Experimental
@aws-cdk/aws-iotevents-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
StateProps Struct
Properties for defining a state of a detector.
Example
import * as iotevents from '@aws-cdk/aws-iotevents-alpha';
import * as actions from '@aws-cdk/aws-iotevents-actions-alpha';
declare const input: iotevents.IInput;
const state = new iotevents.State({
stateName: 'MyState',
onEnter: [{
eventName: 'test-event',
condition: iotevents.Expression.currentInput(input),
actions: [
new actions.SetTimerAction('MyTimer', {
duration: cdk.Duration.seconds(60),
}),
],
}],
});
Properties
onEnteroptionalEvent[]on_enteroptionaltyping.List[Event]onEnteroptionalList<Event>OnEnteroptionalEvent[]OnEnteroptional*[]Event#Default: no events will trigger on entering this state
The conditions of the events will be evaluated when entering this state. If the condition of the event evaluates to true, the actions of the event will be executed.
onExitoptionalEvent[]on_exitoptionaltyping.List[Event]onExitoptionalList<Event>OnExitoptionalEvent[]OnExitoptional*[]Event#Default: no events will trigger on exiting this state
The conditions of the events are evaluated when an exiting this state. If the condition evaluates to true, the actions of the event will be executed.
onInputoptionalEvent[]on_inputoptionaltyping.List[Event]onInputoptionalList<Event>OnInputoptionalEvent[]OnInputoptional*[]Event#Default: no events will trigger on input in this state
The conditions of the events will be evaluated when any input is received. If the condition of the event evaluates to true, the actions of the event will be executed.