调用StopExecution停止一个正在执行中的流程。
接口说明
流程必须为执行中。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | StopExecution |
系统规定参数。取值:StopExecution。 |
RequestId | String | 否 | testRequestId |
请求ID。如果您指定了该值,系统将使用该值作为本次请求的ID;如果您不指定,系统将随机生成。 |
FlowName | String | 是 | flow |
需要停止的流程名称,可以通过ListFlows的返回值获取。该名称在同一地域内唯一,创建后不可修改。取值说明如下:
|
ExecutionName | String | 是 | exec |
需要停止的执行名称,可以通过ListExecutions的返回值获取。在同一流程内唯一。取值说明如下:
|
Cause | String | 否 | for test |
停止错误原因。长度为1~4096个字符。 |
Error | String | 否 | nill |
停止错误代码。长度为1~128个字符。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Status | String | Running |
执行状态。取值说明如下:
|
StoppedTime | String | 2019-01-01T01:01:01.001Z |
执行停止时间。 |
RequestId | String | testRequestId |
请求ID。 |
StartedTime | String | 2019-01-01T01:01:01.001Z |
执行开始时间。 |
FlowDefinition | String | version: v1.0\ntype: flow\nname: test\nsteps:\n - type: pass\n name: mypass |
执行的流程定义。 |
Output | String | {"key":"value"} |
执行的输出,为JSON对象格式。 |
FlowName | String | flow |
流程名称。 |
Name | String | exec |
执行名称。 |
Input | String | {"key":"value"} |
执行的输入,为JSON对象格式。 |
示例
请求示例
http(s)://[Endpoint]/?Action=StopExecution
&RequestId=testRequestId
&FlowName=flow
&ExecutionName=exec
&Cause=for test
&Error=nill
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<StopExecutionResponse>
<Status>Running</Status>
<StoppedTime>2019-01-01T01:01:01.001Z</StoppedTime>
<RequestId>testRequestId</RequestId>
<StartedTime>2019-01-01T01:01:01.001Z</StartedTime>
<FlowDefinition>version: v1.0\ntype: flow\nname: test\nsteps:\n - type: pass\n name: mypass</FlowDefinition>
<Output>{"key":"value"}</Output>
<FlowName>flow</FlowName>
<Name>exec</Name>
<Input>{"key":"value"}</Input>
</StopExecutionResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Status" : "Running",
"StoppedTime" : "2019-01-01T01:01:01.001Z",
"RequestId" : "testRequestId",
"StartedTime" : "2019-01-01T01:01:01.001Z",
"FlowDefinition" : "version: v1.0\\ntype: flow\\nname: test\\nsteps:\\n - type: pass\\n name: mypass",
"Output" : "{\"key\":\"value\"}",
"FlowName" : "flow",
"Name" : "exec",
"Input" : "{\"key\":\"value\"}"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | EntityTooLarge | The payload size exceeds maximum allowed size (%s bytes). | 请求消息体过大。 |
400 | InvalidArgument | Parameter error. | 请求参数错误。具体内容请参考实际错误信息。 |
400 | MissingRequiredHeader | The HTTP header '%s' must be specified. | 请求所需参数缺失。具体内容请参考实际错误信息。 |
400 | MissingRequiredParams | The HTTP query '%s' must be specified. | 请求所需参数缺失。具体内容请参考实际错误信息。 |
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. | 所请求资源不存在,请确保流程已创建。 |
409 | ConcurrentUpdateError | Update conflict, please retry. | 所请求资源存在并发写操作。请等待一段时间后再次操作。 |
415 | UnsupportedMediaType | The content type must be "application/json". | 请求消息体类型错误。 |
429 | ResourceThrottled | The request is throttled. Please try again later. | 因某些原因系统流量已达瓶颈。请稍后重试。 |
500 | InternalServerError | An internal error has occurred. Please retry. | 服务器内部错误。请稍后重试。 |
访问错误中心查看更多错误码。