Deletes the tags added for a bucket.

Request syntax

DELETE /?tagging HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Detail analysis

  • If the target bucket does not exist, the 404 No Content error is returned with the error code: NoSuchBucket.
  • Only the bucket owner can delete the tags added for a bucket. If you try to delete the tags for a bucket owned by another user, the 403 Forbidden error is returned with the error code: AccessDenied.
  • If no tags are added for the bucket or the key of the specified tag does not exist, the HTTP status code 204 is returned.

Examples

  • Request example 1 (Delete all tags for a bucket):
    DELETE /?tagging HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Tue, 25 Dec 2018 17:35:24 GMT
    Authorization: OSS qn6qrrqxo2oawuk53otf****:6ZVHOehYzxoC1yxRydPQs/Cn****
    Response example:
    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
  • Request example 2 (Delete specified tags for a bucket, for example, tags of which the keys are k1 and 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 qn6qrrqxo2oawuk53otf****:6ZVHOehYzxoC1yxRydPQs/Cn****
    Response example:
    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