選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

AWS::StepFunctions::StateMachineVersion

焦點模式
AWS::StepFunctions::StateMachineVersion - AWS CloudFormation
此頁面尚未翻譯為您的語言。 請求翻譯
篩選條件查看

Represents a state machine version. A published version uses the latest state machine revision. A revision is an immutable, read-only snapshot of a state machine’s definition and configuration.

You can publish up to 1000 versions for each state machine.

Important

Before you delete a version, make sure that version's ARN isn't being referenced in any long-running workflows or application code outside of the stack.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::StepFunctions::StateMachineVersion", "Properties" : { "Description" : String, "StateMachineArn" : String, "StateMachineRevisionId" : String } }

YAML

Type: AWS::StepFunctions::StateMachineVersion Properties: Description: String StateMachineArn: String StateMachineRevisionId: String

Properties

Description

An optional description of the state machine version.

Required: No

Type: String

Minimum: 1

Maximum: 2048

Update requires: Replacement

StateMachineArn

The Amazon Resource Name (ARN) of the state machine.

Required: Yes

Type: String

Minimum: 1

Maximum: 2048

Update requires: Replacement

StateMachineRevisionId

Identifier for a state machine revision, which is an immutable, read-only snapshot of a state machine’s definition and configuration.

Only publish the state machine version if the current state machine's revision ID matches the specified ID. Use this option to avoid publishing a version if the state machine has changed since you last updated it.

To specify the initial state machine revision, set the value as INITIAL.

Required: No

Type: String

Minimum: 1

Maximum: 2048

Update requires: Replacement

Return values

Ref

When you provide the logical ID of this resource to the Ref intrinsic function, Ref returns the ARN of the published state machine version. For example, arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1.

For more information about using Ref, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following is the available attribute.

For more information about using Fn::GetAtt, see Fn::GetAtt.

Arn

Returns the ARN of the state machine version. For example, arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1.

Examples

The following CloudFormation template examples show how you can create multiple versions of the same state machine and publish a version using the latest revision of a state machine.

Publish multiple state machine versions

YAML

MyStateMachineVersionA: Type: AWS::StepFunctions::StateMachineVersion Properties: Description: Version 1 StateMachineArn: !Ref MyStateMachine MyStateMachineVersionB: Type: AWS::StepFunctions::StateMachineVersion Properties: Description: Version 2 StateMachineArn: !Ref MyStateMachine

Publish a version for the latest revision of a state machine

The following example uses the StateMachineRevisionId property, which returns a unique value for revision ID of the state machine resource whenever an update is made to the state machine. CloudFormation automatically detects a different value for the StateMachineRevisionId property compared to the property's value in previous stack and makes a replacement update to the AWS::StepFunctions::StateMachineVersion resource. This publishes a new version that points to the most recent revision of your state machine.

YAML

MyLatestStateMachineVersion: Type: AWS::StepFunctions::StateMachineVersion Properties: Description: This version points to the most recent revision of a state machine. StateMachineArn: !Ref MyStateMachine StateMachineRevisionId: !GetAtt MyStateMachine.StateMachineRevisionId

在本頁面

下一個主題:

Next

上一個主題:

RoutingConfigurationVersion
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。