SSMContacts / Client / list_pages_by_contact

list_pages_by_contact#

SSMContacts.Client.list_pages_by_contact(**kwargs)#

Lists the engagements to a contact’s contact channels.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The Amazon Resource Name (ARN) of the contact you are retrieving engagements for.

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

  • MaxResults (integer) – The maximum number of engagements to contact channels to list per page of results.

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'Pages': [
        {
            'PageArn': 'string',
            'EngagementArn': 'string',
            'ContactArn': 'string',
            'Sender': 'string',
            'IncidentId': 'string',
            'SentTime': datetime(2015, 1, 1),
            'DeliveryTime': datetime(2015, 1, 1),
            'ReadTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) –

    • NextToken (string) –

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

    • Pages (list) –

      The list of engagements to a contact’s contact channel.

      • (dict) –

        Incident Manager engaging a contact’s contact channel.

        • PageArn (string) –

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

        • EngagementArn (string) –

          The ARN of the engagement that this page is part of.

        • ContactArn (string) –

          The ARN of the contact that Incident Manager is engaging.

        • Sender (string) –

          The user that started the engagement.

        • IncidentId (string) –

          The ARN of the incident that’s engaging the contact channel.

        • SentTime (datetime) –

          The time that Incident Manager engaged the contact channel.

        • DeliveryTime (datetime) –

          The time the message was delivered to the contact channel.

        • ReadTime (datetime) –

          The time that the contact channel acknowledged engagement.

Exceptions

  • SSMContacts.Client.exceptions.AccessDeniedException

  • SSMContacts.Client.exceptions.InternalServerException

  • SSMContacts.Client.exceptions.ResourceNotFoundException

  • SSMContacts.Client.exceptions.ThrottlingException

  • SSMContacts.Client.exceptions.ValidationException

Examples

The following list-pages-by-contact example lists all pages to the specified contact.

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

print(response)

Expected Output:

{
    'Pages': [
        {
            'ContactArn': 'arn:aws:ssm-contacts:us-east-2:111122223333:contact/akuam',
            'DeliveryTime': datetime(2021, 5, 18, 18, 43, 55, 1, 138, 0),
            'EngagementArn': 'arn:aws:ssm-contacts:us-east-2:111122223333:engagement/akuam/78a29753-3674-4ac5-9f83-0468563567f0',
            'PageArn': 'arn:aws:ssm-contacts:us-east-2:111122223333:page/akuam/ad0052bd-e606-498a-861b-25726292eb93',
            'ReadTime': datetime(2021, 5, 18, 18, 43, 55, 1, 138, 0),
            'Sender': 'cli',
            'SentTime': datetime(2021, 5, 18, 18, 43, 29, 1, 138, 0),
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}