Sets the default version of a policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetDefaultPolicyVersion

The operation that you want to perform. Set the value to SetDefaultPolicyVersion.

PolicyName String Yes OSS-Administrator

The name of the policy.

VersionId String Yes v2

The ID of the policy version that you want to set as the default version.

Response parameters

Parameter Type Example Description
RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE

The ID of the request.

Examples

Sample requests


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

Sample success responses

XML format

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

JSON format

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

Error codes

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