interface StateMachineProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.StateMachineProps |
Java | software.amazon.awscdk.services.stepfunctions.StateMachineProps |
Python | aws_cdk.aws_stepfunctions.StateMachineProps |
TypeScript (source) | @aws-cdk/aws-stepfunctions » StateMachineProps |
Properties for defining a State Machine.
Example
import * as stepfunctions from '@aws-cdk/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 |
---|---|---|
definition | IChainable | Definition for this state machine. |
logs? | Log | Defines what execution history events are logged and where they are logged. |
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. |
definition
Type:
IChainable
Definition for this state machine.
logs?
Type:
Log
(optional, default: No logging)
Defines what execution history events are logged and where they are logged.
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.