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.

Constraints

Involved APIs

Modifying ECS specifications involves the following APIs:

Procedure

  1. Modify the ECS specifications.

    • API

      URI format: POST /v2/{tenant_id}/servers/{server_id}/action

      For details, see section "Modifying the Specifications of an ECS" in Elastic Cloud Server API Reference.

    • Request example
      {
          "resize": {
                        "flavorRef": "4"
          }
      }
    • Response example

      N/A

  2. Confirm the specifications modification.

    The ECS must be in resized state. That is, the OS-EXT-STS:vm_state value of the ECS must be resized.
    • API

      URI format: POST /v2/{tenant_id}/servers/{server_id}/action

      For details, see section "Confirming ECS Specifications Modification" in Elastic Cloud Server API Reference.

    • Request example
      {
         "confirmResize": null
      }
    • Response example

      N/A

  3. (Optional) Roll back the specifications modification.

    Fallback notice:

    The ECS must be in resized state. That is, the OS-EXT-STS:vm_state value of the ECS must be resized.

    The data modified during specifications modification will be lost after the rollback.

    • API

      URI format: POST /v2/{tenant_id}/servers/{server_id}/action

      For details, see section "Rolling Back ECS Specifications Modification" in Elastic Cloud Server API Reference.

    • Request example
      {
          "revertResize": null
      }
    • Response example

      N/A