Replaces the image of one or more cloud computers.
Operation description
This operation is subject to the following limitations:
For cloud computers in the China (Hong Kong) region and regions outside the Chinese mainland, you cannot switch to an image with a different operating system. For example, you cannot switch from a Windows image to a Linux image.
You cannot switch between GPU images and non-GPU images. Graphics-optimized cloud computers must use GPU images, and non-graphics cloud computers can only use non-GPU images.
Changing the image re-initializes the cloud computer's system disk with the new image. This action has the following effects:
All data on the original system disk is erased. Any snapshots created from the original system disk become invalid, and the system automatically deletes them.
If the new image has a different operating system, all data on the data disk is erased. Snapshots created from the data disk become invalid, and the system automatically deletes them. If the new image has the same operating system, data on the data disk is retained and its snapshots remain usable.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:RebuildDesktops |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call the DescribeRegions operation to find the regions where Elastic Desktop Service is available. |
cn-hangzhou |
| DesktopId |
array |
Yes |
The IDs of the cloud computers to rebuild. You can specify 1 to 20 IDs. |
ecd-gx2x1dhsmucyy**** |
|
string |
No |
The desktop ID. |
ecd-gx2x1dhsmucyy**** |
|
| ImageId |
string |
No |
The ID of the new image. |
m-84mztzatmlnys**** |
| OperateType |
string |
No |
Specifies how to handle the data disk. Note
This parameter is optional.
|
replace |
| Language |
string |
No |
The operating system language. This parameter applies only to system images. For Linux cloud computers, only English is supported. Valid values:
|
en-US |
| AfterStatus |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| RebuildResults |
array<object> |
The rebuild results. |
|
|
object |
The rebuild result. |
||
| Code |
string |
The operation result. A value of |
IncorrectDesktopStatus |
| Message |
string |
The error message. This parameter is returned only if the value of |
The current status of the desktop does not support this operation. |
| DesktopId |
string |
The desktop ID. |
ecd-gx2x1dhsmucyy**** |
If the HTTP status code is
200, the request was successful. TheRebuildResultsarray shows the outcome for each cloud computer: aCodeofSuccessindicates the rebuild has started; otherwise, the returned error code explains why the process failed to start.A
4xxHTTP status code indicates an invalid parameter. In this case, the rebuild is not initiated for any of the specified cloud computers.
Examples
Success response
JSON format
{
"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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.