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的標簽信息。 |
文檔內容是否對您有幫助?