Class State
(experimental) Defines a state of a detector.
Inheritance
Namespace: Amazon.CDK.AWS.IoTEvents
Assembly: Amazon.CDK.AWS.IoTEvents.dll
Syntax (csharp)
public class State : DeputyBase
Syntax (vb)
Public Class State
Inherits DeputyBase
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
Constructors
State(IStateProps) | |
State(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
State(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
StateName | (experimental) The name of the state. |
Methods
TransitionTo(State, ITransitionOptions) | (experimental) Add a transition event to the state. |
Constructors
State(IStateProps)
State(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected State(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
State(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected State(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
StateName
(experimental) The name of the state.
public virtual string StateName { get; }
Property Value
System.String
Remarks
Stability: Experimental
Methods
TransitionTo(State, ITransitionOptions)
(experimental) Add a transition event to the state.
public virtual void TransitionTo(State targetState, ITransitionOptions options)
Parameters
- targetState State
the state that will be transit to when the event triggered.
- options ITransitionOptions
transition options including the condition that causes the state transition.
Remarks
The transition event will be triggered if condition is evaluated to true
.
Stability: Experimental