SetDefaultPolicyVersion

Last Updated: Aug 25, 2016

Interface description

 Sets the default authorization policy version.

Request parameters

Action

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

PolicyName

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

VersionId

  • Type: String
  • Required: Yes
  • Description: ID of the new default version.

Return parameters

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

Required permissions

Action

ram:SetDefaultPolicyVersion

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.

Operation examples

Request example

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

Return example

XML format

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

JSON format

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