0030-00000005

Updated at:

Issue description

The policy is invalid.

Causes

The policy that is uploaded by calling the PutBucket operation does not conform to the policy syntax.

Invalid examples

For example, you initiate a request by running the following command:

PUT /?policy
Content-Length: 230
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 21 Feb 2019 12:51:09 GMT
Authorization: OSS qn6q**************:77Dv****************
{
   "Version":1,
   "Statement":[
   {
     "Action":[
       "oss:*"
    ],
    "Effect":"Deny",
    "Principal":["123456****"],
    "Resource":["acs:oss:*:123456****:*/*"]
   }
  ]
 }

In the preceding example, the Version value is 1, which indicates an int type instead of the String type. Therefore, an error is reported because it does not conform to the policy syntax.

Solutions

Check the policy syntax. For more information, see Policy structure and syntax.

References

Overview