Interface IStateProps
(experimental) Properties for defining a state of a detector.
Namespace: Amazon.CDK.AWS.IoTEvents
Assembly: Amazon.CDK.AWS.IoTEvents.dll
Syntax (csharp)
public interface IStateProps
Syntax (vb)
Public Interface IStateProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
// Example automatically generated from non-compiling source. May contain errors.
using Amazon.CDK.AWS.IoTEvents;
using Amazon.CDK.AWS.IoTEvents.Actions;
IInput input;
var state = new State(new StateProps {
StateName = "MyState",
OnEnter = new [] { new Event {
EventName = "test-event",
Condition = Expression.CurrentInput(input),
Actions = new [] { actions, new [] {
new SetVariableAction("MyVariable", Expression.InputAttribute(input, "payload.temperature")) } }
} }
});
Synopsis
Properties
OnEnter | (experimental) Specifies the events on enter. |
OnExit | (experimental) Specifies the events on exit. |
OnInput | (experimental) Specifies the events on input. |
StateName | (experimental) The name of the state. |
Properties
OnEnter
(experimental) Specifies the events on enter.
virtual IEvent[] OnEnter { get; }
Property Value
IEvent[]
Remarks
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.
Default: - no events will trigger on entering this state
Stability: Experimental
OnExit
(experimental) Specifies the events on exit.
virtual IEvent[] OnExit { get; }
Property Value
IEvent[]
Remarks
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.
Default: - no events will trigger on exiting this state
Stability: Experimental
OnInput
(experimental) Specifies the events on input.
virtual IEvent[] OnInput { get; }
Property Value
IEvent[]
Remarks
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.
Default: - no events will trigger on input in this state
Stability: Experimental
StateName
(experimental) The name of the state.
string StateName { get; }
Property Value
System.String
Remarks
Stability: Experimental