DetachUserPolicy#

Description#

Detaches the policy from the IAM user.

Request Parameters#

Required parameters#

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

    • Type: String

    • Required: Yes

  • UserName — The name of the user.

    • Type: String

    • Required: Yes

Optional parameters#

  • ProjectName — The name of the project, which is specified when a project policy is detached.

    • Type: String

    • Required: No

Examples#

Request

https://iam.k2.cloud/?Action=DetachUserPolicy
&UserName=user-1
&ProjectName=project-1
&PolicyArn=arn:c2:iam:::policy/EC2FullAccess

Response

<DetachUserPolicyResponse>
    <requestId>70e986ec-ef18-4028-a564-c5a4b962f6be</requestId>
    <ResponseMetadata>
        <RequestId>70e986ec-ef18-4028-a564-c5a4b962f6be</RequestId>
    </ResponseMetadata>
</DetachUserPolicyResponse>
c2-iam DetachUserPolicy UserName user-1 ProjectName project-1 PolicyArn arn:c2:iam:::policy/EC2FullAccess

c2-iam DetachUserPolicy UserName user-1 PolicyArn arn:c2:iam:::policy/IAMFullAccess