All Products
Search
Document Center

WUYING Workspace:RebuildDesktops

Last Updated:Apr 08, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
DesktopIdarrayYes

The IDs of the cloud computers. You can specify 1 to 20 IDs.

stringYes

The ID of a cloud computer.

ecd-gx2x1dhsmucyy****
ImageIdstringNo

The ID of the new image.

m-84mztzatmlnys****
OperateTypestringNo

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.
  • No data disks are attached to the cloud computer:
    No operation is performed on the data disks of the cloud computer regardless of the value of this parameter.

  • Data disks are attached to the cloud computer:

    1. The OS of the cloud computer is the same as the OS of the destination image:

      • If you set the OperateType parameter to replace, the data in the data disks of the cloud computer is replaced.
      • If you leave the OperateType parameter empty, the data in the data disks of the cloud computer is retained.
    2. The OS of the cloud computer is different from the OS of the destination image:

      • If you set the OperateType parameter to replace, the data in the data disks of the cloud computer is replaced.
      • If you leave the OperateType parameter empty, the data in the data disks of the cloud computer is cleared.
replace

Response parameters

ParameterTypeDescriptionExample
object

Schema of response.

RequestIdstring

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****
RebuildResultsobject []

The recreation results.

Codestring

The recreation result code. If the request was successful, success is returned. If the request failed, an error message is returned.

IncorrectDesktopStatus
Messagestring

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

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

The IDs of the cloud computers.

ecd-gx2x1dhsmucyy****
  • If the 200 status code is returned, the parameters in the RebuildResults section indicate whether the system starts to re-create the cloud computers. If the value of the Code parameter is success, 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

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 timeSummary of changesOperation
2024-02-05The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-04-25The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: OperateType
2021-08-19The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ImageId