You can call this operation to create a policy.


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 CreatePolicy

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

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

The content of the policy.

It must be 1 to 2,048 bytes in length.

PolicyName String Yes OSS-Administrator

The name of the policy.

The name must be 1 to 128 characters in length, and can contain letters, digits, and hyphens (-).

Description String No OSS administrator

The description of the policy.

The description must be 1 to 1,024 characters in length.

Response parameters

Parameter Type Example Description
Policy N/A N/A

The information about the policy.

CreateDate String 2015-01-23T12:33:18Z

The time when the policy was created.

DefaultVersion String v1

The default version.

Description String OSS administrator

The description of the policy.

PolicyName String OSS-Administrator

The name of the policy.

PolicyType String Custom

The type of the policy.

RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE

The ID of the request.


Sample requests
& Description=OSS administrator
&<Common request parameters>

Sample success responses

XML format

    <Description>OSS administrator</Description>

JSON format

		"Description":"OSS administrator",

Error codes