

• 2026 年 4 月 30 日之後， AWS Systems Manager CloudWatch Dashboard 將不再可用。客戶可以繼續使用 Amazon CloudWatch 主控台來檢視、建立和管理其 Amazon CloudWatch 儀表板，就像現在一樣。如需詳細資訊，請參閱 [Amazon CloudWatch Dashboard 文件](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# `aws:executeStateMachine` – 執行 AWS Step Functions 狀態機器
<a name="automation-action-executeStateMachine"></a>

執行 AWS Step Functions 狀態機器。

**注意**  
`aws:executeStateMachine` 動作支援自動限流重試。如需詳細資訊，請參閱[設定限流操作的自動重試](automation-throttling-retry.md)。

**輸入**

此動作支援 Step Functions [StartExecution](https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html) API 操作的大部分參數。

**Required AWS Identity and Access Management (IAM) 許可**
+ `states:DescribeExecution`
+ `states:StartExecution`
+ `states:StopExecution`

------
#### [ YAML ]

```
name: executeTheStateMachine
action: aws:executeStateMachine
inputs:
  stateMachineArn: StateMachine_ARN
  input: '{"parameters":"values"}'
  name: name
```

------
#### [ JSON ]

```
{
    "name": "executeTheStateMachine",
    "action": "aws:executeStateMachine",
    "inputs": {
        "stateMachineArn": "StateMachine_ARN",
        "input": "{\"parameters\":\"values\"}",
        "name": "name"
    }
}
```

------

stateMachineArn  
Step Functions 狀態機的 Amazon Resource Name (ARN)。  
類型：字串  
必要：是

name  
執行的名稱。  
類型：字串  
必要：否

input  
包含執行之 JSON 輸入資料的字串。  
類型：字串  
必要：否

**輸出**  
以下是針對此動作預先定義的輸出。

executionArn  
執行的 ARN。  
類型：字串

input  
包含執行之 JSON 輸入資料的字串。長度限制適用於承載大小，並以 UTF-8 編碼表示為位元組。  
類型：字串

name  
執行的名稱。  
類型：字串

output  
執行的 JSON 輸出資料。長度限制適用於承載大小，在 UTF-8 編碼中表示為位元組。  
類型：字串

startDate  
開始執行的日期。  
類型：字串

stateMachineArn  
已執行的指定機器的 ARN。  
類型：字串

status  
當前執行狀態。  
類型：字串

stopDate  
如果執行已經結束，則為執行停止的日期。  
類型：字串