class DefinitionBody
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.StepFunctions.DefinitionBody |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#DefinitionBody |
Java | software.amazon.awscdk.services.stepfunctions.DefinitionBody |
Python | aws_cdk.aws_stepfunctions.DefinitionBody |
TypeScript (source) | aws-cdk-lib » aws_stepfunctions » DefinitionBody |
Implemented by
Chain, File, String
Example
const jsonata = sfn.Pass.jsonata(this, 'JSONata');
const jsonPath = sfn.Pass.jsonPath(this, 'JSONPath');
const definition = jsonata.next(jsonPath);
new sfn.StateMachine(this, 'MixedStateMachine', {
// queryLanguage: sfn.QueryLanguage.JSON_PATH, // default
definitionBody: sfn.DefinitionBody.fromChainable(definition),
});
// This throws an error. If JSONata is specified at the top level, JSONPath cannot be used in the state machine definition.
new sfn.StateMachine(this, 'JSONataOnlyStateMachine', {
queryLanguage: sfn.QueryLanguage.JSONATA,
definitionBody: sfn.DefinitionBody.fromChainable(definition),
});
Initializer
new DefinitionBody()
Methods
| Name | Description |
|---|---|
| bind(scope, sfnPrincipal, sfnProps, graph?) | |
| static from | |
| static from | |
| static from |
bind(scope, sfnPrincipal, sfnProps, graph?)
public bind(scope: Construct, sfnPrincipal: IPrincipal, sfnProps: StateMachineProps, graph?: StateGraph): DefinitionConfig
Parameters
- scope
Construct - sfnPrincipal
IPrincipal - sfnProps
StateMachine Props - graph
StateGraph
Returns
static fromChainable(chainable)
public static fromChainable(chainable: IChainable): DefinitionBody
Parameters
- chainable
IChainable
Returns
static fromFile(path, options?)
public static fromFile(path: string, options?: AssetOptions): DefinitionBody
Parameters
- path
string - options
AssetOptions
Returns
static fromString(definition)
public static fromString(definition: string): DefinitionBody
Parameters
- definition
string
Returns

.NET
Go
Java
Python
TypeScript (