Example 3: Modifying ECS Specifications
Scenarios
When ECS specifications fail to meet service requirements, they can be modified, for example, by upgrading the vCPUs and memory. Certain ECSs also support changing ECS types during specifications modification.
Constraints
- You can modify the ECS specifications only when the ECS is stopped.
- The EVS disk capacity of the ECS cannot be reduced during the specifications modification.
- When modifying the specifications of an ECS, you are not allowed to select sold-out vCPU and memory resources.
- ECS specifications (vCPU or memory) degrade deteriorates the ECS performance.
- Certain ECSs do not support specifications modification. To query the target flavors to which a specified ECS flavor can be changed, use API Querying the Target Flavors to Which an ECS Flavor Can Be Changed (Discarded). For details about available ECS types as well as their functions and usage on the public cloud, see "Notes" in ECS Specifications.
Involved APIs
Modifying ECS specifications involves the following APIs:
Procedure
- Modify ECS specifications.
- API
URI format: POST /v2.1/{tenant_id}/servers/{server_id}/action
For details, see Modifying the Specifications of an ECS.
- Example request
{ "resize": { "flavorRef": "s6.medium.2" } } - Example response
- API
- Confirm the specifications modification.
The ECS must be in resized state, OS-EXT-STS:vm_state being set to resized.
- API
URI format: POST /v2.1/{tenant_id}/servers/{server_id}/action
For details, see Confirming ECS Specifications Modification.
- Example request
{ "confirmResize": null } - Example response
- API
- (Optional) Roll back the specifications modification.
Notes:
The ECS must be in resized state, OS-EXT-STS:vm_state being set to resized.
The data modified during specifications modification will be lost after the rollback.
- API
URI format: POST /v2.1/{tenant_id}/servers/{server_id}/action
For details, see Rolling Back ECS Specifications Modification.
- Example request
{ "revertResize": null } - Example response
- API
Last Article: Example 2: Querying ECSs
Next Article: Example 4: Attaching a Disk to an ECS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.