AWS IoT Events Data

2021/05/27 - AWS IoT Events Data - 7 new 1 updated api methods

Changes  Releasing new APIs for AWS IoT Events Alarms

BatchEnableAlarm (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.batch_enable_alarm(
    enableActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
type enableActionRequests

list

param enableActionRequests

[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.

rtype

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.

BatchAcknowledgeAlarm (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.batch_acknowledge_alarm(
    acknowledgeActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
type acknowledgeActionRequests

list

param acknowledgeActionRequests

[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.

rtype

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.

BatchDisableAlarm (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.batch_disable_alarm(
    disableActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
type disableActionRequests

list

param disableActionRequests

[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.

rtype

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.

DescribeAlarm (new) Link ¶

Retrieves information about an alarm.

See also: AWS API Documentation

Request Syntax

client.describe_alarm(
    alarmModelName='string',
    keyValue='string'
)
type alarmModelName

string

param alarmModelName

[REQUIRED]

The name of the alarm model.

type keyValue

string

param keyValue

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

rtype

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.

BatchSnoozeAlarm (new) Link ¶

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

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

list

param snoozeActionRequests

[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.

rtype

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.

ListAlarms (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

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.

        • 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.

BatchResetAlarm (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.batch_reset_alarm(
    resetActionRequests=[
        {
            'requestId': 'string',
            'alarmModelName': 'string',
            'keyValue': 'string',
            'note': 'string'
        },
    ]
)
type resetActionRequests

list

param resetActionRequests

[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.

rtype

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.

BatchPutMessage (updated) Link ¶
Changes (request)
{'messages': {'timestamp': {'timeInMillis': 'long'}}}

Sends a set of messages to the AWS 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

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

list

param messages

[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.

rtype

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.