interface StateProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoTEvents.CfnDetectorModel.StateProperty |
Java | software.amazon.awscdk.services.iotevents.CfnDetectorModel.StateProperty |
Python | aws_cdk.aws_iotevents.CfnDetectorModel.StateProperty |
TypeScript | @aws-cdk/aws-iotevents » CfnDetectorModel » StateProperty |
Information that defines a state of a detector.
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 stateProperty: iotevents.CfnDetectorModel.StateProperty = {
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,
},
}],
}],
},
};
Properties
Name | Type | Description |
---|---|---|
state | string | The name of the state. |
on | IResolvable | On | When entering this state, perform these actions if the condition is TRUE. |
on | IResolvable | On | When exiting this state, perform these actions if the specified condition is TRUE . |
on | IResolvable | On | When an input is received and the condition is TRUE, perform the specified actions . |
stateName
Type:
string
The name of the state.
onEnter?
Type:
IResolvable
|
On
(optional)
When entering this state, perform these actions
if the condition
is TRUE.
onExit?
Type:
IResolvable
|
On
(optional)
When exiting this state, perform these actions
if the specified condition
is TRUE
.
onInput?
Type:
IResolvable
|
On
(optional)
When an input is received and the condition
is TRUE, perform the specified actions
.