Applicable Scenario
You can delete a bucket using the console, APIs, tools, or SDKs.
Note:
Only empty buckets can be deleted. If there are still objects or incomplete multipart uploads in a bucket, its deletion will fail. Make sure that there are no objects in the bucket before deleting it.
Before deleting a bucket, make sure that the current identity has been granted the permission to delete it and that the correct Bucket and Region parameters are passed in.
Usage Instructions
Using the REST API
Use the REST API to initiate a bucket deleting request. For more information, see Delete Bucket in the API documentation.
Using Java SDKs
COS supports AWS Java SDK. See Using AWS S3 SDK to Access COS to access COS, and operate according to the Delete Bucket section in the official documentation of AWS Java SDK 2.20.0.