S3 / Client / delete_bucket_tagging

delete_bucket_tagging

S3.Client.delete_bucket_tagging(**kwargs)

Note

This operation is not supported for directory buckets.

Deletes the tags from the bucket.

To use this operation, you must have permission to perform the s3:PutBucketTagging action. By default, the bucket owner has this permission and can grant this permission to others.

The following operations are related to DeleteBucketTagging:

Warning

You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.

See also: AWS API Documentation

Request Syntax

response = client.delete_bucket_tagging(
    Bucket='string',
    ExpectedBucketOwner='string'
)
Parameters:
  • Bucket (string) –

    [REQUIRED]

    The bucket that has the tag set to be removed.

  • ExpectedBucketOwner (string) – The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

Returns:

None

Examples

The following example deletes bucket tags.

response = client.delete_bucket_tagging(
    Bucket='examplebucket',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}