ModifyDesktopSpec

更新时间:
复制 MD 格式

Modifies the desktop type and expands the disks of a cloud desktop.

Operation description

This operation modifies the configuration of a cloud desktop, including its desktop type and disk sizes.

  • Before you modify the configuration, ensure you understand the supported desktop types and disk sizes. For more information, see Cloud desktop specifications. You can call the DescribeDesktopTypes operation to query the supported desktop types.

  • When you call this operation, you must modify the desktop type, the system disk size, or the data disk size. This requires specifying at least one of the corresponding parameters: DesktopType, RootDiskSizeGib, or UserDiskSizeGib. Note the following:

    • A desktop type includes vCPU, memory, and GPU configurations. You can change the desktop type but cannot modify these resources individually.

    • You cannot change a desktop type between general-purpose and non-general-purpose, or between graphics-accelerated and non-graphics-accelerated.

    • Both the system disk and the data disk support expansion, but not shrinking.

    • If the cloud desktop uses the subscription billing method, the system calculates the price difference based on the configuration change. You must pay the price difference, or you will receive a refund.

    • For the same cloud desktop, wait at least five minutes between configuration change operations.

    • The cloud desktop must be in the Stopped state.

  • This operation does not affect the personal data stored on the cloud desktop.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecd:ModifyDesktopSpec

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region. You can call the DescribeRegions operation to obtain a list of regions that Elastic Desktop Service supports.

cn-hangzhou

DesktopId

string

No

The ID of the cloud desktop.

ecd-4543qyik164a4****

DesktopType

string

Yes

The new desktop type. You can call the DescribeDesktopTypes operation to query the supported desktop types.

eds.general.2c4g

RootDiskSizeGib

integer

No

The new size of the system disk, in GiB. The value must be a multiple of 10 in the range of 80 to 500.

80

UserDiskSizeGib

integer

No

The new size of the data disk, in GiB.

  • For non-graphics-accelerated desktop types, the value must be a multiple of 10 in the range of 20 to 1,020.

  • For graphics-accelerated desktop types, the value must be a multiple of 10 in the range of 40 to 1,020.

40

AutoPay

boolean

No

Specifies whether to enable automatic payment.

Valid values:

  • true :

    Enables automatic payment. Ensure your account has a sufficient balance; otherwise, an unpaid order is generated. This is the default value.

  • false :

    Generates an order but does not complete the payment. You can then complete the payment on the My Orders page in the User Center by using the returned order ID.

false

UserDiskPerformanceLevel

string

No

The performance level of the data disk.

Valid values:

  • PL1 :

    PL1

  • PL0 :

    PL0. This is the default value.

  • PL3 :

    PL3

  • PL2 :

    PL2

PL0

PromotionId

string

No

The promotion ID.

50003308011****

ResourceSpecs

array<object>

No

A list of resource specification templates.

object

No

A resource specification template.

DesktopId

string

No

The ID of the cloud desktop.

ecd-4543qyik164a4****

RootDiskSizeGib

integer

No

The new size of the system disk, in GiB. The value must be a multiple of 10 in the range of 80 to 500.

80

UserDiskSizeGib

integer

No

The new size of the data disk, in GiB. The value must be a multiple of 10 in the range of 20 to 2,040.

20

ResourceType

string

No

The resource type.

Note

This parameter is required only for cloud desktops that use the subscription billing method.

Valid values:

  • DesktopMonthPackage :

    A cloud desktop that uses the subscription billing method.

DesktopMonthPackage

ResellerOwnerUid

integer

No

Response elements

Element

Type

Description

Example

object

The response object.

OrderId

string

The order ID.

123456789

RequestId

string

The request ID.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

OrderIds

array

A list of order IDs.

integer

An order ID.

123456789

Examples

Success response

JSON format

{
  "OrderId": "123456789",
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "OrderIds": [
    123456789
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.