Actions35
- Bucket Actions
- IAM Actions
- Object Actions
IAM → Get Policy Version
AI-generatedSummary
Retrieve a specific version of an IAM policy by specifying its Amazon Resource Name (ARN) and the version ID.
Inputs
- Policy ARN (required) — The Amazon Resource Name (ARN) of the IAM policy to retrieve.
- Version ID (required) — The identifier of the policy version to get, such as v1, v2, or v3.
Output shape
a single JSON object representing the requested IAM policy version's details
The output contains the details of the specified policy version. If the version ID or ARN is invalid, an error may be returned.
Examples
Example 1: Retrieve version v2 of a policy using its ARN
Set Policy ARN to arn:aws:iam::123456789012:policy/MyPolicy and Version ID to v2.