Chain¶
-
class
aws_cdk.aws_stepfunctions.
Chain
(*args: Any, **kwargs)¶ Bases:
object
A collection of states to chain onto.
A Chain has a start and zero or more chainable ends. If there are zero ends, calling next() on the Chain will fail.
Methods
-
next
(next)¶ Continue normal execution with the given state.
- Parameters
next (
IChainable
) –- Return type
-
to_single_state
(id, *, comment=None, input_path=None, output_path=None, result_path=None)¶ Return a single state that encompasses all states in the chain.
This can be used to add error handling to a sequence of states.
Be aware that this changes the result of the inner state machine to be an array with the result of the state machine in it. Adjust your paths accordingly. For example, change ‘outputPath’ to ‘$[0]’.
- Parameters
id (
str
) –comment (
Optional
[str
]) – An optional description for this state. Default: No commentinput_path (
Optional
[str
]) – JSONPath expression to select part of the state to be the input to this state. May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}. Default: $output_path (
Optional
[str
]) – JSONPath expression to select part of the state to be the output to this state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}. Default: $result_path (
Optional
[str
]) – JSONPath expression to indicate where to inject the state’s output. May also be the special value JsonPath.DISCARD, which will cause the state’s input to become its output. Default: $
- Return type
Attributes
-
id
¶ Identify this Chain.
- Return type
str
Static Methods
-
classmethod
custom
(start_state, end_states, last_added)¶ Make a Chain with specific start and end states, and a last-added Chainable.
- Parameters
start_state (
State
) –end_states (
List
[INextable
]) –last_added (
IChainable
) –
- Return type
-
classmethod
sequence
(start, next)¶ Make a Chain with the start from one chain and the ends from another.
- Parameters
start (
IChainable
) –next (
IChainable
) –
- Return type
-
classmethod
start
(state)¶ Begin a new Chain from one chainable.
- Parameters
state (
IChainable
) –- Return type
-