DeletePolicy

Last Updated: Aug 25, 2016

Interface description

 Deletes a specified authorization policy.

Request parameters

Action

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

PolicyName

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

Return parameters

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

Required permissions

Action

ram:DeletePolicy

Resource

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

Error messages

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.Policy
  • HTTP Status:404
  • Error Message:The policy does not exist.
DeleteConflict.Policy.User
  • HTTP Status:409
  • Error Message:The policy CAN NOT been attached to any user while deleting the policy.
DeleteConflict.Policy.Group
  • HTTP Status:409
  • Error Message:The policy CAN NOT been attached to any group while deleting the policy.
DeleteConflict.Policy.Version
  • HTTP Status:409
  • Error Message:The policy CAN NOT has any version except the defaul version.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=DeletePolicy
  2. &PolicyName=OSS-Administrator
  3. &<Public request parameters>

Return example

XML format

  1. <DeletePolicyResponse>
  2. <RequestId>898FAB24-7509-43EE-A287-086FE4C44394</RequestId>
  3. </DeletePolicyResponse>

JSON format

  1. {
  2. "RequestId": "898FAB24-7509-43EE-A287-086FE4C44394"
  3. }
Thank you! We've received your feedback.