AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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.createDetectorModel(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)

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

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

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

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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

          • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

            • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

        • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

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

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.

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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • hashKeyType — (String)

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

                      • STRING - The hash key is a string.

                      • NUMBER - The hash key is a number.

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

                    • hashKeyFieldrequired — (String)

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

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

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

                    • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • 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. You can also specify an expression.

                    • assetId — (String)

                      The ID of the asset that has the specified property. You can specify an expression.

                    • propertyId — (String)

                      The ID of the asset property. You can specify an expression.

                    • propertyAlias — (String)

                      The alias of the asset property. You can also specify an expression.

                    • propertyValuerequired — (map)

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

                      • valuerequired — (map)

                        The value to send to an asset property.

                        • stringValue — (String)

                          The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                        • integerValue — (String)

                          The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                        • doubleValue — (String)

                          The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                        • booleanValue — (String)

                          The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                        • offsetInNanos — (String)

                          The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                      • quality — (String)

                        The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

              • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • hashKeyType — (String)

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

                      • STRING - The hash key is a string.

                      • NUMBER - The hash key is a number.

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

                    • hashKeyFieldrequired — (String)

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

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

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

                    • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • 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. You can also specify an expression.

                    • assetId — (String)

                      The ID of the asset that has the specified property. You can specify an expression.

                    • propertyId — (String)

                      The ID of the asset property. You can specify an expression.

                    • propertyAlias — (String)

                      The alias of the asset property. You can also specify an expression.

                    • propertyValuerequired — (map)

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

                      • valuerequired — (map)

                        The value to send to an asset property.

                        • stringValue — (String)

                          The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                        • integerValue — (String)

                          The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                        • doubleValue — (String)

                          The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                        • booleanValue — (String)

                          The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                        • offsetInNanos — (String)

                          The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                      • quality — (String)

                        The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

                • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • hashKeyType — (String)

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

                      • STRING - The hash key is a string.

                      • NUMBER - The hash key is a number.

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

                    • hashKeyFieldrequired — (String)

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

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

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

                    • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • 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. You can also specify an expression.

                    • assetId — (String)

                      The ID of the asset that has the specified property. You can specify an expression.

                    • propertyId — (String)

                      The ID of the asset property. You can specify an expression.

                    • propertyAlias — (String)

                      The alias of the asset property. You can also specify an expression.

                    • propertyValuerequired — (map)

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

                      • valuerequired — (map)

                        The value to send to an asset property.

                        • stringValue — (String)

                          The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                        • integerValue — (String)

                          The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                        • doubleValue — (String)

                          The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                        • booleanValue — (String)

                          The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                        • offsetInNanos — (String)

                          The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                      • quality — (String)

                        The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

            • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • hashKeyType — (String)

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

                      • STRING - The hash key is a string.

                      • NUMBER - The hash key is a number.

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

                    • hashKeyFieldrequired — (String)

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

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

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

                    • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                    • 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. You can also specify an expression.

                    • assetId — (String)

                      The ID of the asset that has the specified property. You can specify an expression.

                    • propertyId — (String)

                      The ID of the asset property. You can specify an expression.

                    • propertyAlias — (String)

                      The alias of the asset property. You can also specify an expression.

                    • propertyValuerequired — (map)

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

                      • valuerequired — (map)

                        The value to send to an asset property.

                        • stringValue — (String)

                          The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                        • integerValue — (String)

                          The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                        • doubleValue — (String)

                          The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                        • booleanValue — (String)

                          The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                        • offsetInNanos — (String)

                          The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                      • quality — (String)

                        The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

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

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.

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 for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

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)

        A token to retrieve the next set of results, or null if there are no additional 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 for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

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)

        A token to retrieve the next set of results, or null if there are no additional 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 for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return at one time.

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)

        A token to retrieve the next set of results, or null if there are no additional 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.

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.

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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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: {
                    propertyValue: { /* required */
                      value: { /* required */
                        booleanValue: 'STRING_VALUE',
                        doubleValue: 'STRING_VALUE',
                        integerValue: 'STRING_VALUE',
                        stringValue: 'STRING_VALUE'
                      },
                      quality: 'STRING_VALUE',
                      timestamp: {
                        timeInSeconds: 'STRING_VALUE', /* required */
                        offsetInNanos: 'STRING_VALUE'
                      }
                    },
                    assetId: 'STRING_VALUE',
                    entryId: 'STRING_VALUE',
                    propertyAlias: 'STRING_VALUE',
                    propertyId: '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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

          • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

            • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

        • 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 also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • hashKeyType — (String)

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

                  • STRING - The hash key is a string.

                  • NUMBER - The hash key is a number.

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

                • hashKeyFieldrequired — (String)

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

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

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

                • 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 also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see Actions in AWS IoT Events Developer Guide.

                • 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. You can also specify an expression.

                • assetId — (String)

                  The ID of the asset that has the specified property. You can specify an expression.

                • propertyId — (String)

                  The ID of the asset property. You can specify an expression.

                • propertyAlias — (String)

                  The alias of the asset property. You can also specify an expression.

                • propertyValuerequired — (map)

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

                  • valuerequired — (map)

                    The value to send to an asset property.

                    • stringValue — (String)

                      The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string.

                    • integerValue — (String)

                      The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer.

                    • doubleValue — (String)

                      The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double.

                    • booleanValue — (String)

                      The asset property value is a Boolean value that must be TRUE or FALSE. You can also specify an expression. If you use an expression, 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. You can also specify an expression.

                    • offsetInNanos — (String)

                      The nanosecond offset converted from timeInSeconds. The valid range is between 0-999999999. You can also specify an expression.

                  • quality — (String)

                    The quality of the asset property value. The value must be GOOD, BAD, or UNCERTAIN. You can also specify an expression.

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