java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IChainable, INextable, software.amazon.jsii.JsiiSerializable, 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.

Example:

 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");
 choice.otherwise(tryAgainState);
 
  • Constructor Details

    • Pass

      protected Pass(software.amazon.jsii.JsiiObjectRef objRef)
    • Pass

      protected Pass(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Pass

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

      @Stability(Stable) public Pass(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      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
      Parameters:
      next - This parameter is required.
      Returns:
      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