Authorization
and anonymous calls are not supported. By default, the bucket creator is the bucket owner.private
(private read/write) will be used by default.PUT / HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Length: 0Authorization: Auth String
PUT / HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Type: application/xmlContent-Length: Content LengthContent-MD5: MD5Authorization: Auth String[Request Body]
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).Header | Description | Type | Required |
x-cos-tagging | Adds up to 50 tags to a bucket during bucket creation, such as key1=value1&key2=value2 . | string | No |
Header | Description | Type | Required |
x-cos-acl | Defines the access control list (ACL) attribute of the bucket. For the enumerated values such as private (default) and public-read , please see the Preset ACL section in ACL Overview. | Enum | No |
x-cos-grant-read | Grants a user permission to read the bucket in the format of id="[OwnerUin]" (e.g., id="100000000001" ). You can use a comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-write | Grants a user permission to write to the bucket in the format of id="[OwnerUin]" (e.g., id="100000000001" ). You can use a comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-read-acp | Grants a user permission to read the ACL and policies of the bucket in the format of id="[OwnerUin]" (e.g., id="100000000001" ). You can use a comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-write-acp | Grants a user permission to write to the ACL and policies of a bucket in the format of id="[OwnerUin]" (e.g., id="100000000001" ). You can use a comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-full-control | Grants a user full permission to operate on the bucket in the format of id="[OwnerUin]" (e.g., id="100000000001" ). You can use a comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
<CreateBucketConfiguration><BucketAZConfig>string</BucketAZConfig></CreateBucketConfiguration>
Node Name (Keyword) | Parent Node | Description | Type | Required |
CreateBucketConfiguration | None | All configurations of the PUT Bucket request | Container | No |
CreateBucketConfiguration
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
BucketAZConfig | CreateBucketConfiguration | AZ configuration of the bucket. To create an MAZ bucket, specify MAZ . | string | Yes |
PUT / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Sun, 26 May 2019 14:51:38 GMTContent-Length: 0Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1558882298;1558889498&q-key-time=1558882298;1558889498&q-header-list=content-length;date;host&q-url-param-list=&q-signature=c25fd640274a6da2318935ceebfbcfba4598****Connection: close
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Sun, 26 May 2019 14:51:37 GMTServer: tencent-cosx-cos-request-id: NWNlYWE3ZjlfZDQyNzVkNjRfMzg1N18yNzFh****
public-read
and granting a user permissions to write to the bucket and read the bucket ACL and policiesPUT / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 14 Jun 2019 13:48:59 GMTx-cos-acl: public-readx-cos-grant-write: id="100000000002"x-cos-grant-read-acp: id="100000000002"Content-Length: 0Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1560520139;1560527339&q-key-time=1560520139;1560527339&q-header-list=content-length;date;host;x-cos-acl;x-cos-grant-read-acp;x-cos-grant-write&q-url-param-list=&q-signature=df03e7917270e0bf2b679bc6f99793bd0c63****Connection: close
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 14 Jun 2019 13:49:00 GMTServer: tencent-cosx-cos-request-id: NWQwM2E1Y2NfZjBhODBiMDlfOTM1YV83NDRi****
PUT / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 04 Jun 2020 06:06:09 GMTContent-Type: application/xmlContent-Length: 96Content-MD5: R1ES/YbddhKJK/wcN+f4yg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1591250769;1591257969&q-key-time=1591250769;1591257969&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=&q-signature=28db662452fcdf8f004fc578f1c3fccbfedd****Connection: close<CreateBucketConfiguration><BucketAZConfig>MAZ</BucketAZConfig></CreateBucketConfiguration>
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Thu, 04 Jun 2020 06:06:10 GMTServer: tencent-cosx-cos-request-id: NWVkODhmNTFfM2JiODJhMDlfMjg4NmFfMzA5ZmE2****
examplebucket-1250000000
in Beijing region and add two tags <a,a>
and <b,b>
to the bucket.PUT / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comx-cos-tagging: a=a&b=bAuthorization: q-sign-algorithm=sha1&q-ak=AKIDYv3vWrwkHXVDf******&q-sign-time=1667446950;1668447000&q-key-time=1667446950;1668447000&q-url-param-list=&q-header-list=host;x-cos-tagging&q-signature=6d0ef3446f29aca9f28f66a031******
HTTP/1.1 200 OKContent-Length: 0Connection: keep-aliveDate: Thu, 03 Nov 2022 03:43:30 GMTServer: tencent-cosx-cos-request-id: NjM2MzM4ZTJfZDRiNTE0M********
Was this page helpful?