Obtains information about the version of a policy.


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

Request parameters

Parameter Type Required? Example value Description
Action String Yes GetPolicyVersion

The name of this action.

Value: GetPolicyVersion

PolicyName String Yes OSS-Administrator The policy name.
PolicyType String Yes Custom

The policy type.

Valid values: System | Custom

VersionId String Yes v3 The ID of the policy version.

Response parameters

Parameter Type Example value Description
PolicyVersion N/A N/A The information about the policy version.
CreateDate String 2015-01-23T12:33:18Z The date and time when the policy version was created.
IsDefaultVersion Boolean false Indicates whether the version is the default version of the policy.
PolicyDocument String { "Statement": [{ "Action": ["oss:*"], "Effect": "Allow", "Resource": ["acs:oss:*:*:*"]}], "Version": "1"} The policy content.
VersionId String v3 The ID of the policy version.
RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE The request ID.


Request example

&<Common parameters>

Response example

XML format

            { "Statement": [{ "Action": ["oss:*"], "Effect": "Allow", "Resource": ["acs:oss:*:*:*"]}], "Version": "1"}

JSON format

        "PolicyDocument":"{ \"Statement\": [{ \"Action\": [\"oss:*\"], \"Effect\": \"Allow\", \"Resource\": [\"acs:oss:*:*:*\"]}], \"Version\": \"1\"}",


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