DeleteAgenticBucket
You can call the DeleteAgenticBucket operation to delete a specified Agentic Bucket. Deletion follows a two-phase process: you must first set the status of the Agentic Bucket to Disabled, and then delete the Agentic Bucket after the system confirms that it is ready for deletion.
Usage notes
Before you delete an Agentic Bucket, you must call PutAgenticBucketStatus to set its status to
Disabled.An Agentic Bucket that still contains Bucket Spaces cannot be deleted. Delete all Bucket Spaces under the Agentic Bucket first.
A deleted Agentic Bucket cannot be restored.
Request syntax
DELETE /?agenticBucket HTTP/1.1
Host: {prefix}-{uid}-{region}-ab-apsr.oss-{region}.aliyuncs.com
Date: GMT Date
Authorization: SignatureValueThe two-phase deletion process works as follows:
Call PutAgenticBucketStatus to set the status of the Agentic Bucket to
Disabled.Wait until the system confirms that the Agentic Bucket is ready for deletion.
Call DeleteAgenticBucket to delete the Agentic Bucket. One of the following results may occur:
If the status of the Agentic Bucket is
Enabled,AgenticBucketNotDisabledis returned.If the system has not confirmed that the Agentic Bucket is ready for deletion,
AgenticBucketNotReadyis returned. Try again later.If the Agentic Bucket is ready for deletion but still contains Bucket Spaces,
AgenticBucketNotEmptyis returned.If the Agentic Bucket is ready for deletion and contains no Bucket Spaces, the Agentic Bucket is deleted and HTTP status code 204 is returned.
Request headers
This operation uses only common request headers. For more information, see Common HTTP headers.
Examples
Sample request
DELETE /?agenticBucket HTTP/1.1 Host: my-uid-region-ab-apsr.oss-cn-hangzhou.aliyuncs.com Date: Thu, 17 Apr 2025 15:39:12 GMT Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218eSample response
HTTP/1.1 204 No Content x-oss-request-id: 5C1B138A109F4E405B2D Date: Mon, 26 Jul 2021 13:08:38 GMT Connection: keep-alive Server: AliyunOSS
Error codes
Error code | HTTP status code | Description |
AgenticBucketNotFound | 404 | The Agentic Bucket does not exist. |
AgenticBucketNotDisabled | 409 | The status of the Agentic Bucket is Enabled. You must call PutAgenticBucketStatus to set the status to Disabled first. |
AgenticBucketNotReady | 409 | The system has not confirmed that the Agentic Bucket is ready for deletion. Try again later. |
AgenticBucketNotEmpty | 409 | The Agentic Bucket still contains Bucket Spaces. Delete all Bucket Spaces under the Agentic Bucket first. |