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
import * as kms from 'aws-cdk-lib/aws-kms';
import * as cdk from 'aws-cdk-lib';
const kmsKey = new kms.Key(this, 'Key');
const stateMachine = new sfn.StateMachine(this, 'StateMachineWithCMKEncryptionConfiguration', {
stateMachineName: 'StateMachineWithCMKEncryptionConfiguration',
definitionBody: sfn.DefinitionBody.fromChainable(sfn.Chain.start(new sfn.Pass(this, 'Pass'))),
stateMachineType: sfn.StateMachineType.STANDARD,
encryptionConfiguration: new sfn.CustomerManagedEncryptionConfiguration(kmsKey, cdk.Duration.seconds(60)),
});
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
State
Machine Props - graph
State
Graph
Returns
Chainable(chainable)
static frompublic static fromChainable(chainable: IChainable): DefinitionBody
Parameters
- chainable
IChainable
Returns
File(path, options?)
static frompublic static fromFile(path: string, options?: AssetOptions): DefinitionBody
Parameters
- path
string
- options
Asset
Options
Returns
String(definition)
static frompublic static fromString(definition: string): DefinitionBody
Parameters
- definition
string
Returns