This API is used to create a bucket under a specified account. A signature needs to be carried in
Authorization and anonymous calls are not supported. By default, the bucket creator is the bucket owner.
- If no access permission is specified for a bucket when it is created,
private(private read/write) will be used by default.
PUT / HTTP/1.1 Host: <BucketName-APPID>.cos.<Region>.myqcloud.com Date: GMT Date Content-Length: 0 Authorization: Auth String
PUT / HTTP/1.1 Host: <BucketName-APPID>.cos.<Region>.myqcloud.com Date: GMT Date Content-Type: application/xml Content-Length: Content Length Content-MD5: MD5 Authorization: Auth String [Request Body]
Authorization: Auth String (See Request Signature for details.)
This API has no request parameter.
In addition to common request headers, this API also supports the following request headers. For more information about common request headers, please see Common Request Headers.
|x-cos-acl||Defines the access control list (ACL) attribute of the bucket. For the enumerated values such as
|x-cos-grant-read||Grants a user permission to read the bucket in the format of
|x-cos-grant-write||Grants a user permission to write to the bucket in the format of
|x-cos-grant-read-acp||Grants a user permission to read the ACL and policies of the bucket in the format of
|x-cos-grant-write-acp||Grants a user permission to write to the ACL and policies of a bucket in the format of
|x-cos-grant-full-control||Grants a user full permission to operate on the bucket in the format of
This API returns only common response headers. For more information, please see Common Response Headers.
The response body of this API is empty.
This API returns common error responses and error codes. For more information, please see Error Codes.
public-readand granting a user permissions to write to the bucket and read the bucket ACL and policies
PUT / HTTP/1.1 Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com Date: Fri, 14 Jun 2019 13:48:59 GMT x-cos-acl: public-read x-cos-grant-write: id="100000000002" x-cos-grant-read-acp: id="100000000002" Content-Length: 0 Authorization: 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 OK Content-Length: 0 Connection: close Date: Fri, 14 Jun 2019 13:49:00 GMT Server: tencent-cos x-cos-request-id: NWQwM2E1Y2NfZjBhODBiMDlfOTM1YV83NDRi****