Delete Bucket
Last Updated:2021-09-13
Interface Description
This interface is used to delete a bucket. Before the deletion, you need to ensure that all objects in this bucket and the uncompleted three-step upload parts have been deleted. Otherwise, the deletion fails.
Considerations
- Before you delete a bucket, confirm that the cross-region replication is not enabled for this bucket. This bucket is not the source bucket or destination bucket in the cross-region replication rule. Otherwise, it cannot be deleted.
- Only the bucket owner can delete the corresponding bucket. Otherwise, it returns “Error 403 Forbidden: AccessDenied”.
- To ensure user data security and prevent accidental deletion, BOS does not allow users to delete a non-empty bucket. If the user attempts to delete a bucket with the object, it returns “Error 409 Conflict: BucketNotEmpty”.
Request URI
DELETE /v1/{bucketName}
Parameter Name | Parameter Type | Required | Description | Example Value | Parameter position |
---|---|---|---|---|---|
bucketName | String | Yes | Name of bucket to delete | "bucketName_example" | Path |
Request Body Parameters
Instructions for Data Structure of Request Body Field
Response Body Parameters
Instructions for Data Structure of Response Body Field
Request Example
DELETE /v1/bucketName_example
Common Request Header
{ }
Response Example
HTTP/1.1 200 OK
<Common response header>
{ }
Error Code
Refer to the universal error code.