全部產品
Search
文件中心

CloudFlow:StopExecution - 停止一個正在執行的流程

更新時間:Dec 20, 2025

停止一個正在執行的流程。

介面說明

介面說明

流程必須為執行中。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

fnf:StopExecution

update

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

FlowName

string

需要停止的流程名稱,可以通過 ListFlows 的傳回值擷取。

my_flow_name

ExecutionName

string

需要停止的執行名稱,可以通過 ListExecutions 的傳回值擷取。

my_exec_name

Cause

string

停止錯誤原因。長度為 1~4096 個字元。

for test

Error

string

停止錯誤碼。長度為 1~128 個字元。

InvalidArgument

返回參數

名稱

類型

描述

樣本值

object

返回資料。

Status

string

執行狀態。取值說明如下:

  • Starting

  • Running

  • Stopped

  • Succeeded

  • Failed

  • TimedOut

Running

StoppedTime

string

執行停止時間。

2019-01-01T01:01:01.001Z

RequestId

string

請求 ID。

testRequestId

StartedTime

string

執行開始時間。

2019-01-01T01:01:01.001Z

FlowDefinition

string

執行的流程定義。

舊版: "type: flow\nversion: v1\nname: my_flow_name\nsteps:\n - type: pass\n name: mypass" 新版: "Type: StateMachine\nSpecVersion: v1\nName: my_flow_name\nStartAt: my_state\nStates:\n - Type: Pass\n Name: my_state\n End: true"

Output

string

執行的輸出,為 JSON 對象格式。

{"key":"value"}

FlowName

string

流程名稱。

my_flow_name

Name

string

執行名稱。

my_exec_name

Input

string

執行的輸入,為 JSON 對象格式。

{"key":"value"}

RoleArn

string

執行的角色許可權配置。若流程定義中的 RoleArn 在執行期間發生變更,系統將記錄並返回執行初始時刻的 RoleArn 的快照。

說明

如果您的流程在執行時未配置執行角色,則該欄位不會出現。

acs:ram:${region}:${accountID}:${role}

樣本

正常返回樣本

JSON格式

{
  "Status": "Running",
  "StoppedTime": "2019-01-01T01:01:01.001Z",
  "RequestId": "testRequestId",
  "StartedTime": "2019-01-01T01:01:01.001Z",
  "FlowDefinition": "舊版:\n\"type: flow\\nversion: v1\\nname: my_flow_name\\nsteps:\\n  - type: pass\\n    name: mypass\"\n\n新版:\n\"Type: StateMachine\\nSpecVersion: v1\\nName: my_flow_name\\nStartAt: my_state\\nStates:\\n  - Type: Pass\\n    Name: my_state\\n    End: true\"",
  "Output": "{\"key\":\"value\"}",
  "FlowName": "my_flow_name",
  "Name": "my_exec_name",
  "Input": "{\"key\":\"value\"}",
  "RoleArn": "acs:ram:${region}:${accountID}:${role}"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 ActionNotSupported The requested API operation '%s' is incorrect. Please check.
400 APIVersionNotSupported The requested API version '%s' is not supported yet. Please check.
400 EntityTooLarge The payload size exceeds maximum allowed size (%s bytes).
400 ExecutionAlreadyCompleted Execution '%s' for flow '%s' has already completed.
400 InvalidArgument Parameter error.
400 MissingRequiredHeader The HTTP header '%s' must be specified.
400 MissingRequiredParams The HTTP query '%s' must be specified.
500 InternalServerError An internal error has occurred. Please retry.
403 AccessDenied The resources doesn't belong to you.
403 InvalidAccessKeyID The AccessKey ID %s is invalid.
403 RequestTimeTooSkewed The difference between the request time %s and the current time %s is too large.
403 SignatureNotMatch The request signature we calculated does not match the signature you provided. Check your access key and signing method.
404 ExecutionNotExists Execution %s for flow %s does not exist.
404 FlowNotExists Flow %s does not exist.
415 UnsupportedMediaType The content type must be "application/json".
429 ResourceThrottled The request is throttled. Please try again later.
409 ConcurrentUpdateError Update conflict, please retry.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情