Querying Desktop Pools
Function
Query desktop pools.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:desktopPools:list
List
desktopPool *
-
-
ims:images:list
URI
GET /v2/{project_id}/desktop-pools
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
No |
String |
Desktop pool name. |
|
type |
No |
String |
Desktop pool type. The options are DYNAMIC (dynamic pool) and STATIC (static pool). |
|
enterprise_project_id |
No |
String |
Enterprise project ID. |
|
offset |
No |
Integer |
Where the pagination query starts. The value starts from 0. |
|
limit |
No |
Integer |
Pagination query. The value ranges from 0 to 1000 and defaults to 1000. |
|
in_maintenance_mode |
No |
Boolean |
Filters by maintenance status. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Total number. |
|
desktop_pools |
Array of SimpleDesktopPoolInfo objects |
Desktop pool information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Specifies the desktop pool ID. |
|
name |
String |
Desktop pool name. |
|
type |
String |
Desktop pool type. DYNAMIC: dynamic pool; STATIC: static pool. |
|
description |
String |
Desktop pool description. |
|
created_time |
String |
Specifies the creation time in UTC format, for example, 2022-05-11T11:45:42.000Z. |
|
charging_mode |
String |
Specifies the billing mode. The value can be 0 (monthly) or 1 (pay-per-use). |
|
desktop_count |
Integer |
Total number of desktops in the desktop pool. |
|
desktop_used |
Integer |
Number of desktops bound to users in the desktop pool. |
|
availability_zone |
String |
AZ. |
|
subnet_id |
String |
Subnet ID (This parameter is deprecated. If there are multiple subnet IDs, only the first one is used.) |
|
subnet_ids |
Array of strings |
List of desktop pool subnet IDs. |
|
product |
ProductInfo object |
Product information. |
|
image_id |
String |
Image ID. |
|
image_name |
String |
Image name. |
|
image_os_type |
String |
Specifies the image OS type. |
|
image_os_version |
String |
Specifies the image OS version. |
|
image_os_platform |
String |
Image OS platform. |
|
image_product_code |
String |
productCode (specCode) of an image. |
|
root_volume |
VolumeInfo object |
System disk. |
|
data_volumes |
Array of VolumeInfo objects |
Data disks. |
|
security_groups |
Array of SecurityGroupInfo objects |
Desktop security group. |
|
disconnected_retention_period |
Integer |
Number of minutes within which the binding relationship between a user and a desktop is retained when the dynamic pool desktop is disconnected. After the binding relationship times out, the user is automatically unbound. |
|
enable_autoscale |
Boolean |
Specifies whether to enable auto scaling for the desktop pool. The value false indicates that auto scaling is disabled, and the value true indicates that auto scaling is enabled. |
|
autoscale_policy |
AutoscalePolicy object |
Auto scaling policy. |
|
status |
String |
Desktop pool status. |
|
enterprise_project_id |
String |
Enterprise project ID. |
|
in_maintenance_mode |
Boolean |
Whether a desktop pool is in administrator maintenance mode. |
|
desktop_name_policy_id |
String |
Policy ID, which is used to specify the desktop name generation policy. |
|
tags |
Array of Tag objects |
Tag list. |
|
ou_name |
String |
OU name. |
|
vpc_id |
String |
VPC ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
product_id |
String |
Product ID. |
|
flavor_id |
String |
Specifications ID. |
|
type |
String |
Product type. |
|
cpu |
String |
CPU. |
|
memory |
String |
Memory. |
|
descriptions |
String |
Product description. |
|
charge_mode |
String |
Billing type of the package. 1 indicates yearly/monthly billing, and 0 indicates pay-per-use billing. |
|
architecture |
String |
Product architecture. |
|
is_gpu |
Boolean |
Whether the specifications are of the GPU type. |
|
package_type |
String |
Package type. |
|
system_disk_type |
String |
System disk type. |
|
system_disk_size |
String |
System disk size. |
|
contain_data_disk |
Boolean |
Whether data disks are included in the package billing. off indicates no. |
|
resource_type |
String |
Resource type. |
|
cloud_service_type |
String |
Cloud service type. |
|
volume_product_type |
String |
Disk type. |
|
status |
String |
The status can be normal (by default, on sale), sellout (sold out), and abandon (unavailable). |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Specifies the IDs of the disks to be operated in batches. |
|
type |
String |
Desktop data disk type, which must be the same as the disk type provided by the system. |
|
size |
Integer |
Disk capacity in GB. |
|
iops |
Integer |
Number of read/write operations performed by an EVS disk per second. |
|
throughput |
Integer |
Amount of data read from and written to an EVS disk per second. |
|
resource_spec_code |
String |
Specifications. |
|
kms_id |
String |
KMS key ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Security group ID. |
|
name |
String |
Security group name. |
|
Parameter |
Type |
Description |
|---|---|---|
|
autoscale_type |
String |
Auto scaling type. The options are as follows: ACCESS_CREATED: created during access; AUTO_CREATED: auto scaling. |
|
max_auto_created |
Integer |
Maximum number of desktops that can be automatically created. |
|
min_idle |
Integer |
Number of reserved idle desktops. |
|
once_auto_created |
Integer |
Number of desktops that can be automatically created at a time. (deprecated) |
|
min_retention |
Integer |
Minimum number of desktops. |
|
idle_retention_duration |
Integer |
Idle desktop reservation duration, in minutes. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Specifies the tag key. This parameter cannot be left blank and can contain a maximum of 128 Unicode characters. The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). The value cannot contain the following characters: =*<>,|/. |
|
value |
String |
Value of a tag, which can contain a maximum of 43 Unicode characters. The value can contain uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). The value cannot contain the following characters: =*<>,|/. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
error_detail |
String |
Error details. |
|
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Example Requests
GET /v2/bcae3e673fd04716a3b9dacdf58ca336/desktop-pools
Example Responses
Status code: 200
Response to the request for querying desktop pools.
{
"total_count" : 2,
"desktop_pools" : [ {
"id" : "ca689892-25f2-4c68-88cb-56be3565f3f5",
"name" : "POOL1",
"type" : "STATIC",
"description" : "",
"created_time" : "2023-01-04T07:10:56.696Z",
"charging_mode" : "1",
"desktop_count" : 1,
"desktop_used" : 0,
"on_demand_desktop_num" : 1,
"availability_zone" : "cn-north-4a",
"subnet_id" : "6bf585f4-5ccf-4e50-93a4-1b1069ed53c3",
"subnet_ids" : [ "6bf585f4-5ccf-4e50-93a4-1b1069ed53c3" ],
"product" : {
"product_id" : "workspace.x86.ultimate.large2",
"flavor_id" : "s6.large.2",
"type" : "BASE",
"cpu" : "2",
"memory" : "4096",
"descriptions" : "Ultimate | 2 vCPUs | 4 GB memory",
"charge_mode" : "1",
"architecture" : "x86",
"is_gpu" : false,
"package_type" : "ultimate",
"system_disk_type" : "SAS",
"system_disk_size" : "80",
"contain_data_disk" : false,
"resource_type" : "hws.resource.type.workspace.desktop",
"cloud_service_type" : "hws.service.type.vdi",
"volume_product_type" : "workspace",
"status" : "normal",
"sub_product_list" : [ ]
},
"image_id" : "97575518-50c9-45f1-85a1-884c6efeaec2",
"image_name" : "WKS_WIN1064_UserImage",
"image_os_type" : "Windows",
"image_os_version" : "Windows 10 64bit",
"image_os_platform" : "Windows",
"root_volume" : {
"id" : "ce665b9f-1dd3-4698-893c-08e9b8f70ac5",
"type" : "SAS",
"size" : 80
},
"data_volumes" : [ {
"id" : "1ac3c662-1c97-4309-abbf-cca3db9f05e2",
"type" : "SAS",
"size" : 10
} ],
"tags" : [ ],
"ou_name" : "",
"vpc_id" : "fe30128b-9184-4b05-9395-b3dedb1a1d41"
}, {
"id" : "2c2be3fb-0013-48d5-a081-0731f3473997",
"name" : "POOL2",
"type" : "DEDICATED",
"created_time" : "2023-01-04T07:10:53.554Z",
"charging_mode" : "0",
"desktop_count" : 2,
"desktop_used" : 1,
"on_demand_desktop_num" : 1,
"availability_zone" : "cn-north-4a",
"subnet_id" : "w9iks7f4-5ccf-4e50-93a4-1b10w9k853c3",
"subnet_ids" : [ "w9iks7f4-5ccf-4e50-93a4-1b10w9k853c3", "27uw8k94-109l-w9sm-77s9-20wlw9k8009j" ],
"product" : {
"product_id" : "workspace.x86.ultimate.large2",
"flavor_id" : "s6.large.2",
"type" : "BASE",
"cpu" : "2",
"memory" : "4096",
"descriptions" : "Ultimate | 2 vCPUs | 4 GB memory",
"charge_mode" : "1",
"architecture" : "x86",
"is_gpu" : false,
"package_type" : "ultimate",
"system_disk_type" : "SAS",
"system_disk_size" : "80",
"contain_data_disk" : false,
"resource_type" : "hws.resource.type.workspace.desktop",
"cloud_service_type" : "hws.service.type.vdi",
"volume_product_type" : "workspace",
"status" : "normal",
"sub_product_list" : [ ]
},
"root_volume" : {
"id" : "lmo05b9f-28ok-4698-893c-9s0ij8f70ac5",
"type" : "SAS",
"size" : 80
},
"data_volumes" : [ {
"id" : "7wka9662-1c97-4309-ab0f-cca3db9f05e2",
"type" : "SAS",
"size" : 80
}, {
"id" : "1ac3c662-9si8-4309-9wkp-cca3db9f2jwl",
"type" : "SAS",
"size" : 80
} ],
"tags" : [ {
"key" : "test",
"value" : "testValue"
} ],
"ou_name" : "ouName",
"vpc_id" : "w7shb382-9184-w8ub-9395-126hw71a1d41"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response to the request for querying desktop pools. |
|
400 |
The request cannot be understood by the server due to malformed syntax. |
|
401 |
Authentication failed. |
|
403 |
No operation permissions. |
|
404 |
No resources found. |
|
500 |
An internal service error occurred. For details about the error code, see the error code description. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot