DetachPolicyFromGroup

Last Updated: Nov 10, 2017

Interface description

Detaches a specified authorization policy from a group.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Required. The parameter value is “DetachPolicyFromGroup”.

PolicyType

  • Type: String
  • Required: Yes
  • Description: Authorization policy type. Value: “System” or “Custom”.

PolicyName

  • Type: String
  • Required: Yes
  • Description: Authorization policy name.

GroupName

  • Type: String
  • Required: Yes
  • Description: Group name.Example: dev.

Return parameters

Only public parameters are returned. For details, see Public return parameters.

Required permissions

Action

ram:DetachPolicyFromGroup

Resource

acs:ram:*:${AccountId}:group/${GroupName}

acs:ram:*:${AccountId} or system:policy/${PolicyName}

Error messages

InvalidParameter.PolicyType
  • HTTP Status: 400
  • Error Message: The parameter - “PolicyType” is incorrect.
InvalidParameter.GroupName.InvalidChars
  • HTTP Status: 400
  • Error Message: The parameter - “GroupName” contains invalid chars.
InvalidParameter.GroupName.Length
  • HTTP Status: 400
  • Error Message: The parameter - “GroupName” beyond the length limit.
InvalidParameter.PolicyName.InvalidChars
  • HTTP Status: 400
  • Error Message: The parameter - “PolicyNam” contains invalid chars.
InvalidParameter.PolicyName.Length
  • HTTP Status: 400
  • Error Message: The parameter - “PolicyName” beyond the length limit.
EntityNotExist.Group
  • HTTP Status: 404
  • Error Message: The group does not exist.
EntityNotExist.Policy
  • HTTP Status: 404
  • Error Message: The policy does not exist.
EntityNotExist.Group.Policy
  • HTTP Status: 404
  • Error Message: The indicate policy attached to the group does not exist.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=DetachPolicyFromGroup
  2. &PolicyType=Custom
  3. &PolicyName=OSS-Administrator
  4. &GroupName=dev
  5. &<Public request parameters>

Return example

XML format

  1. <DetachPolicyFromGroupResponse>
  2. <RequestId>697852FB-50D7-44D9-9774-530C31EAC572</RequestId>
  3. </DetachPolicyFromGroupResponse>

JSON format

  1. {
  2. "RequestId": "697852FB-50D7-44D9-9774-530C31EAC572"
  3. }
Thank you! We've received your feedback.