Help Center/ Workspace/ API Reference/ Workspace APIs/ Desktop Pools/ Modifying Desktop Pool Attributes
Updated on 2026-02-10 GMT+08:00

Modifying Desktop Pool Attributes

Function

Modify desktop pool attributes.

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:update

    Write

    desktopPool *

    -

    -

    -

URI

PUT /v2/{project_id}/desktop-pools/{pool_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

pool_id

Yes

String

Specifies the desktop pool ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Desktop pool name, which must be unique. The desktop name can contain 1 to 255 characters, including uppercase letters, lowercase letters, digits, and hyphens (-).

description

No

String

Desktop pool description.

ou_name

No

String

OU name, which is used for connecting to the AD. An OU must be created in the AD in advance.

tags

No

Array of Tag objects

Tag list.

disconnected_retention_period

No

Integer

Number of minutes within which the binding relationship between a user and a desktop is retained when the desktop is disconnected. After the binding relationship times out, the user is automatically unbound.

enable_autoscale

No

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

No

AutoscalePolicy object

Auto scaling policy.

in_maintenance_mode

No

Boolean

In administrator maintenance mode or not.

desktop_name_policy_id

No

String

Policy ID, which is used to specify the desktop name generation policy.

availability_zone

No

String

AZ of a desktop pool.

root_volume

No

DesktopPoolVolumeInfo object

System disk.

data_volumes

No

Array of DesktopPoolVolumeInfo objects

Data disks.

vpc_id

No

String

VPC ID

subnet_ids

No

Array of strings

List of desktop pool subnet IDs.

security_groups

No

Array of SecurityGroupIdInfo objects

Security group used by the desktop. If no security group is specified, the security group specified in the desktop agent is used by default.

enterprise_project_id

No

String

Enterprise project ID.

Table 3 Tag

Parameter

Mandatory

Type

Description

key

Yes

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

No

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: =*<>,|/.

Table 4 AutoscalePolicy

Parameter

Mandatory

Type

Description

autoscale_type

No

String

Auto scaling type. The options are as follows: ACCESS_CREATED: created during access; AUTO_CREATED: auto scaling.

max_auto_created

No

Integer

Maximum number of desktops that can be automatically created.

min_idle

No

Integer

Number of reserved idle desktops.

once_auto_created

No

Integer

Number of desktops that can be automatically created at a time. (deprecated)

min_retention

No

Integer

Minimum number of desktops.

idle_retention_duration

No

Integer

Idle desktop reservation duration, in minutes.

Table 5 DesktopPoolVolumeInfo

Parameter

Mandatory

Type

Description

id

Yes

String

Specifies the IDs of the disks to be operated in batches.

type

Yes

String

Desktop data disk type, which must be the same as the disk type provided by the system.

  • SAS: High I/O;

  • SSD: Ultra-high I/O

iops

No

Integer

Number of read/write operations performed by a disk per second.

throughput

No

Integer

Amount of data read from and written to a disk per second.

kms_id

No

String

KMS key ID. To change a key, enter the key ID. To delete a key, enter an empty string. The default value is null, indicating that the key is not changed.

Table 6 SecurityGroupIdInfo

Parameter

Mandatory

Type

Description

id

Yes

String

Security group ID.

Response Parameters

Status code: 204

The response is normal and contains no content.

Status code: 400

Table 7 Response body parameters

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

Table 8 Response body parameters

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

Table 9 Response body parameters

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

Table 10 Response body parameters

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

Table 11 Response body parameters

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

POST /v2/0bec5db98280d2d02fd6c00c2de791ce/desktop-pools/9f16d997-7e6a-46b6-9b3b-b1e1d5b98703

{
  "name" : "string",
  "description" : "string",
  "ou_name" : "string",
  "tags" : [ {
    "key" : "string",
    "value" : "string"
  } ],
  "disconnected_retention_period" : 43200,
  "enable_autoscale" : true,
  "autoscale_policy" : {
    "autoscale_type" : "string",
    "max_auto_created" : 1000,
    "min_idle" : 100,
    "once_auto_created" : 10
  },
  "in_maintenance_mode" : true,
  "desktop_name_policy_id" : "string",
  "availability_zone" : "string"
}

Example Responses

None

Status Codes

Status Code

Description

204

The response is normal and contains no content.

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.