:doc:`SSMContacts <../../ssm-contacts>` / Client / get_contact_policy

******************
get_contact_policy
******************



.. py:method:: SSMContacts.Client.get_contact_policy(**kwargs)

  

  Retrieves the resource policies attached to the specified contact or escalation plan.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-contacts-2021-05-03/GetContactPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_contact_policy(
        ContactArn='string'
    )
    
  :type ContactArn: string
  :param ContactArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the contact or escalation plan.

    

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

    
    ::

      {
          'ContactArn': 'string',
          'Policy': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ContactArn** *(string) --* 

        The ARN of the contact or escalation plan.

        
      

      - **Policy** *(string) --* 

        Details about the resource policy attached to the contact or escalation plan.

        
  
  **Exceptions**
  
  *   :py:class:`SSMContacts.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`SSMContacts.Client.exceptions.InternalServerException`

  
  *   :py:class:`SSMContacts.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`SSMContacts.Client.exceptions.ThrottlingException`

  
  *   :py:class:`SSMContacts.Client.exceptions.ValidationException`

  

  **Examples**

  The following get-contact-policy example lists the resource policies associated with the specified contact.
  ::

    response = client.get_contact_policy(
        ContactArn='arn:aws:ssm-contacts:us-east-1:111122223333:contact/akuam',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ContactArn': 'arn:aws:ssm-contacts:us-east-1:111122223333:contact/akuam',
        'Policy': '{"Version":"2012-10-17","Statement":[{"Sid":"SharePolicyForDocumentationDralia","Effect":"Allow","Principal":{"AWS":"222233334444"},"Action":["ssm-contacts:GetContact","ssm-contacts:StartEngagement","ssm-contacts:DescribeEngagement","ssm-contacts:ListPagesByEngagement","ssm-contacts:StopEngagement"],"Resource":["arn:aws:ssm-contacts:*:111122223333:contact/akuam","arn:aws:ssm-contacts:*:111122223333:engagement/akuam/*"]}]}',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  