GetPolicy#

Description#

Returns information about the specified IAM policy.

Request Parameters#

  • PolicyArn — The Amazon Resource Name (ARN) of the policy.

    • Type: String

    • Required: Yes

Response Elements#

  • Policy — Full policy details.

Examples#

Request

https://iam.k2.cloud/?Action=GetPolicy
&PolicyArn=arn:c2:iam::c2dev:policy/policy-1

Response

<GetPolicyResponse>
    <GetPolicyResult>
        <Policy>
            <PolicyArn>arn:c2:iam::c2dev:policy/policy-1</PolicyArn>
            <PolicyId>2cec7683-7ecf-470f-b3f1-498a140752da</PolicyId>
            <PolicyName>policy-1</PolicyName>
            <Owner>self</Owner>
            <Type>global</Type>
            <CreateDate>1724418895</CreateDate>
            <UpdateDate>1724419323</UpdateDate>
            <Description>new description</Description>
            <Document>{"Statement": [{"Action": ["iam:ListUsers"]}]}</Document>
        </Policy>
    </GetPolicyResult>
    <requestId>b774fd7b-5cfb-4ccb-9610-6b990cd31a3c</requestId>
    <ResponseMetadata>
        <RequestId>b774fd7b-5cfb-4ccb-9610-6b990cd31a3c</RequestId>
    </ResponseMetadata>
</GetPolicyResponse>
c2-iam GetPolicy PolicyArn arn:c2:iam::c2dev:policy/policy-1