interface StateMachineProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.StateMachineProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#StateMachineProps |
Java | software.amazon.awscdk.services.stepfunctions.StateMachineProps |
Python | aws_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
Name | Type | Description |
---|---|---|
comment? | string | Comment that describes this state machine. |
definition? | IChainable | Definition for this state machine. |
definition | Definition | Definition for this state machine. |
definition | { [string]: string } | substitutions for the definition body as a key-value map. |
encryption | Encryption | Configures server-side encryption of the state machine definition and execution history. |
logs? | Log | Defines what execution history events are logged and where they are logged. |
removal | Removal | The removal policy to apply to state machine. |
role? | IRole | The execution role for the state machine service. |
state | string | A name for the state machine. |
state | State | Type of the state machine. |
timeout? | Duration | Maximum run time for this state machine. |
tracing | boolean | Specifies whether Amazon X-Ray tracing is enabled for this state machine. |
comment?
Type:
string
(optional, default: No comment)
Comment that describes this state machine.
definition?
⚠️ Deprecated: use definitionBody: DefinitionBody.fromChainable()
Type:
IChainable
(optional)
Definition for this state machine.
definitionBody?
Type:
Definition
(optional)
Definition for this state machine.
definitionSubstitutions?
Type:
{ [string]: string }
(optional)
substitutions for the definition body as a key-value map.
encryptionConfiguration?
Type:
Encryption
(optional, default: data is transparently encrypted using an AWS owned key)
Configures server-side encryption of the state machine definition and execution history.
logs?
Type:
Log
(optional, default: No logging)
Defines what execution history events are logged and where they are logged.
removalPolicy?
Type:
Removal
(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:
State
(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.