云服务器内容精选

  • 请求消息 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json;charset=utf8”。 X-Auth-Token 是 String 调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值。Token获取方式,请参考认证鉴权。
  • 响应示例 { "job": { "execution_status": "SUCCEEDED", "job_id": "JOB17cb1778-07b1-4c8f-a183-c86cffbe8f9e", "job_type": "PROVISION" }, "tasks": [ { "task_id": "Task-af75dd60-0b04-4f4b-b669-0bad38fcdd97", "task_index": 4, "task_name": "VMAPP_CONTEXT_PREPARE_01", "task_status": "SUCCEEDED", "created_at": "2024-06-06T15:55:31.115Z", "update_at": "2024-06-06T15:55:31.136Z", "messages": "{}" }, { "task_id": "Task-50110d26-3973-49e1-95d3-d46755e865af", "task_index": 5, "task_name": "VMAPP_UPGRADE_002", "task_status": "SUCCEEDED", "created_at": "2024-06-06T15:55:31.136Z", "update_at": "2024-06-06T15:55:31.36Z", "messages": "{}" } ], "task_count": 2 }
  • URI GET /v3/{project_id}/cas/jobs/{job_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 租户项目ID。获取方法,请参考获取项目ID。 job_id 是 String 部署任务ID,为应用中创建组件、根据组件ID修改组件信息、根据组件ID下发组件任务接口响应参数的job_id。 表2 查询参数 参数 是否必选 参数类型 描述 limit 否 Integer 指定个数。 offset 否 Integer 指定偏移量。 desc 否 String 是否降序: true=desc,false=asc。
  • 响应示例 { "job": { "JOB_ID": "JOB474362ef-091d-429f-9b3e-c9246b37dee6", "JOB_NAME": "provision/provMain", "JOB_TYPE": "PROVISION", "SERVICE_INSTANCE_ID": "429a35a0-dee8-4648-86f6-d1f8bc74ba52", "PROJECT_ID": "063a3158b1a34710b36ad208b9497d00", "ORDER_ID": "", "JOB_DESC": "provision/provMain", "EXECUTION_STATUS": "FAILED", "CREATED_BY": "585cc5c16cda4954b28d4eb460f06261" }, "tasks": [ { "MESSAGES": "{}", "TASK_ID": "Task-bc64b46c-1688-4787-b7ff-87cb53b346ea", "TASK_TYPE": "echo", "TASK_INDEX": 1, "TASK_NAME": "SEPARATOR_PREPARE_RESOUR CES ", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:03.344Z", "CREATED_AT": "2020-02-04T04:01:03.344Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{}", "TASK_ID": "Task-15ec252f-bca0-401e-ae5b-798a639df92e", "TASK_TYPE": "echo", "TASK_INDEX": 4, "TASK_NAME": "SEPARATOR_BUILDING", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:03.346Z", "CREATED_AT": "2020-02-04T04:01:03.345Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{}", "TASK_ID": "Task-52a5d1ae-2c54-46ec-8134-53e7b6a45fb7", "TASK_TYPE": "restful", "TASK_INDEX": 6, "TASK_NAME": "TN00091", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:08.924Z", "CREATED_AT": "2020-02-04T04:01:03.346Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{}", "TASK_ID": "Task-a149b585-d31b-4c72-a665-d820efcb0bf9", "TASK_TYPE": "restful", "TASK_INDEX": 7, "TASK_NAME": "TN00094", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:08.961Z", "CREATED_AT": "2020-02-04T04:01:08.925Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{ \"Message\" : \"ECC00011\", \"Detail\" : \"Building failed.\" }", "TASK_ID": "Task-a72fe8d8-8cc1-42b5-a097-0cf9e29692a7", "TASK_TYPE": "restful", "TASK_INDEX": 9, "TASK_NAME": "TN00097", "TASK_STATUS": "FAILED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:38.975Z", "CREATED_AT": "2020-02-04T04:01:08.962Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" } ], "task_count": 5 }
  • URI GET /v2/{project_id}/cas/jobs/{job_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 租户项目ID。获取方法,请参考获取项目ID。 job_id 是 String 部署任务ID,为创建组件实例接口响应参数的job_id。 表2 查询参数 参数 是否必选 参数类型 描述 instance_id 否 String 应用组件实例ID。获取方法,请参考获取组件实例。 limit 否 Integer 指定个数。 offset 否 Integer 指定偏移量。 desc 否 String 是否降序: true=desc,false=asc。
  • 响应示例 { "job": { "JOB_ID": "JOB474362ef-091d-429f-9b3e-c9246b37dee6", "JOB_NAME": "provision/provMain", "JOB_TYPE": "PROVISION", "SERVICE_INSTANCE_ID": "429a35a0-dee8-4648-86f6-d1f8bc74ba52", "PROJECT_ID": "063a3158b1a34710b36ad208b9497d00", "ORDER_ID": "", "JOB_DESC": "provision/provMain", "EXECUTION_STATUS": "FAILED", "CREATED_BY": "585cc5c16cda4954b28d4eb460f06261" }, "tasks": [ { "MESSAGES": "{}", "TASK_ID": "Task-bc64b46c-1688-4787-b7ff-87cb53b346ea", "TASK_TYPE": "echo", "TASK_INDEX": 1, "TASK_NAME": "SEPARATOR_PREPARE_RESOURCES", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:03.344Z", "CREATED_AT": "2020-02-04T04:01:03.344Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{}", "TASK_ID": "Task-15ec252f-bca0-401e-ae5b-798a639df92e", "TASK_TYPE": "echo", "TASK_INDEX": 4, "TASK_NAME": "SEPARATOR_BUILDING", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:03.346Z", "CREATED_AT": "2020-02-04T04:01:03.345Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{}", "TASK_ID": "Task-52a5d1ae-2c54-46ec-8134-53e7b6a45fb7", "TASK_TYPE": "restful", "TASK_INDEX": 6, "TASK_NAME": "TN00091", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:08.924Z", "CREATED_AT": "2020-02-04T04:01:03.346Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{}", "TASK_ID": "Task-a149b585-d31b-4c72-a665-d820efcb0bf9", "TASK_TYPE": "restful", "TASK_INDEX": 7, "TASK_NAME": "TN00094", "TASK_STATUS": "SUCCEEDED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:08.961Z", "CREATED_AT": "2020-02-04T04:01:08.925Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" }, { "MESSAGES": "{ \"Message\" : \"ECC00011\", \"Detail\" : \"Building failed.\"}", "TASK_ID": "Task-a72fe8d8-8cc1-42b5-a097-0cf9e29692a7", "TASK_TYPE": "restful", "TASK_INDEX": 9, "TASK_NAME": "TN00097", "TASK_STATUS": "FAILED", "LAST_HEALTH_CHECK": "2020-02-04T04:01:38.975Z", "CREATED_AT": "2020-02-04T04:01:08.962Z", "OWNER_ID": "cas-mgr-69bb87d7c-wpqwb:30114" } ], "task_count": 5}
  • URI GET /v2/{project_id}/cas/jobs/{job_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 租户项目ID。获取方法,请参考获取项目ID。 job_id 是 String 部署任务ID,为创建组件实例接口响应参数的job_id。 表2 查询参数 参数 是否必选 参数类型 描述 instance_id 否 String 应用组件实例ID。获取方法,请参考获取应用组件实例。 limit 否 Integer 指定个数。 offset 否 Integer 指定偏移量。 desc 否 String 是否降序: true=desc,false=asc。