import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ListResourcePoliciesRequest, ListResourcePoliciesResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link ListResourcePoliciesCommand}. */ export interface ListResourcePoliciesCommandInput extends ListResourcePoliciesRequest { } /** * @public * * The output of {@link ListResourcePoliciesCommand}. */ export interface ListResourcePoliciesCommandOutput extends ListResourcePoliciesResponse, __MetadataBearer { } declare const ListResourcePoliciesCommand_base: { new (input: ListResourcePoliciesCommandInput): import("@smithy/core/client").CommandImpl; new (input: ListResourcePoliciesCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Lists the resource-based policies attached to a secret. The response contains only the * names of the policies, not their contents. Secrets Manager lists default first, * followed by any other policies in alphabetical order. To get the contents of a policy, * use GetResourcePolicy. You can modify only the default * policy.

*

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

*

* Required permissions: * * secretsmanager:ListResourcePolicies. For more information, see * IAM policy actions for Secrets Manager and Authentication * and access control in Secrets Manager.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SecretsManagerClient, ListResourcePoliciesCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import * // const { SecretsManagerClient, ListResourcePoliciesCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager"; * const config = {}; // type is SecretsManagerClientConfig * const client = new SecretsManagerClient(config); * const input = { // ListResourcePoliciesRequest * SecretId: "STRING_VALUE", // required * MaxResults: Number("int"), * NextToken: "STRING_VALUE", * }; * const command = new ListResourcePoliciesCommand(input); * const response = await client.send(command); * // { // ListResourcePoliciesResponse * // ResourcePolicies: [ // ResourcePolicySummaryListType // required * // { // ResourcePolicySummary * // PolicyName: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", * // }; * * ``` * * @param ListResourcePoliciesCommandInput - {@link ListResourcePoliciesCommandInput} * @returns {@link ListResourcePoliciesCommandOutput} * @see {@link ListResourcePoliciesCommandInput} for command's `input` shape. * @see {@link ListResourcePoliciesCommandOutput} for command's `response` shape. * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape. * * @throws {@link InternalServiceError} (server fault) *

An error occurred on the server side.

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

The NextToken value is invalid.

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

The parameter name or value is invalid.

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

A parameter value is not valid for the current state of the * resource.

*

Possible causes:

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

Secrets Manager can't find the resource that you asked for.

* * @throws {@link SecretsManagerServiceException} *

Base exception class for all service exceptions from SecretsManager service.

* * * @example To list the resource-based policies attached to a secret * ```javascript * // The following example shows how to list the resource-based policies attached to a secret. * const input = { * SecretId: "MyTestDatabaseSecret" * }; * const command = new ListResourcePoliciesCommand(input); * const response = await client.send(command); * /* response is * { * ResourcePolicies: [ * { * PolicyName: "default" * } * ] * } * *\/ * ``` * * @public */ export declare class ListResourcePoliciesCommand extends ListResourcePoliciesCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ListResourcePoliciesRequest; output: ListResourcePoliciesResponse; }; sdk: { input: ListResourcePoliciesCommandInput; output: ListResourcePoliciesCommandOutput; }; }; }