Changes images for one or more cloud desktops.
Description
Before you change the image of a cloud desktop, take note of the following limits:
- You can select the OS of an image during image change. However, this operation is unavailable in the following regions: China (Hong Kong), Australia (Sydney), Singapore (Singapore), and Japan (Tokyo).
- Image change between GPU and non-GPU images is not supported. If a cloud desktop is of the Graphics type, you can use only a GPU image. If the cloud desktop is of a non-Graphics type, you can use only a non-GPU image.
After you change the image of the cloud desktop, the system uses the new image to initialize the system disk of the cloud desktop. Take note of the following impacts:
- The system deletes data from the original system disk. The snapshots that are created from the original system disk of the cloud desktop become unavailable and are automatically deleted.
- If you change the OS of the image, the system deletes data from the original data disk of the cloud desktop. The system also deletes snapshots that are created from the original data disk of the cloud desktop because original snapshots become unavailable. If you do not change the OS of the image, data on the original data disk is retained, and snapshots that are created from the data disk are still available.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | RebuildDesktops |
The operation that you want to perform. Set the value to RebuildDesktops. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region. |
ImageId | String | No | m-84mztzatmlnys**** |
The ID of the new image. |
DesktopId.N | String | Yes | ecd-gx2x1dhsmucyy**** |
The ID of cloud desktop N. You can specify one or more cloud desktop IDs. Valid values of N: 1 to 20. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 484256DA-D816-44D2-9D86-B6EE4D5BA78C |
The ID of the request. |
RebuildResults | Array of RebuildResult |
The recreation results of cloud desktops by changing images. |
|
Code | String | IncorrectDesktopStatus |
The recreation result of the cloud desktop by changing the image. A value of success indicates that the image of the cloud desktop is changed. If the image of the cloud desktop failed to be changed, an error message is returned. |
Message | String | The current status of the desktop does not support this operation. |
The error message. This parameter is not returned if the value of Code is success. |
DesktopId | String | ecd-gx2x1dhsmucyy**** |
The ID of the cloud desktop. |
Examples
Sample requests
https://ecd.cn-hangzhou.aliyuncs.com/?Action=RebuildDesktops
&DesktopId.1=ecd-gx2x1dhsmucyy****
&RegionId=cn-hangzhou
&<Common request parameters>
Sample responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<RebuildDesktopsResponse>
<RebuildResults>
<Message>The current status of the desktop does not support this operation.</Message>
<DesktopId>ecd-gx2x1dhsmucyy****</DesktopId>
<Code>IncorrectDesktopStatus</Code>
</RebuildResults>
<RequestId>484256DA-D816-44D2-9D86-B6EE4D5BA78C</RequestId>
</RebuildDesktopsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RebuildResults" : [ {
"Message" : "The current status of the desktop does not support this operation.",
"DesktopId" : "ecd-gx2x1dhsmucyy****",
"Code" : "IncorrectDesktopStatus"
} ],
"RequestId" : "484256DA-D816-44D2-9D86-B6EE4D5BA78C"
}