技术员联盟提供win764位系统下载,win10,win7,xp,装机纯净版,64位旗舰版,绿色软件,免费软件下载基地!

当前位置:主页 > 教程 > 服务器类 >

阿里云如何使用取消任务接口

来源:技术员联盟┆发布时间:2017-05-01 01:01┆点击:

  正在运行的任务可以通过该接口取消。当前只支持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