Define a Fail state in the state machine. Reaching a Fail state terminates the state execution in failure.
import { Fail } from 'aws-cdk-lib/aws-stepfunctions';Or use the module namespace:
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
// stepfunctions.FailConfiguration passed to the constructor as FailProps.
causeOptionalstringA description for the cause of the failure.
Default: - No description
causePathOptionalstringJsonPath 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
errorOptionalstringError code used to represent this failure.
Default: - No error code
errorPathOptionalstringJsonPath 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
StateBasePropscommentOptionalinherited from StateBasePropsstringA comment describing this state.
Default: No comment
queryLanguageOptionalinherited from StateBasePropsQueryLanguageThe 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.
Default: - JSONPath
stateNameOptionalinherited from StateBasePropsstringOptional name for this state.
Default: - The construct ID will be used as state name
Everything you need to know about AWS Step Functions on one page. HD quality, print-friendly.
Download Free Infographicaws-stepfunctions