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 descriptioncause_path (
Optional
[str
]) – JsonPath expression to select part of the state to be the cause to this state. You can also use an intrinsic function that returns a string to specify this property. The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID. Default: - No cause pathcomment (
Optional
[str
]) – An optional description for this state. Default: - No commenterror (
Optional
[str
]) – Error code used to represent this failure. Default: - No error codeerror_path (
Optional
[str
]) – JsonPath expression to select part of the state to be the error to this state. You can also use an intrinsic function that returns a string to specify this property. The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID. Default: - No error pathstate_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.format("error: {}.", sfn.JsonPath.string_at("$.someError")), cause_path="States.Format('cause: {}.', $.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.
You can also use an intrinsic function that returns a string to specify this property. The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
- 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.
You can also use an intrinsic function that returns a string to specify this property. The allowed functions include States.Format, States.JsonToString, States.ArrayGetItem, States.Base64Encode, States.Base64Decode, States.Hash, and States.UUID.
- Default:
No error path
- state_name
Optional name for this state.
- Default:
The construct ID will be used as state name