PUT /?policy HTTP/1.1Host:<BucketName-APPID>.cos.<Region>.myqcloud.comDate: dateContent-Type:application/jsonContent-MD5:MD5Authorization: Auth String
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
, <BucketName-APPID> is the bucket name followed by the APPID, such as examplebucket-1250000000
(see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).examplebucket-1250000000
bucket. For more information about the elements used in access policy settings, please see Access Policy Language Overview. For the policy-granting example, please see Working with COS API Access Policies.{"Statement": [{"Principal": {"qcs": ["qcs::cam::uin/100000000001:uin/100000000011"]},"Effect": "allow","Action": ["name/cos:GetBucket"],"Resource": ["qcs::cos:ap-guangzhou:uid/1250000000:examplebucket-1250000000/*"]}],"version": "2.0"}
PUT /?policy HTTP/1.1Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.comAuthorization:q-sign-algorithm=sha1&q-ak=AKIDWtTCBYjM5OwLB9CAwA1Qb2ThTSUj****&q-sign-time=1484813288;32557709288&q-key-time=1484813288;32557709288&q-header-list=host&q-url-param-list=policy&q-signature=05f7fc936369f910a94a0c815e1f1752f034****Content-Type: application/jsonContent-Length: 233{"Statement": [{"Principal": {"qcs": ["qcs::cam::uin/100000000001:uin/100000000001"]},"Effect": "allow","Action": ["name/cos:GetBucket"],"Resource": ["qcs::cos:ap-guangzhou:uid/1250000000:examplebucket-1250000000/*"]}],"version": "2.0"}
HTTP/1.1 204 No ContentContent-Type: application/xmlContent-Length: 0Connection: keep-aliveDate: Thu Jan 19 16:19:22 2017Server: tencent-cosx-cos-request-id: NTg4MDc2OGFfNDUyMDRlXzc3NTlf****
문제 해결에 도움이 되었나요?