import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ListKeyPoliciesRequest, ListKeyPoliciesResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link ListKeyPoliciesCommand}. */ export interface ListKeyPoliciesCommandInput extends ListKeyPoliciesRequest { } /** * @public * * The output of {@link ListKeyPoliciesCommand}. */ export interface ListKeyPoliciesCommandOutput extends ListKeyPoliciesResponse, __MetadataBearer { } declare const ListKeyPoliciesCommand_base: { new (input: ListKeyPoliciesCommandInput): import("@smithy/core/client").CommandImpl; new (input: ListKeyPoliciesCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Gets the names of the key policies that are attached to a KMS key. This operation is * designed to get policy names that you can use in a GetKeyPolicy operation. * However, the only valid policy name is default.

*

* Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

*

* Required permissions: kms:ListKeyPolicies (key policy)

*

* Related operations: *

* *

* Eventual consistency: The KMS API follows an eventual consistency model. * For more information, see KMS eventual consistency.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { KMSClient, ListKeyPoliciesCommand } from "@aws-sdk/client-kms"; // ES Modules import * // const { KMSClient, ListKeyPoliciesCommand } = require("@aws-sdk/client-kms"); // CommonJS import * // import type { KMSClientConfig } from "@aws-sdk/client-kms"; * const config = {}; // type is KMSClientConfig * const client = new KMSClient(config); * const input = { // ListKeyPoliciesRequest * KeyId: "STRING_VALUE", // required * Limit: Number("int"), * Marker: "STRING_VALUE", * }; * const command = new ListKeyPoliciesCommand(input); * const response = await client.send(command); * // { // ListKeyPoliciesResponse * // PolicyNames: [ // PolicyNameList * // "STRING_VALUE", * // ], * // NextMarker: "STRING_VALUE", * // Truncated: true || false, * // }; * * ``` * * @param ListKeyPoliciesCommandInput - {@link ListKeyPoliciesCommandInput} * @returns {@link ListKeyPoliciesCommandOutput} * @see {@link ListKeyPoliciesCommandInput} for command's `input` shape. * @see {@link ListKeyPoliciesCommandOutput} for command's `response` shape. * @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape. * * @throws {@link DependencyTimeoutException} (server fault) *

The system timed out while trying to fulfill the request. You can retry the * request.

* * @throws {@link InvalidArnException} (client fault) *

The request was rejected because a specified ARN, or an ARN in a key policy, is not * valid.

* * @throws {@link KMSInternalException} (server fault) *

The request was rejected because an internal exception occurred. The request can be * retried.

* * @throws {@link KMSInvalidStateException} (client fault) *

The request was rejected because the state of the specified resource is not valid for this * request.

*

This exceptions means one of the following:

* * * @throws {@link NotFoundException} (client fault) *

The request was rejected because the specified entity or resource could not be * found.

* * @throws {@link KMSServiceException} *

Base exception class for all service exceptions from KMS service.

* * * @example To list key policies for a KMS key * ```javascript * // The following example lists key policies for the specified KMS key. * const input = { * KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab" * }; * const command = new ListKeyPoliciesCommand(input); * const response = await client.send(command); * /* response is * { * PolicyNames: [ * "default" * ], * Truncated: false * } * *\/ * ``` * * @public */ export declare class ListKeyPoliciesCommand extends ListKeyPoliciesCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ListKeyPoliciesRequest; output: ListKeyPoliciesResponse; }; sdk: { input: ListKeyPoliciesCommandInput; output: ListKeyPoliciesCommandOutput; }; }; }