interface FailProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.StepFunctions.FailProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#FailProps |
![]() | software.amazon.awscdk.services.stepfunctions.FailProps |
![]() | aws_cdk.aws_stepfunctions.FailProps |
![]() | aws-cdk-lib » aws_stepfunctions » FailProps |
Properties for defining a Fail state.
Example
const fail = new sfn.Fail(this, 'Fail', {
errorPath: sfn.JsonPath.format('error: {}.', sfn.JsonPath.stringAt('$.someError')),
causePath: "States.Format('cause: {}.', $.someCause)",
});
Properties
Name | Type | Description |
---|---|---|
cause? | string | A description for the cause of the failure. |
cause | string | JsonPath expression to select part of the state to be the cause to this state. |
comment? | string | A comment describing this state. |
error? | string | Error code used to represent this failure. |
error | string | JsonPath expression to select part of the state to be the error to this state. |
query | Query | The name of the query language used by the state. |
state | string | Optional name for this state. |
cause?
Type:
string
(optional, default: No description)
A description for the cause of the failure.
causePath?
Type:
string
(optional, default: No 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.
comment?
Type:
string
(optional, default: No comment)
A comment describing this state.
error?
Type:
string
(optional, default: No error code)
Error code used to represent this failure.
errorPath?
Type:
string
(optional, default: No 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.
queryLanguage?
Type:
Query
(optional, default: JSONPath)
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-level queryLanguage
field.
stateName?
Type:
string
(optional, default: The construct ID will be used as state name)
Optional name for this state.