获取桌面实例列表
更新时间:2025-08-05
获取桌面实例列表
接口描述
本接口用于获取云桌面实例列表。
请求结构
Plain Text
1GET /v1/bvd/desktops{?desktopId,endUserId,marker,maxKeys,name,regionId} HTTP/1.1
2Host: bec.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
marker | 标记查询的起始位置 | query | false | string |
maxKeys | 每页包含的最大数量,1-1000,默认1000 | query | false | integer |
name | 按桌面名称查询 | query | false | string |
regionId | 按节点ID查询 | query | false | string |
desktopId | 按桌面ID查询 | query | false | string |
endUserId | 按所分配的终端用户ID查询 | query | false | string |
响应状态
状态码 | 说明 |
---|---|
200 | OK |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
响应参数
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
result | 桌面实例列表 | array | DesktopModelVo |
desktopId | 桌面ID | string | |
name | 桌面名称 | string | |
cpuCount | CPU核数 | integer(int32) | |
cpuModel | CPU类型 | string | |
memorySizeInGB | 内存GB | integer(int32) | |
gpuCount | GPU卡数 | integer(int32) | |
gpuModel | GPU、vGPU卡型号 | string | |
regionId | 所在节点ID | string | |
rootDisk | 系统盘 | DiskModel | DiskModel |
id | 云磁盘ID | string | |
name | 云磁盘名称 | string | |
sizeInGB | 磁盘容量GiB | integer | |
storageType | 磁盘类型。CDS_SSD:云磁盘SSD, NVME:本地盘SSD, SATA:本地盘SATA | string | |
dataDiskList | 数据盘 | array | DiskModel |
id | 云磁盘ID | string | |
name | 云磁盘名称 | string | |
sizeInGB | 磁盘容量GiB | integer | |
storageType | 磁盘类型。CDS_SSD:云磁盘SSD, NVME:本地盘SSD, SATA:本地盘SATA | string | |
endUserCount | 已分配用户数量 | integer(int32) | |
imageId | 镜像Id | string | |
imageName | 镜像名字 | string | |
vpcId | 所在VPC ID | string | |
subnetId | 所在子网ID | string | |
internalIp | 内网IP地址 | string | |
macAddress | MAC地址 | string | |
networkType | 公网类型, NAT或PUBLIC_IP。不需要则留空,可用值:NAT,PUBLIC_IP,INTERNAL_IP | string | |
publicIp | 公网IP地址。只适用PUBLIC_IP类型 | string | |
networkCapacityInMbps | 公网IP带宽。只适用PUBLIC_IP类型 | integer(int32) | |
securityGroupId | 安全组Id | string | |
securityGroupName | 安全组Name | string | |
serverStatus | 服务器状态: CREATING,RUNNING,STOPPING,STOPPED,DELETING RESTARTING,REINSTALLING,STARTING,IMAGING,SNAPSHOTING, FAILED, NOTEXIST | string | |
status | 桌面状态: idle 空闲, inuse 使用中, offline 离线, processing 进行中, error 异常 | string | |
spec | 规格族 | string | |
specName | 规格名称 | string | |
billing | 订单、计费相关参数 | Billing | Billing |
autoRenew | 自动续费时长信息 | PaymentTime | PaymentTime |
length | 时长 | integer | |
timeUnit | 时长单位: month或year | string | |
paymentTiming | 付费方式 | string | |
reservation | 预付费时长信息 | PaymentTime | PaymentTime |
length | 时长 | integer | |
timeUnit | 时长单位: month或year | string | |
createTime | 创建时间 | string | |
totalCount | 总数 | integer(int32) | integer(int32) |
isTruncated | true表示后面还有数据,false表示已经是最后一页 | boolean | |
marker | 标记查询的起始位置 | string | |
maxKeys | 每页包含的最大数量 | integer(int32) | integer(int32) |
nextMarker | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 | string |
请求示例
Plain Text
1GET /v1/bvd/desktops?maxKeys=10&marker= HTTP/1.1
2Host: bec.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
Javascript
1{
2 "result": [
3 {
4 "name": "我的云桌面",
5 "desktopId": "vd-arjkgxc-cn-baoding-ix-afrjb",
6 "cpuCount": 4,
7 "cpuModel": "Intel Xeon Gold 6271C",
8 "memorySizeInGB": 8,
9 "gpuCount": 0,
10 "spec": "bvd.c4.c4m8",
11 "status": "idle",
12 "rootDisk": {
13 "id": "cds-vd-xzfrt-rootfs",
14 "name": "sys",
15 "sizeInGB": 50,
16 "storageType": "CDS_SSD"
17 },
18 "dataDiskList": [
19 {
20 "id": "cds-vd-arjgkf",
21 "name": "data0",
22 "sizeInGB": 100,
23 "storageType": "CDS_SSD"
24 }
25 ],
26 "imageId": "im-k0cq2ivz",
27 "imageName": "Windows10-21h2",
28 "internalIp": "172.16.40.32",
29 "macAddress": "fa:16:xx:xxx:xx:xx",
30 "networkType": "NAT",
31 "publicIp": "",
32 "regionId": "cn-baoding-ix",
33 "securityGroupId": "sg-etr9ohvu",
34 "securityGroupName": "virtual-desktop-sg",
35 "serverStatus": "RUNNING",
36 "subnetId": "sbn-qyz3floifaad",
37 "subnetName": "vd",
38 "vpcId": "vpc-yzv1gad5tgsr",
39 "vpcName": "default",
40 "endUserCount": 1,
41 "billing": {
42 "paymentTiming": "Postpaid"
43 },
44 "createTime": "2024-01-12T03:27:08Z"
45 }
46 ],
47 "isTruncated": false,
48 "marker": "",
49 "maxKeys": 10,
50 "nextMarker": "",
51 "totalCount": 1
52}