Deleting Buckets
Functions
This operation deletes specified buckets. This operation can be performed only by the bucket owner and users who have been authorized (via a policy) with the permission to delete the bucket. The bucket to be deleted must be an empty bucket. If a bucket has an object or a multipart task, the bucket is not empty. You can list objects and multipart upload tasks in a bucket to check whether the bucket is empty.
Note:
If the server returns a 5XX error or times out when a bucket is being deleted, the system needs to synchronize the bucket information. During this period, the bucket information may be inaccurate. Therefore, wait a while and then check whether the bucket is successfully deleted. If the bucket can still be queried, send the deletion request again.
Request Syntax
DELETE / HTTP/1.1Host: bucketname.obs.region.example.comDate: dateAuthorization: authorization
Request Parameters
This request contains no parameters.
Request Headers
This request uses common request headers. For details, see Table 3.
Request Elements
This request involves no elements.
Response Syntax
HTTP/1.1 status_codeDate: date
Response Headers
The response to the request uses common headers. For details, see Table 1.
Response Elements
This response contains no elements.
Error Responses
No special error responses are returned. For details about error responses, see Table 2.
Sample Request
DELETE / HTTP/1.1User-Agent: curl/7.29.0Host: examplebucket.obs.region.example.comAccept: */*Date: WED, 01 Jul 2015 02:31:25 GMTAuthorization: OBS H4IPJX0TQTHTHEBQQCEC:jZiAT8Vx4azWEvPRMWi0X5BpJMA=
Sample Response
HTTP/1.1 204 No ContentServer: OBSx-obs-request-id: BF260000016435DE6D67C35F9B969C47x-obs-id-2: 32AAAQAAEAABKAAQAAEAABAAAQAAEAABCTukraCnXLsb7lEw4ZKjzDWWhzXdgme3Date: WED, 01 Jul 2015 02:31:25 GMT
- Functions
- Request Syntax
- Request Parameters
- Request Headers
- Request Elements
- Response Syntax
- Response Headers
- Response Elements
- Error Responses
- Sample Request
- Sample Response