Rebuilds images for one or more cloud computers.
Operation description
Before you proceed, take note of the following limits:
- You cannot convert a cloud computer's operating system image from one type to another (e.g., Windows to Linux or vice versa) in China (Hong Kong) or overseas regions.
- GPU and non-GPU images are not interchangeable, as graphic-based cloud computers can only use GPU-accelerated images, while other cloud computers are limited to non-GPU-accelerated images.
When a cloud computer’s image is updated, the system initializes its system disk by using the new image, resulting in the following effects:
- All data on the original system disk is erased. Snapshots created from the original system disk become unavailable and are automatically deleted.
- If the OS changes, data on the original data disk is cleared, and snapshots created from the original data disk become unavailable and are automatically deleted. If the OS remains the same, data on the original data disk is retained, and snapshots from the original data disk remain available.
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:RebuildDesktops | 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 regions supported by Elastic Desktop Service (EDS). | cn-hangzhou |
| DesktopId | array | Yes | The cloud computer IDs. You can specify the IDs of 1 to 20 cloud computers. | |
| string | Yes | The cloud computer ID. | ecd-gx2x1dhsmucyy**** | |
| ImageId | string | No | The ID of the new image. | m-84mztzatmlnys**** |
| OperateType | string | No | The operation type on the data disk. Note
This parameter is empty by default regardless of whether data disks are attached to the cloud computer.
| replace |
| Language | string | No | The OS language. Only system images are supported, and Linux cloud computers support only English. Valid values:
| en-US |
Response parameters
- If the
200status code is returned, the parameters in theRebuildResultssection indicate whether the system starts to re-create the cloud computers. If the value of theCodeparameter issuccess, the system starts to re-create the cloud computers. Otherwise, an error code that indicates the cloud computers fail to be re-created is returned in the Code parameter. - If a
4xxstatus code is returned, a parameter is invalid and the system does not start to re-create the cloud computers.
Examples
Sample success responses
JSONformat
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"RebuildResults": [
{
"Code": "IncorrectDesktopStatus",
"Message": "The current status of the desktop does not support this operation.",
"DesktopId": "ecd-gx2x1dhsmucyy****"
}
]
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-04-09 | The request parameters of the API has changed | View Change Details |
| 2024-06-17 | The request parameters of the API has changed | View Change Details |
| 2024-02-05 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2023-04-25 | 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 |
