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.119.0 (build 1634eac)",
date="2025-11-13T16:10:18.433Z")
@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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionState(StateProps props) protectedState(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedState(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescription(experimental) The name of the state.voidtransitionTo(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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.
-