StopExecution - 停止一个正在执行的流程

更新时间:
复制 MD 格式

停止一个正在执行的流程。

接口说明

接口说明

流程必须为执行中。

调试

您可以在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

执行停止时间,采用 ISO 8601 标准的 UTC 时间,格式为 YYYY-MM-DDThh:mm:ss.sssZ。

2019-01-01T01:01:01.001Z

RequestId

string

请求 ID。

testRequestId

StartedTime

string

执行开始时间,采用 ISO 8601 标准的 UTC 时间,格式为 YYYY-MM-DDThh:mm:ss.sssZ。

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. AccessKey ID无效。
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. 您发起请求的签名与我们计算不一致,请检查您的签名算法及AccessKey Secret。
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. 所请求资源存在并发写操作。请等待一段时间后再次操作。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。