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

*******************
get_resource_policy
*******************



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

  

  Retrieves the resource policy for the specified CloudFront resource that you own and have shared.

  

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


  **Request Syntax**
  ::

    response = client.get_resource_policy(
        ResourceArn='string'
    )
    
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the CloudFront resource that is associated with the resource policy.

    

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

    
    ::

      {
          'ResourceArn': 'string',
          'PolicyDocument': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ResourceArn** *(string) --* 

        The Amazon Resource Name (ARN) of the CloudFront resource that is associated with the resource policy.

        
      

      - **PolicyDocument** *(string) --* 

        The resource policy in JSON format.

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

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

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

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

  