Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 AWS Step Functions User Guide.
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
. 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.
Synopsis
- data CreateStateMachine = CreateStateMachine' {}
- newCreateStateMachine :: Text -> Text -> Text -> CreateStateMachine
- createStateMachine_tracingConfiguration :: Lens' CreateStateMachine (Maybe TracingConfiguration)
- createStateMachine_type :: Lens' CreateStateMachine (Maybe StateMachineType)
- createStateMachine_loggingConfiguration :: Lens' CreateStateMachine (Maybe LoggingConfiguration)
- createStateMachine_tags :: Lens' CreateStateMachine (Maybe [Tag])
- createStateMachine_name :: Lens' CreateStateMachine Text
- createStateMachine_definition :: Lens' CreateStateMachine Text
- createStateMachine_roleArn :: Lens' CreateStateMachine Text
- data CreateStateMachineResponse = CreateStateMachineResponse' {}
- newCreateStateMachineResponse :: Int -> Text -> UTCTime -> CreateStateMachineResponse
- createStateMachineResponse_httpStatus :: Lens' CreateStateMachineResponse Int
- createStateMachineResponse_stateMachineArn :: Lens' CreateStateMachineResponse Text
- createStateMachineResponse_creationDate :: Lens' CreateStateMachineResponse UTCTime
Creating a Request
data CreateStateMachine Source #
See: newCreateStateMachine
smart constructor.
CreateStateMachine' | |
|
Instances
newCreateStateMachine Source #
:: Text | |
-> Text | |
-> Text | |
-> CreateStateMachine |
Create a value of CreateStateMachine
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:tracingConfiguration:CreateStateMachine'
, createStateMachine_tracingConfiguration
- Selects whether AWS X-Ray tracing is enabled.
$sel:type':CreateStateMachine'
, createStateMachine_type
- 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.
$sel:loggingConfiguration:CreateStateMachine'
, createStateMachine_loggingConfiguration
- 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 AWS Step Functions User Guide.
$sel:tags:CreateStateMachine'
, createStateMachine_tags
- 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 AWS Billing and Cost Management User Guide, and Controlling Access Using IAM Tags.
Tags may only contain Unicode letters, digits, white space, or these
symbols: _ . : / = + - @
.
$sel:name:CreateStateMachine'
, createStateMachine_name
- 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
)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
$sel:definition:CreateStateMachine'
, createStateMachine_definition
- The Amazon States Language definition of the state machine. See
Amazon States Language.
$sel:roleArn:CreateStateMachine'
, createStateMachine_roleArn
- The Amazon Resource Name (ARN) of the IAM role to use for this state
machine.
Request Lenses
createStateMachine_tracingConfiguration :: Lens' CreateStateMachine (Maybe TracingConfiguration) Source #
Selects whether AWS X-Ray tracing is enabled.
createStateMachine_type :: Lens' CreateStateMachine (Maybe StateMachineType) Source #
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.
createStateMachine_loggingConfiguration :: Lens' CreateStateMachine (Maybe LoggingConfiguration) Source #
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 AWS Step Functions User Guide.
createStateMachine_tags :: Lens' CreateStateMachine (Maybe [Tag]) Source #
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 AWS Billing and Cost Management User Guide, and Controlling Access Using IAM Tags.
Tags may only contain Unicode letters, digits, white space, or these
symbols: _ . : / = + - @
.
createStateMachine_name :: Lens' CreateStateMachine Text Source #
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
)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
createStateMachine_definition :: Lens' CreateStateMachine Text Source #
The Amazon States Language definition of the state machine. See Amazon States Language.
createStateMachine_roleArn :: Lens' CreateStateMachine Text Source #
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
Destructuring the Response
data CreateStateMachineResponse Source #
See: newCreateStateMachineResponse
smart constructor.
CreateStateMachineResponse' | |
|
Instances
newCreateStateMachineResponse Source #
:: Int | |
-> Text | |
-> UTCTime | |
-> CreateStateMachineResponse |
Create a value of CreateStateMachineResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:CreateStateMachineResponse'
, createStateMachineResponse_httpStatus
- The response's http status code.
$sel:stateMachineArn:CreateStateMachineResponse'
, createStateMachineResponse_stateMachineArn
- The Amazon Resource Name (ARN) that identifies the created state
machine.
$sel:creationDate:CreateStateMachineResponse'
, createStateMachineResponse_creationDate
- The date the state machine is created.
Response Lenses
createStateMachineResponse_httpStatus :: Lens' CreateStateMachineResponse Int Source #
The response's http status code.
createStateMachineResponse_stateMachineArn :: Lens' CreateStateMachineResponse Text Source #
The Amazon Resource Name (ARN) that identifies the created state machine.
createStateMachineResponse_creationDate :: Lens' CreateStateMachineResponse UTCTime Source #
The date the state machine is created.