StateMachineProps
- class aws_cdk.aws_stepfunctions.StateMachineProps(*, definition, logs=None, role=None, state_machine_name=None, state_machine_type=None, timeout=None, tracing_enabled=None)
Bases:
object
Properties for defining a State Machine.
- Parameters:
definition (
IChainable
) – Definition for this state machine.logs (
Union
[LogOptions
,Dict
[str
,Any
],None
]) – Defines what execution history events are logged and where they are logged. Default: No loggingrole (
Optional
[IRole
]) – The execution role for the state machine service. Default: A role is automatically createdstate_machine_name (
Optional
[str
]) – A name for the state machine. Default: A name is automatically generatedstate_machine_type (
Optional
[StateMachineType
]) – Type of the state machine. Default: StateMachineType.STANDARDtimeout (
Optional
[Duration
]) – Maximum run time for this state machine. Default: No timeouttracing_enabled (
Optional
[bool
]) – Specifies whether Amazon X-Ray tracing is enabled for this state machine. Default: false
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_stepfunctions as stepfunctions pipeline = codepipeline.Pipeline(self, "MyPipeline") input_artifact = codepipeline.Artifact() start_state = stepfunctions.Pass(self, "StartState") simple_state_machine = stepfunctions.StateMachine(self, "SimpleStateMachine", definition=start_state ) step_function_action = codepipeline_actions.StepFunctionInvokeAction( action_name="Invoke", state_machine=simple_state_machine, state_machine_input=codepipeline_actions.StateMachineInput.file_path(input_artifact.at_path("assets/input.json")) ) pipeline.add_stage( stage_name="StepFunctions", actions=[step_function_action] )
Attributes
- definition
Definition for this state machine.
- logs
Defines what execution history events are logged and where they are logged.
- Default:
No logging
- role
The execution role for the state machine service.
- Default:
A role is automatically created
- state_machine_name
A name for the state machine.
- Default:
A name is automatically generated
- state_machine_type
Type of the state machine.
- Default:
StateMachineType.STANDARD
- timeout
Maximum run time for this state machine.
- Default:
No timeout
- tracing_enabled
Specifies whether Amazon X-Ray tracing is enabled for this state machine.
- Default:
false