UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

62 lines (61 loc) 1.59 kB
import { Construct } from 'constructs'; import { State } from './state'; import { INextable } from '../types'; /** * Properties for defining a Fail state */ export interface FailProps { /** * Optional name for this state * * @default - The construct ID will be used as state name */ readonly stateName?: string; /** * An optional description for this state * * @default - No comment */ readonly comment?: string; /** * Error code used to represent this failure * * @default - No error code */ readonly error?: string; /** * JsonPath expression to select part of the state to be the error to this state. * * @default - No error path */ readonly errorPath?: string; /** * A description for the cause of the failure * * @default - No description */ readonly cause?: string; /** * JsonPath expression to select part of the state to be the cause to this state. * * @default - No cause path */ readonly causePath?: string; } /** * Define a Fail state in the state machine * * Reaching a Fail state terminates the state execution in failure. */ export declare class Fail extends State { readonly endStates: INextable[]; private readonly error?; private readonly errorPath?; private readonly cause?; private readonly causePath?; constructor(scope: Construct, id: string, props?: FailProps); /** * Return the Amazon States Language object for this state */ toStateJson(): object; }