aws-cdk-lib.aws_stepfunctions.StateMachineProps

interface StateMachineProps

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

Properties for defining a State Machine.

Example

import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';

const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const inputArtifact = new codepipeline.Artifact();
const startState = new stepfunctions.Pass(this, 'StartState');
const simpleStateMachine  = new stepfunctions.StateMachine(this, 'SimpleStateMachine', {
  definition: startState,
});
const stepFunctionAction = new codepipeline_actions.StepFunctionInvokeAction({
  actionName: 'Invoke',
  stateMachine: simpleStateMachine,
  stateMachineInput: codepipeline_actions.StateMachineInput.filePath(inputArtifact.atPath('assets/input.json')),
});
pipeline.addStage({
  stageName: 'StepFunctions',
  actions: [stepFunctionAction],
});

Properties

NameTypeDescription
definition?⚠️IChainableDefinition for this state machine.
definitionBody?DefinitionBodyDefinition for this state machine.
definitionSubstitutions?{ [string]: string }substitutions for the definition body aas a key-value map.
logs?LogOptionsDefines what execution history events are logged and where they are logged.
removalPolicy?RemovalPolicyThe removal policy to apply to state machine.
role?IRoleThe execution role for the state machine service.
stateMachineName?stringA name for the state machine.
stateMachineType?StateMachineTypeType of the state machine.
timeout?DurationMaximum run time for this state machine.
tracingEnabled?booleanSpecifies whether Amazon X-Ray tracing is enabled for this state machine.

definition?⚠️

⚠️ Deprecated: use definitionBody: DefinitionBody.fromChainable()

Type: IChainable (optional)

Definition for this state machine.


definitionBody?

Type: DefinitionBody (optional)

Definition for this state machine.


definitionSubstitutions?

Type: { [string]: string } (optional)

substitutions for the definition body aas a key-value map.


logs?

Type: LogOptions (optional, default: No logging)

Defines what execution history events are logged and where they are logged.


removalPolicy?

Type: RemovalPolicy (optional, default: RemovalPolicy.DESTROY)

The removal policy to apply to state machine.


role?

Type: IRole (optional, default: A role is automatically created)

The execution role for the state machine service.


stateMachineName?

Type: string (optional, default: A name is automatically generated)

A name for the state machine.


stateMachineType?

Type: StateMachineType (optional, default: StateMachineType.STANDARD)

Type of the state machine.


timeout?

Type: Duration (optional, default: No timeout)

Maximum run time for this state machine.


tracingEnabled?

Type: boolean (optional, default: false)

Specifies whether Amazon X-Ray tracing is enabled for this state machine.