调用StopInvocation接口,停止一条正在运行中(Running)的作业。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | StopInvocation | 要执行的操作,取值:StopInvocation。 |
Version | String | 是 | 2020-04-01 | API的版本,取值:2020-04-01。 |
InvocationId | String | 是 | ivk-2a745b41**** | 任务执行ID |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
InvocationId | String | ivk-2a745b41**** | 任务执行 ID。 |
GET /?Action=StopInvocation&Version=2020-04-01&InvocationId=ivk-2a745b41**** HTTP/1.1
{ "ResponseMetadata":{ "RequestId":"2023082415303301022514515207C4****", "Action":"StopInvocation", "Version":"2020-04-01", "Service":"ecs", "Region":"cn-beijing" }, "Result":{ "InvocationId":"ivk-2a745b41****" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | MissingParameter.AccountId | The required parameter AccountId is not supplied. | 用户ID不能为空。 |
400 | MissingParameter.InvocationId | The required InvocationId is not supplied. | 作业 ID 不能为空。 |
400 | MissingParameter.InstanceIds | The required parameter InstanceIds is not supplied. | 实例 ID 不能为空。 |
400 | LimitExceeded.MaximumInstanceIds | The specified InstanceIds exceeds the limit. | 实例数量超出限制。 |
400 | InvalidOperation.Forbidden | The specified Invocation is not allowed to operate. | 指定的作业处于不可操作状态。 |
400 | InvalidInvocationRunningInstance.NotFound | No instance with an ongoing invocation is found. | 未查询到正在执行作业的实例。 |
404 | InvalidInvocation.NotFound | The specified Invocation does not exist. | 指定的作业不存在。 |
404 | InvalidInvocationInstance.NotFound | The specified instance is not included in the invocation. | 作业中不包含指定实例。 |
409 | InvalidInstanceIds.Conflict | The specified InstanceId already exists. | 指定实例 ID 重复。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |