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

******************************
associate_distribution_web_acl
******************************



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

  

  Associates the WAF web ACL with a distribution.

  

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


  **Request Syntax**
  ::

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

    The ID of the distribution.

    

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

    The Amazon Resource Name (ARN) of the WAF web ACL to associate.

    

  
  :type IfMatch: string
  :param IfMatch: 

    The value of the ``ETag`` header that you received when retrieving the distribution that you're associating with the WAF web ACL.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Id': 'string',
          'WebACLArn': 'string',
          'ETag': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Id** *(string) --* 

        The ID of the distribution.

        
      

      - **WebACLArn** *(string) --* 

        The ARN of the WAF web ACL that you associated with the distribution.

        
      

      - **ETag** *(string) --* 

        The current version of the distribution.

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

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

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

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

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

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

  