list_alarms

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

Request Syntax

response = client.list_alarms(
    alarmModelName='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • alarmModelName (string) --

    [REQUIRED]

    The name of the alarm model.

  • nextToken (string) -- The token that you can use to return the next set of results.
  • maxResults (integer) -- The maximum number of results to be returned per request.
Return type

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.

        • 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

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.ResourceNotFoundException
  • IoTEventsData.Client.exceptions.ThrottlingException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException