获取云助手任务列表
接口描述
GET /compute/bms/data/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/assist/batchTasks
请求头(Request Header)
请求参数(Request Parameters)
名称 | 类型 | 必须 | 位置 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|---|
subscription_name | string | 否 | path | - | - | 订阅 |
resource_group_name | string | 否 | path | - | - | 资源组 |
zone | string | 否 | path | - | - | 可用区 |
page_size | int | 否 | query | - | - | 返回项最大数目 |
page_token | string | 否 | query | - | - | 从先前的列表请求返回的下一页令牌值 |
请求体(Request Body)
无
请求示例(Request Example)
curl -L -X GET 'https://bms.cn-sh-01.sensecoreapi.dev/compute/bms/data/v1/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/assist/batchTasks' \
-H 'Accept: application/json' \
-H 'Authorization: xxx'
响应参数(Response Parameters)
名称 | 类型 | 描述 |
---|---|---|
tasks | object | 任务列表 |
next_page_token | string | 从先前的列表请求返回的下一页令牌值(如果存在) |
total | int | 总任务量 |
其中,tasks
的参数如下:
名称 | 类型 | 描述 |
---|---|---|
id | string | 任务id |
instance_ids | string | 裸金属实例id |
script | string | 任务内容 |
create_time | string | 创建时间 |
update_time | string | 更新时间 |
tasks | object | 任务列表 |
其中,tasks
的参数如下:
名称 | 类型 | 描述 |
---|---|---|
id | string | 云助手任务id |
name | string | 云助手任务名 |
type | string | 云助手任务类型 |
assist_id | string | 云助手id |
instance_id | string | 实例id |
instance_uuid | string | 实例uuid |
instance_displayname | string | 实例显示的名称 |
script | string | 任务内容 |
create_time | string | 创建时间 |
update_time | string | 更新内容 |
result | string | 任务结果 |
status | string | 任务状态 |
响应示例(Response Example)
{
"tasks": [
{
"id": "0AF00141000018B848BCDD07F758C9B1",
"instance_ids": [
"/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/bmsInstances/bca100af-6f10-11ee-85b4-da68b9bf2c6e"
],
"script": "#!/bin/bash\necho \"123\"",
"create_time": "2023-10-31T15:03:56.845234Z",
"update_time": "2023-10-31T15:03:56.845234Z",
"tasks": [
{
"id": "0AF00141000018B848BCEB1B676FDA5D",
"name": "",
"type": "BASH",
"assist_id": "",
"instance_id": "/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/bmsInstances/bca100af-6f10-11ee-85b4-da68b9bf2c6e",
"instance_uuid": "bca100b1-6f10-11ee-85b4-da68b9bf2c6e",
"instance_displayname": "h800_15",
"script": "",
"create_time": "2023-10-31T15:03:56.849815Z",
"update_time": "2023-10-31T15:04:04.663763Z",
"result": "0",
"status": "DONE"
}
]
},
{
"id": "0AF00141000018B4BF7606F23E4730D7",
"instance_ids": [
"/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/bmsInstances/c019a00b-6f0f-11ee-bc3d-e612694d9db2"
],
"script": "#!/bin/bash\ndfgdg",
"create_time": "2023-10-20T15:23:05.202069Z",
"update_time": "2023-10-20T15:23:05.202069Z",
"tasks": [
{
"id": "0AF00141000018B4BF76074EEC6E1D7A",
"name": "",
"type": "BASH",
"assist_id": "",
"instance_id": "/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/bmsInstances/c019a00b-6f0f-11ee-bc3d-e612694d9db2",
"instance_uuid": "c019a010-6f0f-11ee-bc3d-e612694d9db2",
"instance_displayname": "121_4090",
"script": "",
"create_time": "2023-10-20T15:23:05.204896Z",
"update_time": "2023-10-20T15:23:07.264577Z",
"result": "ExitCodeNonzero",
"status": "DONE"
}
]
},
{
"id": "0AF00141000018B4BF724148DFC0AF28",
"instance_ids": [
"/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/bmsInstances/bca100af-6f10-11ee-85b4-da68b9bf2c6e"
],
"script": "#!/bin/bash\necho usdhfusdg",
"create_time": "2023-10-20T15:22:49.780630Z",
"update_time": "2023-10-20T15:22:49.780630Z",
"tasks": [
{
"id": "0AF00141000018B4BF72439C65CBA9CF",
"name": "",
"type": "BASH",
"assist_id": "",
"instance_id": "/subscriptions/2488c031-873f-4396-8b9e-98c68ca016ae/resourceGroups/default/zones/cn-sh-01a/bmsInstances/bca100af-6f10-11ee-85b4-da68b9bf2c6e",
"instance_uuid": "bca100b1-6f10-11ee-85b4-da68b9bf2c6e",
"instance_displayname": "h800_15",
"script": "",
"create_time": "2023-10-20T15:22:49.785767Z",
"update_time": "2023-10-20T15:22:50.590274Z",
"result": "0",
"status": "DONE"
}
]
}
],
"next_page_token": "",
"total": 3
}