:doc:`CloudFront <../../cloudfront>` / Client / delete_distribution

*******************
delete_distribution
*******************



.. py:method:: CloudFront.Client.delete_distribution(**kwargs)

  

  Delete a distribution.

   

  .. warning::

     

    Before you can delete a distribution, you must disable it, which requires permission to update the distribution. Once deleted, a distribution cannot be recovered.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteDistribution>`_  


  **Request Syntax**
  ::

    response = client.delete_distribution(
        Id='string',
        IfMatch='string'
    )
    
  :type Id: string
  :param Id: **[REQUIRED]** 

    The distribution ID.

    

  
  :type IfMatch: string
  :param IfMatch: 

    The value of the ``ETag`` header that you received when you disabled the distribution. For example: ``E2QWRUHAPOMQZL``.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`CloudFront.Client.exceptions.ResourceInUse`

  
  *   :py:class:`CloudFront.Client.exceptions.NoSuchDistribution`

  
  *   :py:class:`CloudFront.Client.exceptions.PreconditionFailed`

  
  *   :py:class:`CloudFront.Client.exceptions.AccessDenied`

  
  *   :py:class:`CloudFront.Client.exceptions.DistributionNotDisabled`

  
  *   :py:class:`CloudFront.Client.exceptions.InvalidIfMatchVersion`

  