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.
Creates an alias for a state machine that points to one or two versions of the same state machine. You can set your application to call StartExecution with an alias and update the version the alias uses without changing the client's code.
You can also map an alias to split StartExecution requests between two versions
of a state machine. To do this, add a second RoutingConfig
object in the routingConfiguration
parameter. You must also specify the percentage of execution run requests each version
should receive in both RoutingConfig
objects. Step Functions randomly chooses
which version runs a given execution based on the percentage you specify.
To create an alias that points to a single version, specify a single RoutingConfig
object with a weight
set to 100.
You can create up to 100 aliases for each state machine. You must delete unused aliases using the DeleteStateMachineAlias API action.
CreateStateMachineAlias
is an idempotent API. Step Functions bases the idempotency
check on the stateMachineArn
, description
, name
, and routingConfiguration
parameters. Requests that contain the same values for these parameters return a successful
idempotent response without creating a duplicate resource.
Related operations:
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 BeginCreateStateMachineAlias and EndCreateStateMachineAlias.
Namespace: Amazon.StepFunctions
Assembly: AWSSDK.StepFunctions.dll
Version: 3.x.y.z
public abstract Task<CreateStateMachineAliasResponse> CreateStateMachineAliasAsync( CreateStateMachineAliasRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the CreateStateMachineAlias service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
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. |
InvalidNameException | The provided name is not valid. |
ResourceNotFoundException | Could not find the referenced resource. |
ServiceQuotaExceededException | The request would cause a service quota to be exceeded. HTTP Status Code: 402 |
StateMachineDeletingException | The specified state machine is being deleted. |
ValidationException | The input does not satisfy the constraints specified by an Amazon Web Services service. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer