Recreates one or more cloud desktops.

Description

When you call this operation to recreate a cloud desktop, the image in the desktop template is used to re-initialize the system disk of the cloud desktop. The specifications and data disks remain unchanged. When you call this operation, take note of the following items:

  • The cloud desktop to be recreated must be in the Stopped (Stopped) state.
  • Linux cloud desktops cannot be recreated by using Windows images. Windows cloud desktops cannot be recreated by using Linux images.
  • After you recreate a cloud desktop, data in the original system disk is removed. System disk snapshots created from the original system disk are unavailable. The snapshots are automatically deleted.
Note We recommend that you back up system disk data that you want to retain. After you recreate a cloud desktop, data in the system disk is removed and cannot be restored.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RebuildDesktops

The operation that you want to perform. Set the value to RebuildDesktops.

DesktopId.N RepeatList 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.

RegionId String Yes cn-hangzhou

The ID of the region.

Response parameters

Parameter Type Example Description
RebuildResults Array of RebuildResult

The results of recreation.

Code String IncorrectDesktopStatus

The result of recreation. A value of success indicates that the cloud desktop is recreated. If the cloud desktop is not recreated, an error message is returned.

DesktopId String ecd-gx2x1dhsmucyy****

The ID of the cloud desktop.

Message String The current status of the desktop does not support this operation.

The error message. This parameter is empty if the Code value is success.

RequestId String 484256DA-D816-44D2-9D86-B6EE4D5BA78C

The ID of the request.

Examples

Sample requests

https://ecd.cn-hangzhou.aliyuncs.com/?Action=RebuildDesktops
&DesktopId.1=ecd-gx2x1dhsmucyy****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<RebuildDesktopsvResponse>
      <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>
</RebuildDesktopsvResponse>

JSON format

{
	"RebuildResults": [{
		"Message": "The current status of the desktop does not support this operation.",
		"DesktopId": "ecd-gx2x1dhsmucyy****",
		"Code": "IncorrectDesktopStatus"
	}],
	"RequestId": "484256DA-D816-44D2-9D86-B6EE4D5BA78C"
}