aws-cdk-lib.aws_stepfunctions.Succeed

class Succeed (construct)

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.Succeed
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#Succeed
Javasoftware.amazon.awscdk.services.stepfunctions.Succeed
Pythonaws_cdk.aws_stepfunctions.Succeed
TypeScript (source)aws-cdk-lib » aws_stepfunctions » Succeed

Implements IConstruct, IDependable, IChainable

Define a Succeed state in the state machine.

Reaching a Succeed state terminates the state execution in success.

Example

const success = new sfn.Succeed(this, 'We did it!');

Initializer

new Succeed(scope: Construct, id: string, props?: SucceedProps)

Parameters

  • scope Construct
  • id string — Descriptive identifier for this chainable.
  • props SucceedProps

Construct Props

NameTypeDescription
comment?stringAn optional description for this state.
inputPath?stringJSONPath expression to select part of the state to be the input to this state.
outputPath?stringJSONPath expression to select part of the state to be the output to this state.

comment?

Type: string (optional, default: No comment)

An optional description for this state.


inputPath?

Type: string (optional, default: $)

JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.


outputPath?

Type: string (optional, default: $)

JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.

Properties

NameTypeDescription
endStatesINextable[]Continuable states of this Chainable.
idstringDescriptive identifier for this chainable.
nodeNodeThe tree node.
startStateStateFirst state of this Chainable.
stateIdstringTokenized string that evaluates to the state's ID.

endStates

Type: INextable[]

Continuable states of this Chainable.


id

Type: string

Descriptive identifier for this chainable.


node

Type: Node

The tree node.


startState

Type: State

First state of this Chainable.


stateId

Type: string

Tokenized string that evaluates to the state's ID.

Methods

NameDescription
addPrefix(x)Add a prefix to the stateId of this state.
bindToGraph(graph)Register this state as part of the given graph.
toStateJson()Return the Amazon States Language object for this state.
toString()Returns a string representation of this construct.

addPrefix(x)

public addPrefix(x: string): void

Parameters

  • x string

Add a prefix to the stateId of this state.


bindToGraph(graph)

public bindToGraph(graph: StateGraph): void

Parameters

  • graph StateGraph

Register this state as part of the given graph.

Don't call this. It will be called automatically when you work with states normally.


toStateJson()

public toStateJson(): json

Returns

  • json

Return the Amazon States Language object for this state.


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.