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

***********************************
delete_bucket_metrics_configuration
***********************************



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

  

  .. note::

    

    This operation is not supported for directory buckets.

    

   

  Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) from the bucket. Note that this doesn't include the daily storage metrics.

   

  To use this operation, you must have permissions to perform the ``s3:PutMetricsConfiguration`` action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see `Permissions Related to Bucket Subresource Operations <https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources>`__ and `Managing Access Permissions to Your Amazon S3 Resources <https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html>`__.

   

  For information about CloudWatch request metrics for Amazon S3, see `Monitoring Metrics with Amazon CloudWatch <https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html>`__.

   

  The following operations are related to ``DeleteBucketMetricsConfiguration``:

   

  
  * `GetBucketMetricsConfiguration <https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html>`__
   
  * `PutBucketMetricsConfiguration <https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html>`__
   
  * `ListBucketMetricsConfigurations <https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html>`__
   
  * `Monitoring Metrics with Amazon CloudWatch <https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.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/DeleteBucketMetricsConfiguration>`_  


  **Request Syntax**
  ::

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

    The name of the bucket containing the metrics configuration to delete.

    

  
  :type Id: string
  :param Id: **[REQUIRED]** 

    The ID used to identify the metrics configuration. The ID has a 64 character limit and can only contain letters, numbers, periods, dashes, and underscores.

    

  
  :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