interface CfnDetectorModelProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoTEvents.CfnDetectorModelProps |
Java | software.amazon.awscdk.services.iotevents.CfnDetectorModelProps |
Python | aws_cdk.aws_iotevents.CfnDetectorModelProps |
TypeScript | @aws-cdk/aws-iotevents » CfnDetectorModelProps |
Properties for defining a CfnDetectorModel
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as iotevents from '@aws-cdk/aws-iotevents';
const cfnDetectorModelProps: iotevents.CfnDetectorModelProps = {
detectorModelDefinition: {
initialStateName: 'initialStateName',
states: [{
stateName: 'stateName',
// the properties below are optional
onEnter: {
events: [{
eventName: 'eventName',
// the properties below are optional
actions: [{
clearTimer: {
timerName: 'timerName',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyValue: 'hashKeyValue',
tableName: 'tableName',
// the properties below are optional
hashKeyType: 'hashKeyType',
operation: 'operation',
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
},
dynamoDBv2: {
tableName: 'tableName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
firehose: {
deliveryStreamName: 'deliveryStreamName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
separator: 'separator',
},
iotEvents: {
inputName: 'inputName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
iotSiteWise: {
propertyValue: {
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
// the properties below are optional
quality: 'quality',
timestamp: {
timeInSeconds: 'timeInSeconds',
// the properties below are optional
offsetInNanos: 'offsetInNanos',
},
},
// the properties below are optional
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
},
iotTopicPublish: {
mqttTopic: 'mqttTopic',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
lambda: {
functionArn: 'functionArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
resetTimer: {
timerName: 'timerName',
},
setTimer: {
timerName: 'timerName',
// the properties below are optional
durationExpression: 'durationExpression',
seconds: 123,
},
setVariable: {
value: 'value',
variableName: 'variableName',
},
sns: {
targetArn: 'targetArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
sqs: {
queueUrl: 'queueUrl',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
useBase64: false,
},
}],
condition: 'condition',
}],
},
onExit: {
events: [{
eventName: 'eventName',
// the properties below are optional
actions: [{
clearTimer: {
timerName: 'timerName',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyValue: 'hashKeyValue',
tableName: 'tableName',
// the properties below are optional
hashKeyType: 'hashKeyType',
operation: 'operation',
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
},
dynamoDBv2: {
tableName: 'tableName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
firehose: {
deliveryStreamName: 'deliveryStreamName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
separator: 'separator',
},
iotEvents: {
inputName: 'inputName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
iotSiteWise: {
propertyValue: {
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
// the properties below are optional
quality: 'quality',
timestamp: {
timeInSeconds: 'timeInSeconds',
// the properties below are optional
offsetInNanos: 'offsetInNanos',
},
},
// the properties below are optional
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
},
iotTopicPublish: {
mqttTopic: 'mqttTopic',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
lambda: {
functionArn: 'functionArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
resetTimer: {
timerName: 'timerName',
},
setTimer: {
timerName: 'timerName',
// the properties below are optional
durationExpression: 'durationExpression',
seconds: 123,
},
setVariable: {
value: 'value',
variableName: 'variableName',
},
sns: {
targetArn: 'targetArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
sqs: {
queueUrl: 'queueUrl',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
useBase64: false,
},
}],
condition: 'condition',
}],
},
onInput: {
events: [{
eventName: 'eventName',
// the properties below are optional
actions: [{
clearTimer: {
timerName: 'timerName',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyValue: 'hashKeyValue',
tableName: 'tableName',
// the properties below are optional
hashKeyType: 'hashKeyType',
operation: 'operation',
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
},
dynamoDBv2: {
tableName: 'tableName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
firehose: {
deliveryStreamName: 'deliveryStreamName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
separator: 'separator',
},
iotEvents: {
inputName: 'inputName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
iotSiteWise: {
propertyValue: {
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
// the properties below are optional
quality: 'quality',
timestamp: {
timeInSeconds: 'timeInSeconds',
// the properties below are optional
offsetInNanos: 'offsetInNanos',
},
},
// the properties below are optional
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
},
iotTopicPublish: {
mqttTopic: 'mqttTopic',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
lambda: {
functionArn: 'functionArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
resetTimer: {
timerName: 'timerName',
},
setTimer: {
timerName: 'timerName',
// the properties below are optional
durationExpression: 'durationExpression',
seconds: 123,
},
setVariable: {
value: 'value',
variableName: 'variableName',
},
sns: {
targetArn: 'targetArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
sqs: {
queueUrl: 'queueUrl',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
useBase64: false,
},
}],
condition: 'condition',
}],
transitionEvents: [{
condition: 'condition',
eventName: 'eventName',
nextState: 'nextState',
// the properties below are optional
actions: [{
clearTimer: {
timerName: 'timerName',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyValue: 'hashKeyValue',
tableName: 'tableName',
// the properties below are optional
hashKeyType: 'hashKeyType',
operation: 'operation',
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
},
dynamoDBv2: {
tableName: 'tableName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
firehose: {
deliveryStreamName: 'deliveryStreamName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
separator: 'separator',
},
iotEvents: {
inputName: 'inputName',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
iotSiteWise: {
propertyValue: {
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
// the properties below are optional
quality: 'quality',
timestamp: {
timeInSeconds: 'timeInSeconds',
// the properties below are optional
offsetInNanos: 'offsetInNanos',
},
},
// the properties below are optional
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
},
iotTopicPublish: {
mqttTopic: 'mqttTopic',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
lambda: {
functionArn: 'functionArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
resetTimer: {
timerName: 'timerName',
},
setTimer: {
timerName: 'timerName',
// the properties below are optional
durationExpression: 'durationExpression',
seconds: 123,
},
setVariable: {
value: 'value',
variableName: 'variableName',
},
sns: {
targetArn: 'targetArn',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
},
sqs: {
queueUrl: 'queueUrl',
// the properties below are optional
payload: {
contentExpression: 'contentExpression',
type: 'type',
},
useBase64: false,
},
}],
}],
},
}],
},
roleArn: 'roleArn',
// the properties below are optional
detectorModelDescription: 'detectorModelDescription',
detectorModelName: 'detectorModelName',
evaluationMethod: 'evaluationMethod',
key: 'key',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
detector | IResolvable | Detector | Information that defines how a detector operates. |
role | string | The ARN of the role that grants permission to AWS IoT Events to perform its operations. |
detector | string | A brief description of the detector model. |
detector | string | The name of the detector model. |
evaluation | string | Information about the order in which events are evaluated and how actions are executed. |
key? | string | The value used to identify a detector instance. |
tags? | Cfn [] | An array of key-value pairs to apply to this resource. |
detectorModelDefinition
Type:
IResolvable
|
Detector
Information that defines how a detector operates.
roleArn
Type:
string
The ARN of the role that grants permission to AWS IoT Events to perform its operations.
detectorModelDescription?
Type:
string
(optional)
A brief description of the detector model.
detectorModelName?
Type:
string
(optional)
The name of the detector model.
evaluationMethod?
Type:
string
(optional)
Information about the order in which events are evaluated and how actions are executed.
key?
Type:
string
(optional)
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.
tags?
Type:
Cfn
[]
(optional)
An array of key-value pairs to apply to this resource.
For more information, see Tag .