State

class aws_cdk.aws_stepfunctions.State(scope, id, *, comment=None, input_path=None, output_path=None, parameters=None, result_path=None)

Bases: aws_cdk.core.Construct

Base class for all other state classes.

stability :stability: experimental

__init__(scope, id, *, comment=None, input_path=None, output_path=None, parameters=None, result_path=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props

  • comment (Optional[str]) – A comment describing this state. Default: No comment

  • input_path (Optional[str]) – JSONPath expression to select part of the state to be the input to this state. May also be the special value 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 DISCARD, which will cause the effective output to be the empty object {}. Default: $

  • parameters (Optional[Mapping[str, Any]]) – Parameters pass a collection of key-value pairs, either static values or JSONPath expressions that select from the input. Default: No parameters

  • result_path (Optional[str]) – JSONPath expression to indicate where to inject the state’s output. May also be the special value DISCARD, which will cause the state’s input to become its output. Default: $

stability :stability: experimental

Return type

None

Methods

add_prefix(x)

Add a prefix to the stateId of this state.

Parameters

x (str) –

stability :stability: experimental

Return type

None

bind_to_graph(graph)

Register this state as part of the given graph.

Don’t call this. It will be called automatically when you work with states normally.

Parameters

graph (StateGraph) –

stability :stability: experimental

Return type

None

to_state_json()

Render the state as JSON.

stability :stability: experimental

Return type

Mapping[Any, Any]

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

end_states

Continuable states of this Chainable.

stability :stability: experimental

Return type

List[INextable]

id

Descriptive identifier for this chainable.

stability :stability: experimental

Return type

str

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

start_state

First state of this Chainable.

stability :stability: experimental

Return type

State

state_id

Tokenized string that evaluates to the state’s ID.

stability :stability: experimental

Return type

str

Static Methods

classmethod filter_nextables(states)

Return only the states that allow chaining from an array of states.

Parameters

states (List[State]) –

stability :stability: experimental

Return type

List[INextable]

classmethod find_reachable_end_states(start, *, include_error_handlers=None)

Find the set of end states states reachable through transitions from the given start state.

Parameters
  • start (State) –

  • options

  • include_error_handlers (Optional[bool]) – Whether or not to follow error-handling transitions. Default: false

stability :stability: experimental

Return type

List[State]

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

classmethod prefix_states(root, prefix)

Add a prefix to the stateId of all States found in a construct tree.

Parameters

stability :stability: experimental

Return type

None