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

*********************
list_contact_channels
*********************



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

  

  Lists all contact channels for the specified contact.

  

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


  **Request Syntax**
  ::

    response = client.list_contact_channels(
        ContactId='string',
        NextToken='string',
        MaxResults=123
    )
    
  :type ContactId: string
  :param ContactId: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the contact.

    

  
  :type NextToken: string
  :param NextToken: 

    The pagination token to continue to the next page of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of contact channels per page.

    

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

    
    ::

      {
          'NextToken': 'string',
          'ContactChannels': [
              {
                  'ContactChannelArn': 'string',
                  'ContactArn': 'string',
                  'Name': 'string',
                  'Type': 'SMS'|'VOICE'|'EMAIL',
                  'DeliveryAddress': {
                      'SimpleAddress': 'string'
                  },
                  'ActivationStatus': 'ACTIVATED'|'NOT_ACTIVATED'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        The pagination token to continue to the next page of results.

        
      

      - **ContactChannels** *(list) --* 

        A list of contact channels related to the specified contact.

        
        

        - *(dict) --* 

          The method that Incident Manager uses to engage a contact.

          
          

          - **ContactChannelArn** *(string) --* 

            The Amazon Resource Name (ARN) of the contact channel.

            
          

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

            The ARN of the contact that contains the contact channel.

            
          

          - **Name** *(string) --* 

            The name of the contact channel.

            
          

          - **Type** *(string) --* 

            The type of the contact channel. Incident Manager supports three contact methods:

             

            
            * SMS
             
            * VOICE
             
            * EMAIL
            

            
          

          - **DeliveryAddress** *(dict) --* 

            The details that Incident Manager uses when trying to engage the contact channel.

            
            

            - **SimpleAddress** *(string) --* 

              The format is dependent on the type of the contact channel. The following are the expected formats:

               

              
              * SMS - '+' followed by the country code and phone number
               
              * VOICE - '+' followed by the country code and phone number
               
              * EMAIL - any standard email format
              

              
        
          

          - **ActivationStatus** *(string) --* 

            A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't activated, Incident Manager can't engage the contact through it.

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

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

  
  *   :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 list-contact-channels example lists the available contact channels of the specified contact.
  ::

    response = client.list_contact_channels(
        ContactId='arn:aws:ssm-contacts:us-east-2:111122223333:contact/akuam',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ContactChannels': [
            {
                'ActivationStatus': 'ACTIVATED',
                'ContactArn': 'arn:aws:ssm-contacts:us-east-2:111122223333:contact/akuam',
                'ContactChannelArn': 'arn:aws:ssm-contacts:us-east-2:111122223333:contact-channel/akuam/fc7405c4-46b2-48b7-87b2-93e2f225b90d',
                'DeliveryAddress': {
                    'SimpleAddress': '+15005550100',
                },
                'Name': 'akuas sms',
                'Type': 'SMS',
            },
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  