DeleteBucketTags介面用於刪除儲存空間(Bucket)標籤。
說明
如果目標Bucket沒有任何標籤或指定標籤的Key不存在,則返回HTTP狀態代碼204。
請求文法
DELETE /?tagging HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
要求標頭
此介面僅涉及公用要求標頭,詳情請參見公用要求標頭(Common Request Headers)。
回應標頭
此介面僅涉及公用回應標頭,詳情請參見公用回應標頭(Common Response Headers)。
樣本
樣本1:刪除所有標籤
DELETE /?tagging HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Date: Tue, 25 Dec 2018 17:35:24 GMT Authorization: OSS qn6q**************:77Dv****************
返回樣本
HTTP/1.1 204 No Content x-oss-request-id: 5C22E0EFD127F6810B1A**** Date: Tue, 25 Dec 2018 17:35:24 GMT Connection: keep-alive Content-Length: 0 Server: AliyunOSS x-oss-server-time: 293
樣本2:刪除Key為k1和k2的標籤
DELETE /?tagging=k1,k2 HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Date: Tue, 25 Dec 2018 17:35:24 GMT Authorization: OSS qn6q**************:77Dv****************
返回樣本
HTTP/1.1 204 No Content x-oss-request-id: 5C22E0EFD127F6810B1A92A8 Date: Tue, 25 Dec 2018 17:35:24 GMT Connection: keep-alive Content-Length: 0 Server: AliyunOSS x-oss-server-time: 293
SDK
錯誤碼
錯誤碼 | HTTP狀態代碼 | 描述 |
NoSuchBucket | 404 No Content | 目標Bucket不存在。 |
AccessDenied | 403 Forbidden | 無許可權刪除該Bucket的標籤資訊。只有Bucket的擁有者才能刪除Bucket的標籤資訊。 |