Skip to content

SecretsManagerClient.list_resource_policies

rboto-secrets-manager==0.4.0 · Service index · Types

Model summary (excerpt): 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...

Install and imports

python -m pip install "rboto[secrets-manager]==0.4.0"
from rboto import SecretsManagerClient
from rboto_secrets_manager.types import (
    ListResourcePoliciesOutput,
)

Signature

async def list_resource_policies(
    *,
    secret_id: str,
    max_results: int | None = None,
    next_token: str | None = None,
) -> ListResourcePoliciesOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
secret_id Yes The ARN or name of the secret. For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN .
max_results No The number of results to include in the response. If you don't specify this value, the service returns up to 100 results. If there are more results available, in the response, Secrets Manager includes NextToken . To get the next results, call ListResourcePolicies again with the value from NextToken .
next_token No A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call ListResourcePolicies again with this value.

Output

ListResourcePoliciesOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
resource_policies list[ResourcePolicySummaryOutput] Always present ResourcePolicySummaryOutput
next_token str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ListResourcePoliciesOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.list_resource_policies(...) accepts the same arguments and returns AsyncIterator[ListResourcePoliciesOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: next_token. Page-size argument: max_results.

No output stream.

Errors

Import from rboto_secrets_manager.exceptions:

InternalServiceError, InvalidNextTokenError, InvalidParameterError, InvalidRequestError, ResourceNotFoundError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model