Sets the default version of a policy.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes SetDefaultPolicyVersion

The name of this action.

Value: SetDefaultPolicyVersion

PolicyName String Yes OSS-Administrator The policy name.
VersionId String Yes v2 The ID of the default policy version.

Response parameters

Parameter Type Example value Description
RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE The request ID.

Example

Request example

https://ram.aliyuncs.com/?Action=SetDefaultPolicyVersion
&PolicyName=OSS-Administrator
&VersionId=v2
&<Common parameters>

Response example

XML format

<SetDefaultPolicyVersionResponse>
  <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
</SetDefaultPolicyVersionResponse>

JSON format

{
    "RequestId":"9B34724D-54B0-4A51-B34D-4512372FE1BE"
}

Errors

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