Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . iotevents ]

create-detector-model

Description

Creates a detector model.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-detector-model
--detector-model-name <value>
--detector-model-definition <value>
[--detector-model-description <value>]
[--key <value>]
--role-arn <value>
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--detector-model-name (string)

The name of the detector model.

--detector-model-definition (structure)

Information that defines how the detectors operate.

JSON Syntax:

{
  "states": [
    {
      "stateName": "string",
      "onInput": {
        "events": [
          {
            "eventName": "string",
            "condition": "string",
            "actions": [
              {
                "setVariable": {
                  "variableName": "string",
                  "value": "string"
                },
                "sns": {
                  "targetArn": "string"
                },
                "iotTopicPublish": {
                  "mqttTopic": "string"
                },
                "setTimer": {
                  "timerName": "string",
                  "seconds": integer
                },
                "clearTimer": {
                  "timerName": "string"
                },
                "resetTimer": {
                  "timerName": "string"
                },
                "lambda": {
                  "functionArn": "string"
                },
                "iotEvents": {
                  "inputName": "string"
                },
                "sqs": {
                  "queueUrl": "string",
                  "useBase64": true|false
                },
                "firehose": {
                  "deliveryStreamName": "string",
                  "separator": "string"
                }
              }
              ...
            ]
          }
          ...
        ],
        "transitionEvents": [
          {
            "eventName": "string",
            "condition": "string",
            "actions": [
              {
                "setVariable": {
                  "variableName": "string",
                  "value": "string"
                },
                "sns": {
                  "targetArn": "string"
                },
                "iotTopicPublish": {
                  "mqttTopic": "string"
                },
                "setTimer": {
                  "timerName": "string",
                  "seconds": integer
                },
                "clearTimer": {
                  "timerName": "string"
                },
                "resetTimer": {
                  "timerName": "string"
                },
                "lambda": {
                  "functionArn": "string"
                },
                "iotEvents": {
                  "inputName": "string"
                },
                "sqs": {
                  "queueUrl": "string",
                  "useBase64": true|false
                },
                "firehose": {
                  "deliveryStreamName": "string",
                  "separator": "string"
                }
              }
              ...
            ],
            "nextState": "string"
          }
          ...
        ]
      },
      "onEnter": {
        "events": [
          {
            "eventName": "string",
            "condition": "string",
            "actions": [
              {
                "setVariable": {
                  "variableName": "string",
                  "value": "string"
                },
                "sns": {
                  "targetArn": "string"
                },
                "iotTopicPublish": {
                  "mqttTopic": "string"
                },
                "setTimer": {
                  "timerName": "string",
                  "seconds": integer
                },
                "clearTimer": {
                  "timerName": "string"
                },
                "resetTimer": {
                  "timerName": "string"
                },
                "lambda": {
                  "functionArn": "string"
                },
                "iotEvents": {
                  "inputName": "string"
                },
                "sqs": {
                  "queueUrl": "string",
                  "useBase64": true|false
                },
                "firehose": {
                  "deliveryStreamName": "string",
                  "separator": "string"
                }
              }
              ...
            ]
          }
          ...
        ]
      },
      "onExit": {
        "events": [
          {
            "eventName": "string",
            "condition": "string",
            "actions": [
              {
                "setVariable": {
                  "variableName": "string",
                  "value": "string"
                },
                "sns": {
                  "targetArn": "string"
                },
                "iotTopicPublish": {
                  "mqttTopic": "string"
                },
                "setTimer": {
                  "timerName": "string",
                  "seconds": integer
                },
                "clearTimer": {
                  "timerName": "string"
                },
                "resetTimer": {
                  "timerName": "string"
                },
                "lambda": {
                  "functionArn": "string"
                },
                "iotEvents": {
                  "inputName": "string"
                },
                "sqs": {
                  "queueUrl": "string",
                  "useBase64": true|false
                },
                "firehose": {
                  "deliveryStreamName": "string",
                  "separator": "string"
                }
              }
              ...
            ]
          }
          ...
        ]
      }
    }
    ...
  ],
  "initialStateName": "string"
}

--detector-model-description (string)

A brief description of the detector model.

--key (string)

The input attribute key used to identify a device or system in order 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 to specify the attribute-value pair in the message payload of each input that is used to identify the device associated with the input.

--role-arn (string)

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

--tags (list)

Metadata that can be used to manage the detector model.

Shorthand Syntax:

key=string,value=string ...

JSON Syntax:

[
  {
    "key": "string",
    "value": "string"
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

detectorModelConfiguration -> (structure)

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 -> (timestamp)

The time the detector model was created.

lastUpdateTime -> (timestamp)

The time the detector model was last updated.

status -> (string)

The status of the detector model.

key -> (string)

The input attribute key used to identify a device or system in order 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 to specify the attribute-value pair in the message payload of each input that is used to identify the device associated with the input.