FailProps
- class aws_cdk.aws_stepfunctions.FailProps(*, comment=None, query_language=None, state_name=None, cause=None, cause_path=None, error=None, error_path=None)
Bases:
StateBaseProps
Properties for defining a Fail state.
- Parameters:
comment (
Optional
[str
]) – A comment describing this state. Default: No commentquery_language (
Optional
[QueryLanguage
]) – The name of the query language used by the state. If the state does not contain aqueryLanguage
field, then it will use the query language specified in the top-levelqueryLanguage
field. Default: - JSONPathstate_name (
Optional
[str
]) – Optional name for this state. Default: - The construct ID will be used as state namecause (
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 patherror (
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 path
- 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
A comment describing 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
- query_language
The name of the query language used by the state.
If the state does not contain a
queryLanguage
field, then it will use the query language specified in the top-levelqueryLanguage
field.- Default:
JSONPath
- state_name
Optional name for this state.
- Default:
The construct ID will be used as state name