:doc:`S3 <../../s3>` / Client / delete_bucket_tagging

*********************
delete_bucket_tagging
*********************



.. py:method:: S3.Client.delete_bucket_tagging(**kwargs)

  

  .. note::

    

    This operation is not supported for directory buckets.

    

   

  Deletes tags from the general purpose bucket if attribute based access control (ABAC) is not enabled for the bucket. When you `enable ABAC for a general purpose bucket <https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging-enable-abac.html>`__, you can no longer use this operation for that bucket and must use `UntagResource <https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_UntagResource.html>`__ instead.

   

  if ABAC is not enabled for the bucket. When you `enable ABAC for a general purpose bucket <https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging-enable-abac.html>`__, you can no longer use this operation for that bucket and must use `UntagResource <https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_UntagResource.html>`__ instead.

   

  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``:

   

  
  * `GetBucketTagging <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html>`__
   
  * `PutBucketTagging <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html>`__
  

   

  .. 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 <https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging>`_  


  **Request Syntax**
  ::

    response = client.delete_bucket_tagging(
        Bucket='string',
        ExpectedBucketOwner='string'
    )
    
  :type Bucket: string
  :param Bucket: **[REQUIRED]** 

    The bucket that has the tag set to be removed.

    

  
  :type ExpectedBucketOwner: string
  :param ExpectedBucketOwner: 

    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': {
            '...': '...',
        },
    }

  