Help Center/ Workspace/ API Reference/ Workspace APIs/ Desktop Pools/ Modifying Desktop Pool Attributes
Updated on 2025-07-14 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.

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 header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Table 3 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

Tags.

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. If the AZ of a desktop pool is an edge AZ, the AZ cannot be changed.

Table 4 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 5 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

When the number of idle desktops is less than the value of this parameter, desktops are automatically created.

once_auto_created

No

Integer

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

Response Parameters

Status code: 204

The response is normal and contains no content.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

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 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

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 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

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 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

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 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code, which is returned upon failure.

error_msg

String

Error description.

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

{
  "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.