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 a version from the current revision of a state machine. Use versions to create immutable snapshots of your state machine. You can start executions from versions either directly or with an alias. To create an alias, use CreateStateMachineAlias.
You can publish up to 1000 versions for each state machine. You must manually delete unused versions using the DeleteStateMachineVersion API action.
PublishStateMachineVersion
is an idempotent API. It doesn't create a duplicate
state machine version if it already exists for the current revision. Step Functions
bases PublishStateMachineVersion
's idempotency check on the stateMachineArn
,
name
, and revisionId
parameters. Requests with the same parameters return
a successful idempotent response. If you don't specify a revisionId
, Step Functions
checks for a previously published version of the state machine's current revision.
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 BeginPublishStateMachineVersion and EndPublishStateMachineVersion.
Namespace: Amazon.StepFunctions
Assembly: AWSSDK.StepFunctions.dll
Version: 3.x.y.z
public abstract Task<PublishStateMachineVersionResponse> PublishStateMachineVersionAsync( PublishStateMachineVersionRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the PublishStateMachineVersion 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. |
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:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer