获取云助手任务列表 | 大装置帮助中心
跳到主要内容

获取云助手任务列表

接口描述

GET /compute/bms/data/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/assist/batchTasks

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters)

名称类型必须位置默认值取值范围描述
subscription_namestringpath--订阅
resource_group_namestringpath--资源组
zonestringpath--可用区
page_sizeintquery--返回项最大数目
page_tokenstringquery--从先前的列表请求返回的下一页令牌值

请求体(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)

名称类型描述
tasksobject任务列表
next_page_tokenstring从先前的列表请求返回的下一页令牌值(如果存在)
totalint总任务量

其中,tasks的参数如下:

名称类型描述
idstring任务id
instance_idsstring裸金属实例id
scriptstring任务内容
create_timestring创建时间
update_timestring更新时间
tasksobject任务列表

其中,tasks的参数如下:

名称类型描述
idstring云助手任务id
namestring云助手任务名
typestring云助手任务类型
assist_idstring云助手id
instance_idstring实例id
instance_uuidstring实例uuid
instance_displaynamestring实例显示的名称
scriptstring任务内容
create_timestring创建时间
update_timestring更新内容
resultstring任务结果
statusstring任务状态

响应示例(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
}