DeletePolicyVersion

Last Updated: Aug 25, 2016

Interface description

 Deletes a specified authorization policy version.

Request parameters

Action

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

PolicyName

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

VersionId

  • Type: String
  • Required: Yes
  • Description: Target version ID.

Return parameters

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

Required permissions

Action

ram:DeletePolicyVersion

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.
InvalidParameter.VersionId.Format
  • HTTP Status:400
  • Error Message:The format of the parameter - “VersionId” is incorrect.
EntityNotExist.Policy
  • HTTP Status:404
  • Error Message:The policy does not exist.
EntityNotExist.Policy.Version
  • HTTP Status:404
  • Error Message:The policy version does not exist.
DeleteConflict.Policy.Version.Default
  • HTTP Status:409
  • Error Message:The default policy version CAN NOT been deleted directly.

Operation examples

Request example

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

Return example

XML format

  1. <DeletePolicyVersionResponse>
  2. <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
  3. </DeletePolicyVersionResponse>

JSON format

  1. {
  2. "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE"
  3. }
Thank you! We've received your feedback.