Changes the instance type of a cloud computer and scales up the disks of the cloud computer.
Operation description
Changing the configurations of a cloud computer includes changing the instance type of the cloud computer and scaling up the disks of the cloud computer.
-
Before you change the configurations of a cloud computer, you must understand the instance types and disk sizes supported by cloud computers. For more information, see Cloud computer types. You can call the DescribeDesktopTypes operation to query the instance types supported by cloud computers.
-
You must change at least one of the following configurations: instance type, system disk size, and data disk size of the cloud computer. You must specify at least one of the following parameters:
DesktopType,RootDiskSizeGib, andUserDiskSizeGib. Take note of the following items:- The instance type of a cloud computer includes the configurations of vCPUs, memory, and GPUs. You can only change an instance type to another. You cannot change only one of the configurations.
- You cannot change a cloud computer between the General Office type and the non-General Office type. You cannot yet change a cloud computer between the Graphics type and the non-Graphics type.
- The system disk and data disks of a cloud computer can only be scaled up and cannot be scaled down.
- If the billing method of the cloud computer is subscription, the system calculates the price difference based on the configuration difference between the original cloud computer and the new cloud computer. You must make up for the price difference or receive a refund for the price difference.
- We recommend that you do not change the configurations of a cloud computer twice within 5 minutes.
- When you change the configurations of a cloud computer, the cloud computer must be in the Stopped state.
-
After you change the configurations of a cloud computer, the personal data on the cloud computer is not affected.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ecd:ModifyDesktopSpec | update | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | Yes | The region ID. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
| DesktopId | string | Yes | The ID of a cloud computer. | ecd-4543qyik164a4**** |
| DesktopType | string | Yes | The destination instance type. You can call the DescribeDesktopTypes operation to query the instance types supported by cloud computers. | eds.general.2c8g |
| RootDiskSizeGib | integer | No | The size of the new system disk. Unit: GiB. Valid values: 80 to 500 GiB. The value must be a multiple of 10. | 80 |
| UserDiskSizeGib | integer | No | The destination data disk size. Unit: GiB.
| 100 |
| AutoPay | boolean | No | Specifies whether to enable the auto-payment feature. Default value: true. Valid values:
| false |
| UserDiskPerformanceLevel | string | No | The performance level (PL) of the data disk. Default value: PL0. Valid values:
| PL0 |
| PromotionId | string | No | The ID of the promotional activity. | 500033080110596 |
| ResourceSpecs | array<object> | No | The array of resource specification templates. | |
| object | No | The resource specification template. | ||
| DesktopId | string | No | The ID of the cloud computer. | ecd-4543qyik164a4**** |
| RootDiskSizeGib | integer | No | The target size of the system disk. Valid values: 80-500 GiB. The value must be a multiple of 10. | 80 |
| UserDiskSizeGib | integer | No | The target size of the data disk. Valid values: 80-500 GiB. The value must be a multiple of 10. | 20 |
| ResourceType | string | No | The resource type. Note
This parameter is optional for non-subscribed cloud computers.
Enumeration Value:
| DesktopMonthPackage |
Response parameters
Examples
Sample success responses
JSONformat
{
"OrderId": 123456789,
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"OrderIds": [
123456789
]
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-12-02 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2024-06-17 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
| 2023-12-12 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2021-08-19 | The request parameters of the API has changed | View Change Details |
| 2021-08-19 | The request parameters of the API has changed | View Change Details |
