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 Tags to the bucket while creating it. You can set up to 50 Tags. For example, key1=value1&key2=value2. | string | No |
Header | Description | Type | Required |
x-cos-acl | Defines the Access Control List (ACL) property of the bucket. For enumerated values, see the preset ACL section for buckets in the ACL Overview document, such as private and public-read. The default value is private. | Enum | No |
x-cos-grant-read | Grants the grantee the permission to read the bucket. The format is id="[OwnerUin]", for example, id="100000000001". You can use commas (,) to separate multiple grantees, for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-write | Grants the grantee the permission to write to the bucket. The format is id="[OwnerUin]", for example, id="100000000001". You can use commas (,) to separate multiple grantees, for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-read-acp | Grants the grantee the permission to read the bucket's Access Control List (ACL) and bucket Policy. The format is id="[OwnerUin]", for example, id="100000000001". You can use commas (,) to separate multiple grantees, for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-write-acp | Grants the grantee the permission to write to the bucket's Access Control List (ACL) and bucket Policy. The format is id="[OwnerUin]", for example, id="100000000001". You can use commas (,) to separate multiple grantees, for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-full-control | Grants the grantee all permissions to operate the bucket. The format is id="[OwnerUin]", for example, id="100000000001". You can use commas (,) to separate multiple grantees, for example, id="100000000001",id="100000000002". | string | No |
<CreateBucketConfiguration><BucketAZConfig>string</BucketAZConfig></CreateBucketConfiguration>
Node Name (Keyword) | Parent Node | Description | Type | Required |
CreateBucketConfiguration | None | Contains all request information for the PUT Bucket operation. | Container | No |
CreateBucketConfiguration has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
BucketAZConfig | CreateBucketConfiguration | Bucket AZ configuration. Specify as MAZ to create a multi-AZ bucket. | 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=************************************&q-sign-time=1558882298;1558889498&q-key-time=1558882298;1558889498&q-header-list=content-length;date;host&q-url-param-list=&q-signature=****************************************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=************************************&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=****************************************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=************************************&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=****************************************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=************************************&q-sign-time=1667446950;1668447000&q-key-time=1667446950;1668447000&q-url-param-list=&q-header-list=host;x-cos-tagging&q-signature=****************************************
HTTP/1.1 200 OKContent-Length: 0Connection: keep-aliveDate: Thu, 03 Nov 2022 03:43:30 GMTServer: tencent-cosx-cos-request-id: NjM2MzM4ZTJfZDRiNTE0M********
フィードバック