DeleteBucket

Prev Next

Available in Classic and VPC

Delete buckets with no data. No request query parameter or request body is used in the operation.

Note

10 minutes after a user deletes a bucket, the name of that bucket is deleted from the system.

Requests

The following describes the request format for the endpoint. The request format is as follows.

Method URI
DELETE {bucket-name}

Request syntax

DELETE https://{endpoint}/{bucket-name} # path style
DELETE https://{bucket-name}.{endpoint} # virtual host style

Request headers

For headers common to all Object Storage APIs, see Object Storage common headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
bucket-name String Required Name of the bucket to delete

Request example

The following is a sample request.

DELETE /{bucket-name} HTTP/1.1
Host: kr.object.ncloudstorage.com
X-Amz-Date: {Timestamp}
Authorization: {authorization-string}

Responses

The following describes the response format.

Note

If the bucket you're trying to delete is not an empty bucket, the server responds with 409 Conflict.

Response headers

For response headers common to all Object Storage APIs, see Object Storage common response headers.

Response status codes

For response status codes common to all Object Storage APIs, see Object Storage response status codes.

Response example

The following is a sample response.

Normal

The following is a sample of a normal response.

HTTP/1.1 200 OK
Date: Thu, 04 Apr 2024 04:51:44 GMT
x-amz-request-id: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Accept-Ranges: bytes

Error

The following is a sample of a 409 Conflict error.

HTTP/1.1 409 Conflict
Date: Thu, 04 Apr 2024 04:51:44 GMT
x-amz-request-id: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Content-Type: application/xml
Content-Length: 285
<Error>
  <Code>BucketNotEmpty</Code>
  <Message>The bucket you tried to delete is not empty.</Message>
  <Resource>/apiary/</Resource>
  <RequestId>9d2bbc00-2827-4210-b40a-8107863f4386</RequestId>
  <httpStatusCode>409</httpStatusCode>
</Error>