All Implemented Interfaces:
IConstruct, IDependable, IChainable, INextable,, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.925Z") @Stability(Stable) public class Pass extends State implements INextable
Define a Pass in the state machine.

A Pass state can be used to transform the current execution's state.


 Choice choice = new Choice(this, "Did it work?");
 // Add conditions with .when()
 Pass successState = new Pass(this, "SuccessState");
 Pass failureState = new Pass(this, "FailureState");
 choice.when(Condition.stringEquals("$.status", "SUCCESS"), successState);
 choice.when(Condition.numberGreaterThan("$.attempts", 5), failureState);
 // Use .otherwise() to indicate what should be done if none of the conditions match
 Pass tryAgainState = new Pass(this, "TryAgainState");
  • Constructor Details

    • Pass

      protected Pass( objRef)
    • Pass

      protected Pass( initializationMode)
    • Pass

      @Stability(Stable) public Pass(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable PassProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • Pass

      @Stability(Stable) public Pass(@NotNull software.constructs.Construct scope, @NotNull String id)
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • next

      @Stability(Stable) @NotNull public Chain next(@NotNull IChainable next)
      Continue normal execution with the given state.

      Specified by:
      next in interface INextable
      next - This parameter is required.
      The chain of states built up
    • toStateJson

      @Stability(Stable) @NotNull public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()
      Return the Amazon States Language object for this state.
      Specified by:
      toStateJson in class State
    • getEndStates

      @Stability(Stable) @NotNull public List<INextable> getEndStates()
      Continuable states of this Chainable.
      Specified by:
      getEndStates in interface IChainable
      Specified by:
      getEndStates in class State