StepFunctionsClient.create_state_machine
rboto-sfn==0.4.0 · Service index · Types
Model summary (excerpt): Creates a state machine. A state machine consists of a collection of states that can do work ( Task states), determine to which states to transition next ( Choice states), stop an execution with an error ( Fail states), and so on. State machines are specified using a JSON-based, structured language. For more information, see Amazon States Language in the Step Functions User Guide. If you set...
Install and imports
from rboto import StepFunctionsClient
from collections.abc import Sequence
from rboto_sfn.types import (
CreateStateMachineOutput,
EncryptionConfiguration,
LoggingConfiguration,
StateMachineType,
Tag,
TracingConfiguration,
)
Signature
async def create_state_machine(
*,
name: str,
definition: str,
role_arn: str,
type: StateMachineType | None = None,
logging_configuration: LoggingConfiguration | None = None,
tags: Sequence[Tag] | None = None,
tracing_configuration: TracingConfiguration | None = None,
publish: bool | None = None,
version_description: str | None = None,
encryption_configuration: EncryptionConfiguration | None = None,
) -> CreateStateMachineOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
name |
Yes | The name of the state machine. A name must not contain: white space brackets < > { } [ ] wildcard characters ? * special characters " # % \ ^ | ~ ` $ & , ; : / control characters ( U+0000-001F , U+007F-009F , U+FFFE-FFFF ) surrogates ( U+D800-DFFF ) invalid characters ( U+10FFFF ) To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. |
definition |
Yes | The Amazon States Language definition of the state machine. See Amazon States Language . |
role_arn |
Yes | The Amazon Resource Name (ARN) of the IAM role to use for this state machine. |
type |
No | Determines whether a Standard or Express state machine is created. The default is STANDARD . You cannot update the type of a state machine once it has been created. |
logging_configuration |
No | Defines what execution history events are logged and where they are logged. By default, the level is set to OFF . For more information see Log Levels in the Step Functions User Guide. |
tags |
No | Tags to be added when creating a state machine. An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide , and Controlling Access Using IAM Tags . Tags may only contain Unicode letters, digits, white space, or these symbols: _ . : / = + - @ . |
tracing_configuration |
No | Selects whether X-Ray tracing is enabled. |
publish |
No | Set to true to publish the first version of the state machine during creation. The default is false . |
version_description |
No | Sets description about the state machine version. You can only set the description if the publish parameter is set to true . Otherwise, if you set versionDescription , but publish to false , this API action throws ValidationException . |
encryption_configuration |
No | Settings to configure server-side encryption. |
Output
CreateStateMachineOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
state_machine_arn |
str |
Always present | — |
creation_date |
str |
Always present | — |
state_machine_version_arn |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
CreateStateMachineOutput, EncryptionConfiguration, LoggingConfiguration, StateMachineType, Tag, TracingConfiguration
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_sfn.exceptions:
ConflictError, InvalidArnError, InvalidDefinitionError, InvalidEncryptionConfigurationError, InvalidLoggingConfigurationError, InvalidNameError, InvalidTracingConfigurationError, KmsAccessDeniedError, KmsThrottlingError, StateMachineAlreadyExistsError, StateMachineDeletingError, StateMachineLimitExceededError, StateMachineTypeNotSupportedError, TooManyTagsError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.