SecretsManagerClient.validate_resource_policy
rboto-secrets-manager==0.4.0 · Service index · Types
Model summary (excerpt): Validates that a resource policy does not grant a wide range of principals access to your secret. A resource-based policy is optional for secrets. The API performs three checks when validating the policy: Sends a call to Zelkova , an automated reasoning engine, to ensure your resource policy does not allow broad access to your secret, for example policies that use a wildcard for the principal....
Install and imports
from rboto import SecretsManagerClient
from rboto_secrets_manager.types import (
ValidateResourcePolicyOutput,
)
Signature
async def validate_resource_policy(
*,
resource_policy: str,
secret_id: str | None = None,
) -> ValidateResourcePolicyOutput: ...
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) |
|---|---|---|
resource_policy |
Yes | A JSON-formatted string that contains an Amazon Web Services resource-based policy. The policy in the string identifies who can access or manage this secret and its versions. For example policies, see Permissions policy examples . |
secret_id |
No | The ARN or name of the secret with the resource-based policy you want to validate. |
Output
ValidateResourcePolicyOutput.
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 |
|---|---|---|---|
policy_validation_passed |
bool |
Always present | — |
validation_errors |
list[ValidationErrorsEntryOutput] | None |
Always present | ValidationErrorsEntryOutput |
| 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.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_secrets_manager.exceptions:
InternalServiceError, InvalidParameterError, InvalidRequestError, MalformedPolicyDocumentError, ResourceNotFoundError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.