SSMContacts / Client / list_contact_channels

list_contact_channels#

SSMContacts.Client.list_contact_channels(**kwargs)#

Lists all contact channels for the specified contact.

See also: AWS API Documentation

Request Syntax

response = client.list_contact_channels(
    ContactId='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • ContactId (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the contact.

  • NextToken (string) – The pagination token to continue to the next page of results.

  • MaxResults (integer) – The maximum number of contact channels per page.

Return type:

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

  • SSMContacts.Client.exceptions.AccessDeniedException

  • SSMContacts.Client.exceptions.DataEncryptionException

  • SSMContacts.Client.exceptions.InternalServerException

  • SSMContacts.Client.exceptions.ResourceNotFoundException

  • SSMContacts.Client.exceptions.ThrottlingException

  • 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': {
        '...': '...',
    },
}