We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.IoTEvents

Inherits:
AWS.Service show all
Identifier:
iotevents
API Version:
2018-07-27
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

Sending a Request Using IoTEvents

var iotevents = new AWS.IoTEvents();
iotevents.createAlarmModel(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the IoTEvents object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var iotevents = new AWS.IoTEvents({apiVersion: '2018-07-27'});

You can also set the API version globally in AWS.config.apiVersions using the iotevents service identifier:

AWS.config.apiVersions = {
  iotevents: '2018-07-27',
  // other service API versions
};

var iotevents = new AWS.IoTEvents();

Version:

  • 2018-07-27

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.IoTEvents(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a IoTEvents object

var iotevents = new AWS.IoTEvents({apiVersion: '2018-07-27'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.IoTEvents.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.IoTEvents.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.IoTEvents.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createAlarmModel(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createAlarmModel operation

var params = {
  alarmModelName: 'STRING_VALUE', /* required */
  alarmRule: { /* required */
    simpleRule: {
      comparisonOperator: GREATER | GREATER_OR_EQUAL | LESS | LESS_OR_EQUAL | EQUAL | NOT_EQUAL, /* required */
      inputProperty: 'STRING_VALUE', /* required */
      threshold: 'STRING_VALUE' /* required */
    }
  },
  roleArn: 'STRING_VALUE', /* required */
  alarmCapabilities: {
    acknowledgeFlow: {
      enabled: true || false /* required */
    },
    initializationConfiguration: {
      disabledOnInitialization: true || false /* required */
    }
  },
  alarmEventActions: {
    alarmActions: [
      {
        dynamoDB: {
          hashKeyField: 'STRING_VALUE', /* required */
          hashKeyValue: 'STRING_VALUE', /* required */
          tableName: 'STRING_VALUE', /* required */
          hashKeyType: 'STRING_VALUE',
          operation: 'STRING_VALUE',
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          },
          payloadField: 'STRING_VALUE',
          rangeKeyField: 'STRING_VALUE',
          rangeKeyType: 'STRING_VALUE',
          rangeKeyValue: 'STRING_VALUE'
        },
        dynamoDBv2: {
          tableName: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        firehose: {
          deliveryStreamName: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          },
          separator: 'STRING_VALUE'
        },
        iotEvents: {
          inputName: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        iotSiteWise: {
          assetId: 'STRING_VALUE',
          entryId: 'STRING_VALUE',
          propertyAlias: 'STRING_VALUE',
          propertyId: 'STRING_VALUE',
          propertyValue: {
            quality: 'STRING_VALUE',
            timestamp: {
              timeInSeconds: 'STRING_VALUE', /* required */
              offsetInNanos: 'STRING_VALUE'
            },
            value: {
              booleanValue: 'STRING_VALUE',
              doubleValue: 'STRING_VALUE',
              integerValue: 'STRING_VALUE',
              stringValue: 'STRING_VALUE'
            }
          }
        },
        iotTopicPublish: {
          mqttTopic: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        lambda: {
          functionArn: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        sns: {
          targetArn: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        sqs: {
          queueUrl: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          },
          useBase64: true || false
        }
      },
      /* more items */
    ]
  },
  alarmModelDescription: 'STRING_VALUE',
  alarmNotification: {
    notificationActions: [
      {
        action: { /* required */
          lambdaAction: {
            functionArn: 'STRING_VALUE', /* required */
            payload: {
              contentExpression: 'STRING_VALUE', /* required */
              type: STRING | JSON /* required */
            }
          }
        },
        emailConfigurations: [
          {
            from: 'STRING_VALUE', /* required */
            recipients: { /* required */
              to: [
                {
                  ssoIdentity: {
                    identityStoreId: 'STRING_VALUE', /* required */
                    userId: 'STRING_VALUE'
                  }
                },
                /* more items */
              ]
            },
            content: {
              additionalMessage: 'STRING_VALUE',
              subject: 'STRING_VALUE'
            }
          },
          /* more items */
        ],
        smsConfigurations: [
          {
            recipients: [ /* required */
              {
                ssoIdentity: {
                  identityStoreId: 'STRING_VALUE', /* required */
                  userId: 'STRING_VALUE'
                }
              },
              /* more items */
            ],
            additionalMessage: 'STRING_VALUE',
            senderId: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  key: 'STRING_VALUE',
  severity: 'NUMBER_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotevents.createAlarmModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • alarmModelName — (String)

      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)

      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 — (Array<map>)

      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.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        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 — (map)

      Defines when your alarm is invoked.

      • simpleRule — (map)

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

        • inputPropertyrequired — (String)

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

        • comparisonOperatorrequired — (String)

          The comparison operator.

          Possible values include:
          • "GREATER"
          • "GREATER_OR_EQUAL"
          • "LESS"
          • "LESS_OR_EQUAL"
          • "EQUAL"
          • "NOT_EQUAL"
        • thresholdrequired — (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 — (map)

      Contains information about one or more notification actions.

      • notificationActions — (Array<map>)

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

        • actionrequired — (map)

          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 — (map)

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

            • functionArnrequired — (String)

              The ARN of the Lambda function that is executed.

            • payload — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
        • smsConfigurations — (Array<map>)

          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.

          • recipientsrequired — (Array<map>)

            Specifies one or more recipients who receive the message.

            You must add the users that receive SMS messages to your AWS SSO store.

            • ssoIdentity — (map)

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

              • identityStoreIdrequired — (String)

                The ID of the AWS SSO identity store.

              • userId — (String)

                The user ID.

        • emailConfigurations — (Array<map>)

          Contains the configuration information of email notifications.

          • fromrequired — (String)

            The email address that sends emails.

            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 — (map)

            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.

          • recipientsrequired — (map)

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

            You must add the users that receive emails to your AWS SSO store.

            • to — (Array<map>)

              Specifies one or more recipients who receive the email.

              • ssoIdentity — (map)

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

                • identityStoreIdrequired — (String)

                  The ID of the AWS SSO identity store.

                • userId — (String)

                  The user ID.

    • alarmEventActions — (map)

      Contains information about one or more alarm actions.

      • alarmActions — (Array<map>)

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

        • sns — (map)

          Information required to publish the Amazon SNS message.

          • targetArnrequired — (String)

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

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • iotTopicPublish — (map)

          Information required to publish the MQTT message through the AWS IoT message broker.

          • mqttTopicrequired — (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 — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • lambda — (map)

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

          • functionArnrequired — (String)

            The ARN of the Lambda function that is executed.

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • iotEvents — (map)

          Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

          • inputNamerequired — (String)

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

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • sqs — (map)

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

          • queueUrlrequired — (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 — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • firehose — (map)

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

          • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • dynamoDB — (map)

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

          • hashKeyFieldrequired — (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.

          • hashKeyValuerequired — (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.

          • tableNamerequired — (String)

            The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

          • payload — (map)

            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.

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • dynamoDBv2 — (map)

          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.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • payload — (map)

            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.

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • iotSiteWise — (map)

          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 — (map)

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

            • value — (map)

              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 — (map)

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

              • timeInSecondsrequired — (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 — (map)

      Contains the configuration information of alarm state changes.

      • initializationConfiguration — (map)

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

        • disabledOnInitializationrequired — (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 — (map)

        Specifies whether to get notified for alarm state changes.

        • enabledrequired — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • creationTime — (Date)

        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 — (Date)

        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.

        Possible values include:
        • "ACTIVE"
        • "ACTIVATING"
        • "INACTIVE"
        • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDetectorModel(params = {}, callback) ⇒ AWS.Request

Creates a detector model.

Service Reference:

Examples:

Calling the createDetectorModel operation

var params = {
  detectorModelDefinition: { /* required */
    initialStateName: 'STRING_VALUE', /* required */
    states: [ /* required */
      {
        stateName: 'STRING_VALUE', /* required */
        onEnter: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        onExit: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        onInput: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ],
          transitionEvents: [
            {
              condition: 'STRING_VALUE', /* required */
              eventName: 'STRING_VALUE', /* required */
              nextState: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ]
            },
            /* more items */
          ]
        }
      },
      /* more items */
    ]
  },
  detectorModelName: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  detectorModelDescription: 'STRING_VALUE',
  evaluationMethod: BATCH | SERIAL,
  key: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotevents.createDetectorModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • detectorModelName — (String)

      The name of the detector model.

    • detectorModelDefinition — (map)

      Information that defines how the detectors operate.

      • statesrequired — (Array<map>)

        Information about the states of the detector.

        • stateNamerequired — (String)

          The name of the state.

        • onInput — (map)

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

          • events — (Array<map>)

            Specifies the actions performed when the condition evaluates to TRUE.

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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 — (Array<map>)

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

            • eventNamerequired — (String)

              The name of the transition event.

            • conditionrequired — (String)

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

            • actions — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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'.

            • nextStaterequired — (String)

              The next state to enter.

        • onEnter — (map)

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

          • events — (Array<map>)

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

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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 — (map)

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

          • events — (Array<map>)

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

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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'.

      • initialStateNamerequired — (String)

        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)

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

    • tags — (Array<map>)

      Metadata that can be used to manage the detector model.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

    • evaluationMethod — (String)

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

      Possible values include:
      • "BATCH"
      • "SERIAL"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • detectorModelConfiguration — (map)

        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 — (Date)

          The time the detector model was created.

        • lastUpdateTime — (Date)

          The time the detector model was last updated.

        • status — (String)

          The status of the detector model.

          Possible values include:
          • "ACTIVE"
          • "ACTIVATING"
          • "INACTIVE"
          • "DEPRECATED"
          • "DRAFT"
          • "PAUSED"
          • "FAILED"
        • 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.

          Possible values include:
          • "BATCH"
          • "SERIAL"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createInput(params = {}, callback) ⇒ AWS.Request

Creates an input.

Service Reference:

Examples:

Calling the createInput operation

var params = {
  inputDefinition: { /* required */
    attributes: [ /* required */
      {
        jsonPath: 'STRING_VALUE' /* required */
      },
      /* more items */
    ]
  },
  inputName: 'STRING_VALUE', /* required */
  inputDescription: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotevents.createInput(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • inputName — (String)

      The name you want to give to the input.

    • inputDescription — (String)

      A brief description of the input.

    • inputDefinition — (map)

      The definition of the input.

      • attributesrequired — (Array<map>)

        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.

        • jsonPathrequired — (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>...

    • tags — (Array<map>)

      Metadata that can be used to manage the input.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • inputConfiguration — (map)

        Information about the configuration of the input.

        • inputNamerequired — (String)

          The name of the input.

        • inputDescription — (String)

          A brief description of the input.

        • inputArnrequired — (String)

          The ARN of the input.

        • creationTimerequired — (Date)

          The time the input was created.

        • lastUpdateTimerequired — (Date)

          The last time the input was updated.

        • statusrequired — (String)

          The status of the input.

          Possible values include:
          • "CREATING"
          • "UPDATING"
          • "ACTIVE"
          • "DELETING"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAlarmModel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteAlarmModel operation

var params = {
  alarmModelName: 'STRING_VALUE' /* required */
};
iotevents.deleteAlarmModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • alarmModelName — (String)

      The name of the alarm model.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDetectorModel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteDetectorModel operation

var params = {
  detectorModelName: 'STRING_VALUE' /* required */
};
iotevents.deleteDetectorModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • detectorModelName — (String)

      The name of the detector model to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteInput(params = {}, callback) ⇒ AWS.Request

Deletes an input.

Service Reference:

Examples:

Calling the deleteInput operation

var params = {
  inputName: 'STRING_VALUE' /* required */
};
iotevents.deleteInput(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • inputName — (String)

      The name of the input to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAlarmModel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describeAlarmModel operation

var params = {
  alarmModelName: 'STRING_VALUE', /* required */
  alarmModelVersion: 'STRING_VALUE'
};
iotevents.describeAlarmModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • alarmModelName — (String)

      The name of the alarm model.

    • alarmModelVersion — (String)

      The version of the alarm model.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • creationTime — (Date)

        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 — (Date)

        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.

        Possible values include:
        • "ACTIVE"
        • "ACTIVATING"
        • "INACTIVE"
        • "FAILED"
      • 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 — (map)

        Defines when your alarm is invoked.

        • simpleRule — (map)

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

          • inputPropertyrequired — (String)

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

          • comparisonOperatorrequired — (String)

            The comparison operator.

            Possible values include:
            • "GREATER"
            • "GREATER_OR_EQUAL"
            • "LESS"
            • "LESS_OR_EQUAL"
            • "EQUAL"
            • "NOT_EQUAL"
          • thresholdrequired — (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 — (map)

        Contains information about one or more notification actions.

        • notificationActions — (Array<map>)

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

          • actionrequired — (map)

            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 — (map)

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

              • functionArnrequired — (String)

                The ARN of the Lambda function that is executed.

              • payload — (map)

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

                • contentExpressionrequired — (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.

                • typerequired — (String)

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

                  Possible values include:
                  • "STRING"
                  • "JSON"
          • smsConfigurations — (Array<map>)

            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.

            • recipientsrequired — (Array<map>)

              Specifies one or more recipients who receive the message.

              You must add the users that receive SMS messages to your AWS SSO store.

              • ssoIdentity — (map)

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

                • identityStoreIdrequired — (String)

                  The ID of the AWS SSO identity store.

                • userId — (String)

                  The user ID.

          • emailConfigurations — (Array<map>)

            Contains the configuration information of email notifications.

            • fromrequired — (String)

              The email address that sends emails.

              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 — (map)

              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.

            • recipientsrequired — (map)

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

              You must add the users that receive emails to your AWS SSO store.

              • to — (Array<map>)

                Specifies one or more recipients who receive the email.

                • ssoIdentity — (map)

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

                  • identityStoreIdrequired — (String)

                    The ID of the AWS SSO identity store.

                  • userId — (String)

                    The user ID.

      • alarmEventActions — (map)

        Contains information about one or more alarm actions.

        • alarmActions — (Array<map>)

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

          • sns — (map)

            Information required to publish the Amazon SNS message.

            • targetArnrequired — (String)

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

            • payload — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • iotTopicPublish — (map)

            Information required to publish the MQTT message through the AWS IoT message broker.

            • mqttTopicrequired — (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 — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • lambda — (map)

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

            • functionArnrequired — (String)

              The ARN of the Lambda function that is executed.

            • payload — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • iotEvents — (map)

            Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

            • inputNamerequired — (String)

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

            • payload — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • sqs — (map)

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

            • queueUrlrequired — (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 — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • firehose — (map)

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

            • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

            • payload — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • dynamoDB — (map)

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

            • hashKeyFieldrequired — (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.

            • hashKeyValuerequired — (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.

            • tableNamerequired — (String)

              The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

            • payload — (map)

              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.

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • dynamoDBv2 — (map)

            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.

            • tableNamerequired — (String)

              The name of the DynamoDB table.

            • payload — (map)

              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.

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
          • iotSiteWise — (map)

            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 — (map)

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

              • value — (map)

                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 — (map)

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

                • timeInSecondsrequired — (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 — (map)

        Contains the configuration information of alarm state changes.

        • initializationConfiguration — (map)

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

          • disabledOnInitializationrequired — (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 — (map)

          Specifies whether to get notified for alarm state changes.

          • enabledrequired — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDetectorModel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describeDetectorModel operation

var params = {
  detectorModelName: 'STRING_VALUE', /* required */
  detectorModelVersion: 'STRING_VALUE'
};
iotevents.describeDetectorModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • detectorModelName — (String)

      The name of the detector model.

    • detectorModelVersion — (String)

      The version of the detector model.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • detectorModel — (map)

        Information about the detector model.

        • detectorModelDefinition — (map)

          Information that defines how a detector operates.

          • statesrequired — (Array<map>)

            Information about the states of the detector.

            • stateNamerequired — (String)

              The name of the state.

            • onInput — (map)

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

              • events — (Array<map>)

                Specifies the actions performed when the condition evaluates to TRUE.

                • eventNamerequired — (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 — (Array<map>)

                  The actions to be performed.

                  • setVariable — (map)

                    Sets a variable to a specified value.

                    • variableNamerequired — (String)

                      The name of the variable.

                    • valuerequired — (String)

                      The new value of the variable.

                  • sns — (map)

                    Sends an Amazon SNS message.

                    • targetArnrequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotTopicPublish — (map)

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

                    • mqttTopicrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • setTimer — (map)

                    Information needed to set the timer.

                    • timerNamerequired — (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 — (map)

                    Information needed to clear the timer.

                    • timerNamerequired — (String)

                      The name of the timer to clear.

                  • resetTimer — (map)

                    Information needed to reset the timer.

                    • timerNamerequired — (String)

                      The name of the timer to reset.

                  • lambda — (map)

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

                    • functionArnrequired — (String)

                      The ARN of the Lambda function that is executed.

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotEvents — (map)

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

                    • inputNamerequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • sqs — (map)

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

                    • queueUrlrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • firehose — (map)

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

                    • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDB — (map)

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

                    • hashKeyFieldrequired — (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.

                    • hashKeyValuerequired — (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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDBv2 — (map)

                    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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotSiteWise — (map)

                    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 — (map)

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

                      • value — (map)

                        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 — (map)

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

                        • timeInSecondsrequired — (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 — (Array<map>)

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

                • eventNamerequired — (String)

                  The name of the transition event.

                • conditionrequired — (String)

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

                • actions — (Array<map>)

                  The actions to be performed.

                  • setVariable — (map)

                    Sets a variable to a specified value.

                    • variableNamerequired — (String)

                      The name of the variable.

                    • valuerequired — (String)

                      The new value of the variable.

                  • sns — (map)

                    Sends an Amazon SNS message.

                    • targetArnrequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotTopicPublish — (map)

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

                    • mqttTopicrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • setTimer — (map)

                    Information needed to set the timer.

                    • timerNamerequired — (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 — (map)

                    Information needed to clear the timer.

                    • timerNamerequired — (String)

                      The name of the timer to clear.

                  • resetTimer — (map)

                    Information needed to reset the timer.

                    • timerNamerequired — (String)

                      The name of the timer to reset.

                  • lambda — (map)

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

                    • functionArnrequired — (String)

                      The ARN of the Lambda function that is executed.

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotEvents — (map)

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

                    • inputNamerequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • sqs — (map)

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

                    • queueUrlrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • firehose — (map)

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

                    • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDB — (map)

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

                    • hashKeyFieldrequired — (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.

                    • hashKeyValuerequired — (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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDBv2 — (map)

                    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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotSiteWise — (map)

                    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 — (map)

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

                      • value — (map)

                        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 — (map)

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

                        • timeInSecondsrequired — (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'.

                • nextStaterequired — (String)

                  The next state to enter.

            • onEnter — (map)

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

              • events — (Array<map>)

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

                • eventNamerequired — (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 — (Array<map>)

                  The actions to be performed.

                  • setVariable — (map)

                    Sets a variable to a specified value.

                    • variableNamerequired — (String)

                      The name of the variable.

                    • valuerequired — (String)

                      The new value of the variable.

                  • sns — (map)

                    Sends an Amazon SNS message.

                    • targetArnrequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotTopicPublish — (map)

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

                    • mqttTopicrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • setTimer — (map)

                    Information needed to set the timer.

                    • timerNamerequired — (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 — (map)

                    Information needed to clear the timer.

                    • timerNamerequired — (String)

                      The name of the timer to clear.

                  • resetTimer — (map)

                    Information needed to reset the timer.

                    • timerNamerequired — (String)

                      The name of the timer to reset.

                  • lambda — (map)

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

                    • functionArnrequired — (String)

                      The ARN of the Lambda function that is executed.

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotEvents — (map)

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

                    • inputNamerequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • sqs — (map)

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

                    • queueUrlrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • firehose — (map)

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

                    • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDB — (map)

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

                    • hashKeyFieldrequired — (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.

                    • hashKeyValuerequired — (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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDBv2 — (map)

                    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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotSiteWise — (map)

                    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 — (map)

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

                      • value — (map)

                        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 — (map)

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

                        • timeInSecondsrequired — (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 — (map)

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

              • events — (Array<map>)

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

                • eventNamerequired — (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 — (Array<map>)

                  The actions to be performed.

                  • setVariable — (map)

                    Sets a variable to a specified value.

                    • variableNamerequired — (String)

                      The name of the variable.

                    • valuerequired — (String)

                      The new value of the variable.

                  • sns — (map)

                    Sends an Amazon SNS message.

                    • targetArnrequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotTopicPublish — (map)

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

                    • mqttTopicrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • setTimer — (map)

                    Information needed to set the timer.

                    • timerNamerequired — (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 — (map)

                    Information needed to clear the timer.

                    • timerNamerequired — (String)

                      The name of the timer to clear.

                  • resetTimer — (map)

                    Information needed to reset the timer.

                    • timerNamerequired — (String)

                      The name of the timer to reset.

                  • lambda — (map)

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

                    • functionArnrequired — (String)

                      The ARN of the Lambda function that is executed.

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotEvents — (map)

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

                    • inputNamerequired — (String)

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

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • sqs — (map)

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

                    • queueUrlrequired — (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 — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • firehose — (map)

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

                    • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                    • payload — (map)

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

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDB — (map)

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

                    • hashKeyFieldrequired — (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.

                    • hashKeyValuerequired — (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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • dynamoDBv2 — (map)

                    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.

                    • tableNamerequired — (String)

                      The name of the DynamoDB table.

                    • payload — (map)

                      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.

                      • contentExpressionrequired — (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.

                      • typerequired — (String)

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

                        Possible values include:
                        • "STRING"
                        • "JSON"
                  • iotSiteWise — (map)

                    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 — (map)

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

                      • value — (map)

                        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 — (map)

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

                        • timeInSecondsrequired — (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'.

          • initialStateNamerequired — (String)

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

        • detectorModelConfiguration — (map)

          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 — (Date)

            The time the detector model was created.

          • lastUpdateTime — (Date)

            The time the detector model was last updated.

          • status — (String)

            The status of the detector model.

            Possible values include:
            • "ACTIVE"
            • "ACTIVATING"
            • "INACTIVE"
            • "DEPRECATED"
            • "DRAFT"
            • "PAUSED"
            • "FAILED"
          • 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.

            Possible values include:
            • "BATCH"
            • "SERIAL"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDetectorModelAnalysis(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeDetectorModelAnalysis operation

var params = {
  analysisId: 'STRING_VALUE' /* required */
};
iotevents.describeDetectorModelAnalysis(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analysisId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

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

        Possible values include:
        • "RUNNING"
        • "COMPLETE"
        • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeInput(params = {}, callback) ⇒ AWS.Request

Describes an input.

Service Reference:

Examples:

Calling the describeInput operation

var params = {
  inputName: 'STRING_VALUE' /* required */
};
iotevents.describeInput(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • inputName — (String)

      The name of the input.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • input — (map)

        Information about the input.

        • inputConfiguration — (map)

          Information about the configuration of an input.

          • inputNamerequired — (String)

            The name of the input.

          • inputDescription — (String)

            A brief description of the input.

          • inputArnrequired — (String)

            The ARN of the input.

          • creationTimerequired — (Date)

            The time the input was created.

          • lastUpdateTimerequired — (Date)

            The last time the input was updated.

          • statusrequired — (String)

            The status of the input.

            Possible values include:
            • "CREATING"
            • "UPDATING"
            • "ACTIVE"
            • "DELETING"
        • inputDefinition — (map)

          The definition of the input.

          • attributesrequired — (Array<map>)

            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.

            • jsonPathrequired — (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>...

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeLoggingOptions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describeLoggingOptions operation

var params = {
};
iotevents.describeLoggingOptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • loggingOptions — (map)

        The current settings of the AWS IoT Events logging options.

        • roleArnrequired — (String)

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

        • levelrequired — (String)

          The logging level.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "DEBUG"
        • enabledrequired — (Boolean)

          If TRUE, logging is enabled for AWS IoT Events.

        • detectorDebugOptions — (Array<map>)

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

          • detectorModelNamerequired — (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).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDetectorModelAnalysisResults(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getDetectorModelAnalysisResults operation

var params = {
  analysisId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.getDetectorModelAnalysisResults(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • analysisId — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • analysisResults — (Array<map>)

        Contains information about one or more analysis results.

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

          Possible values include:
          • "INFO"
          • "WARNING"
          • "ERROR"
        • message — (String)

          Contains additional information about the analysis result.

        • locations — (Array<map>)

          Contains one or more locations that you can use to locate the fields 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAlarmModels(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listAlarmModels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.listAlarmModels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • alarmModelSummaries — (Array<map>)

        A list that summarizes each alarm model.

        • creationTime — (Date)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAlarmModelVersions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listAlarmModelVersions operation

var params = {
  alarmModelName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.listAlarmModelVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • alarmModelName — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • alarmModelVersionSummaries — (Array<map>)

        A list that summarizes each 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 — (Date)

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

        • lastUpdateTime — (Date)

          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.

          Possible values include:
          • "ACTIVE"
          • "ACTIVATING"
          • "INACTIVE"
          • "FAILED"
        • 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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDetectorModels(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listDetectorModels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.listDetectorModels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • detectorModelSummaries — (Array<map>)

        Summary information about the detector models.

        • detectorModelName — (String)

          The name of the detector model.

        • detectorModelDescription — (String)

          A brief description of the detector model.

        • creationTime — (Date)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDetectorModelVersions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listDetectorModelVersions operation

var params = {
  detectorModelName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.listDetectorModelVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • detectorModelName — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • detectorModelVersionSummaries — (Array<map>)

        Summary information about the detector model versions.

        • 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 — (Date)

          The time the detector model version was created.

        • lastUpdateTime — (Date)

          The last time the detector model version was updated.

        • status — (String)

          The status of the detector model version.

          Possible values include:
          • "ACTIVE"
          • "ACTIVATING"
          • "INACTIVE"
          • "DEPRECATED"
          • "DRAFT"
          • "PAUSED"
          • "FAILED"
        • evaluationMethod — (String)

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

          Possible values include:
          • "BATCH"
          • "SERIAL"
      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInputRoutings(params = {}, callback) ⇒ AWS.Request

Lists one or more input routings.

Service Reference:

Examples:

Calling the listInputRoutings operation

var params = {
  inputIdentifier: { /* required */
    iotEventsInputIdentifier: {
      inputName: 'STRING_VALUE' /* required */
    },
    iotSiteWiseInputIdentifier: {
      iotSiteWiseAssetModelPropertyIdentifier: {
        assetModelId: 'STRING_VALUE', /* required */
        propertyId: 'STRING_VALUE' /* required */
      }
    }
  },
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.listInputRoutings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • inputIdentifier — (map)

      The identifer of the routed input.

      • iotEventsInputIdentifier — (map)

        The identifier of the input routed to AWS IoT Events.

        • inputNamerequired — (String)

          The name of the input routed to AWS IoT Events.

      • iotSiteWiseInputIdentifier — (map)

        The identifer of the input routed from AWS IoT SiteWise.

        • iotSiteWiseAssetModelPropertyIdentifier — (map)

          The identifier of the AWS IoT SiteWise asset model property.

          • assetModelIdrequired — (String)

            The ID of the AWS IoT SiteWise asset model.

          • propertyIdrequired — (String)

            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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • routedResources — (Array<map>)

        Summary information about the routed resources.

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInputs(params = {}, callback) ⇒ AWS.Request

Lists the inputs you have created.

Service Reference:

Examples:

Calling the listInputs operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotevents.listInputs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • inputSummaries — (Array<map>)

        Summary information about the inputs.

        • inputName — (String)

          The name of the input.

        • inputDescription — (String)

          A brief description of the input.

        • inputArn — (String)

          The ARN of the input.

        • creationTime — (Date)

          The time the input was created.

        • lastUpdateTime — (Date)

          The last time the input was updated.

        • status — (String)

          The status of the input.

          Possible values include:
          • "CREATING"
          • "UPDATING"
          • "ACTIVE"
          • "DELETING"
      • nextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
iotevents.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (Array<map>)

        The list of tags assigned to the resource.

        • keyrequired — (String)

          The tag's key.

        • valuerequired — (String)

          The tag's value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putLoggingOptions(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the putLoggingOptions operation

var params = {
  loggingOptions: { /* required */
    enabled: true || false, /* required */
    level: ERROR | INFO | DEBUG, /* required */
    roleArn: 'STRING_VALUE', /* required */
    detectorDebugOptions: [
      {
        detectorModelName: 'STRING_VALUE', /* required */
        keyValue: 'STRING_VALUE'
      },
      /* more items */
    ]
  }
};
iotevents.putLoggingOptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • loggingOptions — (map)

      The new values of the AWS IoT Events logging options.

      • roleArnrequired — (String)

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

      • levelrequired — (String)

        The logging level.

        Possible values include:
        • "ERROR"
        • "INFO"
        • "DEBUG"
      • enabledrequired — (Boolean)

        If TRUE, logging is enabled for AWS IoT Events.

      • detectorDebugOptions — (Array<map>)

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

        • detectorModelNamerequired — (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).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startDetectorModelAnalysis(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the startDetectorModelAnalysis operation

var params = {
  detectorModelDefinition: { /* required */
    initialStateName: 'STRING_VALUE', /* required */
    states: [ /* required */
      {
        stateName: 'STRING_VALUE', /* required */
        onEnter: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        onExit: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        onInput: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ],
          transitionEvents: [
            {
              condition: 'STRING_VALUE', /* required */
              eventName: 'STRING_VALUE', /* required */
              nextState: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ]
            },
            /* more items */
          ]
        }
      },
      /* more items */
    ]
  }
};
iotevents.startDetectorModelAnalysis(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • detectorModelDefinition — (map)

      Information that defines how a detector operates.

      • statesrequired — (Array<map>)

        Information about the states of the detector.

        • stateNamerequired — (String)

          The name of the state.

        • onInput — (map)

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

          • events — (Array<map>)

            Specifies the actions performed when the condition evaluates to TRUE.

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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 — (Array<map>)

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

            • eventNamerequired — (String)

              The name of the transition event.

            • conditionrequired — (String)

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

            • actions — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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'.

            • nextStaterequired — (String)

              The next state to enter.

        • onEnter — (map)

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

          • events — (Array<map>)

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

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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 — (map)

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

          • events — (Array<map>)

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

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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'.

      • initialStateNamerequired — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • analysisId — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotevents.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource.

    • tags — (Array<map>)

      The new or modified tags for the resource.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes the given tags (metadata) from the resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
iotevents.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the resource.

    • tagKeys — (Array<String>)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateAlarmModel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the updateAlarmModel operation

var params = {
  alarmModelName: 'STRING_VALUE', /* required */
  alarmRule: { /* required */
    simpleRule: {
      comparisonOperator: GREATER | GREATER_OR_EQUAL | LESS | LESS_OR_EQUAL | EQUAL | NOT_EQUAL, /* required */
      inputProperty: 'STRING_VALUE', /* required */
      threshold: 'STRING_VALUE' /* required */
    }
  },
  roleArn: 'STRING_VALUE', /* required */
  alarmCapabilities: {
    acknowledgeFlow: {
      enabled: true || false /* required */
    },
    initializationConfiguration: {
      disabledOnInitialization: true || false /* required */
    }
  },
  alarmEventActions: {
    alarmActions: [
      {
        dynamoDB: {
          hashKeyField: 'STRING_VALUE', /* required */
          hashKeyValue: 'STRING_VALUE', /* required */
          tableName: 'STRING_VALUE', /* required */
          hashKeyType: 'STRING_VALUE',
          operation: 'STRING_VALUE',
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          },
          payloadField: 'STRING_VALUE',
          rangeKeyField: 'STRING_VALUE',
          rangeKeyType: 'STRING_VALUE',
          rangeKeyValue: 'STRING_VALUE'
        },
        dynamoDBv2: {
          tableName: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        firehose: {
          deliveryStreamName: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          },
          separator: 'STRING_VALUE'
        },
        iotEvents: {
          inputName: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        iotSiteWise: {
          assetId: 'STRING_VALUE',
          entryId: 'STRING_VALUE',
          propertyAlias: 'STRING_VALUE',
          propertyId: 'STRING_VALUE',
          propertyValue: {
            quality: 'STRING_VALUE',
            timestamp: {
              timeInSeconds: 'STRING_VALUE', /* required */
              offsetInNanos: 'STRING_VALUE'
            },
            value: {
              booleanValue: 'STRING_VALUE',
              doubleValue: 'STRING_VALUE',
              integerValue: 'STRING_VALUE',
              stringValue: 'STRING_VALUE'
            }
          }
        },
        iotTopicPublish: {
          mqttTopic: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        lambda: {
          functionArn: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        sns: {
          targetArn: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          }
        },
        sqs: {
          queueUrl: 'STRING_VALUE', /* required */
          payload: {
            contentExpression: 'STRING_VALUE', /* required */
            type: STRING | JSON /* required */
          },
          useBase64: true || false
        }
      },
      /* more items */
    ]
  },
  alarmModelDescription: 'STRING_VALUE',
  alarmNotification: {
    notificationActions: [
      {
        action: { /* required */
          lambdaAction: {
            functionArn: 'STRING_VALUE', /* required */
            payload: {
              contentExpression: 'STRING_VALUE', /* required */
              type: STRING | JSON /* required */
            }
          }
        },
        emailConfigurations: [
          {
            from: 'STRING_VALUE', /* required */
            recipients: { /* required */
              to: [
                {
                  ssoIdentity: {
                    identityStoreId: 'STRING_VALUE', /* required */
                    userId: 'STRING_VALUE'
                  }
                },
                /* more items */
              ]
            },
            content: {
              additionalMessage: 'STRING_VALUE',
              subject: 'STRING_VALUE'
            }
          },
          /* more items */
        ],
        smsConfigurations: [
          {
            recipients: [ /* required */
              {
                ssoIdentity: {
                  identityStoreId: 'STRING_VALUE', /* required */
                  userId: 'STRING_VALUE'
                }
              },
              /* more items */
            ],
            additionalMessage: 'STRING_VALUE',
            senderId: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      /* more items */
    ]
  },
  severity: 'NUMBER_VALUE'
};
iotevents.updateAlarmModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

    • severity — (Integer)

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

    • alarmRule — (map)

      Defines when your alarm is invoked.

      • simpleRule — (map)

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

        • inputPropertyrequired — (String)

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

        • comparisonOperatorrequired — (String)

          The comparison operator.

          Possible values include:
          • "GREATER"
          • "GREATER_OR_EQUAL"
          • "LESS"
          • "LESS_OR_EQUAL"
          • "EQUAL"
          • "NOT_EQUAL"
        • thresholdrequired — (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 — (map)

      Contains information about one or more notification actions.

      • notificationActions — (Array<map>)

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

        • actionrequired — (map)

          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 — (map)

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

            • functionArnrequired — (String)

              The ARN of the Lambda function that is executed.

            • payload — (map)

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

              • contentExpressionrequired — (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.

              • typerequired — (String)

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

                Possible values include:
                • "STRING"
                • "JSON"
        • smsConfigurations — (Array<map>)

          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.

          • recipientsrequired — (Array<map>)

            Specifies one or more recipients who receive the message.

            You must add the users that receive SMS messages to your AWS SSO store.

            • ssoIdentity — (map)

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

              • identityStoreIdrequired — (String)

                The ID of the AWS SSO identity store.

              • userId — (String)

                The user ID.

        • emailConfigurations — (Array<map>)

          Contains the configuration information of email notifications.

          • fromrequired — (String)

            The email address that sends emails.

            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 — (map)

            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.

          • recipientsrequired — (map)

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

            You must add the users that receive emails to your AWS SSO store.

            • to — (Array<map>)

              Specifies one or more recipients who receive the email.

              • ssoIdentity — (map)

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

                • identityStoreIdrequired — (String)

                  The ID of the AWS SSO identity store.

                • userId — (String)

                  The user ID.

    • alarmEventActions — (map)

      Contains information about one or more alarm actions.

      • alarmActions — (Array<map>)

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

        • sns — (map)

          Information required to publish the Amazon SNS message.

          • targetArnrequired — (String)

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

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • iotTopicPublish — (map)

          Information required to publish the MQTT message through the AWS IoT message broker.

          • mqttTopicrequired — (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 — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • lambda — (map)

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

          • functionArnrequired — (String)

            The ARN of the Lambda function that is executed.

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • iotEvents — (map)

          Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

          • inputNamerequired — (String)

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

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • sqs — (map)

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

          • queueUrlrequired — (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 — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • firehose — (map)

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

          • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

          • payload — (map)

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

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • dynamoDB — (map)

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

          • hashKeyFieldrequired — (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.

          • hashKeyValuerequired — (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.

          • tableNamerequired — (String)

            The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

          • payload — (map)

            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.

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • dynamoDBv2 — (map)

          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.

          • tableNamerequired — (String)

            The name of the DynamoDB table.

          • payload — (map)

            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.

            • contentExpressionrequired — (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.

            • typerequired — (String)

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

              Possible values include:
              • "STRING"
              • "JSON"
        • iotSiteWise — (map)

          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 — (map)

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

            • value — (map)

              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 — (map)

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

              • timeInSecondsrequired — (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 — (map)

      Contains the configuration information of alarm state changes.

      • initializationConfiguration — (map)

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

        • disabledOnInitializationrequired — (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 — (map)

        Specifies whether to get notified for alarm state changes.

        • enabledrequired — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • creationTime — (Date)

        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 — (Date)

        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.

        Possible values include:
        • "ACTIVE"
        • "ACTIVATING"
        • "INACTIVE"
        • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDetectorModel(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the updateDetectorModel operation

var params = {
  detectorModelDefinition: { /* required */
    initialStateName: 'STRING_VALUE', /* required */
    states: [ /* required */
      {
        stateName: 'STRING_VALUE', /* required */
        onEnter: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        onExit: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        onInput: {
          events: [
            {
              eventName: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ],
              condition: 'STRING_VALUE'
            },
            /* more items */
          ],
          transitionEvents: [
            {
              condition: 'STRING_VALUE', /* required */
              eventName: 'STRING_VALUE', /* required */
              nextState: 'STRING_VALUE', /* required */
              actions: [
                {
                  clearTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  dynamoDB: {
                    hashKeyField: 'STRING_VALUE', /* required */
                    hashKeyValue: 'STRING_VALUE', /* required */
                    tableName: 'STRING_VALUE', /* required */
                    hashKeyType: 'STRING_VALUE',
                    operation: 'STRING_VALUE',
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    payloadField: 'STRING_VALUE',
                    rangeKeyField: 'STRING_VALUE',
                    rangeKeyType: 'STRING_VALUE',
                    rangeKeyValue: 'STRING_VALUE'
                  },
                  dynamoDBv2: {
                    tableName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  firehose: {
                    deliveryStreamName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    separator: 'STRING_VALUE'
                  },
                  iotEvents: {
                    inputName: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  iotSiteWise: {
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: 'STRING_VALUE',
                    propertyValue: {
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      },
                      value: {
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      }
                    }
                  },
                  iotTopicPublish: {
                    mqttTopic: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  lambda: {
                    functionArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  resetTimer: {
                    timerName: 'STRING_VALUE' /* required */
                  },
                  setTimer: {
                    timerName: 'STRING_VALUE', /* required */
                    durationExpression: 'STRING_VALUE',
                    seconds: 'NUMBER_VALUE'
                  },
                  setVariable: {
                    value: 'STRING_VALUE', /* required */
                    variableName: 'STRING_VALUE' /* required */
                  },
                  sns: {
                    targetArn: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    }
                  },
                  sqs: {
                    queueUrl: 'STRING_VALUE', /* required */
                    payload: {
                      contentExpression: 'STRING_VALUE', /* required */
                      type: STRING | JSON /* required */
                    },
                    useBase64: true || false
                  }
                },
                /* more items */
              ]
            },
            /* more items */
          ]
        }
      },
      /* more items */
    ]
  },
  detectorModelName: 'STRING_VALUE', /* required */
  roleArn: 'STRING_VALUE', /* required */
  detectorModelDescription: 'STRING_VALUE',
  evaluationMethod: BATCH | SERIAL
};
iotevents.updateDetectorModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • detectorModelName — (String)

      The name of the detector model that is updated.

    • detectorModelDefinition — (map)

      Information that defines how a detector operates.

      • statesrequired — (Array<map>)

        Information about the states of the detector.

        • stateNamerequired — (String)

          The name of the state.

        • onInput — (map)

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

          • events — (Array<map>)

            Specifies the actions performed when the condition evaluates to TRUE.

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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 — (Array<map>)

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

            • eventNamerequired — (String)

              The name of the transition event.

            • conditionrequired — (String)

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

            • actions — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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'.

            • nextStaterequired — (String)

              The next state to enter.

        • onEnter — (map)

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

          • events — (Array<map>)

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

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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 — (map)

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

          • events — (Array<map>)

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

            • eventNamerequired — (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 — (Array<map>)

              The actions to be performed.

              • setVariable — (map)

                Sets a variable to a specified value.

                • variableNamerequired — (String)

                  The name of the variable.

                • valuerequired — (String)

                  The new value of the variable.

              • sns — (map)

                Sends an Amazon SNS message.

                • targetArnrequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotTopicPublish — (map)

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

                • mqttTopicrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • setTimer — (map)

                Information needed to set the timer.

                • timerNamerequired — (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 — (map)

                Information needed to clear the timer.

                • timerNamerequired — (String)

                  The name of the timer to clear.

              • resetTimer — (map)

                Information needed to reset the timer.

                • timerNamerequired — (String)

                  The name of the timer to reset.

              • lambda — (map)

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

                • functionArnrequired — (String)

                  The ARN of the Lambda function that is executed.

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotEvents — (map)

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

                • inputNamerequired — (String)

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

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • sqs — (map)

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

                • queueUrlrequired — (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 — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • firehose — (map)

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

                • deliveryStreamNamerequired — (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), '\r\n' (Windows newline), ',' (comma).

                • payload — (map)

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

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDB — (map)

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

                • hashKeyFieldrequired — (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.

                • hashKeyValuerequired — (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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • dynamoDBv2 — (map)

                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.

                • tableNamerequired — (String)

                  The name of the DynamoDB table.

                • payload — (map)

                  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.

                  • contentExpressionrequired — (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.

                  • typerequired — (String)

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

                    Possible values include:
                    • "STRING"
                    • "JSON"
              • iotSiteWise — (map)

                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 — (map)

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

                  • value — (map)

                    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 — (map)

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

                    • timeInSecondsrequired — (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'.

      • initialStateNamerequired — (String)

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

    • detectorModelDescription — (String)

      A brief description of the detector model.

    • roleArn — (String)

      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.

      Possible values include:
      • "BATCH"
      • "SERIAL"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • detectorModelConfiguration — (map)

        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 — (Date)

          The time the detector model was created.

        • lastUpdateTime — (Date)

          The time the detector model was last updated.

        • status — (String)

          The status of the detector model.

          Possible values include:
          • "ACTIVE"
          • "ACTIVATING"
          • "INACTIVE"
          • "DEPRECATED"
          • "DRAFT"
          • "PAUSED"
          • "FAILED"
        • 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.

          Possible values include:
          • "BATCH"
          • "SERIAL"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateInput(params = {}, callback) ⇒ AWS.Request

Updates an input.

Service Reference:

Examples:

Calling the updateInput operation

var params = {
  inputDefinition: { /* required */
    attributes: [ /* required */
      {
        jsonPath: 'STRING_VALUE' /* required */
      },
      /* more items */
    ]
  },
  inputName: 'STRING_VALUE', /* required */
  inputDescription: 'STRING_VALUE'
};
iotevents.updateInput(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • inputName — (String)

      The name of the input you want to update.

    • inputDescription — (String)

      A brief description of the input.

    • inputDefinition — (map)

      The definition of the input.

      • attributesrequired — (Array<map>)

        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.

        • jsonPathrequired — (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>...

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • inputConfiguration — (map)

        Information about the configuration of the input.

        • inputNamerequired — (String)

          The name of the input.

        • inputDescription — (String)

          A brief description of the input.

        • inputArnrequired — (String)

          The ARN of the input.

        • creationTimerequired — (Date)

          The time the input was created.

        • lastUpdateTimerequired — (Date)

          The last time the input was updated.

        • statusrequired — (String)

          The status of the input.

          Possible values include:
          • "CREATING"
          • "UPDATING"
          • "ACTIVE"
          • "DELETING"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.