Struct aws_sdk_sfn::client::fluent_builders::CreateStateMachine
source · [−]pub struct CreateStateMachine { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateStateMachine
.
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.
Implementations
sourceimpl CreateStateMachine
impl CreateStateMachine
sourcepub async fn send(
self
) -> Result<CreateStateMachineOutput, SdkError<CreateStateMachineError>>
pub async fn send(
self
) -> Result<CreateStateMachineOutput, SdkError<CreateStateMachineError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
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 _.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
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 _.
sourcepub fn definition(self, input: impl Into<String>) -> Self
pub fn definition(self, input: impl Into<String>) -> Self
The Amazon States Language definition of the state machine. See Amazon States Language.
sourcepub fn set_definition(self, input: Option<String>) -> Self
pub fn set_definition(self, input: Option<String>) -> Self
The Amazon States Language definition of the state machine. See Amazon States Language.
sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role to use for this state machine.
sourcepub fn type(self, input: StateMachineType) -> Self
pub fn type(self, input: StateMachineType) -> Self
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.
sourcepub fn set_type(self, input: Option<StateMachineType>) -> Self
pub fn set_type(self, input: Option<StateMachineType>) -> Self
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.
sourcepub fn logging_configuration(self, input: LoggingConfiguration) -> Self
pub fn logging_configuration(self, input: LoggingConfiguration) -> Self
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.
sourcepub fn set_logging_configuration(
self,
input: Option<LoggingConfiguration>
) -> Self
pub fn set_logging_configuration(
self,
input: Option<LoggingConfiguration>
) -> Self
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.
Appends an item to tags
.
To override the contents of this collection use set_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: _ . : / = + - @
.
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: _ . : / = + - @
.
sourcepub fn tracing_configuration(self, input: TracingConfiguration) -> Self
pub fn tracing_configuration(self, input: TracingConfiguration) -> Self
Selects whether AWS X-Ray tracing is enabled.
sourcepub fn set_tracing_configuration(
self,
input: Option<TracingConfiguration>
) -> Self
pub fn set_tracing_configuration(
self,
input: Option<TracingConfiguration>
) -> Self
Selects whether AWS X-Ray tracing is enabled.
Trait Implementations
sourceimpl Clone for CreateStateMachine
impl Clone for CreateStateMachine
sourcefn clone(&self) -> CreateStateMachine
fn clone(&self) -> CreateStateMachine
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateStateMachine
impl Send for CreateStateMachine
impl Sync for CreateStateMachine
impl Unpin for CreateStateMachine
impl !UnwindSafe for CreateStateMachine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more