You can call this operation to delete tags configured for a bucket.

Note If no tag is configured for the bucket or the tag to delete does not exist, 204 is returned.

Request syntax

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

Examples

  • Sample request that deletes all tags configured 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****
    Sample response
    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
  • Sample request that deletes specified tags configured for a bucket

    Delete 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****
    Sample response
    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

SDKs

Error codes

Error code HTTP status code Description
NoSuchBucket 404 No Content The error message returned because the specified bucket does not exist.
AccessDenied 403 Forbidden The error message returned because you do not have the permission to delete the tags configured for the bucket. Only the bucket owner can delete the tags configured for a bucket.