Feature Overview
This API is used to delete a specified bucket. To call this API, you need to have permission to write to the bucket.
Note
Before deleting a bucket, ensure that all data and unfinished uploaded parts within the bucket have been cleared; otherwise, the bucket cannot be deleted.
Requests
Sample Request
DELETE / HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
Note
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com, where <BucketName-APPID> is the bucket name with the APPID suffix, such as examplebucket-1250000000. You can refer to the Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Convention documentation. <Region> represents the available regions for COS, which can be found in the Regions and Access Domain Names documentation.
Authorization: Auth String (For more information, see Request Signature.)
Request Parameters
This API has no request parameter.
Request Header
Request Body
The request body of this request is empty.
Response
Response Header
Response Body
The response body of this API is empty.
Error Codes
Examples
Requests
DELETE / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Tue, 28 May 2019 03:19:13 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO**&q-sign-time=1559013553;1559020753&q-key-time=1559013553;1559020753&q-header-list=date;host&q-url-param-list=&q-signature=478b1db6182db32c8ed459dfa723a9f500b2**Connection: close
Response
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Tue, 28 May 2019 03:19:14 GMTServer: tencent-cosx-cos-request-id: NWNlY2E4YjFfNjljMDBiMDlfMmNiZTlfZGE0****