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.919Z") @Stability(Stable) public class Map extends State implements INextable
Define a Map state in the state machine.

A Map state can be used to run a set of steps for each element of an input array. A Map state will execute the same steps for multiple entries of an array in the state input.

While the Parallel state executes multiple branches of steps using the same input, a Map state will execute the same steps for multiple entries of an array in the state input.

Example:

 Map map = Map.Builder.create(this, "Map State")
         .maxConcurrency(1)
         .itemsPath(JsonPath.stringAt("$.inputForMap"))
         .build();
 map.iterator(new Pass(this, "Pass State"));
 

See Also:
  • Constructor Details

    • Map

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

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

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

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

    • addCatch

      @Stability(Stable) @NotNull public Map addCatch(@NotNull IChainable handler, @Nullable CatchProps props)
      Add a recovery handler for this state.

      When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.

      Parameters:
      handler - This parameter is required.
      props -
    • addCatch

      @Stability(Stable) @NotNull public Map addCatch(@NotNull IChainable handler)
      Add a recovery handler for this state.

      When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.

      Parameters:
      handler - This parameter is required.
    • addRetry

      @Stability(Stable) @NotNull public Map addRetry(@Nullable RetryProps props)
      Add retry configuration for this state.

      This controls if and how the execution will be retried if a particular error occurs.

      Parameters:
      props -
    • addRetry

      @Stability(Stable) @NotNull public Map addRetry()
      Add retry configuration for this state.

      This controls if and how the execution will be retried if a particular error occurs.

    • iterator

      @Stability(Stable) @NotNull public Map iterator(@NotNull IChainable iterator)
      Define iterator state machine in Map.

      Parameters:
      iterator - This parameter is required.
    • 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
    • validate

      @Stability(Stable) @NotNull protected List<String> validate()
      Validate this state.
      Overrides:
      validate in class Construct
      Returns:
      An array of validation error messages, or an empty array if the construct is valid.
    • 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