AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Updates an existing state machine by modifying its definition
, roleArn
,
loggingConfiguration
, or EncryptionConfiguration
. Running executions
will continue to use the previous definition
and roleArn
. You must include
at least one of definition
or roleArn
or you will receive a MissingRequiredParameter
error.
A qualified state machine ARN refers to a Distributed Map state defined within
a state machine. For example, the qualified state machine ARN arn:partition:states:region:account-id:stateMachine:stateMachineName/mapStateLabel
refers to a Distributed Map state with a label mapStateLabel
in the
state machine named stateMachineName
.
A qualified state machine ARN can either refer to a Distributed Map state defined within a state machine, a version ARN, or an alias ARN.
The following are some examples of qualified and unqualified state machine ARNs:
The following qualified state machine ARN refers to a Distributed Map state
with a label mapStateLabel
in a state machine named myStateMachine
.
arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabel
If you provide a qualified state machine ARN that refers to a Distributed Map state,
the request fails with ValidationException
.
The following qualified state machine ARN refers to an alias named PROD
.
arn:
If you provide a qualified state machine ARN that refers to a version ARN or an alias ARN, the request starts execution for that version or alias.
The following unqualified state machine ARN refers to a state machine named myStateMachine
.
arn:
After you update your state machine, you can set the publish
parameter to true
in the same action to publish a new version.
This way, you can opt-in to strict versioning of your state machine.
Step Functions assigns monotonically increasing integers for state machine versions, starting at version number 1.
All StartExecution
calls within a few seconds use the updated definition
and roleArn
. Executions started immediately after you call UpdateStateMachine
may use the previous state machine definition
and roleArn
.
For .NET Core this operation is only available in asynchronous form. Please refer to UpdateStateMachineAsync.
Namespace: Amazon.StepFunctions
Assembly: AWSSDK.StepFunctions.dll
Version: 3.x.y.z
public abstract UpdateStateMachineResponse UpdateStateMachine( UpdateStateMachineRequest request )
Container for the necessary parameters to execute the UpdateStateMachine service method.
Exception | Condition |
---|---|
ConflictException | Updating or deleting a resource can cause an inconsistent state. This error occurs when there're concurrent requests for DeleteStateMachineVersion, PublishStateMachineVersion, or UpdateStateMachine with the publish parameter set to true. HTTP Status Code: 409 |
InvalidArnException | The provided Amazon Resource Name (ARN) is not valid. |
InvalidDefinitionException | The provided Amazon States Language definition is not valid. |
InvalidEncryptionConfigurationException | Received when encryptionConfiguration is specified but various conditions exist which make the configuration invalid. For example, if type is set to CUSTOMER_MANAGED_KMS_KEY, but kmsKeyId is null, or kmsDataKeyReusePeriodSeconds is not between 60 and 900, or the KMS key is not symmetric or inactive. |
InvalidLoggingConfigurationException | Configuration is not valid. |
InvalidTracingConfigurationException | Your tracingConfiguration key does not match, or enabled has not been set to true or false. |
KmsAccessDeniedException | Either your KMS key policy or API caller does not have the required permissions. |
KmsThrottlingException | Received when KMS returns ThrottlingException for a KMS call that Step Functions makes on behalf of the caller. |
MissingRequiredParameterException | Request is missing a required parameter. This error occurs if both definition and roleArn are not specified. |
ServiceQuotaExceededException | The request would cause a service quota to be exceeded. HTTP Status Code: 402 |
StateMachineDeletingException | The specified state machine is being deleted. |
StateMachineDoesNotExistException | The specified state machine does not exist. |
ValidationException | The input does not satisfy the constraints specified by an Amazon Web Services service. |
.NET Framework:
Supported in: 4.5 and newer, 3.5