IoTEventsData

Table of Contents

Client

class IoTEventsData.Client

A low-level client representing AWS IoT Events Data

IoT Events monitors your equipment or device fleets for failures or changes in operation, and triggers actions when such events occur. You can use IoT Events Data API commands to send inputs to detectors, list detectors, and view or update a detector's status.

For more information, see What is IoT Events? in the IoT Events Developer Guide .

import boto3

client = boto3.client('iotevents-data')

These are the available methods:

batch_acknowledge_alarm(**kwargs)

Acknowledges one or more alarms. The alarms change to the ACKNOWLEDGED state after you acknowledge them.

See also: AWS API Documentation

Request Syntax

response = client.batch_acknowledge_alarm(
    acknowledgeActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
Parameters
acknowledgeActionRequests (list) --

[REQUIRED]

The list of acknowledge action requests. You can specify up to 10 requests per operation.

  • (dict) --

    Information needed to acknowledge the alarm.

    • requestId (string) -- [REQUIRED]

      The request ID. Each ID must be unique within each batch.

    • alarmModelName (string) -- [REQUIRED]

      The name of the alarm model.

    • keyValue (string) --

      The value of the key used as a filter to select only the alarms associated with the key .

    • note (string) --

      The note that you can leave when you acknowledge the alarm.

Return type
dict
Returns
Response Syntax
{
    'errorEntries': [
        {
            'requestId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • errorEntries (list) --

      A list of errors associated with the request, or null if there are no errors. Each error entry contains an entry ID that helps you identify the entry that failed.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
batch_disable_alarm(**kwargs)

Disables one or more alarms. The alarms change to the DISABLED state after you disable them.

See also: AWS API Documentation

Request Syntax

response = client.batch_disable_alarm(
    disableActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
Parameters
disableActionRequests (list) --

[REQUIRED]

The list of disable action requests. You can specify up to 10 requests per operation.

  • (dict) --

    Information used to disable the alarm.

    • requestId (string) -- [REQUIRED]

      The request ID. Each ID must be unique within each batch.

    • alarmModelName (string) -- [REQUIRED]

      The name of the alarm model.

    • keyValue (string) --

      The value of the key used as a filter to select only the alarms associated with the key .

    • note (string) --

      The note that you can leave when you disable the alarm.

Return type
dict
Returns
Response Syntax
{
    'errorEntries': [
        {
            'requestId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • errorEntries (list) --

      A list of errors associated with the request, or null if there are no errors. Each error entry contains an entry ID that helps you identify the entry that failed.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
batch_enable_alarm(**kwargs)

Enables one or more alarms. The alarms change to the NORMAL state after you enable them.

See also: AWS API Documentation

Request Syntax

response = client.batch_enable_alarm(
    enableActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
Parameters
enableActionRequests (list) --

[REQUIRED]

The list of enable action requests. You can specify up to 10 requests per operation.

  • (dict) --

    Information needed to enable the alarm.

    • requestId (string) -- [REQUIRED]

      The request ID. Each ID must be unique within each batch.

    • alarmModelName (string) -- [REQUIRED]

      The name of the alarm model.

    • keyValue (string) --

      The value of the key used as a filter to select only the alarms associated with the key .

    • note (string) --

      The note that you can leave when you enable the alarm.

Return type
dict
Returns
Response Syntax
{
    'errorEntries': [
        {
            'requestId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • errorEntries (list) --

      A list of errors associated with the request, or null if there are no errors. Each error entry contains an entry ID that helps you identify the entry that failed.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
batch_put_message(**kwargs)

Sends a set of messages to the IoT Events system. Each message payload is transformed into the input you specify ("inputName" ) and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.

See also: AWS API Documentation

Request Syntax

response = client.batch_put_message(
    messages=[
        {
            'messageId': 'string',
            'inputName': 'string',
            'payload': b'bytes',
            'timestamp': {
                'timeInMillis': 123
            }
        },
    ]
)
Parameters
messages (list) --

[REQUIRED]

The list of messages to send. Each message has the following format: '{ "messageId": "string", "inputName": "string", "payload": "string"}'

  • (dict) --

    Information about a message.

    • messageId (string) -- [REQUIRED]

      The ID to assign to the message. Within each batch sent, each "messageId" must be unique.

    • inputName (string) -- [REQUIRED]

      The name of the input into which the message payload is transformed.

    • payload (bytes) -- [REQUIRED]

      The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).

    • timestamp (dict) --

      The timestamp associated with the message.

      • timeInMillis (integer) --

        The value of the timestamp, in the Unix epoch format.

Return type
dict
Returns
Response Syntax
{
    'BatchPutMessageErrorEntries': [
        {
            'messageId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • BatchPutMessageErrorEntries (list) --

      A list of any errors encountered when sending the messages.

      • (dict) --

        Contains information about the errors encountered.

        • messageId (string) --

          The ID of the message that caused the error. (See the value corresponding to the "messageId" key in the "message" object.)

        • errorCode (string) --

          The error code.

        • errorMessage (string) --

          A message that describes the error.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
batch_reset_alarm(**kwargs)

Resets one or more alarms. The alarms return to the NORMAL state after you reset them.

See also: AWS API Documentation

Request Syntax

response = client.batch_reset_alarm(
    resetActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
Parameters
resetActionRequests (list) --

[REQUIRED]

The list of reset action requests. You can specify up to 10 requests per operation.

  • (dict) --

    Information needed to reset the alarm.

    • requestId (string) -- [REQUIRED]

      The request ID. Each ID must be unique within each batch.

    • alarmModelName (string) -- [REQUIRED]

      The name of the alarm model.

    • keyValue (string) --

      The value of the key used as a filter to select only the alarms associated with the key .

    • note (string) --

      The note that you can leave when you reset the alarm.

Return type
dict
Returns
Response Syntax
{
    'errorEntries': [
        {
            'requestId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • errorEntries (list) --

      A list of errors associated with the request, or null if there are no errors. Each error entry contains an entry ID that helps you identify the entry that failed.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
batch_snooze_alarm(**kwargs)

Changes one or more alarms to the snooze mode. The alarms change to the SNOOZE_DISABLED state after you set them to the snooze mode.

See also: AWS API Documentation

Request Syntax

response = client.batch_snooze_alarm(
    snoozeActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string',
            'snoozeDuration': 123
        },
    ]
)
Parameters
snoozeActionRequests (list) --

[REQUIRED]

The list of snooze action requests. You can specify up to 10 requests per operation.

  • (dict) --

    Information needed to snooze the alarm.

    • requestId (string) -- [REQUIRED]

      The request ID. Each ID must be unique within each batch.

    • alarmModelName (string) -- [REQUIRED]

      The name of the alarm model.

    • keyValue (string) --

      The value of the key used as a filter to select only the alarms associated with the key .

    • note (string) --

      The note that you can leave when you snooze the alarm.

    • snoozeDuration (integer) -- [REQUIRED]

      The snooze time in seconds. The alarm automatically changes to the NORMAL state after this duration.

Return type
dict
Returns
Response Syntax
{
    'errorEntries': [
        {
            'requestId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • errorEntries (list) --

      A list of errors associated with the request, or null if there are no errors. Each error entry contains an entry ID that helps you identify the entry that failed.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
batch_update_detector(**kwargs)

Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.

See also: AWS API Documentation

Request Syntax

response = client.batch_update_detector(
    detectors=[
        {
            'messageId': 'string',
            'detectorModelName': 'string',
            'keyValue': 'string',
            'state': {
                'stateName': 'string',
                'variables': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ],
                'timers': [
                    {
                        'name': 'string',
                        'seconds': 123
                    },
                ]
            }
        },
    ]
)
Parameters
detectors (list) --

[REQUIRED]

The list of detectors (instances) to update, along with the values to update.

  • (dict) --

    Information used to update the detector (instance).

    • messageId (string) -- [REQUIRED]

      The ID to assign to the detector update "message" . Each "messageId" must be unique within each batch sent.

    • detectorModelName (string) -- [REQUIRED]

      The name of the detector model that created the detectors (instances).

    • keyValue (string) --

      The value of the input key attribute (identifying the device or system) that caused the creation of this detector (instance).

    • state (dict) -- [REQUIRED]

      The new state, variable values, and timer settings of the detector (instance).

      • stateName (string) -- [REQUIRED]

        The name of the new state of the detector (instance).

      • variables (list) -- [REQUIRED]

        The new values of the detector's variables. Any variable whose value isn't specified is cleared.

        • (dict) --

          The new value of the variable.

          • name (string) -- [REQUIRED]

            The name of the variable.

          • value (string) -- [REQUIRED]

            The new value of the variable.

      • timers (list) -- [REQUIRED]

        The new values of the detector's timers. Any timer whose value isn't specified is cleared, and its timeout event won't occur.

        • (dict) --

          The new setting of a timer.

          • name (string) -- [REQUIRED]

            The name of the timer.

          • seconds (integer) -- [REQUIRED]

            The new setting of the timer (the number of seconds before the timer elapses).

Return type
dict
Returns
Response Syntax
{
    'batchUpdateDetectorErrorEntries': [
        {
            'messageId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • batchUpdateDetectorErrorEntries (list) --

      A list of those detector updates that resulted in errors. (If an error is listed here, the specific update did not occur.)

      • (dict) --

        Information about the error that occurred when attempting to update a detector.

        • messageId (string) --

          The "messageId" of the update request that caused the error. (The value of the "messageId" in the update request "Detector" object.)

        • errorCode (string) --

          The error code.

        • errorMessage (string) --

          A message that describes the error.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
describe_alarm(**kwargs)

Retrieves information about an alarm.

See also: AWS API Documentation

Request Syntax

response = client.describe_alarm(
    alarmModelName='string',
    keyValue='string'
)
Parameters
  • alarmModelName (string) --

    [REQUIRED]

    The name of the alarm model.

  • keyValue (string) -- The value of the key used as a filter to select only the alarms associated with the key .
Return type

dict

Returns

Response Syntax

{
    'alarm': {
        'alarmModelName': 'string',
        'alarmModelVersion': 'string',
        'keyValue': 'string',
        'alarmState': {
            'stateName': 'DISABLED'|'NORMAL'|'ACTIVE'|'ACKNOWLEDGED'|'SNOOZE_DISABLED'|'LATCHED',
            'ruleEvaluation': {
                'simpleRuleEvaluation': {
                    'inputPropertyValue': 'string',
                    'operator': 'GREATER'|'GREATER_OR_EQUAL'|'LESS'|'LESS_OR_EQUAL'|'EQUAL'|'NOT_EQUAL',
                    'thresholdValue': 'string'
                }
            },
            'customerAction': {
                'actionName': 'SNOOZE'|'ENABLE'|'DISABLE'|'ACKNOWLEDGE'|'RESET',
                'snoozeActionConfiguration': {
                    'snoozeDuration': 123,
                    'note': 'string'
                },
                'enableActionConfiguration': {
                    'note': 'string'
                },
                'disableActionConfiguration': {
                    'note': 'string'
                },
                'acknowledgeActionConfiguration': {
                    'note': 'string'
                },
                'resetActionConfiguration': {
                    'note': 'string'
                }
            },
            'systemEvent': {
                'eventType': 'STATE_CHANGE',
                'stateChangeConfiguration': {
                    'triggerType': 'SNOOZE_TIMEOUT'
                }
            }
        },
        'severity': 123,
        'creationTime': datetime(2015, 1, 1),
        'lastUpdateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • alarm (dict) --

      Contains information about 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 .

      • alarmState (dict) --

        Contains information about the current state of the alarm.

        • 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.
        • ruleEvaluation (dict) --

          Information needed to evaluate data.

          • simpleRuleEvaluation (dict) --

            Information needed to compare two values with a comparison operator.

            • inputPropertyValue (string) --

              The value of the input property, on the left side of the comparison operator.

            • operator (string) --

              The comparison operator.

            • thresholdValue (string) --

              The threshold value, on the right side of the comparison operator.

        • customerAction (dict) --

          Contains information about the action that you can take to respond to the alarm.

          • actionName (string) --

            The name of the action. The action name can be one of the following values:

            • SNOOZE - When you snooze the alarm, the alarm state changes to SNOOZE_DISABLED .
            • ENABLE - When you enable the alarm, the alarm state changes to NORMAL .
            • DISABLE - When you disable the alarm, the alarm state changes to DISABLED .
            • ACKNOWLEDGE - When you acknowledge the alarm, the alarm state changes to ACKNOWLEDGED .
            • RESET - When you reset the alarm, the alarm state changes to NORMAL .

            For more information, see the AlarmState API.

          • snoozeActionConfiguration (dict) --

            Contains the configuration information of a snooze action.

            • snoozeDuration (integer) --

              The snooze time in seconds. The alarm automatically changes to the NORMAL state after this duration.

            • note (string) --

              The note that you can leave when you snooze the alarm.

          • enableActionConfiguration (dict) --

            Contains the configuration information of an enable action.

            • note (string) --

              The note that you can leave when you enable the alarm.

          • disableActionConfiguration (dict) --

            Contains the configuration information of a disable action.

            • note (string) --

              The note that you can leave when you disable the alarm.

          • acknowledgeActionConfiguration (dict) --

            Contains the configuration information of an acknowledge action.

            • note (string) --

              The note that you can leave when you acknowledge the alarm.

          • resetActionConfiguration (dict) --

            Contains the configuration information of a reset action.

            • note (string) --

              The note that you can leave when you reset the alarm.

        • systemEvent (dict) --

          Contains information about alarm state changes.

          • eventType (string) --

            The event type. If the value is STATE_CHANGE , the event contains information about alarm state changes.

          • stateChangeConfiguration (dict) --

            Contains the configuration information of alarm state changes.

            • triggerType (string) --

              The trigger type. If the value is SNOOZE_TIMEOUT , the snooze duration ends and the alarm automatically changes to the NORMAL state.

      • severity (integer) --

        A non-negative integer that reflects the severity level of 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.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.ResourceNotFoundException
  • IoTEventsData.Client.exceptions.ThrottlingException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
describe_detector(**kwargs)

Returns information about the specified detector (instance).

See also: AWS API Documentation

Request Syntax

response = client.describe_detector(
    detectorModelName='string',
    keyValue='string'
)
Parameters
  • detectorModelName (string) --

    [REQUIRED]

    The name of the detector model whose detectors (instances) you want information about.

  • keyValue (string) -- A filter used to limit results to detectors (instances) created because of the given key ID.
Return type

dict

Returns

Response Syntax

{
    'detector': {
        'detectorModelName': 'string',
        'keyValue': 'string',
        'detectorModelVersion': 'string',
        'state': {
            'stateName': 'string',
            'variables': [
                {
                    'name': 'string',
                    'value': 'string'
                },
            ],
            'timers': [
                {
                    'name': 'string',
                    'timestamp': datetime(2015, 1, 1)
                },
            ]
        },
        'creationTime': datetime(2015, 1, 1),
        'lastUpdateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • detector (dict) --

      Information about the detector (instance).

      • detectorModelName (string) --

        The name of the detector model that created this detector (instance).

      • keyValue (string) --

        The value of the key (identifying the device or system) that caused the creation of this detector (instance).

      • detectorModelVersion (string) --

        The version of the detector model that created this detector (instance).

      • state (dict) --

        The current state of the detector (instance).

        • stateName (string) --

          The name of the state.

        • variables (list) --

          The current values of the detector's variables.

          • (dict) --

            The current state of the variable.

            • name (string) --

              The name of the variable.

            • value (string) --

              The current value of the variable.

        • timers (list) --

          The current state of the detector's timers.

          • (dict) --

            The current state of a timer.

            • name (string) --

              The name of the timer.

            • timestamp (datetime) --

              The expiration time for the timer.

      • creationTime (datetime) --

        The time the detector (instance) was created.

      • lastUpdateTime (datetime) --

        The time the detector (instance) was last updated.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.ResourceNotFoundException
  • IoTEventsData.Client.exceptions.ThrottlingException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
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
list_detectors(**kwargs)

Lists detectors (the instances of a detector model).

See also: AWS API Documentation

Request Syntax

response = client.list_detectors(
    detectorModelName='string',
    stateName='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • detectorModelName (string) --

    [REQUIRED]

    The name of the detector model whose detectors (instances) are listed.

  • stateName (string) -- A filter that limits results to those detectors (instances) in the given state.
  • 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

{
    'detectorSummaries': [
        {
            'detectorModelName': 'string',
            'keyValue': 'string',
            'detectorModelVersion': 'string',
            'state': {
                'stateName': 'string'
            },
            'creationTime': datetime(2015, 1, 1),
            'lastUpdateTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • detectorSummaries (list) --

      A list of summary information about the detectors (instances).

      • (dict) --

        Information about the detector (instance).

        • detectorModelName (string) --

          The name of the detector model that created this detector (instance).

        • keyValue (string) --

          The value of the key (identifying the device or system) that caused the creation of this detector (instance).

        • detectorModelVersion (string) --

          The version of the detector model that created this detector (instance).

        • state (dict) --

          The current state of the detector (instance).

          • stateName (string) --

            The name of the state.

        • creationTime (datetime) --

          The time the detector (instance) was created.

        • lastUpdateTime (datetime) --

          The time the detector (instance) was last updated.

    • 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

Paginators

The available paginators are: