Batch Modifying ECS Specifications
Function
This API is used to batch modify ECS specifications.
This API is an asynchronous API. After the batch specification modification request is successfully submitted, a job ID is returned. This does not mean the modification is complete. You need to call the API by referring to Querying Job Execution Status to query the job status. The SUCCESS status indicates that the modification is successful.

Huawei Cloud no longer provides Windows images. This API cannot be used to modify the specifications of Windows ECSs.
Constraints
- You can modify specifications for a maximum of 50 ECSs in a batch.
- The billing modes of ECSs whose specifications are to be modified in the same batch must be the same.
- The specifications of yearly/monthly ECSs can be batch upgraded or downgraded.
- The ECSs whose specifications are to be modified in the same batch must be located in the same AZ.
- The current and new specifications of the ECSs whose specifications are to be modified in the same batch must be the same.
- The specifications of ECSs on DeHs cannot be batch modified.
- The specifications of spot instances cannot be batch modified.
- Auto-payment is not supported for batch upgrade of specifications for yearly/monthly ECSs. You can manually pay for the generated order on the console or refer to Paying Yearly/Monthly Product Orders to pay for the order.
- The specifications of yearly/monthly ECSs created using paid public images cannot be batch modified. For details about paid public images, see Image Billing.
URI
POST /v1/{project_id}/cloudservers/batch-resize
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resize |
Yes |
Object |
Specifies the operation to modify ECS specifications. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
flavorRef |
Yes |
String |
Specifies the flavor ID of the ECS after the modification. |
servers |
Yes |
Array of objects |
Specifies the ECS ID list. For details, see Table 4. |
mode |
No |
String |
Specifies the mode of modifying specifications.
|
cpu_options |
No |
Object |
Specifies the CPU options. For details, see Table 5. |
promotion |
No |
Object |
Specifies the discount. For details, see Table 6. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Specifies the ECS ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
hw:cpu_threads |
No |
Integer |
Definition Specifies whether to enable CPU hyper-threading. Constraints This parameter can be set to 1 (disabling hyper-threading) only when all of the following conditions are met:
Range
Default Value N/A |
Response
Table 7 describes the response parameters.
Example Request
Batch modify the specifications of two ECSs to s3.small.1.
POST https://{endpoint}/v1/{project_id}/cloudservers/batch-resize { "resize": { "flavorRef": "s3.small.1", "servers": [ { "id": "98ce4563-3e06-414f-899b-6ba6eaa41c1d" }, { "id": "aacc5bf0-49c4-4720-a406-1751d8010e7f" } ] } }
Example Response
{ "job_id": "ff80808288d415d80189901d8eb81cbb", "order_id": "CS18020810083A4GP" }
Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot