AWS SDK Version 3 for .NET
API Reference

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, or loggingConfiguration. 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:

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.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginUpdateStateMachine and EndUpdateStateMachine.

Namespace: Amazon.StepFunctions
Assembly: AWSSDK.StepFunctions.dll
Version: 3.x.y.z

Syntax

C#
public virtual Task<UpdateStateMachineResponse> UpdateStateMachineAsync(
         UpdateStateMachineRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.StepFunctions.Model.UpdateStateMachineRequest

Container for the necessary parameters to execute the UpdateStateMachine service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the UpdateStateMachine service method, as returned by StepFunctions.

Exceptions

ExceptionCondition
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.
InvalidLoggingConfigurationException
InvalidTracingConfigurationException Your tracingConfiguration key does not match, or enabled has not been set to true or false.
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.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also