{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"BaseResp":{"description":"API响应基类。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00149901","maxLength":16,"minLength":1,"type":"string"},"error_msg":{"description":"错误描述。","example":"The request message is invalid.","maxLength":255,"minLength":1,"type":"string"}}},"JobDetailInfo":{"properties":{"begin_time":{"description":"任务创建时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","readOnly":true,"type":"string"},"end_time":{"description":"任务结束时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","readOnly":true,"type":"string"},"error_code":{"description":"任务执行失败时的错误码。","example":"WKS.00129901","readOnly":true,"type":"string"},"error_message":{"description":"任务失败原因。","example":"The service is now unavailable to process the request.","readOnly":true,"type":"string"},"id":{"description":"子任务ID。","example":"1","type":"string"},"job_id":{"description":"任务ID。","example":"1","readOnly":true,"type":"string"},"job_resource_info":{"$ref":"#/definitions/JobResourceInfo"},"job_type":{"$ref":"#/definitions/JobType"},"project_id":{"description":"项目ID。","example":"325f2346-xxxx123d-1425af14","readOnly":true,"type":"string"},"status":{"$ref":"#/definitions/JobDetailStatus","description":"任务状态。","readOnly":true}}},"JobDetailStatus":{"description":"job详情的状态\n* `WAITING` - 等待\n* `RUNNING` - 运行中\n* `SUCCESS` - 成功\n* `FAILED` - 失败\n* `ABNORMAL` - 异常\n* `ROLLBACK` - 回滚中\n* `ABORTING` - 终止中","enum":["WAITING","RUNNING","SUCCESS","FAILED","ABNORMAL","ROLLBACK","ABORTING"],"example":"WAITING","type":"string"},"JobInfo":{"properties":{"begin_time":{"description":"任务创建时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","type":"string"},"end_time":{"description":"任务结束时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","type":"string"},"id":{"description":"任务ID。","example":"1","readOnly":true,"type":"string"},"job_type":{"$ref":"#/definitions/JobType","description":"任务类型。"},"status":{"$ref":"#/definitions/JobStatus","description":"任务状态。"},"sub_jobs_total":{"description":"子任务总数。","example":10,"type":"integer"}}},"JobResourceInfo":{"description":"具体的资源信息。","properties":{"cloud_service_type":{"description":"云服务类型编码;新购、规格变更场景,必填。","readOnly":true,"type":"string"},"extend_params":{"description":"expireTime:到期时间,域名注册服务使用。\n UTC时间,格式:yyyy-MM-ddTHH:mm:ssZ(2016-06-28T00:00:00Z)。","readOnly":true,"type":"string"},"is_main_resource":{"description":"该resourceId是否是主资源(仅开通场景使用,其他场景为空)。\n* `1` - 是\n* `0` - 否","example":1,"readOnly":true,"type":"integer"},"main_resources":{"description":"resourceId的主资源。\n 是挂载到/绑定到/依附到/包含于/关联到资源,比如IP的主资源‘云主机’、数据盘的主资源‘云主机’。\n 如果resourceId是依附在多个资源上,则有多个主资源,比如共享盘挂载到多个云主机上。\n 无关联主资源,则空,比如独立未挂载的数据盘。","items":{"$ref":"#/definitions/RelativeResource"},"readOnly":true,"type":"array"},"measure":{"description":"specSize的单位编码,比如GB、M,有specSize时,此字段必填。","format":"int32","readOnly":true,"type":"integer"},"old_cloud_service_type":{"description":"仅针对ECS/BMS云服务的“切换操作系统”场景使用:云主机切换操作系统的云服务类型编码会变化场景。\n填写变更前老的云服务类型编码。云服务类型未变化,无此字段。","readOnly":true,"type":"string"},"old_resource_id":{"description":"仅针对ECS/BMS云服务的“切换操作系统”场景使用。\n云主机切换操作系统的资源id会变化场景。\n填写变更前老的资源Id。资源Id未变化,无此字段。","maxLength":128,"minLength":0,"readOnly":true,"type":"string"},"old_resource_type":{"description":"仅针对ECS/BMS云服务“切换操作系统”场景使用。\n云主机切换操作系统的资源类型编码会变化场景。\n填写变更前老的资源类型编码。资源类型未变化,无此字段。","readOnly":true,"type":"string"},"processed_time":{"description":"处理时间。","example":"2022-03-07T10:40:43Z","format":"date-time","readOnly":true,"type":"string"},"resource_id":{"description":"客户在云服务Console上可见的资源实例Id,全局唯一,且不可更改,最大64个字符。\n 注:“规格变更”场景下(包括升降配),是对某个资源实例的规格进行调整,\n 该资源实例其他信息(比如资源Id、资源名称)和运行的业务数据不变化。","maxLength":128,"minLength":0,"readOnly":true,"type":"string"},"resource_name":{"description":"资源名称;创建、有最新资源名称场景,必填。","readOnly":true,"type":"string"},"resource_spec_code":{"description":"资源规格编码;新购、规格变更场景,必填。","readOnly":true,"type":"string"},"resource_type":{"description":"资源类型编码;新购、规格变更场景,必填。","readOnly":true,"type":"string"},"spec_size":{"description":"某些规格属性大小:比如带宽大小、数据盘大小。","format":"double","readOnly":true,"type":"number"},"spec_type":{"additionalProperties":{"properties":{},"type":"object"},"description":"规格类型,运营上需要呈现和使用的一些规格属性,多个使用K:V格式。\n比如带宽的共享/独享(shareable:true/false),数据盘的系统盘/数据盘类型(root:true/false)。\n当前针对共享带宽、共享盘使用,必填。","readOnly":true,"type":"object"}}},"JobResp":{"allOf":[{"$ref":"#/definitions/JobInfo"},{"properties":{"sub_jobs":{"description":"子任务列表。","items":{"$ref":"#/definitions/JobDetailInfo"},"readOnly":true,"type":"array"}},"type":"object"}],"description":"查询任务详情响应。"},"JobStatus":{"description":"job状态\n* `WAITING` - 等待\n* `RUNNING` - 运行中\n* `SUCCESS` - 完成\n* `FAILED` - 失败","enum":["WAITING","RUNNING","SUCCESS","FAILED"],"example":"WAITING","type":"string"},"JobType":{"description":"job类型:\n* `CREATE_SERVER` - 创建服务器\n* `DELETE_SERVER` - 删除服务器\n* `UPDATE_FREEZE_STATUS` - 修改服务器冻结状态\n* `CREATE_SERVER_IMAGE` - 构建镜像\n* `REINSTALL_OS` - 重装操作系统\n* `CHANGE_SERVER_IMAGE` - 更换镜像\n* `REJOIN_DOMAIN` - 重新加域\n* `MIGRATE_SERVER` - 迁移服务器\n* `UPGRADE_ACCESS_AGENT` - hda升级\n* `UPDATE_SERVER_TSVI` - 更新虚拟会话IP\n* `SCHEDULED_TASK` - 定时任务job\n* `COLLECT_HDA_LOG` - 收集hda日志\n* `COLLECT_APS_LOG` - 收集aps日志\n* `CREATE_SERVER_SNAPSHOT` - 创建服务器快照\n* `DELETE_SERVER_SNAPSHOT` - 删除服务器快照\n* `RESTORE_SERVER_SNAPSHOT` - 恢复服务器快照","enum":["CREATE_SERVER","DELETE_SERVER","UPDATE_FREEZE_STATUS","CREATE_SERVER_IMAGE","REINSTALL_OS","CHANGE_SERVER_IMAGE","REJOIN_DOMAIN","MIGRATE_SERVER","UPGRADE_ACCESS_AGENT","UPDATE_SERVER_TSVI","SCHEDULED_TASK","COLLECT_HDA_LOG","COLLECT_APS_LOG","CREATE_SERVER_SNAPSHOT","DELETE_SERVER_SNAPSHOT","RESTORE_SERVER_SNAPSHOT"],"example":"CREATE_SERVER","type":"string"},"RelativeResource":{"description":"关联资源","properties":{"extend_params":{"description":"扩展信息,Key:Value格式。","readOnly":true,"type":"string"},"relative_cloud_service_type":{"description":"比如ECS云服务类型为‘hws.service.type.ec2’。","readOnly":true,"type":"string"},"relative_resource_id":{"description":"关联的资源ID。","maxLength":128,"minLength":0,"readOnly":true,"type":"string"},"relative_resource_name":{"description":"有资源名称的云资源,都需要返回resourceName,如果为空值,则返回“”。","readOnly":true,"type":"string"},"relative_resource_type":{"description":"比如VM的资源类型为‘hws.resource.type.vm’。","readOnly":true,"type":"string"},"relative_type":{"description":"* 关联关系类型,描述relativeResourceId和resourceId间的关联关系:\n * 0:挂载(弱关联),表示relativeResourceId和resourceId两者有关联关系,\n * 但是两者可以独立使用、分别进行交易,且分别使用和交易都不影响整套云服务的使用;比如云主机和数据盘。 *\n 1:绑定(强关联),表示relativeResourceId和resourceId是强绑定关系,\n 两者必须一起使用、一起进行交易,缺少其中一个会造成整套云服务不能使用;比如云主机和系统盘。\n 缺省值为0(挂载)。\n subResources中的RelativeResource,此字段是必填;mainResources中的RelativeResource。","example":1,"maximum":1,"minimum":0,"type":"integer"}}}},"description":null,"group_id":"fe7dbee2e20f4aa589be7dce935a38ad","host":"appstream.cn-north-4.myhuaweicloud.com","id":"e449aa6bc9564a52bb431b71a840de23","info_version":"v1","method":"get","name":"ShowJobDetail","parameters":{},"paths":{"/v2/{project_id}/job/{job_id}":{"get":{"consumes":["application/json"],"description":"查询Job的执行状态。\n\n对于创建云服务器、删除云服务器、重建镜像等异步API,下发命令后会返回job_id,通过job_id可以查询任务的执行状态。","operationId":"ShowJobDetail","parameters":[{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":2147483647,"minLength":0,"name":"X-Auth-Token","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"项目唯一标识。","in":"path","maxLength":128,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"任务ID。","in":"path","maxLength":255,"minLength":1,"name":"job_id","required":true,"type":"string","x-example":"2382dd96-xxxxx56d-axxxc4b09a35b58"}],"produces":["application/json"],"responses":{"200":{"description":"成功响应。","examples":{"application/json":{"begin_time":"2023-06-06T02:30:06.836Z","end_time":"2023-06-06T02:45:49.577Z","id":"575768277444198400","job_type":"CREATE_SERVER","status":"SUCCESS","sub_jobs":[{"begin_time":"2023-06-06T02:30:06.902Z","end_time":"2023-06-06T02:45:49.564Z","error_code":"","error_message":"","id":"575768277481947136","job_id":"575768277444198400","job_resource_info":{"resource_id":"a2a6f5af-cbf7-4242-8988-109426870886","resource_name":"APS-20230606023006-YM08IXT04C"},"job_type":"CREATE_SERVER","project_id":"a4da8115c9d8464ead3a38309130523f","status":"SUCCESS"}],"sub_jobs_total":1}},"schema":{"$ref":"#/definitions/JobResp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BaseResp"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/BaseResp"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/BaseResp"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/BaseResp"}}},"security":[{"apig-auth-iam-used-authn5":[]}],"summary":"查询任务的执行状态","tags":["Job"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal,public","x-apigateway-backend":{"httpVpcEndpoints":{"description":"","method":"GET","name":"wks-bundlemanager-lb","path":"/v2/{project_id}/job/{job_id}","scheme":"https","timeout":30000},"parameters":[{"description":"","in":"header","name":"X-Auth-Token","origin":"request","value":"X-Auth-Token"},{"description":"","in":"path","name":"project_id","origin":"request","value":"project_id"},{"description":"","in":"path","name":"job_id","origin":"request","value":"job_id"}],"type":"HTTP-VPC"},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-ratelimit":"workspace_base","x-apigateway-request-type":"public","x-is-registered":"Y","x-request-examples-url-1":"GET /v2/29dfe82ada564ac2b927e1ff036d9a9b/job/575768277444198400","x-support-sdk":"Y"}}},"product_short":"WorkspaceApp","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":{"apig-auth-app":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-type":"AppSigv1"},"apig-auth-iam":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM"},"apig-auth-iam-used-authn5":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-opt":{"inner-auth-type":"iam_auth_n5"},"x-apigateway-auth-type":"IAM"}},"summary":"查询任务的执行状态","tags":"查询Job状态","uri":null,"version":"2.0"}