Smaws_Client_SFN.CreateStateMachine
val request :
Smaws_Lib.Context.t ->
create_state_machine_input ->
(create_state_machine_output,
[> Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of conflict_exception
| `InvalidArn of invalid_arn
| `InvalidDefinition of invalid_definition
| `InvalidLoggingConfiguration of invalid_logging_configuration
| `InvalidName of invalid_name
| `InvalidTracingConfiguration of invalid_tracing_configuration
| `StateMachineAlreadyExists of state_machine_already_exists
| `StateMachineDeleting of state_machine_deleting
| `StateMachineLimitExceeded of state_machine_limit_exceeded
| `StateMachineTypeNotSupported of state_machine_type_not_supported
| `TooManyTags of too_many_tags
| `ValidationException of validation_exception ])
Stdlib.result
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 the publish
parameter of this API action to true
, it publishes version 1
as the first revision of the state machine.
This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
CreateStateMachine
is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. CreateStateMachine
's idempotency check is based on the state machine name
, definition
, type
, LoggingConfiguration
, and TracingConfiguration
. The check is also based on the publish
and versionDescription
parameters. If a following request has a different roleArn
or tags
, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, roleArn
and tags
will not be updated, even if they are different.