Removes a policy from a RAM user.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DetachPolicyFromUser

The name of this action.

Value: DetachPolicyFromUser

PolicyName String Yes OSS-Administrator The policy name.
PolicyType String Yes Custom

The policy type.

Valid values: System | Custom

UserName String Yes Alice The username of the RAM user from which the policy is removed.

Response parameters

Parameter Type Example value Description
RequestId String 697852FB-50D7-44D9-9774-530C31EAC572 The request ID.

Example

Request example

https://ram.aliyuncs.com/?Action=DetachPolicyFromUser
&PolicyType=Custom
&PolicyName=OSS-Administrator
&UserName=Alice
&<Common parameters>

Response example

XML format

<DetachPolicyFromUserResponse>
  <RequestId>697852FB-50D7-44D9-9774-530C31EAC572</RequestId>
</DetachPolicyFromUserResponse>

JSON format

{
    "RequestId":"697852FB-50D7-44D9-9774-530C31EAC572"
}

Errors

For a list of error codes, visit the API Error Center.