StateMachineProps
- class aws_cdk.aws_stepfunctions.StateMachineProps(*, comment=None, definition=None, definition_body=None, definition_substitutions=None, encryption_configuration=None, logs=None, removal_policy=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:
comment (
Optional
[str
]) – Comment that describes this state machine. Default: - No commentdefinition (
Optional
[IChainable
]) – (deprecated) Definition for this state machine.definition_body (
Optional
[DefinitionBody
]) – Definition for this state machine.definition_substitutions (
Optional
[Mapping
[str
,str
]]) – substitutions for the definition body as a key-value map.encryption_configuration (
Optional
[EncryptionConfiguration
]) – Configures server-side encryption of the state machine definition and execution history. Default: - data is transparently encrypted using an AWS owned keylogs (
Union
[LogOptions
,Dict
[str
,Any
],None
]) – Defines what execution history events are logged and where they are logged. Default: No loggingremoval_policy (
Optional
[RemovalPolicy
]) – The removal policy to apply to state machine. Default: RemovalPolicy.DESTROYrole (
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
- comment
Comment that describes this state machine.
- Default:
No comment
- definition
(deprecated) Definition for this state machine.
- Deprecated:
use definitionBody: DefinitionBody.fromChainable()
- Stability:
deprecated
- definition_body
Definition for this state machine.
- definition_substitutions
substitutions for the definition body as a key-value map.
- encryption_configuration
Configures server-side encryption of the state machine definition and execution history.
- Default:
data is transparently encrypted using an AWS owned key
- logs
Defines what execution history events are logged and where they are logged.
- Default:
No logging
- removal_policy
The removal policy to apply to state machine.
- Default:
RemovalPolicy.DESTROY
- 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