取消任务
描述
正在运行的任务可以通过该接口取消。当前只支持ImportImage和ExportImage两个种类型的任务。
请求参数
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
Action | String | 是 | 操作接口名,取值:CancelTask。 |
RegionId | String | 是 | 地域ID |
TaskId | String | 是 | 任务Id |
返回参数
全是公共返回参数,详见公共返回参数
错误码
错误代码 | 描述 | Http 状态码 | 语义 |
---|---|---|---|
MissingParameter | An input parameter "RegionId" that is mandatory for processing the request is not supplied. | 400 | 缺少 RegionId 值 |
MissingParameter | An input parameter "TaskId" that is mandatory for processing the request is not supplied. | 400 | 缺少 TaskId 值 |
RegionId.NotFound | The specified region is not found. | 400 | 指定的regionId 不存在 |
InvalidTaskId.NotFound | The specified taskId is not found. | 400 | 指定的任务ID不存在 |
IncorrectTaskStatus | The specified task status is not invalid. | 403 | 指定的任务状态不正确 |
TaskActionNotSupport | The specified task action is not support | 400 | 该任务类型不支持取消 |
CancelTaskFailed | The task is failed to cancel, Please contact the administrator. | 400 | 取消任务失败,请联系管理员 |
示例
请求示例
https://ecs.aliyuncs.com/?Action=CancelTask
&RegionId=cn-hangzhou
&TaskId=t-23ym6mvro
&<公共请求参数>
返回示例
JSON 格式
{"RequestId": "4BE2C7FE-C7A4-4675-A153-174E032AAB