Baidu AI Cloud
中国站

百度智能云

Object Storage

DeleteBucket

Interface Description

This interface is used to delete a bucket. Before 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.

Description: Before you delete a bucket, confirm that the cross-region replication is not enabled for this bucket. This bucket is not the source bucket in the cross-region replication rule. Otherwise, it cannot be deleted.

Request

  • Request syntax

    DELETE / HTTP/1.1
    Host: <BucketName>.bj.bcebos.com
    Date: <Date> 
    Authorization: <AuthorizationString>
  • Request header field

    No special header parameters.

  • Request parameters

    No special parameters.

Response

  • Response header field

    No special header parameter.

  • Response element

    None

Considerations

  1. Only the bucket owner can delete the corresponding bucket. Otherwise, it returns “Error 403 Forbidden: AccessDenied”.
  2. 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”.

Example

  • Request example

    DELETE / HTTP/1.1
    Host: BucketName.bj.bcebos.com
    Date: Wed, 06 Apr 2016 06:34:40 GMT
    Authorization: AuthorizationString
  • Response example

    HTTP/1.1 204 No Content
    x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409
    Date: Wed, 06 Apr 2016 06:34:40 GMT
    Connection: close
    Server: BceBos
Previous
Service Related Interfaces
Next
GetBucketLocation