SSMIncidents / Paginator / ListIncidentRecords

ListIncidentRecords#

class SSMIncidents.Paginator.ListIncidentRecords#
paginator = client.get_paginator('list_incident_records')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from SSMIncidents.Client.list_incident_records().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    filters=[
        {
            'condition': {
                'after': datetime(2015, 1, 1),
                'before': datetime(2015, 1, 1),
                'equals': {
                    'integerValues': [
                        123,
                    ],
                    'stringValues': [
                        'string',
                    ]
                }
            },
            'key': 'string'
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • filters (list) –

    Filters the list of incident records you want to search through. You can filter on the following keys:

    • creationTime

    • impact

    • status

    • createdBy

    Note the following when when you use Filters:

    • If you don’t specify a Filter, the response includes all incident records.

    • If you specify more than one filter in a single request, the response returns incident records that match all filters.

    • If you specify a filter with more than one value, the response returns incident records that match any of the values provided.

    • (dict) –

      Filter the selection by using a condition.

      • condition (dict) – [REQUIRED]

        The condition accepts before or after a specified time, equal to a string, or equal to an integer.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: after, before, equals.

        • after (datetime) –

          After the specified timestamp.

        • before (datetime) –

          Before the specified timestamp

        • equals (dict) –

          The value is equal to the provided string or integer.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: integerValues, stringValues.

          • integerValues (list) –

            The list of integer values that the filter matches.

            • (integer) –

          • stringValues (list) –

            The list of string values that the filter matches.

            • (string) –

      • key (string) – [REQUIRED]

        The key that you’re filtering on.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'incidentRecordSummaries': [
        {
            'arn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'impact': 123,
            'incidentRecordSource': {
                'createdBy': 'string',
                'invokedBy': 'string',
                'resourceArn': 'string',
                'source': 'string'
            },
            'resolvedTime': datetime(2015, 1, 1),
            'status': 'OPEN'|'RESOLVED',
            'title': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • incidentRecordSummaries (list) –

      The details of each listed incident record.

      • (dict) –

        Details describing an incident record.

        • arn (string) –

          The Amazon Resource Name (ARN) of the incident.

        • creationTime (datetime) –

          The timestamp for when the incident was created.

        • impact (integer) –

          Defines the impact to customers and applications.

        • incidentRecordSource (dict) –

          What caused Incident Manager to create the incident.

          • createdBy (string) –

            The principal that started the incident.

          • invokedBy (string) –

            The service principal that assumed the role specified in createdBy. If no service principal assumed the role this will be left blank.

          • resourceArn (string) –

            The resource that caused the incident to be created.

          • source (string) –

            The service that started the incident. This can be manually created from Incident Manager, automatically created using an Amazon CloudWatch alarm, or Amazon EventBridge event.

        • resolvedTime (datetime) –

          The timestamp for when the incident was resolved.

        • status (string) –

          The current status of the incident.

        • title (string) –

          The title of the incident. This value is either provided by the response plan or overwritten on creation.

    • NextToken (string) –

      A token to resume pagination.