:doc:`IoTEventsData <../../iotevents-data>` / Client / list_alarms

***********
list_alarms
***********



.. py:method:: IoTEventsData.Client.list_alarms(**kwargs)

  

  Lists one or more alarms. The operation returns only the metadata associated with each alarm.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotevents-data-2018-10-23/ListAlarms>`_  


  **Request Syntax**
  ::

    response = client.list_alarms(
        alarmModelName='string',
        nextToken='string',
        maxResults=123
    )
    
  :type alarmModelName: string
  :param alarmModelName: **[REQUIRED]** 

    The name of the alarm model.

    

  
  :type nextToken: string
  :param nextToken: 

    The token that you can use to return the next set of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to be returned per request.

    

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

    
    ::

      {
          'alarmSummaries': [
              {
                  'alarmModelName': 'string',
                  'alarmModelVersion': 'string',
                  'keyValue': 'string',
                  'stateName': 'DISABLED'|'NORMAL'|'ACTIVE'|'ACKNOWLEDGED'|'SNOOZE_DISABLED'|'LATCHED',
                  'creationTime': datetime(2015, 1, 1),
                  'lastUpdateTime': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **alarmSummaries** *(list) --* 

        A list that summarizes each alarm.

        
        

        - *(dict) --* 

          Contains a summary of an alarm.

          
          

          - **alarmModelName** *(string) --* 

            The name of the alarm model.

            
          

          - **alarmModelVersion** *(string) --* 

            The version of the alarm model.

            
          

          - **keyValue** *(string) --* 

            The value of the key used as a filter to select only the alarms associated with the `key <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateAlarmModel.html#iotevents-CreateAlarmModel-request-key>`__.

            
          

          - **stateName** *(string) --* 

            The name of the alarm state. The state name can be one of the following values:

             

            
            * ``DISABLED`` - When the alarm is in the ``DISABLED`` state, it isn't ready to evaluate data. To enable the alarm, you must change the alarm to the ``NORMAL`` state.
             
            * ``NORMAL`` - When the alarm is in the ``NORMAL`` state, it's ready to evaluate data.
             
            * ``ACTIVE`` - If the alarm is in the ``ACTIVE`` state, the alarm is invoked.
             
            * ``ACKNOWLEDGED`` - When the alarm is in the ``ACKNOWLEDGED`` state, the alarm was invoked and you acknowledged the alarm.
             
            * ``SNOOZE_DISABLED`` - When the alarm is in the ``SNOOZE_DISABLED`` state, the alarm is disabled for a specified period of time. After the snooze time, the alarm automatically changes to the ``NORMAL`` state.
             
            * ``LATCHED`` - When the alarm is in the ``LATCHED`` state, the alarm was invoked. However, the data that the alarm is currently evaluating is within the specified range. To change the alarm to the ``NORMAL`` state, you must acknowledge the alarm.
            

            
          

          - **creationTime** *(datetime) --* 

            The time the alarm was created, in the Unix epoch format.

            
          

          - **lastUpdateTime** *(datetime) --* 

            The time the alarm was last updated, in the Unix epoch format.

            
      
    
      

      - **nextToken** *(string) --* 

        The token that you can use to return the next set of results, or ``null`` if there are no more results.

        
  
  **Exceptions**
  
  *   :py:class:`IoTEventsData.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.ServiceUnavailableException`

  