Class State
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iotevents.alpha.State
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-15T10:25:09.405Z")
@Stability(Experimental)
public class State
extends software.amazon.jsii.JsiiObject
(experimental) Defines a state of a detector.
Example:
// Example automatically generated from non-compiling source. May contain errors. import software.amazon.awscdk.services.iotevents.alpha.*; import software.amazon.awscdk.services.iotevents.actions.alpha.*; IInput input; State state = State.Builder.create() .stateName("MyState") .onEnter(List.of(Event.builder() .eventName("test-event") .condition(Expression.currentInput(input)) .actions(List.of( new SetTimerAction("MyTimer", Map.of( "duration", cdk.Duration.seconds(60))))) .build())) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionState
(StateProps props) protected
State
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
State
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescription(experimental) The name of the state.void
transitionTo
(State targetState, TransitionOptions options) (experimental) Add a transition event to the state.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
State
protected State(software.amazon.jsii.JsiiObjectRef objRef) -
State
protected State(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
State
- Parameters:
props
- This parameter is required.
-
-
Method Details
-
transitionTo
@Stability(Experimental) public void transitionTo(@NotNull State targetState, @NotNull TransitionOptions options) (experimental) Add a transition event to the state.The transition event will be triggered if condition is evaluated to
true
.- Parameters:
targetState
- the state that will be transit to when the event triggered. This parameter is required.options
- transition options including the condition that causes the state transition. This parameter is required.
-
getStateName
(experimental) The name of the state.
-