FailProps

class aws_cdk.aws_stepfunctions.FailProps(*, cause=None, cause_path=None, comment=None, error=None, error_path=None, state_name=None)

Bases: object

Properties for defining a Fail state.

Parameters:
  • cause (Optional[str]) – A description for the cause of the failure. Default: - No description

  • cause_path (Optional[str]) – JsonPath expression to select part of the state to be the cause to this state. Default: - No cause path

  • comment (Optional[str]) – An optional description for this state. Default: - No comment

  • error (Optional[str]) – Error code used to represent this failure. Default: - No error code

  • error_path (Optional[str]) – JsonPath expression to select part of the state to be the error to this state. Default: - No error path

  • state_name (Optional[str]) – Optional name for this state. Default: - The construct ID will be used as state name

ExampleMetadata:

infused

Example:

fail = sfn.Fail(self, "Fail",
    error_path=sfn.JsonPath.string_at("$.someError"),
    cause_path=sfn.JsonPath.string_at("$.someCause")
)

Attributes

cause

A description for the cause of the failure.

Default:
  • No description

cause_path

JsonPath expression to select part of the state to be the cause to this state.

Default:
  • No cause path

comment

An optional description for this state.

Default:
  • No comment

error

Error code used to represent this failure.

Default:
  • No error code

error_path

JsonPath expression to select part of the state to be the error to this state.

Default:
  • No error path

state_name

Optional name for this state.

Default:
  • The construct ID will be used as state name