Detaches a policy from a RAM user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DetachPolicyFromUser

The operation that you want to perform. Set the value to DetachPolicyFromUser.

PolicyName String Yes OSS-Administrator

The name of the policy.

PolicyType String Yes Custom

The type of the policy. Valid values: System and Custom.

UserName String Yes zhangq****

The name of the RAM user.

Response parameters

Parameter Type Example Description
RequestId String 697852FB-50D7-44D9-9774-530C31EAC572

The ID of the request.

Examples

Sample requests


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

Sample success responses

XML format

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

JSON format

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

Error codes

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