Modifying the Specifications of an ECS
Function
This API is used to modify the specifications of an ECS.
For a running ECS, the system will automatically stop the ECS, copy the ECS data to the target node, which can be the source node, and then restart the ECS.
This API supports automatic rollback if the underlying resources are insufficient.
This API must be used with the API for verifying ECS specifications modification (POST /v2.1/{project_id}/servers/{server_id}/action) or the API for rolling back ECS specifications modification (POST /v2.1/{project_id}/servers/{server_id}/action) if an ECS is detected to be in VERIFY_RESIZE state and its OS-EXT-STS:vm_state is RESIZED.
To view application examples about ECS specifications modification, see Modifying ECS Specifications.
Huawei Cloud no longer provides Windows images. This API cannot be used to modify the specifications of Windows ECSs.
URI
POST /v2.1/{project_id}/servers/{server_id}/action
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_id |
Yes |
Specifies the ECS ID. |
Request
Response
None
Example Request
Change the flavor of a specified ECS to s3.medium.2.
POST https://{endpoint}/v2.1/{project_id}/servers/{server_id}/action { "resize" : { "flavorRef" : "s3.medium.2" } }
Example Response
None
Returned Values
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