AWS IoT Events

2020/04/16 - AWS IoT Events - 3 updated api methods

Changes  API update that allows users to customize event action payloads, and adds support for Amazon DynamoDB actions.

CreateDetectorModel (updated) Link ¶
Changes (request)
{'detectorModelDefinition': {'states': {'onEnter': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                        'hashKeyType': 'string',
                                                                                        'hashKeyValue': 'string',
                                                                                        'operation': 'string',
                                                                                        'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'},
                                                                                        'payloadField': 'string',
                                                                                        'rangeKeyField': 'string',
                                                                                        'rangeKeyType': 'string',
                                                                                        'rangeKeyValue': 'string',
                                                                                        'tableName': 'string'},
                                                                           'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                      'type': 'STRING '
                                                                                                              '| '
                                                                                                              'JSON'},
                                                                                          'tableName': 'string'},
                                                                           'firehose': {'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'}},
                                                                           'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                     'type': 'STRING '
                                                                                                             '| '
                                                                                                             'JSON'}},
                                                                           'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                           'type': 'STRING '
                                                                                                                   '| '
                                                                                                                   'JSON'}},
                                                                           'lambda': {'payload': {'contentExpression': 'string',
                                                                                                  'type': 'STRING '
                                                                                                          '| '
                                                                                                          'JSON'}},
                                                                           'sns': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}},
                                                                           'sqs': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}}}}},
                                        'onExit': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                       'hashKeyType': 'string',
                                                                                       'hashKeyValue': 'string',
                                                                                       'operation': 'string',
                                                                                       'payload': {'contentExpression': 'string',
                                                                                                   'type': 'STRING '
                                                                                                           '| '
                                                                                                           'JSON'},
                                                                                       'payloadField': 'string',
                                                                                       'rangeKeyField': 'string',
                                                                                       'rangeKeyType': 'string',
                                                                                       'rangeKeyValue': 'string',
                                                                                       'tableName': 'string'},
                                                                          'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                     'type': 'STRING '
                                                                                                             '| '
                                                                                                             'JSON'},
                                                                                         'tableName': 'string'},
                                                                          'firehose': {'payload': {'contentExpression': 'string',
                                                                                                   'type': 'STRING '
                                                                                                           '| '
                                                                                                           'JSON'}},
                                                                          'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'}},
                                                                          'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                          'type': 'STRING '
                                                                                                                  '| '
                                                                                                                  'JSON'}},
                                                                          'lambda': {'payload': {'contentExpression': 'string',
                                                                                                 'type': 'STRING '
                                                                                                         '| '
                                                                                                         'JSON'}},
                                                                          'sns': {'payload': {'contentExpression': 'string',
                                                                                              'type': 'STRING '
                                                                                                      '| '
                                                                                                      'JSON'}},
                                                                          'sqs': {'payload': {'contentExpression': 'string',
                                                                                              'type': 'STRING '
                                                                                                      '| '
                                                                                                      'JSON'}}}}},
                                        'onInput': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                        'hashKeyType': 'string',
                                                                                        'hashKeyValue': 'string',
                                                                                        'operation': 'string',
                                                                                        'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'},
                                                                                        'payloadField': 'string',
                                                                                        'rangeKeyField': 'string',
                                                                                        'rangeKeyType': 'string',
                                                                                        'rangeKeyValue': 'string',
                                                                                        'tableName': 'string'},
                                                                           'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                      'type': 'STRING '
                                                                                                              '| '
                                                                                                              'JSON'},
                                                                                          'tableName': 'string'},
                                                                           'firehose': {'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'}},
                                                                           'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                     'type': 'STRING '
                                                                                                             '| '
                                                                                                             'JSON'}},
                                                                           'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                           'type': 'STRING '
                                                                                                                   '| '
                                                                                                                   'JSON'}},
                                                                           'lambda': {'payload': {'contentExpression': 'string',
                                                                                                  'type': 'STRING '
                                                                                                          '| '
                                                                                                          'JSON'}},
                                                                           'sns': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}},
                                                                           'sqs': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}}}},
                                                    'transitionEvents': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                                  'hashKeyType': 'string',
                                                                                                  'hashKeyValue': 'string',
                                                                                                  'operation': 'string',
                                                                                                  'payload': {'contentExpression': 'string',
                                                                                                              'type': 'STRING '
                                                                                                                      '| '
                                                                                                                      'JSON'},
                                                                                                  'payloadField': 'string',
                                                                                                  'rangeKeyField': 'string',
                                                                                                  'rangeKeyType': 'string',
                                                                                                  'rangeKeyValue': 'string',
                                                                                                  'tableName': 'string'},
                                                                                     'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                                'type': 'STRING '
                                                                                                                        '| '
                                                                                                                        'JSON'},
                                                                                                    'tableName': 'string'},
                                                                                     'firehose': {'payload': {'contentExpression': 'string',
                                                                                                              'type': 'STRING '
                                                                                                                      '| '
                                                                                                                      'JSON'}},
                                                                                     'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                               'type': 'STRING '
                                                                                                                       '| '
                                                                                                                       'JSON'}},
                                                                                     'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                                     'type': 'STRING '
                                                                                                                             '| '
                                                                                                                             'JSON'}},
                                                                                     'lambda': {'payload': {'contentExpression': 'string',
                                                                                                            'type': 'STRING '
                                                                                                                    '| '
                                                                                                                    'JSON'}},
                                                                                     'sns': {'payload': {'contentExpression': 'string',
                                                                                                         'type': 'STRING '
                                                                                                                 '| '
                                                                                                                 'JSON'}},
                                                                                     'sqs': {'payload': {'contentExpression': 'string',
                                                                                                         'type': 'STRING '
                                                                                                                 '| '
                                                                                                                 'JSON'}}}}}}}}

Creates a detector model.

See also: AWS API Documentation

Request Syntax

client.create_detector_model(
    detectorModelName='string',
    detectorModelDefinition={
        'states': [
            {
                'stateName': 'string',
                'onInput': {
                    'events': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ]
                        },
                    ],
                    'transitionEvents': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ],
                            'nextState': 'string'
                        },
                    ]
                },
                'onEnter': {
                    'events': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                },
                'onExit': {
                    'events': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                }
            },
        ],
        'initialStateName': 'string'
    },
    detectorModelDescription='string',
    key='string',
    roleArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    evaluationMethod='BATCH'|'SERIAL'
)
type detectorModelName

string

param detectorModelName

[REQUIRED]

The name of the detector model.

type detectorModelDefinition

dict

param detectorModelDefinition

[REQUIRED]

Information that defines how the detectors operate.

  • states (list) -- [REQUIRED]

    Information about the states of the detector.

    • (dict) --

      Information that defines a state of a detector.

      • stateName (string) -- [REQUIRED]

        The name of the state.

      • onInput (dict) --

        When an input is received and the condition is TRUE, perform the specified actions .

        • events (list) --

          Specifies the actions performed when the condition evaluates to TRUE.

          • (dict) --

            Specifies the actions to be performed when the condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the event.

            • condition (string) --

              Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

        • transitionEvents (list) --

          Specifies the actions performed, and the next state entered, when a condition evaluates to TRUE.

          • (dict) --

            Specifies the actions performed and the next state entered when a condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the transition event.

            • condition (string) -- [REQUIRED]

              Required. A Boolean expression that when TRUE causes the actions to be performed and the nextState to be entered.

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

            • nextState (string) -- [REQUIRED]

              The next state to enter.

      • onEnter (dict) --

        When entering this state, perform these actions if the condition is TRUE.

        • events (list) --

          Specifies the actions that are performed when the state is entered and the condition is TRUE .

          • (dict) --

            Specifies the actions to be performed when the condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the event.

            • condition (string) --

              Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

      • onExit (dict) --

        When exiting this state, perform these actions if the specified condition is TRUE .

        • events (list) --

          Specifies the actions that are performed when the state is exited and the condition is TRUE .

          • (dict) --

            Specifies the actions to be performed when the condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the event.

            • condition (string) --

              Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

  • initialStateName (string) -- [REQUIRED]

    The state that is entered at the creation of each detector (instance).

type detectorModelDescription

string

param detectorModelDescription

A brief description of the detector model.

type key

string

param key

The input attribute key used to identify a device or system to create a detector (an instance of the detector model) and then to route each input received to the appropriate detector (instance). This parameter uses a JSON-path expression in the message payload of each input to specify the attribute-value pair that is used to identify the device associated with the input.

type roleArn

string

param roleArn

[REQUIRED]

The ARN of the role that grants permission to AWS IoT Events to perform its operations.

type tags

list

param tags

Metadata that can be used to manage the detector model.

  • (dict) --

    Metadata that can be used to manage the resource.

    • key (string) -- [REQUIRED]

      The tag's key.

    • value (string) -- [REQUIRED]

      The tag's value.

type evaluationMethod

string

param evaluationMethod

Information about the order in which events are evaluated and how actions are executed.

rtype

dict

returns

Response Syntax

{
    'detectorModelConfiguration': {
        'detectorModelName': 'string',
        'detectorModelVersion': 'string',
        'detectorModelDescription': 'string',
        'detectorModelArn': 'string',
        'roleArn': 'string',
        'creationTime': datetime(2015, 1, 1),
        'lastUpdateTime': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'DEPRECATED'|'DRAFT'|'PAUSED'|'FAILED',
        'key': 'string',
        'evaluationMethod': 'BATCH'|'SERIAL'
    }
}

Response Structure

  • (dict) --

    • detectorModelConfiguration (dict) --

      Information about how the detector model is configured.

      • detectorModelName (string) --

        The name of the detector model.

      • detectorModelVersion (string) --

        The version of the detector model.

      • detectorModelDescription (string) --

        A brief description of the detector model.

      • detectorModelArn (string) --

        The ARN of the detector model.

      • roleArn (string) --

        The ARN of the role that grants permission to AWS IoT Events to perform its operations.

      • creationTime (datetime) --

        The time the detector model was created.

      • lastUpdateTime (datetime) --

        The time the detector model was last updated.

      • status (string) --

        The status of the detector model.

      • key (string) --

        The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.

        This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.

      • evaluationMethod (string) --

        Information about the order in which events are evaluated and how actions are executed.

DescribeDetectorModel (updated) Link ¶
Changes (response)
{'detectorModel': {'detectorModelDefinition': {'states': {'onEnter': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                                          'hashKeyType': 'string',
                                                                                                          'hashKeyValue': 'string',
                                                                                                          'operation': 'string',
                                                                                                          'payload': {'contentExpression': 'string',
                                                                                                                      'type': 'STRING '
                                                                                                                              '| '
                                                                                                                              'JSON'},
                                                                                                          'payloadField': 'string',
                                                                                                          'rangeKeyField': 'string',
                                                                                                          'rangeKeyType': 'string',
                                                                                                          'rangeKeyValue': 'string',
                                                                                                          'tableName': 'string'},
                                                                                             'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                                        'type': 'STRING '
                                                                                                                                '| '
                                                                                                                                'JSON'},
                                                                                                            'tableName': 'string'},
                                                                                             'firehose': {'payload': {'contentExpression': 'string',
                                                                                                                      'type': 'STRING '
                                                                                                                              '| '
                                                                                                                              'JSON'}},
                                                                                             'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                                       'type': 'STRING '
                                                                                                                               '| '
                                                                                                                               'JSON'}},
                                                                                             'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                                             'type': 'STRING '
                                                                                                                                     '| '
                                                                                                                                     'JSON'}},
                                                                                             'lambda': {'payload': {'contentExpression': 'string',
                                                                                                                    'type': 'STRING '
                                                                                                                            '| '
                                                                                                                            'JSON'}},
                                                                                             'sns': {'payload': {'contentExpression': 'string',
                                                                                                                 'type': 'STRING '
                                                                                                                         '| '
                                                                                                                         'JSON'}},
                                                                                             'sqs': {'payload': {'contentExpression': 'string',
                                                                                                                 'type': 'STRING '
                                                                                                                         '| '
                                                                                                                         'JSON'}}}}},
                                                          'onExit': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                                         'hashKeyType': 'string',
                                                                                                         'hashKeyValue': 'string',
                                                                                                         'operation': 'string',
                                                                                                         'payload': {'contentExpression': 'string',
                                                                                                                     'type': 'STRING '
                                                                                                                             '| '
                                                                                                                             'JSON'},
                                                                                                         'payloadField': 'string',
                                                                                                         'rangeKeyField': 'string',
                                                                                                         'rangeKeyType': 'string',
                                                                                                         'rangeKeyValue': 'string',
                                                                                                         'tableName': 'string'},
                                                                                            'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                                       'type': 'STRING '
                                                                                                                               '| '
                                                                                                                               'JSON'},
                                                                                                           'tableName': 'string'},
                                                                                            'firehose': {'payload': {'contentExpression': 'string',
                                                                                                                     'type': 'STRING '
                                                                                                                             '| '
                                                                                                                             'JSON'}},
                                                                                            'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                                      'type': 'STRING '
                                                                                                                              '| '
                                                                                                                              'JSON'}},
                                                                                            'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                                            'type': 'STRING '
                                                                                                                                    '| '
                                                                                                                                    'JSON'}},
                                                                                            'lambda': {'payload': {'contentExpression': 'string',
                                                                                                                   'type': 'STRING '
                                                                                                                           '| '
                                                                                                                           'JSON'}},
                                                                                            'sns': {'payload': {'contentExpression': 'string',
                                                                                                                'type': 'STRING '
                                                                                                                        '| '
                                                                                                                        'JSON'}},
                                                                                            'sqs': {'payload': {'contentExpression': 'string',
                                                                                                                'type': 'STRING '
                                                                                                                        '| '
                                                                                                                        'JSON'}}}}},
                                                          'onInput': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                                          'hashKeyType': 'string',
                                                                                                          'hashKeyValue': 'string',
                                                                                                          'operation': 'string',
                                                                                                          'payload': {'contentExpression': 'string',
                                                                                                                      'type': 'STRING '
                                                                                                                              '| '
                                                                                                                              'JSON'},
                                                                                                          'payloadField': 'string',
                                                                                                          'rangeKeyField': 'string',
                                                                                                          'rangeKeyType': 'string',
                                                                                                          'rangeKeyValue': 'string',
                                                                                                          'tableName': 'string'},
                                                                                             'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                                        'type': 'STRING '
                                                                                                                                '| '
                                                                                                                                'JSON'},
                                                                                                            'tableName': 'string'},
                                                                                             'firehose': {'payload': {'contentExpression': 'string',
                                                                                                                      'type': 'STRING '
                                                                                                                              '| '
                                                                                                                              'JSON'}},
                                                                                             'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                                       'type': 'STRING '
                                                                                                                               '| '
                                                                                                                               'JSON'}},
                                                                                             'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                                             'type': 'STRING '
                                                                                                                                     '| '
                                                                                                                                     'JSON'}},
                                                                                             'lambda': {'payload': {'contentExpression': 'string',
                                                                                                                    'type': 'STRING '
                                                                                                                            '| '
                                                                                                                            'JSON'}},
                                                                                             'sns': {'payload': {'contentExpression': 'string',
                                                                                                                 'type': 'STRING '
                                                                                                                         '| '
                                                                                                                         'JSON'}},
                                                                                             'sqs': {'payload': {'contentExpression': 'string',
                                                                                                                 'type': 'STRING '
                                                                                                                         '| '
                                                                                                                         'JSON'}}}},
                                                                      'transitionEvents': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                                                    'hashKeyType': 'string',
                                                                                                                    'hashKeyValue': 'string',
                                                                                                                    'operation': 'string',
                                                                                                                    'payload': {'contentExpression': 'string',
                                                                                                                                'type': 'STRING '
                                                                                                                                        '| '
                                                                                                                                        'JSON'},
                                                                                                                    'payloadField': 'string',
                                                                                                                    'rangeKeyField': 'string',
                                                                                                                    'rangeKeyType': 'string',
                                                                                                                    'rangeKeyValue': 'string',
                                                                                                                    'tableName': 'string'},
                                                                                                       'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                                                  'type': 'STRING '
                                                                                                                                          '| '
                                                                                                                                          'JSON'},
                                                                                                                      'tableName': 'string'},
                                                                                                       'firehose': {'payload': {'contentExpression': 'string',
                                                                                                                                'type': 'STRING '
                                                                                                                                        '| '
                                                                                                                                        'JSON'}},
                                                                                                       'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                                                 'type': 'STRING '
                                                                                                                                         '| '
                                                                                                                                         'JSON'}},
                                                                                                       'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                                                       'type': 'STRING '
                                                                                                                                               '| '
                                                                                                                                               'JSON'}},
                                                                                                       'lambda': {'payload': {'contentExpression': 'string',
                                                                                                                              'type': 'STRING '
                                                                                                                                      '| '
                                                                                                                                      'JSON'}},
                                                                                                       'sns': {'payload': {'contentExpression': 'string',
                                                                                                                           'type': 'STRING '
                                                                                                                                   '| '
                                                                                                                                   'JSON'}},
                                                                                                       'sqs': {'payload': {'contentExpression': 'string',
                                                                                                                           'type': 'STRING '
                                                                                                                                   '| '
                                                                                                                                   'JSON'}}}}}}}}}

Describes a detector model. If the version parameter is not specified, information about the latest version is returned.

See also: AWS API Documentation

Request Syntax

client.describe_detector_model(
    detectorModelName='string',
    detectorModelVersion='string'
)
type detectorModelName

string

param detectorModelName

[REQUIRED]

The name of the detector model.

type detectorModelVersion

string

param detectorModelVersion

The version of the detector model.

rtype

dict

returns

Response Syntax

{
    'detectorModel': {
        'detectorModelDefinition': {
            'states': [
                {
                    'stateName': 'string',
                    'onInput': {
                        'events': [
                            {
                                'eventName': 'string',
                                'condition': 'string',
                                'actions': [
                                    {
                                        'setVariable': {
                                            'variableName': 'string',
                                            'value': 'string'
                                        },
                                        'sns': {
                                            'targetArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotTopicPublish': {
                                            'mqttTopic': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'setTimer': {
                                            'timerName': 'string',
                                            'seconds': 123,
                                            'durationExpression': 'string'
                                        },
                                        'clearTimer': {
                                            'timerName': 'string'
                                        },
                                        'resetTimer': {
                                            'timerName': 'string'
                                        },
                                        'lambda': {
                                            'functionArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotEvents': {
                                            'inputName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'sqs': {
                                            'queueUrl': 'string',
                                            'useBase64': True|False,
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'firehose': {
                                            'deliveryStreamName': 'string',
                                            'separator': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDB': {
                                            'hashKeyType': 'string',
                                            'hashKeyField': 'string',
                                            'hashKeyValue': 'string',
                                            'rangeKeyType': 'string',
                                            'rangeKeyField': 'string',
                                            'rangeKeyValue': 'string',
                                            'operation': 'string',
                                            'payloadField': 'string',
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDBv2': {
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        }
                                    },
                                ]
                            },
                        ],
                        'transitionEvents': [
                            {
                                'eventName': 'string',
                                'condition': 'string',
                                'actions': [
                                    {
                                        'setVariable': {
                                            'variableName': 'string',
                                            'value': 'string'
                                        },
                                        'sns': {
                                            'targetArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotTopicPublish': {
                                            'mqttTopic': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'setTimer': {
                                            'timerName': 'string',
                                            'seconds': 123,
                                            'durationExpression': 'string'
                                        },
                                        'clearTimer': {
                                            'timerName': 'string'
                                        },
                                        'resetTimer': {
                                            'timerName': 'string'
                                        },
                                        'lambda': {
                                            'functionArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotEvents': {
                                            'inputName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'sqs': {
                                            'queueUrl': 'string',
                                            'useBase64': True|False,
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'firehose': {
                                            'deliveryStreamName': 'string',
                                            'separator': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDB': {
                                            'hashKeyType': 'string',
                                            'hashKeyField': 'string',
                                            'hashKeyValue': 'string',
                                            'rangeKeyType': 'string',
                                            'rangeKeyField': 'string',
                                            'rangeKeyValue': 'string',
                                            'operation': 'string',
                                            'payloadField': 'string',
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDBv2': {
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        }
                                    },
                                ],
                                'nextState': 'string'
                            },
                        ]
                    },
                    'onEnter': {
                        'events': [
                            {
                                'eventName': 'string',
                                'condition': 'string',
                                'actions': [
                                    {
                                        'setVariable': {
                                            'variableName': 'string',
                                            'value': 'string'
                                        },
                                        'sns': {
                                            'targetArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotTopicPublish': {
                                            'mqttTopic': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'setTimer': {
                                            'timerName': 'string',
                                            'seconds': 123,
                                            'durationExpression': 'string'
                                        },
                                        'clearTimer': {
                                            'timerName': 'string'
                                        },
                                        'resetTimer': {
                                            'timerName': 'string'
                                        },
                                        'lambda': {
                                            'functionArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotEvents': {
                                            'inputName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'sqs': {
                                            'queueUrl': 'string',
                                            'useBase64': True|False,
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'firehose': {
                                            'deliveryStreamName': 'string',
                                            'separator': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDB': {
                                            'hashKeyType': 'string',
                                            'hashKeyField': 'string',
                                            'hashKeyValue': 'string',
                                            'rangeKeyType': 'string',
                                            'rangeKeyField': 'string',
                                            'rangeKeyValue': 'string',
                                            'operation': 'string',
                                            'payloadField': 'string',
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDBv2': {
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        }
                                    },
                                ]
                            },
                        ]
                    },
                    'onExit': {
                        'events': [
                            {
                                'eventName': 'string',
                                'condition': 'string',
                                'actions': [
                                    {
                                        'setVariable': {
                                            'variableName': 'string',
                                            'value': 'string'
                                        },
                                        'sns': {
                                            'targetArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotTopicPublish': {
                                            'mqttTopic': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'setTimer': {
                                            'timerName': 'string',
                                            'seconds': 123,
                                            'durationExpression': 'string'
                                        },
                                        'clearTimer': {
                                            'timerName': 'string'
                                        },
                                        'resetTimer': {
                                            'timerName': 'string'
                                        },
                                        'lambda': {
                                            'functionArn': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'iotEvents': {
                                            'inputName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'sqs': {
                                            'queueUrl': 'string',
                                            'useBase64': True|False,
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'firehose': {
                                            'deliveryStreamName': 'string',
                                            'separator': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDB': {
                                            'hashKeyType': 'string',
                                            'hashKeyField': 'string',
                                            'hashKeyValue': 'string',
                                            'rangeKeyType': 'string',
                                            'rangeKeyField': 'string',
                                            'rangeKeyValue': 'string',
                                            'operation': 'string',
                                            'payloadField': 'string',
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        },
                                        'dynamoDBv2': {
                                            'tableName': 'string',
                                            'payload': {
                                                'contentExpression': 'string',
                                                'type': 'STRING'|'JSON'
                                            }
                                        }
                                    },
                                ]
                            },
                        ]
                    }
                },
            ],
            'initialStateName': 'string'
        },
        'detectorModelConfiguration': {
            'detectorModelName': 'string',
            'detectorModelVersion': 'string',
            'detectorModelDescription': 'string',
            'detectorModelArn': 'string',
            'roleArn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdateTime': datetime(2015, 1, 1),
            'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'DEPRECATED'|'DRAFT'|'PAUSED'|'FAILED',
            'key': 'string',
            'evaluationMethod': 'BATCH'|'SERIAL'
        }
    }
}

Response Structure

  • (dict) --

    • detectorModel (dict) --

      Information about the detector model.

      • detectorModelDefinition (dict) --

        Information that defines how a detector operates.

        • states (list) --

          Information about the states of the detector.

          • (dict) --

            Information that defines a state of a detector.

            • stateName (string) --

              The name of the state.

            • onInput (dict) --

              When an input is received and the condition is TRUE, perform the specified actions .

              • events (list) --

                Specifies the actions performed when the condition evaluates to TRUE.

                • (dict) --

                  Specifies the actions to be performed when the condition evaluates to TRUE.

                  • eventName (string) --

                    The name of the event.

                  • condition (string) --

                    Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

                  • actions (list) --

                    The actions to be performed.

                    • (dict) --

                      An action to be performed when the condition is TRUE.

                      • setVariable (dict) --

                        Sets a variable to a specified value.

                        • variableName (string) --

                          The name of the variable.

                        • value (string) --

                          The new value of the variable.

                      • sns (dict) --

                        Sends an Amazon SNS message.

                        • targetArn (string) --

                          The ARN of the Amazon SNS target where the message is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message as an Amazon SNS push notification.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotTopicPublish (dict) --

                        Publishes an MQTT message with the given topic to the AWS IoT message broker.

                        • mqttTopic (string) --

                          The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                        • payload (dict) --

                          You can configure the action payload when you publish a message to an AWS IoT Core topic.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • setTimer (dict) --

                        Information needed to set the timer.

                        • timerName (string) --

                          The name of the timer.

                        • seconds (integer) --

                          The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                        • durationExpression (string) --

                          The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                      • clearTimer (dict) --

                        Information needed to clear the timer.

                        • timerName (string) --

                          The name of the timer to clear.

                      • resetTimer (dict) --

                        Information needed to reset the timer.

                        • timerName (string) --

                          The name of the timer to reset.

                      • lambda (dict) --

                        Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                        • functionArn (string) --

                          The ARN of the Lambda function that is executed.

                        • payload (dict) --

                          You can configure the action payload when you send a message to a Lambda function.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotEvents (dict) --

                        Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                        • inputName (string) --

                          The name of the AWS IoT Events input where the data is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an AWS IoT Events input.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • sqs (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                        • queueUrl (string) --

                          The URL of the SQS queue where the data is written.

                        • useBase64 (boolean) --

                          Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon SQS queue.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • firehose (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                        • deliveryStreamName (string) --

                          The name of the Kinesis Data Firehose delivery stream where the data is written.

                        • separator (string) --

                          A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDB (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • hashKeyType (string) --

                          The data type for the hash key (also called the partition key). You can specify the following values:

                          • STRING - The hash key is a string.

                          • NUMBER - The hash key is a number.

                          If you don't specify hashKeyType , the default value is STRING .

                        • hashKeyField (string) --

                          The name of the hash key (also called the partition key).

                        • hashKeyValue (string) --

                          The value of the hash key (also called the partition key).

                        • rangeKeyType (string) --

                          The data type for the range key (also called the sort key), You can specify the following values:

                          • STRING - The range key is a string.

                          • NUMBER - The range key is number.

                          If you don't specify rangeKeyField , the default value is STRING .

                        • rangeKeyField (string) --

                          The name of the range key (also called the sort key).

                        • rangeKeyValue (string) --

                          The value of the range key (also called the sort key).

                        • operation (string) --

                          The type of operation to perform. You can specify the following values:

                          • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                          • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                        • payloadField (string) --

                          The name of the DynamoDB column that receives the action payload.

                          If you don't specify this parameter, the name of the DynamoDB column is payload .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDBv2 (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

              • transitionEvents (list) --

                Specifies the actions performed, and the next state entered, when a condition evaluates to TRUE.

                • (dict) --

                  Specifies the actions performed and the next state entered when a condition evaluates to TRUE.

                  • eventName (string) --

                    The name of the transition event.

                  • condition (string) --

                    Required. A Boolean expression that when TRUE causes the actions to be performed and the nextState to be entered.

                  • actions (list) --

                    The actions to be performed.

                    • (dict) --

                      An action to be performed when the condition is TRUE.

                      • setVariable (dict) --

                        Sets a variable to a specified value.

                        • variableName (string) --

                          The name of the variable.

                        • value (string) --

                          The new value of the variable.

                      • sns (dict) --

                        Sends an Amazon SNS message.

                        • targetArn (string) --

                          The ARN of the Amazon SNS target where the message is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message as an Amazon SNS push notification.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotTopicPublish (dict) --

                        Publishes an MQTT message with the given topic to the AWS IoT message broker.

                        • mqttTopic (string) --

                          The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                        • payload (dict) --

                          You can configure the action payload when you publish a message to an AWS IoT Core topic.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • setTimer (dict) --

                        Information needed to set the timer.

                        • timerName (string) --

                          The name of the timer.

                        • seconds (integer) --

                          The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                        • durationExpression (string) --

                          The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                      • clearTimer (dict) --

                        Information needed to clear the timer.

                        • timerName (string) --

                          The name of the timer to clear.

                      • resetTimer (dict) --

                        Information needed to reset the timer.

                        • timerName (string) --

                          The name of the timer to reset.

                      • lambda (dict) --

                        Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                        • functionArn (string) --

                          The ARN of the Lambda function that is executed.

                        • payload (dict) --

                          You can configure the action payload when you send a message to a Lambda function.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotEvents (dict) --

                        Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                        • inputName (string) --

                          The name of the AWS IoT Events input where the data is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an AWS IoT Events input.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • sqs (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                        • queueUrl (string) --

                          The URL of the SQS queue where the data is written.

                        • useBase64 (boolean) --

                          Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon SQS queue.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • firehose (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                        • deliveryStreamName (string) --

                          The name of the Kinesis Data Firehose delivery stream where the data is written.

                        • separator (string) --

                          A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDB (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • hashKeyType (string) --

                          The data type for the hash key (also called the partition key). You can specify the following values:

                          • STRING - The hash key is a string.

                          • NUMBER - The hash key is a number.

                          If you don't specify hashKeyType , the default value is STRING .

                        • hashKeyField (string) --

                          The name of the hash key (also called the partition key).

                        • hashKeyValue (string) --

                          The value of the hash key (also called the partition key).

                        • rangeKeyType (string) --

                          The data type for the range key (also called the sort key), You can specify the following values:

                          • STRING - The range key is a string.

                          • NUMBER - The range key is number.

                          If you don't specify rangeKeyField , the default value is STRING .

                        • rangeKeyField (string) --

                          The name of the range key (also called the sort key).

                        • rangeKeyValue (string) --

                          The value of the range key (also called the sort key).

                        • operation (string) --

                          The type of operation to perform. You can specify the following values:

                          • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                          • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                        • payloadField (string) --

                          The name of the DynamoDB column that receives the action payload.

                          If you don't specify this parameter, the name of the DynamoDB column is payload .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDBv2 (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                  • nextState (string) --

                    The next state to enter.

            • onEnter (dict) --

              When entering this state, perform these actions if the condition is TRUE.

              • events (list) --

                Specifies the actions that are performed when the state is entered and the condition is TRUE .

                • (dict) --

                  Specifies the actions to be performed when the condition evaluates to TRUE.

                  • eventName (string) --

                    The name of the event.

                  • condition (string) --

                    Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

                  • actions (list) --

                    The actions to be performed.

                    • (dict) --

                      An action to be performed when the condition is TRUE.

                      • setVariable (dict) --

                        Sets a variable to a specified value.

                        • variableName (string) --

                          The name of the variable.

                        • value (string) --

                          The new value of the variable.

                      • sns (dict) --

                        Sends an Amazon SNS message.

                        • targetArn (string) --

                          The ARN of the Amazon SNS target where the message is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message as an Amazon SNS push notification.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotTopicPublish (dict) --

                        Publishes an MQTT message with the given topic to the AWS IoT message broker.

                        • mqttTopic (string) --

                          The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                        • payload (dict) --

                          You can configure the action payload when you publish a message to an AWS IoT Core topic.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • setTimer (dict) --

                        Information needed to set the timer.

                        • timerName (string) --

                          The name of the timer.

                        • seconds (integer) --

                          The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                        • durationExpression (string) --

                          The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                      • clearTimer (dict) --

                        Information needed to clear the timer.

                        • timerName (string) --

                          The name of the timer to clear.

                      • resetTimer (dict) --

                        Information needed to reset the timer.

                        • timerName (string) --

                          The name of the timer to reset.

                      • lambda (dict) --

                        Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                        • functionArn (string) --

                          The ARN of the Lambda function that is executed.

                        • payload (dict) --

                          You can configure the action payload when you send a message to a Lambda function.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotEvents (dict) --

                        Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                        • inputName (string) --

                          The name of the AWS IoT Events input where the data is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an AWS IoT Events input.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • sqs (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                        • queueUrl (string) --

                          The URL of the SQS queue where the data is written.

                        • useBase64 (boolean) --

                          Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon SQS queue.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • firehose (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                        • deliveryStreamName (string) --

                          The name of the Kinesis Data Firehose delivery stream where the data is written.

                        • separator (string) --

                          A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDB (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • hashKeyType (string) --

                          The data type for the hash key (also called the partition key). You can specify the following values:

                          • STRING - The hash key is a string.

                          • NUMBER - The hash key is a number.

                          If you don't specify hashKeyType , the default value is STRING .

                        • hashKeyField (string) --

                          The name of the hash key (also called the partition key).

                        • hashKeyValue (string) --

                          The value of the hash key (also called the partition key).

                        • rangeKeyType (string) --

                          The data type for the range key (also called the sort key), You can specify the following values:

                          • STRING - The range key is a string.

                          • NUMBER - The range key is number.

                          If you don't specify rangeKeyField , the default value is STRING .

                        • rangeKeyField (string) --

                          The name of the range key (also called the sort key).

                        • rangeKeyValue (string) --

                          The value of the range key (also called the sort key).

                        • operation (string) --

                          The type of operation to perform. You can specify the following values:

                          • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                          • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                        • payloadField (string) --

                          The name of the DynamoDB column that receives the action payload.

                          If you don't specify this parameter, the name of the DynamoDB column is payload .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDBv2 (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

            • onExit (dict) --

              When exiting this state, perform these actions if the specified condition is TRUE .

              • events (list) --

                Specifies the actions that are performed when the state is exited and the condition is TRUE .

                • (dict) --

                  Specifies the actions to be performed when the condition evaluates to TRUE.

                  • eventName (string) --

                    The name of the event.

                  • condition (string) --

                    Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

                  • actions (list) --

                    The actions to be performed.

                    • (dict) --

                      An action to be performed when the condition is TRUE.

                      • setVariable (dict) --

                        Sets a variable to a specified value.

                        • variableName (string) --

                          The name of the variable.

                        • value (string) --

                          The new value of the variable.

                      • sns (dict) --

                        Sends an Amazon SNS message.

                        • targetArn (string) --

                          The ARN of the Amazon SNS target where the message is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message as an Amazon SNS push notification.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotTopicPublish (dict) --

                        Publishes an MQTT message with the given topic to the AWS IoT message broker.

                        • mqttTopic (string) --

                          The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                        • payload (dict) --

                          You can configure the action payload when you publish a message to an AWS IoT Core topic.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • setTimer (dict) --

                        Information needed to set the timer.

                        • timerName (string) --

                          The name of the timer.

                        • seconds (integer) --

                          The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                        • durationExpression (string) --

                          The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                      • clearTimer (dict) --

                        Information needed to clear the timer.

                        • timerName (string) --

                          The name of the timer to clear.

                      • resetTimer (dict) --

                        Information needed to reset the timer.

                        • timerName (string) --

                          The name of the timer to reset.

                      • lambda (dict) --

                        Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                        • functionArn (string) --

                          The ARN of the Lambda function that is executed.

                        • payload (dict) --

                          You can configure the action payload when you send a message to a Lambda function.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • iotEvents (dict) --

                        Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                        • inputName (string) --

                          The name of the AWS IoT Events input where the data is sent.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an AWS IoT Events input.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • sqs (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                        • queueUrl (string) --

                          The URL of the SQS queue where the data is written.

                        • useBase64 (boolean) --

                          Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon SQS queue.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • firehose (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                        • deliveryStreamName (string) --

                          The name of the Kinesis Data Firehose delivery stream where the data is written.

                        • separator (string) --

                          A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                        • payload (dict) --

                          You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDB (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • hashKeyType (string) --

                          The data type for the hash key (also called the partition key). You can specify the following values:

                          • STRING - The hash key is a string.

                          • NUMBER - The hash key is a number.

                          If you don't specify hashKeyType , the default value is STRING .

                        • hashKeyField (string) --

                          The name of the hash key (also called the partition key).

                        • hashKeyValue (string) --

                          The value of the hash key (also called the partition key).

                        • rangeKeyType (string) --

                          The data type for the range key (also called the sort key), You can specify the following values:

                          • STRING - The range key is a string.

                          • NUMBER - The range key is number.

                          If you don't specify rangeKeyField , the default value is STRING .

                        • rangeKeyField (string) --

                          The name of the range key (also called the sort key).

                        • rangeKeyValue (string) --

                          The value of the range key (also called the sort key).

                        • operation (string) --

                          The type of operation to perform. You can specify the following values:

                          • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                          • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                          If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                        • payloadField (string) --

                          The name of the DynamoDB column that receives the action payload.

                          If you don't specify this parameter, the name of the DynamoDB column is payload .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

                      • dynamoDBv2 (dict) --

                        Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                        • tableName (string) --

                          The name of the DynamoDB table.

                        • payload (dict) --

                          Information needed to configure the payload.

                          By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                          • contentExpression (string) --

                            The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                          • type (string) --

                            The value of the payload type can be either STRING or JSON .

        • initialStateName (string) --

          The state that is entered at the creation of each detector (instance).

      • detectorModelConfiguration (dict) --

        Information about how the detector is configured.

        • detectorModelName (string) --

          The name of the detector model.

        • detectorModelVersion (string) --

          The version of the detector model.

        • detectorModelDescription (string) --

          A brief description of the detector model.

        • detectorModelArn (string) --

          The ARN of the detector model.

        • roleArn (string) --

          The ARN of the role that grants permission to AWS IoT Events to perform its operations.

        • creationTime (datetime) --

          The time the detector model was created.

        • lastUpdateTime (datetime) --

          The time the detector model was last updated.

        • status (string) --

          The status of the detector model.

        • key (string) --

          The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.

          This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.

        • evaluationMethod (string) --

          Information about the order in which events are evaluated and how actions are executed.

UpdateDetectorModel (updated) Link ¶
Changes (request)
{'detectorModelDefinition': {'states': {'onEnter': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                        'hashKeyType': 'string',
                                                                                        'hashKeyValue': 'string',
                                                                                        'operation': 'string',
                                                                                        'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'},
                                                                                        'payloadField': 'string',
                                                                                        'rangeKeyField': 'string',
                                                                                        'rangeKeyType': 'string',
                                                                                        'rangeKeyValue': 'string',
                                                                                        'tableName': 'string'},
                                                                           'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                      'type': 'STRING '
                                                                                                              '| '
                                                                                                              'JSON'},
                                                                                          'tableName': 'string'},
                                                                           'firehose': {'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'}},
                                                                           'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                     'type': 'STRING '
                                                                                                             '| '
                                                                                                             'JSON'}},
                                                                           'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                           'type': 'STRING '
                                                                                                                   '| '
                                                                                                                   'JSON'}},
                                                                           'lambda': {'payload': {'contentExpression': 'string',
                                                                                                  'type': 'STRING '
                                                                                                          '| '
                                                                                                          'JSON'}},
                                                                           'sns': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}},
                                                                           'sqs': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}}}}},
                                        'onExit': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                       'hashKeyType': 'string',
                                                                                       'hashKeyValue': 'string',
                                                                                       'operation': 'string',
                                                                                       'payload': {'contentExpression': 'string',
                                                                                                   'type': 'STRING '
                                                                                                           '| '
                                                                                                           'JSON'},
                                                                                       'payloadField': 'string',
                                                                                       'rangeKeyField': 'string',
                                                                                       'rangeKeyType': 'string',
                                                                                       'rangeKeyValue': 'string',
                                                                                       'tableName': 'string'},
                                                                          'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                     'type': 'STRING '
                                                                                                             '| '
                                                                                                             'JSON'},
                                                                                         'tableName': 'string'},
                                                                          'firehose': {'payload': {'contentExpression': 'string',
                                                                                                   'type': 'STRING '
                                                                                                           '| '
                                                                                                           'JSON'}},
                                                                          'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'}},
                                                                          'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                          'type': 'STRING '
                                                                                                                  '| '
                                                                                                                  'JSON'}},
                                                                          'lambda': {'payload': {'contentExpression': 'string',
                                                                                                 'type': 'STRING '
                                                                                                         '| '
                                                                                                         'JSON'}},
                                                                          'sns': {'payload': {'contentExpression': 'string',
                                                                                              'type': 'STRING '
                                                                                                      '| '
                                                                                                      'JSON'}},
                                                                          'sqs': {'payload': {'contentExpression': 'string',
                                                                                              'type': 'STRING '
                                                                                                      '| '
                                                                                                      'JSON'}}}}},
                                        'onInput': {'events': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                        'hashKeyType': 'string',
                                                                                        'hashKeyValue': 'string',
                                                                                        'operation': 'string',
                                                                                        'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'},
                                                                                        'payloadField': 'string',
                                                                                        'rangeKeyField': 'string',
                                                                                        'rangeKeyType': 'string',
                                                                                        'rangeKeyValue': 'string',
                                                                                        'tableName': 'string'},
                                                                           'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                      'type': 'STRING '
                                                                                                              '| '
                                                                                                              'JSON'},
                                                                                          'tableName': 'string'},
                                                                           'firehose': {'payload': {'contentExpression': 'string',
                                                                                                    'type': 'STRING '
                                                                                                            '| '
                                                                                                            'JSON'}},
                                                                           'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                     'type': 'STRING '
                                                                                                             '| '
                                                                                                             'JSON'}},
                                                                           'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                           'type': 'STRING '
                                                                                                                   '| '
                                                                                                                   'JSON'}},
                                                                           'lambda': {'payload': {'contentExpression': 'string',
                                                                                                  'type': 'STRING '
                                                                                                          '| '
                                                                                                          'JSON'}},
                                                                           'sns': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}},
                                                                           'sqs': {'payload': {'contentExpression': 'string',
                                                                                               'type': 'STRING '
                                                                                                       '| '
                                                                                                       'JSON'}}}},
                                                    'transitionEvents': {'actions': {'dynamoDB': {'hashKeyField': 'string',
                                                                                                  'hashKeyType': 'string',
                                                                                                  'hashKeyValue': 'string',
                                                                                                  'operation': 'string',
                                                                                                  'payload': {'contentExpression': 'string',
                                                                                                              'type': 'STRING '
                                                                                                                      '| '
                                                                                                                      'JSON'},
                                                                                                  'payloadField': 'string',
                                                                                                  'rangeKeyField': 'string',
                                                                                                  'rangeKeyType': 'string',
                                                                                                  'rangeKeyValue': 'string',
                                                                                                  'tableName': 'string'},
                                                                                     'dynamoDBv2': {'payload': {'contentExpression': 'string',
                                                                                                                'type': 'STRING '
                                                                                                                        '| '
                                                                                                                        'JSON'},
                                                                                                    'tableName': 'string'},
                                                                                     'firehose': {'payload': {'contentExpression': 'string',
                                                                                                              'type': 'STRING '
                                                                                                                      '| '
                                                                                                                      'JSON'}},
                                                                                     'iotEvents': {'payload': {'contentExpression': 'string',
                                                                                                               'type': 'STRING '
                                                                                                                       '| '
                                                                                                                       'JSON'}},
                                                                                     'iotTopicPublish': {'payload': {'contentExpression': 'string',
                                                                                                                     'type': 'STRING '
                                                                                                                             '| '
                                                                                                                             'JSON'}},
                                                                                     'lambda': {'payload': {'contentExpression': 'string',
                                                                                                            'type': 'STRING '
                                                                                                                    '| '
                                                                                                                    'JSON'}},
                                                                                     'sns': {'payload': {'contentExpression': 'string',
                                                                                                         'type': 'STRING '
                                                                                                                 '| '
                                                                                                                 'JSON'}},
                                                                                     'sqs': {'payload': {'contentExpression': 'string',
                                                                                                         'type': 'STRING '
                                                                                                                 '| '
                                                                                                                 'JSON'}}}}}}}}

Updates a detector model. Detectors (instances) spawned by the previous version are deleted and then re-created as new inputs arrive.

See also: AWS API Documentation

Request Syntax

client.update_detector_model(
    detectorModelName='string',
    detectorModelDefinition={
        'states': [
            {
                'stateName': 'string',
                'onInput': {
                    'events': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ]
                        },
                    ],
                    'transitionEvents': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ],
                            'nextState': 'string'
                        },
                    ]
                },
                'onEnter': {
                    'events': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                },
                'onExit': {
                    'events': [
                        {
                            'eventName': 'string',
                            'condition': 'string',
                            'actions': [
                                {
                                    'setVariable': {
                                        'variableName': 'string',
                                        'value': 'string'
                                    },
                                    'sns': {
                                        'targetArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotTopicPublish': {
                                        'mqttTopic': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'setTimer': {
                                        'timerName': 'string',
                                        'seconds': 123,
                                        'durationExpression': 'string'
                                    },
                                    'clearTimer': {
                                        'timerName': 'string'
                                    },
                                    'resetTimer': {
                                        'timerName': 'string'
                                    },
                                    'lambda': {
                                        'functionArn': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'iotEvents': {
                                        'inputName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'sqs': {
                                        'queueUrl': 'string',
                                        'useBase64': True|False,
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'firehose': {
                                        'deliveryStreamName': 'string',
                                        'separator': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDB': {
                                        'hashKeyType': 'string',
                                        'hashKeyField': 'string',
                                        'hashKeyValue': 'string',
                                        'rangeKeyType': 'string',
                                        'rangeKeyField': 'string',
                                        'rangeKeyValue': 'string',
                                        'operation': 'string',
                                        'payloadField': 'string',
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    },
                                    'dynamoDBv2': {
                                        'tableName': 'string',
                                        'payload': {
                                            'contentExpression': 'string',
                                            'type': 'STRING'|'JSON'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                }
            },
        ],
        'initialStateName': 'string'
    },
    detectorModelDescription='string',
    roleArn='string',
    evaluationMethod='BATCH'|'SERIAL'
)
type detectorModelName

string

param detectorModelName

[REQUIRED]

The name of the detector model that is updated.

type detectorModelDefinition

dict

param detectorModelDefinition

[REQUIRED]

Information that defines how a detector operates.

  • states (list) -- [REQUIRED]

    Information about the states of the detector.

    • (dict) --

      Information that defines a state of a detector.

      • stateName (string) -- [REQUIRED]

        The name of the state.

      • onInput (dict) --

        When an input is received and the condition is TRUE, perform the specified actions .

        • events (list) --

          Specifies the actions performed when the condition evaluates to TRUE.

          • (dict) --

            Specifies the actions to be performed when the condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the event.

            • condition (string) --

              Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

        • transitionEvents (list) --

          Specifies the actions performed, and the next state entered, when a condition evaluates to TRUE.

          • (dict) --

            Specifies the actions performed and the next state entered when a condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the transition event.

            • condition (string) -- [REQUIRED]

              Required. A Boolean expression that when TRUE causes the actions to be performed and the nextState to be entered.

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

            • nextState (string) -- [REQUIRED]

              The next state to enter.

      • onEnter (dict) --

        When entering this state, perform these actions if the condition is TRUE.

        • events (list) --

          Specifies the actions that are performed when the state is entered and the condition is TRUE .

          • (dict) --

            Specifies the actions to be performed when the condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the event.

            • condition (string) --

              Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

      • onExit (dict) --

        When exiting this state, perform these actions if the specified condition is TRUE .

        • events (list) --

          Specifies the actions that are performed when the state is exited and the condition is TRUE .

          • (dict) --

            Specifies the actions to be performed when the condition evaluates to TRUE.

            • eventName (string) -- [REQUIRED]

              The name of the event.

            • condition (string) --

              Optional. The Boolean expression that, when TRUE, causes the actions to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).

            • actions (list) --

              The actions to be performed.

              • (dict) --

                An action to be performed when the condition is TRUE.

                • setVariable (dict) --

                  Sets a variable to a specified value.

                  • variableName (string) -- [REQUIRED]

                    The name of the variable.

                  • value (string) -- [REQUIRED]

                    The new value of the variable.

                • sns (dict) --

                  Sends an Amazon SNS message.

                  • targetArn (string) -- [REQUIRED]

                    The ARN of the Amazon SNS target where the message is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message as an Amazon SNS push notification.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotTopicPublish (dict) --

                  Publishes an MQTT message with the given topic to the AWS IoT message broker.

                  • mqttTopic (string) -- [REQUIRED]

                    The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name> ) and input values ($input.<input-name>.<path-to-datum> ) as the topic string.

                  • payload (dict) --

                    You can configure the action payload when you publish a message to an AWS IoT Core topic.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • setTimer (dict) --

                  Information needed to set the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer.

                  • seconds (integer) --

                    The number of seconds until the timer expires. The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.

                  • durationExpression (string) --

                    The duration of the timer, in seconds. You can use a string expression that includes numbers, variables ($variable.<variable-name> ), and input values ($input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.

                • clearTimer (dict) --

                  Information needed to clear the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to clear.

                • resetTimer (dict) --

                  Information needed to reset the timer.

                  • timerName (string) -- [REQUIRED]

                    The name of the timer to reset.

                • lambda (dict) --

                  Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

                  • functionArn (string) -- [REQUIRED]

                    The ARN of the Lambda function that is executed.

                  • payload (dict) --

                    You can configure the action payload when you send a message to a Lambda function.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • iotEvents (dict) --

                  Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.

                  • inputName (string) -- [REQUIRED]

                    The name of the AWS IoT Events input where the data is sent.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an AWS IoT Events input.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • sqs (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

                  • queueUrl (string) -- [REQUIRED]

                    The URL of the SQS queue where the data is written.

                  • useBase64 (boolean) --

                    Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE.

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon SQS queue.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • firehose (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

                  • deliveryStreamName (string) -- [REQUIRED]

                    The name of the Kinesis Data Firehose delivery stream where the data is written.

                  • separator (string) --

                    A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: 'n' (newline), 't' (tab), 'rn' (Windows newline), ',' (comma).

                  • payload (dict) --

                    You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDB (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • hashKeyType (string) --

                    The data type for the hash key (also called the partition key). You can specify the following values:

                    • STRING - The hash key is a string.

                    • NUMBER - The hash key is a number.

                    If you don't specify hashKeyType , the default value is STRING .

                  • hashKeyField (string) -- [REQUIRED]

                    The name of the hash key (also called the partition key).

                  • hashKeyValue (string) -- [REQUIRED]

                    The value of the hash key (also called the partition key).

                  • rangeKeyType (string) --

                    The data type for the range key (also called the sort key), You can specify the following values:

                    • STRING - The range key is a string.

                    • NUMBER - The range key is number.

                    If you don't specify rangeKeyField , the default value is STRING .

                  • rangeKeyField (string) --

                    The name of the range key (also called the sort key).

                  • rangeKeyValue (string) --

                    The value of the range key (also called the sort key).

                  • operation (string) --

                    The type of operation to perform. You can specify the following values:

                    • INSERT - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.

                    • UPDATE - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    • DELETE - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.

                    If you don't specify this parameter, AWS IoT Events triggers the INSERT operation.

                  • payloadField (string) --

                    The name of the DynamoDB column that receives the action payload.

                    If you don't specify this parameter, the name of the DynamoDB column is payload .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

                • dynamoDBv2 (dict) --

                  Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide .

                  • tableName (string) -- [REQUIRED]

                    The name of the DynamoDB table.

                  • payload (dict) --

                    Information needed to configure the payload.

                    By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression .

                    • contentExpression (string) -- [REQUIRED]

                      The content of the payload. You can use a string expression that includes quoted strings ('<string>' ), variables ($variable.<variable-name> ), input values ($input.<input-name>.<path-to-datum> ), string concatenations, and quoted strings that contain ${} as the content. The recommended maximum size of a content expression is 1 KB.

                    • type (string) -- [REQUIRED]

                      The value of the payload type can be either STRING or JSON .

  • initialStateName (string) -- [REQUIRED]

    The state that is entered at the creation of each detector (instance).

type detectorModelDescription

string

param detectorModelDescription

A brief description of the detector model.

type roleArn

string

param roleArn

[REQUIRED]

The ARN of the role that grants permission to AWS IoT Events to perform its operations.

type evaluationMethod

string

param evaluationMethod

Information about the order in which events are evaluated and how actions are executed.

rtype

dict

returns

Response Syntax

{
    'detectorModelConfiguration': {
        'detectorModelName': 'string',
        'detectorModelVersion': 'string',
        'detectorModelDescription': 'string',
        'detectorModelArn': 'string',
        'roleArn': 'string',
        'creationTime': datetime(2015, 1, 1),
        'lastUpdateTime': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'DEPRECATED'|'DRAFT'|'PAUSED'|'FAILED',
        'key': 'string',
        'evaluationMethod': 'BATCH'|'SERIAL'
    }
}

Response Structure

  • (dict) --

    • detectorModelConfiguration (dict) --

      Information about how the detector model is configured.

      • detectorModelName (string) --

        The name of the detector model.

      • detectorModelVersion (string) --

        The version of the detector model.

      • detectorModelDescription (string) --

        A brief description of the detector model.

      • detectorModelArn (string) --

        The ARN of the detector model.

      • roleArn (string) --

        The ARN of the role that grants permission to AWS IoT Events to perform its operations.

      • creationTime (datetime) --

        The time the detector model was created.

      • lastUpdateTime (datetime) --

        The time the detector model was last updated.

      • status (string) --

        The status of the detector model.

      • key (string) --

        The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.

        This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.

      • evaluationMethod (string) --

        Information about the order in which events are evaluated and how actions are executed.