:doc:`SSMIncidents <../../ssm-incidents>` / Client / list_incident_records

*********************
list_incident_records
*********************



.. py:method:: SSMIncidents.Client.list_incident_records(**kwargs)

  

  Lists all incident records in your account. Use this command to retrieve the Amazon Resource Name (ARN) of the incident record you want to update.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-incidents-2018-05-10/ListIncidentRecords>`_  


  **Request Syntax**
  ::

    response = client.list_incident_records(
        filters=[
            {
                'condition': {
                    'after': datetime(2015, 1, 1),
                    'before': datetime(2015, 1, 1),
                    'equals': {
                        'integerValues': [
                            123,
                        ],
                        'stringValues': [
                            'string',
                        ]
                    }
                },
                'key': 'string'
            },
        ],
        maxResults=123,
        nextToken='string'
    )
    
  :type filters: list
  :param filters: 

    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.

        

      
    

  :type maxResults: integer
  :param maxResults: 

    The maximum number of results per page.

    

  
  :type nextToken: string
  :param nextToken: 

    The pagination token for the next set of items to return. (You received this token from a previous call.)

    

  
  
  :rtype: 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) --* 

        The pagination token to use when requesting the next set of items. If there are no additional items to return, the string is null.

        
  
  **Exceptions**
  
  *   :py:class:`SSMIncidents.Client.exceptions.ThrottlingException`

  
  *   :py:class:`SSMIncidents.Client.exceptions.AccessDeniedException`

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

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

  