Recreates cloud computers.
Operation description
Before you change the image of a cloud computer, take note of the following limits:
- You can select an image whose OS is different from the OS of the original image. The image change feature is not supported in the following regions: China (Hong Kong), Australia (Sydney), Singapore, and Japan (Tokyo).
- GPU images and non-GPU images cannot be exchanged. Graphical cloud computers can only use GPU-accelerated images. Non-graphical cloud computers can only use non-GPU-accelerated images.
After the image is changed, the system uses the new image to initialize the system disk of the cloud computer. This has the following impacts:
- Data in the system disk of the original cloud computer is cleared. Snapshots that are created based on the system disk of the original cloud computer can no longer be used. The system automatically deletes the snapshots.
- If the OS of the image is changed, the data in the data disks of the original cloud computer is cleared, and the snapshots that are created based on the data disks of the original cloud computer can no longer be used. The system automatically deletes the snapshots. If the OS of the image is not changed, the data in the data disks of the original cloud computer is retained, and the snapshots that are created based on the data disks of the original cloud computer can still be used.
Debugging
Authorization information
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 | array | Yes | The IDs of the cloud computers. You can specify 1 to 20 IDs. | |
string | Yes | The ID of a cloud computer. | 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 |
Response parameters
- If the
200
status code is returned, the parameters in theRebuildResults
section indicate whether the system starts to re-create the cloud computers. If the value of theCode
parameter 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
4xx
status code is returned, a parameter is invalid and the system does not start to re-create the cloud computers.
Examples
Sample success responses
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
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2024-02-05 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||||
| ||||||
2023-04-25 | The request parameters of the API has changed | see changesets | ||||
| ||||||
2021-08-19 | The request parameters of the API has changed | see changesets | ||||
|