IoTEvents

Table of Contents

Client

class IoTEvents.Client

A low-level client representing AWS IoT Events

AWS IoT Events monitors your equipment or device fleets for failures or changes in operation, and triggers actions when such events occur. You can use AWS IoT Events API operations to create, read, update, and delete inputs and detector models, and to list their versions.

import boto3

client = boto3.client('iotevents')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

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

Creates an alarm model to monitor an AWS IoT Events input attribute. You can use the alarm to get notified when the value is outside a specified range. For more information, see Create an alarm model in the AWS IoT Events Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_alarm_model(
    alarmModelName='string',
    alarmModelDescription='string',
    roleArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    key='string',
    severity=123,
    alarmRule={
        'simpleRule': {
            'inputProperty': 'string',
            'comparisonOperator': 'GREATER'|'GREATER_OR_EQUAL'|'LESS'|'LESS_OR_EQUAL'|'EQUAL'|'NOT_EQUAL',
            'threshold': 'string'
        }
    },
    alarmNotification={
        'notificationActions': [
            {
                'action': {
                    'lambdaAction': {
                        'functionArn': 'string',
                        'payload': {
                            'contentExpression': 'string',
                            'type': 'STRING'|'JSON'
                        }
                    }
                },
                'smsConfigurations': [
                    {
                        'senderId': 'string',
                        'additionalMessage': 'string',
                        'recipients': [
                            {
                                'ssoIdentity': {
                                    'identityStoreId': 'string',
                                    'userId': 'string'
                                }
                            },
                        ]
                    },
                ],
                'emailConfigurations': [
                    {
                        'from': 'string',
                        'content': {
                            'subject': 'string',
                            'additionalMessage': 'string'
                        },
                        'recipients': {
                            'to': [
                                {
                                    'ssoIdentity': {
                                        'identityStoreId': 'string',
                                        'userId': 'string'
                                    }
                                },
                            ]
                        }
                    },
                ]
            },
        ]
    },
    alarmEventActions={
        'alarmActions': [
            {
                'sns': {
                    'targetArn': 'string',
                    'payload': {
                        'contentExpression': 'string',
                        'type': 'STRING'|'JSON'
                    }
                },
                'iotTopicPublish': {
                    'mqttTopic': 'string',
                    'payload': {
                        'contentExpression': 'string',
                        'type': 'STRING'|'JSON'
                    }
                },
                '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'
                    }
                },
                'iotSiteWise': {
                    'entryId': 'string',
                    'assetId': 'string',
                    'propertyId': 'string',
                    'propertyAlias': 'string',
                    'propertyValue': {
                        'value': {
                            'stringValue': 'string',
                            'integerValue': 'string',
                            'doubleValue': 'string',
                            'booleanValue': 'string'
                        },
                        'timestamp': {
                            'timeInSeconds': 'string',
                            'offsetInNanos': 'string'
                        },
                        'quality': 'string'
                    }
                }
            },
        ]
    },
    alarmCapabilities={
        'initializationConfiguration': {
            'disabledOnInitialization': True|False
        },
        'acknowledgeFlow': {
            'enabled': True|False
        }
    }
)
Parameters
  • alarmModelName (string) --

    [REQUIRED]

    A unique name that helps you identify the alarm model. You can't change this name after you create the alarm model.

  • alarmModelDescription (string) -- A description that tells you what the alarm model detects.
  • roleArn (string) --

    [REQUIRED]

    The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

  • tags (list) --

    A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. For more information, see Tagging your AWS IoT Events resources in the AWS IoT Events Developer Guide .

    You can create up to 50 tags for one alarm 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.

  • key (string) -- An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this key to the alarm.
  • severity (integer) -- A non-negative integer that reflects the severity level of the alarm.
  • alarmRule (dict) --

    [REQUIRED]

    Defines when your alarm is invoked.

    • simpleRule (dict) --

      A rule that compares an input property value to a threshold value with a comparison operator.

      • inputProperty (string) -- [REQUIRED]

        The value on the left side of the comparison operator. You can specify an AWS IoT Events input attribute as an input property.

      • comparisonOperator (string) -- [REQUIRED]

        The comparison operator.

      • threshold (string) -- [REQUIRED]

        The value on the right side of the comparison operator. You can enter a number or specify an AWS IoT Events input attribute.

  • alarmNotification (dict) --

    Contains information about one or more notification actions.

    • notificationActions (list) --

      Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on this alarm model.

      • (dict) --

        Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on this alarm model.

        • action (dict) -- [REQUIRED]

          Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function provided by AWS IoT Events .

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

        • smsConfigurations (list) --

          Contains the configuration information of SMS notifications.

          • (dict) --

            Contains the configuration information of SMS notifications.

            • senderId (string) --

              The sender ID.

            • additionalMessage (string) --

              The message that you want to send. The message can be up to 200 characters.

            • recipients (list) -- [REQUIRED]

              Specifies one or more recipients who receive the message.

              • (dict) --

                The information that identifies the recipient.

                • ssoIdentity (dict) --

                  The AWS Single Sign-On (AWS SSO) authentication information.

                  • identityStoreId (string) -- [REQUIRED]

                    The ID of the AWS SSO identity store.

                  • userId (string) --

                    The user ID.

        • emailConfigurations (list) --

          Contains the configuration information of email notifications.

          • (dict) --

            Contains the configuration information of email notifications.

            • from (string) -- [REQUIRED]

              The email address that sends emails.

              Warning

              If you use the AWS IoT Events managed AWS Lambda function to manage your emails, you must verify the email address that sends emails in Amazon SES .

            • content (dict) --

              Contains the subject and message of an email.

              • subject (string) --

                The subject of the email.

              • additionalMessage (string) --

                The message that you want to send. The message can be up to 200 characters.

            • recipients (dict) -- [REQUIRED]

              Contains the information of one or more recipients who receive the emails.

              • to (list) --

                Specifies one or more recipients who receive the email.

                • (dict) --

                  The information that identifies the recipient.

                  • ssoIdentity (dict) --

                    The AWS Single Sign-On (AWS SSO) authentication information.

                    • identityStoreId (string) -- [REQUIRED]

                      The ID of the AWS SSO identity store.

                    • userId (string) --

                      The user ID.

  • alarmEventActions (dict) --

    Contains information about one or more alarm actions.

    • alarmActions (list) --

      Specifies one or more supported actions to receive notifications when the alarm state changes.

      • (dict) --

        Specifies one of the following actions to receive notifications when the alarm state changes.

        • sns (dict) --

          Information required to publish the 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) --

          Information required to publish the MQTT message through 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 .

        • 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 an AWS IoT Events input, passing in 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) --

          Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.

          You must use expressions for all parameters in DynamoDBAction . The expressions accept literals, operators, functions, references, and substitution templates.

          Examples
          • For literal values, the expressions must contain single quotes. For example, the value for the hashKeyType parameter can be 'STRING' .
          • For references, you must specify either variables or input values. For example, the value for the hashKeyField parameter can be $input.GreenhouseInput.name .
          • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the hashKeyValue parameter uses a substitution template. '${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
          • For a string concatenation, you must use + . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the tableName parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField parameter is <payload-field>_raw .

          • 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). The hashKeyField value must match the partition key of the target DynamoDB table.

          • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

          • 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. The tableName value must match the table name of the target 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) --

          Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.

          You must use expressions for all parameters in DynamoDBv2Action . The expressions accept literals, operators, functions, references, and substitution templates.

          Examples
          • For literal values, the expressions must contain single quotes. For example, the value for the tableName parameter can be 'GreenhouseTemperatureTable' .
          • For references, you must specify either variables or input values. For example, the value for the tableName parameter can be $variable.ddbtableName .
          • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the contentExpression parameter in Payload uses a substitution template. '{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
          • For a string concatenation, you must use + . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the tableName parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          The value for the type parameter in Payload must be JSON .

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

        • iotSiteWise (dict) --

          Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.

          You must use expressions for all parameters in IotSiteWiseAction . The expressions accept literals, operators, functions, references, and substitutions templates.

          Examples
          • For literal values, the expressions must contain single quotes. For example, the value for the propertyAlias parameter can be '/company/windfarm/3/turbine/7/temperature' .
          • For references, you must specify either variables or input values. For example, the value for the assetId parameter can be $input.TurbineInput.assetId1 .
          • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the propertyAlias parameter uses a substitution template. 'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'

          You must specify either propertyAlias or both assetId and propertyId to identify the target asset property in AWS IoT SiteWise.

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          • entryId (string) --

            A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

          • assetId (string) --

            The ID of the asset that has the specified property.

          • propertyId (string) --

            The ID of the asset property.

          • propertyAlias (string) --

            The alias of the asset property.

          • propertyValue (dict) --

            The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

            • value (dict) --

              The value to send to an asset property.

              • stringValue (string) --

                The asset property value is a string. You must use an expression, and the evaluated result should be a string.

              • integerValue (string) --

                The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

              • doubleValue (string) --

                The asset property value is a double. You must use an expression, and the evaluated result should be a double.

              • booleanValue (string) --

                The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

            • timestamp (dict) --

              The timestamp associated with the asset property value. The default is the current event time.

              • timeInSeconds (string) -- [REQUIRED]

                The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

              • offsetInNanos (string) --

                The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

            • quality (string) --

              The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

  • alarmCapabilities (dict) --

    Contains the configuration information of alarm state changes.

    • initializationConfiguration (dict) --

      Specifies the default alarm state. The configuration applies to all alarms that were created based on this alarm model.

      • disabledOnInitialization (boolean) -- [REQUIRED]

        The value must be TRUE or FALSE . If FALSE , all alarm instances created based on the alarm model are activated. The default value is TRUE .

    • acknowledgeFlow (dict) --

      Specifies whether to get notified for alarm state changes.

      • enabled (boolean) -- [REQUIRED]

        The value must be TRUE or FALSE . If TRUE , you receive a notification when the alarm state changes. You must choose to acknowledge the notification before the alarm state can return to NORMAL . If FALSE , you won't receive notifications. The alarm automatically changes to the NORMAL state when the input property value returns to the specified range.

Return type

dict

Returns

Response Syntax

{
    'creationTime': datetime(2015, 1, 1),
    'alarmModelArn': 'string',
    'alarmModelVersion': 'string',
    'lastUpdateTime': datetime(2015, 1, 1),
    'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'FAILED'
}

Response Structure

  • (dict) --

    • creationTime (datetime) --

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

    • alarmModelArn (string) --

      The ARN of the alarm model. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

    • alarmModelVersion (string) --

      The version of the alarm model.

    • lastUpdateTime (datetime) --

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

    • status (string) --

      The status of the alarm model. The status can be one of the following values:

      • ACTIVE - The alarm model is active and it's ready to evaluate data.
      • ACTIVATING - AWS IoT Events is activating your alarm model. Activating an alarm model can take up to a few minutes.
      • INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. Check your alarm model information and update the alarm model.
      • FAILED - You couldn't create or update the alarm model. Check your alarm model information and try again.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ResourceAlreadyExistsException
  • IoTEvents.Client.exceptions.LimitExceededException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
create_detector_model(**kwargs)

Creates a detector model.

See also: AWS API Documentation

Request Syntax

response = 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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ],
                    '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ],
                            '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                },
                '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                }
            },
        ],
        'initialStateName': 'string'
    },
    detectorModelDescription='string',
    key='string',
    roleArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    evaluationMethod='BATCH'|'SERIAL'
)
Parameters
  • detectorModelName (string) --

    [REQUIRED]

    The name of the detector model.

  • detectorModelDefinition (dict) --

    [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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

          • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

              • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

        • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

    • initialStateName (string) -- [REQUIRED]

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

  • detectorModelDescription (string) -- A brief description of the detector model.
  • key (string) -- 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.
  • roleArn (string) --

    [REQUIRED]

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

  • tags (list) --

    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.

  • evaluationMethod (string) -- Information about the order in which events are evaluated and how actions are executed.
Return type

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.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ResourceAlreadyExistsException
  • IoTEvents.Client.exceptions.LimitExceededException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
create_input(**kwargs)

Creates an input.

See also: AWS API Documentation

Request Syntax

response = client.create_input(
    inputName='string',
    inputDescription='string',
    inputDefinition={
        'attributes': [
            {
                'jsonPath': 'string'
            },
        ]
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • inputName (string) --

    [REQUIRED]

    The name you want to give to the input.

  • inputDescription (string) -- A brief description of the input.
  • inputDefinition (dict) --

    [REQUIRED]

    The definition of the input.

    • attributes (list) -- [REQUIRED]

      The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage . Each such message contains a JSON payload, and those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors that monitor this input.

      • (dict) --

        The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage . Each such message contains a JSON payload. Those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors.

        • jsonPath (string) -- [REQUIRED]

          An expression that specifies an attribute-value pair in a JSON structure. Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to AWS IoT Events (BatchPutMessage ). Each such message contains a JSON payload. The attribute (and its paired value) specified here are available for use in the condition expressions used by detectors.

          Syntax: <field-name>.<field-name>...

  • tags (list) --

    Metadata that can be used to manage the input.

    • (dict) --

      Metadata that can be used to manage the resource.

      • key (string) -- [REQUIRED]

        The tag's key.

      • value (string) -- [REQUIRED]

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'inputConfiguration': {
        'inputName': 'string',
        'inputDescription': 'string',
        'inputArn': 'string',
        'creationTime': datetime(2015, 1, 1),
        'lastUpdateTime': datetime(2015, 1, 1),
        'status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'
    }
}

Response Structure

  • (dict) --

    • inputConfiguration (dict) --

      Information about the configuration of the input.

      • inputName (string) --

        The name of the input.

      • inputDescription (string) --

        A brief description of the input.

      • inputArn (string) --

        The ARN of the input.

      • creationTime (datetime) --

        The time the input was created.

      • lastUpdateTime (datetime) --

        The last time the input was updated.

      • status (string) --

        The status of the input.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
  • IoTEvents.Client.exceptions.ResourceAlreadyExistsException
delete_alarm_model(**kwargs)

Deletes an alarm model. Any alarm instances that were created based on this alarm model are also deleted. This action can't be undone.

See also: AWS API Documentation

Request Syntax

response = client.delete_alarm_model(
    alarmModelName='string'
)
Parameters
alarmModelName (string) --

[REQUIRED]

The name of the alarm model.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
delete_detector_model(**kwargs)

Deletes a detector model. Any active instances of the detector model are also deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_detector_model(
    detectorModelName='string'
)
Parameters
detectorModelName (string) --

[REQUIRED]

The name of the detector model to be deleted.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
delete_input(**kwargs)

Deletes an input.

See also: AWS API Documentation

Request Syntax

response = client.delete_input(
    inputName='string'
)
Parameters
inputName (string) --

[REQUIRED]

The name of the input to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
  • IoTEvents.Client.exceptions.ResourceInUseException
describe_alarm_model(**kwargs)

Retrieves information about an alarm model. If you don't specify a value for the alarmModelVersion parameter, the latest version is returned.

See also: AWS API Documentation

Request Syntax

response = client.describe_alarm_model(
    alarmModelName='string',
    alarmModelVersion='string'
)
Parameters
  • alarmModelName (string) --

    [REQUIRED]

    The name of the alarm model.

  • alarmModelVersion (string) -- The version of the alarm model.
Return type

dict

Returns

Response Syntax

{
    'creationTime': datetime(2015, 1, 1),
    'alarmModelArn': 'string',
    'alarmModelVersion': 'string',
    'lastUpdateTime': datetime(2015, 1, 1),
    'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'FAILED',
    'statusMessage': 'string',
    'alarmModelName': 'string',
    'alarmModelDescription': 'string',
    'roleArn': 'string',
    'key': 'string',
    'severity': 123,
    'alarmRule': {
        'simpleRule': {
            'inputProperty': 'string',
            'comparisonOperator': 'GREATER'|'GREATER_OR_EQUAL'|'LESS'|'LESS_OR_EQUAL'|'EQUAL'|'NOT_EQUAL',
            'threshold': 'string'
        }
    },
    'alarmNotification': {
        'notificationActions': [
            {
                'action': {
                    'lambdaAction': {
                        'functionArn': 'string',
                        'payload': {
                            'contentExpression': 'string',
                            'type': 'STRING'|'JSON'
                        }
                    }
                },
                'smsConfigurations': [
                    {
                        'senderId': 'string',
                        'additionalMessage': 'string',
                        'recipients': [
                            {
                                'ssoIdentity': {
                                    'identityStoreId': 'string',
                                    'userId': 'string'
                                }
                            },
                        ]
                    },
                ],
                'emailConfigurations': [
                    {
                        'from': 'string',
                        'content': {
                            'subject': 'string',
                            'additionalMessage': 'string'
                        },
                        'recipients': {
                            'to': [
                                {
                                    'ssoIdentity': {
                                        'identityStoreId': 'string',
                                        'userId': 'string'
                                    }
                                },
                            ]
                        }
                    },
                ]
            },
        ]
    },
    'alarmEventActions': {
        'alarmActions': [
            {
                'sns': {
                    'targetArn': 'string',
                    'payload': {
                        'contentExpression': 'string',
                        'type': 'STRING'|'JSON'
                    }
                },
                'iotTopicPublish': {
                    'mqttTopic': 'string',
                    'payload': {
                        'contentExpression': 'string',
                        'type': 'STRING'|'JSON'
                    }
                },
                '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'
                    }
                },
                'iotSiteWise': {
                    'entryId': 'string',
                    'assetId': 'string',
                    'propertyId': 'string',
                    'propertyAlias': 'string',
                    'propertyValue': {
                        'value': {
                            'stringValue': 'string',
                            'integerValue': 'string',
                            'doubleValue': 'string',
                            'booleanValue': 'string'
                        },
                        'timestamp': {
                            'timeInSeconds': 'string',
                            'offsetInNanos': 'string'
                        },
                        'quality': 'string'
                    }
                }
            },
        ]
    },
    'alarmCapabilities': {
        'initializationConfiguration': {
            'disabledOnInitialization': True|False
        },
        'acknowledgeFlow': {
            'enabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • creationTime (datetime) --

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

    • alarmModelArn (string) --

      The ARN of the alarm model. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

    • alarmModelVersion (string) --

      The version of the alarm model.

    • lastUpdateTime (datetime) --

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

    • status (string) --

      The status of the alarm model. The status can be one of the following values:

      • ACTIVE - The alarm model is active and it's ready to evaluate data.
      • ACTIVATING - AWS IoT Events is activating your alarm model. Activating an alarm model can take up to a few minutes.
      • INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. Check your alarm model information and update the alarm model.
      • FAILED - You couldn't create or update the alarm model. Check your alarm model information and try again.
    • statusMessage (string) --

      Contains information about the status of the alarm model.

    • alarmModelName (string) --

      The name of the alarm model.

    • alarmModelDescription (string) --

      The description of the alarm model.

    • roleArn (string) --

      The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

    • key (string) --

      An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this key to the alarm.

    • severity (integer) --

      A non-negative integer that reflects the severity level of the alarm.

    • alarmRule (dict) --

      Defines when your alarm is invoked.

      • simpleRule (dict) --

        A rule that compares an input property value to a threshold value with a comparison operator.

        • inputProperty (string) --

          The value on the left side of the comparison operator. You can specify an AWS IoT Events input attribute as an input property.

        • comparisonOperator (string) --

          The comparison operator.

        • threshold (string) --

          The value on the right side of the comparison operator. You can enter a number or specify an AWS IoT Events input attribute.

    • alarmNotification (dict) --

      Contains information about one or more notification actions.

      • notificationActions (list) --

        Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on this alarm model.

        • (dict) --

          Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on this alarm model.

          • action (dict) --

            Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function provided by AWS IoT Events .

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

          • smsConfigurations (list) --

            Contains the configuration information of SMS notifications.

            • (dict) --

              Contains the configuration information of SMS notifications.

              • senderId (string) --

                The sender ID.

              • additionalMessage (string) --

                The message that you want to send. The message can be up to 200 characters.

              • recipients (list) --

                Specifies one or more recipients who receive the message.

                • (dict) --

                  The information that identifies the recipient.

                  • ssoIdentity (dict) --

                    The AWS Single Sign-On (AWS SSO) authentication information.

                    • identityStoreId (string) --

                      The ID of the AWS SSO identity store.

                    • userId (string) --

                      The user ID.

          • emailConfigurations (list) --

            Contains the configuration information of email notifications.

            • (dict) --

              Contains the configuration information of email notifications.

              • from (string) --

                The email address that sends emails.

                Warning

                If you use the AWS IoT Events managed AWS Lambda function to manage your emails, you must verify the email address that sends emails in Amazon SES .

              • content (dict) --

                Contains the subject and message of an email.

                • subject (string) --

                  The subject of the email.

                • additionalMessage (string) --

                  The message that you want to send. The message can be up to 200 characters.

              • recipients (dict) --

                Contains the information of one or more recipients who receive the emails.

                • to (list) --

                  Specifies one or more recipients who receive the email.

                  • (dict) --

                    The information that identifies the recipient.

                    • ssoIdentity (dict) --

                      The AWS Single Sign-On (AWS SSO) authentication information.

                      • identityStoreId (string) --

                        The ID of the AWS SSO identity store.

                      • userId (string) --

                        The user ID.

    • alarmEventActions (dict) --

      Contains information about one or more alarm actions.

      • alarmActions (list) --

        Specifies one or more supported actions to receive notifications when the alarm state changes.

        • (dict) --

          Specifies one of the following actions to receive notifications when the alarm state changes.

          • sns (dict) --

            Information required to publish the 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) --

            Information required to publish the MQTT message through 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 .

          • 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 an AWS IoT Events input, passing in 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) --

            Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.

            You must use expressions for all parameters in DynamoDBAction . The expressions accept literals, operators, functions, references, and substitution templates.

            Examples

            • For literal values, the expressions must contain single quotes. For example, the value for the hashKeyType parameter can be 'STRING' .
            • For references, you must specify either variables or input values. For example, the value for the hashKeyField parameter can be $input.GreenhouseInput.name .
            • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the hashKeyValue parameter uses a substitution template. '${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
            • For a string concatenation, you must use + . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the tableName parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

            For more information, see Expressions in the AWS IoT Events Developer Guide .

            If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField parameter is <payload-field>_raw .

            • 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). The hashKeyField value must match the partition key of the target DynamoDB table.

            • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

            • 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. The tableName value must match the table name of the target 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) --

            Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.

            You must use expressions for all parameters in DynamoDBv2Action . The expressions accept literals, operators, functions, references, and substitution templates.

            Examples

            • For literal values, the expressions must contain single quotes. For example, the value for the tableName parameter can be 'GreenhouseTemperatureTable' .
            • For references, you must specify either variables or input values. For example, the value for the tableName parameter can be $variable.ddbtableName .
            • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the contentExpression parameter in Payload uses a substitution template. '{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
            • For a string concatenation, you must use + . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the tableName parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

            For more information, see Expressions in the AWS IoT Events Developer Guide .

            The value for the type parameter in Payload must be JSON .

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

          • iotSiteWise (dict) --

            Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.

            You must use expressions for all parameters in IotSiteWiseAction . The expressions accept literals, operators, functions, references, and substitutions templates.

            Examples

            • For literal values, the expressions must contain single quotes. For example, the value for the propertyAlias parameter can be '/company/windfarm/3/turbine/7/temperature' .
            • For references, you must specify either variables or input values. For example, the value for the assetId parameter can be $input.TurbineInput.assetId1 .
            • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the propertyAlias parameter uses a substitution template. 'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'

            You must specify either propertyAlias or both assetId and propertyId to identify the target asset property in AWS IoT SiteWise.

            For more information, see Expressions in the AWS IoT Events Developer Guide .

            • entryId (string) --

              A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

            • assetId (string) --

              The ID of the asset that has the specified property.

            • propertyId (string) --

              The ID of the asset property.

            • propertyAlias (string) --

              The alias of the asset property.

            • propertyValue (dict) --

              The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

              • value (dict) --

                The value to send to an asset property.

                • stringValue (string) --

                  The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                • integerValue (string) --

                  The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                • doubleValue (string) --

                  The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                • booleanValue (string) --

                  The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

              • timestamp (dict) --

                The timestamp associated with the asset property value. The default is the current event time.

                • timeInSeconds (string) --

                  The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                • offsetInNanos (string) --

                  The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

              • quality (string) --

                The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

    • alarmCapabilities (dict) --

      Contains the configuration information of alarm state changes.

      • initializationConfiguration (dict) --

        Specifies the default alarm state. The configuration applies to all alarms that were created based on this alarm model.

        • disabledOnInitialization (boolean) --

          The value must be TRUE or FALSE . If FALSE , all alarm instances created based on the alarm model are activated. The default value is TRUE .

      • acknowledgeFlow (dict) --

        Specifies whether to get notified for alarm state changes.

        • enabled (boolean) --

          The value must be TRUE or FALSE . If TRUE , you receive a notification when the alarm state changes. You must choose to acknowledge the notification before the alarm state can return to NORMAL . If FALSE , you won't receive notifications. The alarm automatically changes to the NORMAL state when the input property value returns to the specified range.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
describe_detector_model(**kwargs)

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

response = client.describe_detector_model(
    detectorModelName='string',
    detectorModelVersion='string'
)
Parameters
  • detectorModelName (string) --

    [REQUIRED]

    The name of the detector model.

  • detectorModelVersion (string) -- The version of the detector model.
Return type

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'
                                            }
                                        },
                                        'iotSiteWise': {
                                            'entryId': 'string',
                                            'assetId': 'string',
                                            'propertyId': 'string',
                                            'propertyAlias': 'string',
                                            'propertyValue': {
                                                'value': {
                                                    'stringValue': 'string',
                                                    'integerValue': 'string',
                                                    'doubleValue': 'string',
                                                    'booleanValue': 'string'
                                                },
                                                'timestamp': {
                                                    'timeInSeconds': 'string',
                                                    'offsetInNanos': 'string'
                                                },
                                                'quality': 'string'
                                            }
                                        }
                                    },
                                ]
                            },
                        ],
                        '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'
                                            }
                                        },
                                        'iotSiteWise': {
                                            'entryId': 'string',
                                            'assetId': 'string',
                                            'propertyId': 'string',
                                            'propertyAlias': 'string',
                                            'propertyValue': {
                                                'value': {
                                                    'stringValue': 'string',
                                                    'integerValue': 'string',
                                                    'doubleValue': 'string',
                                                    'booleanValue': 'string'
                                                },
                                                'timestamp': {
                                                    'timeInSeconds': 'string',
                                                    'offsetInNanos': 'string'
                                                },
                                                'quality': 'string'
                                            }
                                        }
                                    },
                                ],
                                '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'
                                            }
                                        },
                                        'iotSiteWise': {
                                            'entryId': 'string',
                                            'assetId': 'string',
                                            'propertyId': 'string',
                                            'propertyAlias': 'string',
                                            'propertyValue': {
                                                'value': {
                                                    'stringValue': 'string',
                                                    'integerValue': 'string',
                                                    'doubleValue': 'string',
                                                    'booleanValue': 'string'
                                                },
                                                'timestamp': {
                                                    'timeInSeconds': 'string',
                                                    'offsetInNanos': 'string'
                                                },
                                                'quality': 'string'
                                            }
                                        }
                                    },
                                ]
                            },
                        ]
                    },
                    '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'
                                            }
                                        },
                                        'iotSiteWise': {
                                            'entryId': 'string',
                                            'assetId': 'string',
                                            'propertyId': 'string',
                                            'propertyAlias': 'string',
                                            'propertyValue': {
                                                'value': {
                                                    'stringValue': 'string',
                                                    'integerValue': 'string',
                                                    'doubleValue': 'string',
                                                    'booleanValue': 'string'
                                                },
                                                'timestamp': {
                                                    'timeInSeconds': 'string',
                                                    'offsetInNanos': 'string'
                                                },
                                                'quality': 'string'
                                            }
                                        }
                                    },
                                ]
                            },
                        ]
                    }
                },
            ],
            '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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                        • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                        • 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. The tableName value must match the table name of the target 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 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 .

                      • iotSiteWise (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                        • entryId (string) --

                          A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                        • assetId (string) --

                          The ID of the asset that has the specified property.

                        • propertyId (string) --

                          The ID of the asset property.

                        • propertyAlias (string) --

                          The alias of the asset property.

                        • propertyValue (dict) --

                          The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                          • value (dict) --

                            The value to send to an asset property.

                            • stringValue (string) --

                              The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                            • integerValue (string) --

                              The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                            • doubleValue (string) --

                              The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                            • booleanValue (string) --

                              The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                          • timestamp (dict) --

                            The timestamp associated with the asset property value. The default is the current event time.

                            • timeInSeconds (string) --

                              The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                            • offsetInNanos (string) --

                              The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                          • quality (string) --

                            The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

              • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                        • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                        • 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. The tableName value must match the table name of the target 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 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 .

                      • iotSiteWise (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                        • entryId (string) --

                          A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                        • assetId (string) --

                          The ID of the asset that has the specified property.

                        • propertyId (string) --

                          The ID of the asset property.

                        • propertyAlias (string) --

                          The alias of the asset property.

                        • propertyValue (dict) --

                          The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                          • value (dict) --

                            The value to send to an asset property.

                            • stringValue (string) --

                              The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                            • integerValue (string) --

                              The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                            • doubleValue (string) --

                              The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                            • booleanValue (string) --

                              The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                          • timestamp (dict) --

                            The timestamp associated with the asset property value. The default is the current event time.

                            • timeInSeconds (string) --

                              The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                            • offsetInNanos (string) --

                              The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                          • quality (string) --

                            The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

                  • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                        • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                        • 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. The tableName value must match the table name of the target 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 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 .

                      • iotSiteWise (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                        • entryId (string) --

                          A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                        • assetId (string) --

                          The ID of the asset that has the specified property.

                        • propertyId (string) --

                          The ID of the asset property.

                        • propertyAlias (string) --

                          The alias of the asset property.

                        • propertyValue (dict) --

                          The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                          • value (dict) --

                            The value to send to an asset property.

                            • stringValue (string) --

                              The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                            • integerValue (string) --

                              The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                            • doubleValue (string) --

                              The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                            • booleanValue (string) --

                              The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                          • timestamp (dict) --

                            The timestamp associated with the asset property value. The default is the current event time.

                            • timeInSeconds (string) --

                              The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                            • offsetInNanos (string) --

                              The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                          • quality (string) --

                            The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

            • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                        • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                        • 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. The tableName value must match the table name of the target 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 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 .

                      • iotSiteWise (dict) --

                        Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                        • entryId (string) --

                          A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                        • assetId (string) --

                          The ID of the asset that has the specified property.

                        • propertyId (string) --

                          The ID of the asset property.

                        • propertyAlias (string) --

                          The alias of the asset property.

                        • propertyValue (dict) --

                          The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                          • value (dict) --

                            The value to send to an asset property.

                            • stringValue (string) --

                              The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                            • integerValue (string) --

                              The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                            • doubleValue (string) --

                              The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                            • booleanValue (string) --

                              The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                          • timestamp (dict) --

                            The timestamp associated with the asset property value. The default is the current event time.

                            • timeInSeconds (string) --

                              The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                            • offsetInNanos (string) --

                              The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                          • quality (string) --

                            The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
describe_detector_model_analysis(**kwargs)

Retrieves runtime information about a detector model analysis.

Note

After AWS IoT Events starts analyzing your detector model, you have up to 24 hours to retrieve the analysis results.

See also: AWS API Documentation

Request Syntax

response = client.describe_detector_model_analysis(
    analysisId='string'
)
Parameters
analysisId (string) --

[REQUIRED]

The ID of the analysis result that you want to retrieve.

Return type
dict
Returns
Response Syntax
{
    'status': 'RUNNING'|'COMPLETE'|'FAILED'
}

Response Structure

  • (dict) --
    • status (string) --

      The status of the analysis activity. The status can be one of the following values:

      • RUNNING - AWS IoT Events is analyzing your detector model. This process can take several minutes to complete.
      • COMPLETE - AWS IoT Events finished analyzing your detector model.
      • FAILED - AWS IoT Events couldn't analyze your detector model. Try again later.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
describe_input(**kwargs)

Describes an input.

See also: AWS API Documentation

Request Syntax

response = client.describe_input(
    inputName='string'
)
Parameters
inputName (string) --

[REQUIRED]

The name of the input.

Return type
dict
Returns
Response Syntax
{
    'input': {
        'inputConfiguration': {
            'inputName': 'string',
            'inputDescription': 'string',
            'inputArn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdateTime': datetime(2015, 1, 1),
            'status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'
        },
        'inputDefinition': {
            'attributes': [
                {
                    'jsonPath': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --
    • input (dict) --

      Information about the input.

      • inputConfiguration (dict) --

        Information about the configuration of an input.

        • inputName (string) --

          The name of the input.

        • inputDescription (string) --

          A brief description of the input.

        • inputArn (string) --

          The ARN of the input.

        • creationTime (datetime) --

          The time the input was created.

        • lastUpdateTime (datetime) --

          The last time the input was updated.

        • status (string) --

          The status of the input.

      • inputDefinition (dict) --

        The definition of the input.

        • attributes (list) --

          The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage . Each such message contains a JSON payload, and those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors that monitor this input.

          • (dict) --

            The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage . Each such message contains a JSON payload. Those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors.

            • jsonPath (string) --

              An expression that specifies an attribute-value pair in a JSON structure. Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to AWS IoT Events (BatchPutMessage ). Each such message contains a JSON payload. The attribute (and its paired value) specified here are available for use in the condition expressions used by detectors.

              Syntax: <field-name>.<field-name>...

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
describe_logging_options()

Retrieves the current settings of the AWS IoT Events logging options.

See also: AWS API Documentation

Request Syntax

response = client.describe_logging_options()
Return type
dict
Returns
Response Syntax
{
    'loggingOptions': {
        'roleArn': 'string',
        'level': 'ERROR'|'INFO'|'DEBUG',
        'enabled': True|False,
        'detectorDebugOptions': [
            {
                'detectorModelName': 'string',
                'keyValue': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --
    • loggingOptions (dict) --

      The current settings of the AWS IoT Events logging options.

      • roleArn (string) --

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

      • level (string) --

        The logging level.

      • enabled (boolean) --

        If TRUE, logging is enabled for AWS IoT Events.

      • detectorDebugOptions (list) --

        Information that identifies those detector models and their detectors (instances) for which the logging level is given.

        • (dict) --

          The detector model and the specific detectors (instances) for which the logging level is given.

          • detectorModelName (string) --

            The name of the detector model.

          • keyValue (string) --

            The value of the input attribute key used to create the detector (the instance of the detector model).

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
  • IoTEvents.Client.exceptions.UnsupportedOperationException
get_detector_model_analysis_results(**kwargs)

Retrieves one or more analysis results of the detector model.

Note

After AWS IoT Events starts analyzing your detector model, you have up to 24 hours to retrieve the analysis results.

See also: AWS API Documentation

Request Syntax

response = client.get_detector_model_analysis_results(
    analysisId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • analysisId (string) --

    [REQUIRED]

    The ID of the analysis result that you want to retrieve.

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

dict

Returns

Response Syntax

{
    'analysisResults': [
        {
            'type': 'string',
            'level': 'INFO'|'WARNING'|'ERROR',
            'message': 'string',
            'locations': [
                {
                    'path': 'string'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • analysisResults (list) --

      Contains information about one or more analysis results.

      • (dict) --

        Contains the result of the analysis.

        • type (string) --

          The type of the analysis result. Analyses fall into the following types based on the validators used to generate the analysis result:

          • supported-actions - You must specify AWS IoT Events supported actions that work with other AWS services in a supported AWS Region.
          • service-limits - Resources or API operations can't exceed service quotas (also known as limits). Update your detector model or request a quota increase.
          • structure - The detector model must follow a structure that AWS IoT Events supports.
          • expression-syntax - Your expression must follow the required syntax.
          • data-type - Data types referenced in the detector model must be compatible.
          • referenced-data - You must define the data referenced in your detector model before you can use the data.
          • referenced-resource - Resources that the detector model uses must be available.

          For more information, see Running detector model analyses in the AWS IoT Events Developer Guide .

        • level (string) --

          The severity level of the analysis result. Based on the severity level, analysis results fall into three general categories:

          • INFO - An information result tells you about a significant field in your detector model. This type of result usually doesn't require immediate action.
          • WARNING - A warning result draws special attention to fields that might cause issues for your detector model. We recommend that you review warnings and take necessary actions before you use your detector model in production environments. Otherwise, the detector model might not work as expected.
          • ERROR - An error result notifies you about a problem found in your detector model. You must fix all errors before you can publish your detector model.
        • message (string) --

          Contains additional information about the analysis result.

        • locations (list) --

          Contains one or more locations that you can use to locate the fields in your detector model that the analysis result references.

          • (dict) --

            Contains information that you can use to locate the field in your detector model that the analysis result references.

            • path (string) --

              A JsonPath expression that identifies the error field in your detector model.

    • nextToken (string) --

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

Exceptions

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

Create a paginator for an operation.

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

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_alarm_model_versions(**kwargs)

Lists all the versions of an alarm model. The operation returns only the metadata associated with each alarm model version.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The name of the alarm model.

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

dict

Returns

Response Syntax

{
    'alarmModelVersionSummaries': [
        {
            'alarmModelName': 'string',
            'alarmModelArn': 'string',
            'alarmModelVersion': 'string',
            'roleArn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdateTime': datetime(2015, 1, 1),
            'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'FAILED',
            'statusMessage': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • alarmModelVersionSummaries (list) --

      A list that summarizes each alarm model version.

      • (dict) --

        Contains a summary of an alarm model version.

        • alarmModelName (string) --

          The name of the alarm model.

        • alarmModelArn (string) --

          The ARN of the alarm model. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

        • alarmModelVersion (string) --

          The version of the alarm model.

        • roleArn (string) --

          The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

        • creationTime (datetime) --

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

        • lastUpdateTime (datetime) --

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

        • status (string) --

          The status of the alarm model. The status can be one of the following values:

          • ACTIVE - The alarm model is active and it's ready to evaluate data.
          • ACTIVATING - AWS IoT Events is activating your alarm model. Activating an alarm model can take up to a few minutes.
          • INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. Check your alarm model information and update the alarm model.
          • FAILED - You couldn't create or update the alarm model. Check your alarm model information and try again.
        • statusMessage (string) --

          Contains information about the status of the alarm model version.

    • nextToken (string) --

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
list_alarm_models(**kwargs)

Lists the alarm models that you created. The operation returns only the metadata associated with each alarm model.

See also: AWS API Documentation

Request Syntax

response = client.list_alarm_models(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- The token that you can use to return the next set of results.
  • maxResults (integer) -- The maximum number of results to be returned per request.
Return type

dict

Returns

Response Syntax

{
    'alarmModelSummaries': [
        {
            'creationTime': datetime(2015, 1, 1),
            'alarmModelDescription': 'string',
            'alarmModelName': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • alarmModelSummaries (list) --

      A list that summarizes each alarm model.

      • (dict) --

        Contains a summary of an alarm model.

        • creationTime (datetime) --

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

        • alarmModelDescription (string) --

          The description of the alarm model.

        • alarmModelName (string) --

          The name of the alarm model.

    • nextToken (string) --

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
list_detector_model_versions(**kwargs)

Lists all the versions of a detector model. Only the metadata associated with each detector model version is returned.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The name of the detector model whose versions are returned.

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

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • detectorModelVersionSummaries (list) --

      Summary information about the detector model versions.

      • (dict) --

        Information about the detector model version.

        • detectorModelName (string) --

          The name of the detector model.

        • detectorModelVersion (string) --

          The ID of the detector model version.

        • detectorModelArn (string) --

          The ARN of the detector model version.

        • roleArn (string) --

          The ARN of the role that grants the detector model permission to perform its tasks.

        • creationTime (datetime) --

          The time the detector model version was created.

        • lastUpdateTime (datetime) --

          The last time the detector model version was updated.

        • status (string) --

          The status of the detector model version.

        • evaluationMethod (string) --

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

    • nextToken (string) --

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
list_detector_models(**kwargs)

Lists the detector models you have created. Only the metadata associated with each detector model is returned.

See also: AWS API Documentation

Request Syntax

response = client.list_detector_models(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- The token that you can use to return the next set of results.
  • maxResults (integer) -- The maximum number of results to be returned per request.
Return type

dict

Returns

Response Syntax

{
    'detectorModelSummaries': [
        {
            'detectorModelName': 'string',
            'detectorModelDescription': 'string',
            'creationTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • detectorModelSummaries (list) --

      Summary information about the detector models.

      • (dict) --

        Information about the detector model.

        • detectorModelName (string) --

          The name of the detector model.

        • detectorModelDescription (string) --

          A brief description of the detector model.

        • creationTime (datetime) --

          The time the detector model was created.

    • nextToken (string) --

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
list_input_routings(**kwargs)

Lists one or more input routings.

See also: AWS API Documentation

Request Syntax

response = client.list_input_routings(
    inputIdentifier={
        'iotEventsInputIdentifier': {
            'inputName': 'string'
        },
        'iotSiteWiseInputIdentifier': {
            'iotSiteWiseAssetModelPropertyIdentifier': {
                'assetModelId': 'string',
                'propertyId': 'string'
            }
        }
    },
    maxResults=123,
    nextToken='string'
)
Parameters
  • inputIdentifier (dict) --

    [REQUIRED]

    The identifer of the routed input.

    • iotEventsInputIdentifier (dict) --

      The identifier of the input routed to AWS IoT Events.

      • inputName (string) -- [REQUIRED]

        The name of the input routed to AWS IoT Events.

    • iotSiteWiseInputIdentifier (dict) --

      The identifer of the input routed from AWS IoT SiteWise.

      • iotSiteWiseAssetModelPropertyIdentifier (dict) --

        The identifier of the AWS IoT SiteWise asset model property.

        • assetModelId (string) -- [REQUIRED]

          The ID of the AWS IoT SiteWise asset model.

        • propertyId (string) -- [REQUIRED]

          The ID of the AWS IoT SiteWise asset property.

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

dict

Returns

Response Syntax

{
    'routedResources': [
        {
            'name': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • routedResources (list) --

      Summary information about the routed resources.

      • (dict) --

        Contains information about the routed resource.

        • name (string) --

          The name of the routed resource.

        • arn (string) --

          The ARN of the routed resource. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

    • nextToken (string) --

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
list_inputs(**kwargs)

Lists the inputs you have created.

See also: AWS API Documentation

Request Syntax

response = client.list_inputs(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- The token that you can use to return the next set of results.
  • maxResults (integer) -- The maximum number of results to be returned per request.
Return type

dict

Returns

Response Syntax

{
    'inputSummaries': [
        {
            'inputName': 'string',
            'inputDescription': 'string',
            'inputArn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdateTime': datetime(2015, 1, 1),
            'status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • inputSummaries (list) --

      Summary information about the inputs.

      • (dict) --

        Information about the input.

        • inputName (string) --

          The name of the input.

        • inputDescription (string) --

          A brief description of the input.

        • inputArn (string) --

          The ARN of the input.

        • creationTime (datetime) --

          The time the input was created.

        • lastUpdateTime (datetime) --

          The last time the input was updated.

        • status (string) --

          The status of the input.

    • nextToken (string) --

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

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
list_tags_for_resource(**kwargs)

Lists the tags (metadata) you have assigned to the resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The ARN of the resource.

Return type
dict
Returns
Response Syntax
{
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • tags (list) --

      The list of tags assigned to the resource.

      • (dict) --

        Metadata that can be used to manage the resource.

        • key (string) --

          The tag's key.

        • value (string) --

          The tag's value.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
put_logging_options(**kwargs)

Sets or updates the AWS IoT Events logging options.

If you update the value of any loggingOptions field, it takes up to one minute for the change to take effect. If you change the policy attached to the role you specified in the roleArn field (for example, to correct an invalid policy), it takes up to five minutes for that change to take effect.

See also: AWS API Documentation

Request Syntax

response = client.put_logging_options(
    loggingOptions={
        'roleArn': 'string',
        'level': 'ERROR'|'INFO'|'DEBUG',
        'enabled': True|False,
        'detectorDebugOptions': [
            {
                'detectorModelName': 'string',
                'keyValue': 'string'
            },
        ]
    }
)
Parameters
loggingOptions (dict) --

[REQUIRED]

The new values of the AWS IoT Events logging options.

  • roleArn (string) -- [REQUIRED]

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

  • level (string) -- [REQUIRED]

    The logging level.

  • enabled (boolean) -- [REQUIRED]

    If TRUE, logging is enabled for AWS IoT Events.

  • detectorDebugOptions (list) --

    Information that identifies those detector models and their detectors (instances) for which the logging level is given.

    • (dict) --

      The detector model and the specific detectors (instances) for which the logging level is given.

      • detectorModelName (string) -- [REQUIRED]

        The name of the detector model.

      • keyValue (string) --

        The value of the input attribute key used to create the detector (the instance of the detector model).

Returns
None

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
  • IoTEvents.Client.exceptions.UnsupportedOperationException
  • IoTEvents.Client.exceptions.ResourceInUseException
start_detector_model_analysis(**kwargs)

Performs an analysis of your detector model. For more information, see Troubleshooting a detector model in the AWS IoT Events Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.start_detector_model_analysis(
    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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ],
                    '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ],
                            '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                },
                '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                }
            },
        ],
        'initialStateName': 'string'
    }
)
Parameters
detectorModelDefinition (dict) --

[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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                  • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                  • 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. The tableName value must match the table name of the target 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 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 .

                • iotSiteWise (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                  • entryId (string) --

                    A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                  • assetId (string) --

                    The ID of the asset that has the specified property.

                  • propertyId (string) --

                    The ID of the asset property.

                  • propertyAlias (string) --

                    The alias of the asset property.

                  • propertyValue (dict) --

                    The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                    • value (dict) --

                      The value to send to an asset property.

                      • stringValue (string) --

                        The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                      • integerValue (string) --

                        The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                      • doubleValue (string) --

                        The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                      • booleanValue (string) --

                        The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                    • timestamp (dict) --

                      The timestamp associated with the asset property value. The default is the current event time.

                      • timeInSeconds (string) -- [REQUIRED]

                        The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                      • offsetInNanos (string) --

                        The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                    • quality (string) --

                      The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

        • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                  • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                  • 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. The tableName value must match the table name of the target 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 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 .

                • iotSiteWise (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                  • entryId (string) --

                    A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                  • assetId (string) --

                    The ID of the asset that has the specified property.

                  • propertyId (string) --

                    The ID of the asset property.

                  • propertyAlias (string) --

                    The alias of the asset property.

                  • propertyValue (dict) --

                    The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                    • value (dict) --

                      The value to send to an asset property.

                      • stringValue (string) --

                        The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                      • integerValue (string) --

                        The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                      • doubleValue (string) --

                        The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                      • booleanValue (string) --

                        The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                    • timestamp (dict) --

                      The timestamp associated with the asset property value. The default is the current event time.

                      • timeInSeconds (string) -- [REQUIRED]

                        The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                      • offsetInNanos (string) --

                        The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                    • quality (string) --

                      The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

            • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                  • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                  • 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. The tableName value must match the table name of the target 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 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 .

                • iotSiteWise (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                  • entryId (string) --

                    A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                  • assetId (string) --

                    The ID of the asset that has the specified property.

                  • propertyId (string) --

                    The ID of the asset property.

                  • propertyAlias (string) --

                    The alias of the asset property.

                  • propertyValue (dict) --

                    The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                    • value (dict) --

                      The value to send to an asset property.

                      • stringValue (string) --

                        The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                      • integerValue (string) --

                        The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                      • doubleValue (string) --

                        The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                      • booleanValue (string) --

                        The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                    • timestamp (dict) --

                      The timestamp associated with the asset property value. The default is the current event time.

                      • timeInSeconds (string) -- [REQUIRED]

                        The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                      • offsetInNanos (string) --

                        The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                    • quality (string) --

                      The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

      • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                  • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                  • 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. The tableName value must match the table name of the target 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 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 .

                • iotSiteWise (dict) --

                  Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                  • entryId (string) --

                    A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                  • assetId (string) --

                    The ID of the asset that has the specified property.

                  • propertyId (string) --

                    The ID of the asset property.

                  • propertyAlias (string) --

                    The alias of the asset property.

                  • propertyValue (dict) --

                    The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                    • value (dict) --

                      The value to send to an asset property.

                      • stringValue (string) --

                        The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                      • integerValue (string) --

                        The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                      • doubleValue (string) --

                        The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                      • booleanValue (string) --

                        The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                    • timestamp (dict) --

                      The timestamp associated with the asset property value. The default is the current event time.

                      • timeInSeconds (string) -- [REQUIRED]

                        The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                      • offsetInNanos (string) --

                        The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                    • quality (string) --

                      The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

  • initialStateName (string) -- [REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'analysisId': 'string'
}

Response Structure

  • (dict) --
    • analysisId (string) --

      The ID that you can use to retrieve the analysis result.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.LimitExceededException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
tag_resource(**kwargs)

Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The ARN of the resource.

  • tags (list) --

    [REQUIRED]

    The new or modified tags for the resource.

    • (dict) --

      Metadata that can be used to manage the resource.

      • key (string) -- [REQUIRED]

        The tag's key.

      • value (string) -- [REQUIRED]

        The tag's value.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.LimitExceededException
  • IoTEvents.Client.exceptions.InternalFailureException
untag_resource(**kwargs)

Removes the given tags (metadata) from the resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The ARN of the resource.

  • tagKeys (list) --

    [REQUIRED]

    A list of the keys of the tags to be removed from the resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
update_alarm_model(**kwargs)

Updates an alarm model. Any alarms that were created based on the previous version are deleted and then created again as new data arrives.

See also: AWS API Documentation

Request Syntax

response = client.update_alarm_model(
    alarmModelName='string',
    alarmModelDescription='string',
    roleArn='string',
    severity=123,
    alarmRule={
        'simpleRule': {
            'inputProperty': 'string',
            'comparisonOperator': 'GREATER'|'GREATER_OR_EQUAL'|'LESS'|'LESS_OR_EQUAL'|'EQUAL'|'NOT_EQUAL',
            'threshold': 'string'
        }
    },
    alarmNotification={
        'notificationActions': [
            {
                'action': {
                    'lambdaAction': {
                        'functionArn': 'string',
                        'payload': {
                            'contentExpression': 'string',
                            'type': 'STRING'|'JSON'
                        }
                    }
                },
                'smsConfigurations': [
                    {
                        'senderId': 'string',
                        'additionalMessage': 'string',
                        'recipients': [
                            {
                                'ssoIdentity': {
                                    'identityStoreId': 'string',
                                    'userId': 'string'
                                }
                            },
                        ]
                    },
                ],
                'emailConfigurations': [
                    {
                        'from': 'string',
                        'content': {
                            'subject': 'string',
                            'additionalMessage': 'string'
                        },
                        'recipients': {
                            'to': [
                                {
                                    'ssoIdentity': {
                                        'identityStoreId': 'string',
                                        'userId': 'string'
                                    }
                                },
                            ]
                        }
                    },
                ]
            },
        ]
    },
    alarmEventActions={
        'alarmActions': [
            {
                'sns': {
                    'targetArn': 'string',
                    'payload': {
                        'contentExpression': 'string',
                        'type': 'STRING'|'JSON'
                    }
                },
                'iotTopicPublish': {
                    'mqttTopic': 'string',
                    'payload': {
                        'contentExpression': 'string',
                        'type': 'STRING'|'JSON'
                    }
                },
                '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'
                    }
                },
                'iotSiteWise': {
                    'entryId': 'string',
                    'assetId': 'string',
                    'propertyId': 'string',
                    'propertyAlias': 'string',
                    'propertyValue': {
                        'value': {
                            'stringValue': 'string',
                            'integerValue': 'string',
                            'doubleValue': 'string',
                            'booleanValue': 'string'
                        },
                        'timestamp': {
                            'timeInSeconds': 'string',
                            'offsetInNanos': 'string'
                        },
                        'quality': 'string'
                    }
                }
            },
        ]
    },
    alarmCapabilities={
        'initializationConfiguration': {
            'disabledOnInitialization': True|False
        },
        'acknowledgeFlow': {
            'enabled': True|False
        }
    }
)
Parameters
  • alarmModelName (string) --

    [REQUIRED]

    The name of the alarm model.

  • alarmModelDescription (string) -- The description of the alarm model.
  • roleArn (string) --

    [REQUIRED]

    The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

  • severity (integer) -- A non-negative integer that reflects the severity level of the alarm.
  • alarmRule (dict) --

    [REQUIRED]

    Defines when your alarm is invoked.

    • simpleRule (dict) --

      A rule that compares an input property value to a threshold value with a comparison operator.

      • inputProperty (string) -- [REQUIRED]

        The value on the left side of the comparison operator. You can specify an AWS IoT Events input attribute as an input property.

      • comparisonOperator (string) -- [REQUIRED]

        The comparison operator.

      • threshold (string) -- [REQUIRED]

        The value on the right side of the comparison operator. You can enter a number or specify an AWS IoT Events input attribute.

  • alarmNotification (dict) --

    Contains information about one or more notification actions.

    • notificationActions (list) --

      Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on this alarm model.

      • (dict) --

        Contains the notification settings of an alarm model. The settings apply to all alarms that were created based on this alarm model.

        • action (dict) -- [REQUIRED]

          Specifies an AWS Lambda function to manage alarm notifications. You can create one or use the AWS Lambda function provided by AWS IoT Events .

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

        • smsConfigurations (list) --

          Contains the configuration information of SMS notifications.

          • (dict) --

            Contains the configuration information of SMS notifications.

            • senderId (string) --

              The sender ID.

            • additionalMessage (string) --

              The message that you want to send. The message can be up to 200 characters.

            • recipients (list) -- [REQUIRED]

              Specifies one or more recipients who receive the message.

              • (dict) --

                The information that identifies the recipient.

                • ssoIdentity (dict) --

                  The AWS Single Sign-On (AWS SSO) authentication information.

                  • identityStoreId (string) -- [REQUIRED]

                    The ID of the AWS SSO identity store.

                  • userId (string) --

                    The user ID.

        • emailConfigurations (list) --

          Contains the configuration information of email notifications.

          • (dict) --

            Contains the configuration information of email notifications.

            • from (string) -- [REQUIRED]

              The email address that sends emails.

              Warning

              If you use the AWS IoT Events managed AWS Lambda function to manage your emails, you must verify the email address that sends emails in Amazon SES .

            • content (dict) --

              Contains the subject and message of an email.

              • subject (string) --

                The subject of the email.

              • additionalMessage (string) --

                The message that you want to send. The message can be up to 200 characters.

            • recipients (dict) -- [REQUIRED]

              Contains the information of one or more recipients who receive the emails.

              • to (list) --

                Specifies one or more recipients who receive the email.

                • (dict) --

                  The information that identifies the recipient.

                  • ssoIdentity (dict) --

                    The AWS Single Sign-On (AWS SSO) authentication information.

                    • identityStoreId (string) -- [REQUIRED]

                      The ID of the AWS SSO identity store.

                    • userId (string) --

                      The user ID.

  • alarmEventActions (dict) --

    Contains information about one or more alarm actions.

    • alarmActions (list) --

      Specifies one or more supported actions to receive notifications when the alarm state changes.

      • (dict) --

        Specifies one of the following actions to receive notifications when the alarm state changes.

        • sns (dict) --

          Information required to publish the 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) --

          Information required to publish the MQTT message through 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 .

        • 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 an AWS IoT Events input, passing in 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) --

          Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.

          You must use expressions for all parameters in DynamoDBAction . The expressions accept literals, operators, functions, references, and substitution templates.

          Examples
          • For literal values, the expressions must contain single quotes. For example, the value for the hashKeyType parameter can be 'STRING' .
          • For references, you must specify either variables or input values. For example, the value for the hashKeyField parameter can be $input.GreenhouseInput.name .
          • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the hashKeyValue parameter uses a substitution template. '${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'
          • For a string concatenation, you must use + . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the tableName parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField parameter is <payload-field>_raw .

          • 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). The hashKeyField value must match the partition key of the target DynamoDB table.

          • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

          • 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. The tableName value must match the table name of the target 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) --

          Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.

          You must use expressions for all parameters in DynamoDBv2Action . The expressions accept literals, operators, functions, references, and substitution templates.

          Examples
          • For literal values, the expressions must contain single quotes. For example, the value for the tableName parameter can be 'GreenhouseTemperatureTable' .
          • For references, you must specify either variables or input values. For example, the value for the tableName parameter can be $variable.ddbtableName .
          • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the contentExpression parameter in Payload uses a substitution template. '{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
          • For a string concatenation, you must use + . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the tableName parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          The value for the type parameter in Payload must be JSON .

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

        • iotSiteWise (dict) --

          Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.

          You must use expressions for all parameters in IotSiteWiseAction . The expressions accept literals, operators, functions, references, and substitutions templates.

          Examples
          • For literal values, the expressions must contain single quotes. For example, the value for the propertyAlias parameter can be '/company/windfarm/3/turbine/7/temperature' .
          • For references, you must specify either variables or input values. For example, the value for the assetId parameter can be $input.TurbineInput.assetId1 .
          • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates. In the following example, the value for the propertyAlias parameter uses a substitution template. 'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'

          You must specify either propertyAlias or both assetId and propertyId to identify the target asset property in AWS IoT SiteWise.

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          • entryId (string) --

            A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

          • assetId (string) --

            The ID of the asset that has the specified property.

          • propertyId (string) --

            The ID of the asset property.

          • propertyAlias (string) --

            The alias of the asset property.

          • propertyValue (dict) --

            The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

            • value (dict) --

              The value to send to an asset property.

              • stringValue (string) --

                The asset property value is a string. You must use an expression, and the evaluated result should be a string.

              • integerValue (string) --

                The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

              • doubleValue (string) --

                The asset property value is a double. You must use an expression, and the evaluated result should be a double.

              • booleanValue (string) --

                The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

            • timestamp (dict) --

              The timestamp associated with the asset property value. The default is the current event time.

              • timeInSeconds (string) -- [REQUIRED]

                The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

              • offsetInNanos (string) --

                The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

            • quality (string) --

              The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

  • alarmCapabilities (dict) --

    Contains the configuration information of alarm state changes.

    • initializationConfiguration (dict) --

      Specifies the default alarm state. The configuration applies to all alarms that were created based on this alarm model.

      • disabledOnInitialization (boolean) -- [REQUIRED]

        The value must be TRUE or FALSE . If FALSE , all alarm instances created based on the alarm model are activated. The default value is TRUE .

    • acknowledgeFlow (dict) --

      Specifies whether to get notified for alarm state changes.

      • enabled (boolean) -- [REQUIRED]

        The value must be TRUE or FALSE . If TRUE , you receive a notification when the alarm state changes. You must choose to acknowledge the notification before the alarm state can return to NORMAL . If FALSE , you won't receive notifications. The alarm automatically changes to the NORMAL state when the input property value returns to the specified range.

Return type

dict

Returns

Response Syntax

{
    'creationTime': datetime(2015, 1, 1),
    'alarmModelArn': 'string',
    'alarmModelVersion': 'string',
    'lastUpdateTime': datetime(2015, 1, 1),
    'status': 'ACTIVE'|'ACTIVATING'|'INACTIVE'|'FAILED'
}

Response Structure

  • (dict) --

    • creationTime (datetime) --

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

    • alarmModelArn (string) --

      The ARN of the alarm model. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .

    • alarmModelVersion (string) --

      The version of the alarm model.

    • lastUpdateTime (datetime) --

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

    • status (string) --

      The status of the alarm model. The status can be one of the following values:

      • ACTIVE - The alarm model is active and it's ready to evaluate data.
      • ACTIVATING - AWS IoT Events is activating your alarm model. Activating an alarm model can take up to a few minutes.
      • INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. Check your alarm model information and update the alarm model.
      • FAILED - You couldn't create or update the alarm model. Check your alarm model information and try again.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
update_detector_model(**kwargs)

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

response = 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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ],
                    '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ],
                            '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                },
                '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'
                                        }
                                    },
                                    'iotSiteWise': {
                                        'entryId': 'string',
                                        'assetId': 'string',
                                        'propertyId': 'string',
                                        'propertyAlias': 'string',
                                        'propertyValue': {
                                            'value': {
                                                'stringValue': 'string',
                                                'integerValue': 'string',
                                                'doubleValue': 'string',
                                                'booleanValue': 'string'
                                            },
                                            'timestamp': {
                                                'timeInSeconds': 'string',
                                                'offsetInNanos': 'string'
                                            },
                                            'quality': 'string'
                                        }
                                    }
                                },
                            ]
                        },
                    ]
                }
            },
        ],
        'initialStateName': 'string'
    },
    detectorModelDescription='string',
    roleArn='string',
    evaluationMethod='BATCH'|'SERIAL'
)
Parameters
  • detectorModelName (string) --

    [REQUIRED]

    The name of the detector model that is updated.

  • detectorModelDefinition (dict) --

    [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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

          • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

              • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

        • 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 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). The hashKeyField value must match the partition key of the target DynamoDB table.

                    • 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). The rangeKeyField value must match the sort key of the target DynamoDB table.

                    • 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. The tableName value must match the table name of the target 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 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 .

                  • iotSiteWise (dict) --

                    Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .

                    • entryId (string) --

                      A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.

                    • assetId (string) --

                      The ID of the asset that has the specified property.

                    • propertyId (string) --

                      The ID of the asset property.

                    • propertyAlias (string) --

                      The alias of the asset property.

                    • propertyValue (dict) --

                      The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information.

                      • value (dict) --

                        The value to send to an asset property.

                        • stringValue (string) --

                          The asset property value is a string. You must use an expression, and the evaluated result should be a string.

                        • integerValue (string) --

                          The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.

                        • doubleValue (string) --

                          The asset property value is a double. You must use an expression, and the evaluated result should be a double.

                        • booleanValue (string) --

                          The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' . You must use an expression, and the evaluated result should be a Boolean value.

                      • timestamp (dict) --

                        The timestamp associated with the asset property value. The default is the current event time.

                        • timeInSeconds (string) -- [REQUIRED]

                          The timestamp, in seconds, in the Unix epoch format. The valid range is between 1-31556889864403199.

                        • offsetInNanos (string) --

                          The nanosecond offset converted from timeInSeconds . The valid range is between 0-999999999.

                      • quality (string) --

                        The quality of the asset property value. The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .

    • initialStateName (string) -- [REQUIRED]

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

  • detectorModelDescription (string) -- A brief description of the detector model.
  • roleArn (string) --

    [REQUIRED]

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

  • evaluationMethod (string) -- Information about the order in which events are evaluated and how actions are executed.
Return type

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.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ResourceInUseException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
update_input(**kwargs)

Updates an input.

See also: AWS API Documentation

Request Syntax

response = client.update_input(
    inputName='string',
    inputDescription='string',
    inputDefinition={
        'attributes': [
            {
                'jsonPath': 'string'
            },
        ]
    }
)
Parameters
  • inputName (string) --

    [REQUIRED]

    The name of the input you want to update.

  • inputDescription (string) -- A brief description of the input.
  • inputDefinition (dict) --

    [REQUIRED]

    The definition of the input.

    • attributes (list) -- [REQUIRED]

      The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage . Each such message contains a JSON payload, and those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors that monitor this input.

      • (dict) --

        The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage . Each such message contains a JSON payload. Those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors.

        • jsonPath (string) -- [REQUIRED]

          An expression that specifies an attribute-value pair in a JSON structure. Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to AWS IoT Events (BatchPutMessage ). Each such message contains a JSON payload. The attribute (and its paired value) specified here are available for use in the condition expressions used by detectors.

          Syntax: <field-name>.<field-name>...

Return type

dict

Returns

Response Syntax

{
    'inputConfiguration': {
        'inputName': 'string',
        'inputDescription': 'string',
        'inputArn': 'string',
        'creationTime': datetime(2015, 1, 1),
        'lastUpdateTime': datetime(2015, 1, 1),
        'status': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'
    }
}

Response Structure

  • (dict) --

    • inputConfiguration (dict) --

      Information about the configuration of the input.

      • inputName (string) --

        The name of the input.

      • inputDescription (string) --

        A brief description of the input.

      • inputArn (string) --

        The ARN of the input.

      • creationTime (datetime) --

        The time the input was created.

      • lastUpdateTime (datetime) --

        The last time the input was updated.

      • status (string) --

        The status of the input.

Exceptions

  • IoTEvents.Client.exceptions.InvalidRequestException
  • IoTEvents.Client.exceptions.ThrottlingException
  • IoTEvents.Client.exceptions.ResourceNotFoundException
  • IoTEvents.Client.exceptions.InternalFailureException
  • IoTEvents.Client.exceptions.ServiceUnavailableException
  • IoTEvents.Client.exceptions.ResourceInUseException

Paginators

The available paginators are: