Interface StateProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
StateProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:25:09.406Z") @Stability(Experimental) public interface StateProps extends software.amazon.jsii.JsiiSerializable
(experimental) Properties for defining 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();
 
  • Method Details

    • getStateName

      @Stability(Experimental) @NotNull String getStateName()
      (experimental) The name of the state.
    • getOnEnter

      @Stability(Experimental) @Nullable default List<Event> getOnEnter()
      (experimental) Specifies the events on enter.

      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

    • getOnExit

      @Stability(Experimental) @Nullable default List<Event> getOnExit()
      (experimental) Specifies the events on exit.

      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

    • getOnInput

      @Stability(Experimental) @Nullable default List<Event> getOnInput()
      (experimental) Specifies the events on input.

      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

    • builder

      @Stability(Experimental) static StateProps.Builder builder()
      Returns:
      a StateProps.Builder of StateProps