ECS specifications can be modified, for example, upgrading the vCPUs and memory, to meet service requirements. This API is used to modify ECS specifications.
This API is an asynchronous API. After the specifications modification request is successfully delivered, 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.
An ECS flavor cannot be changed to certain flavors. For details, see Querying the Target Flavors to Which an ECS Flavor Can Be Changed.
POST /v1/{project_id}/cloudservers/{server_id}/resize
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
resize |
Yes |
Object |
Definition Specifies the operation to modify ECS specifications. For details, see Table 3. Constraints N/A Range N/A Default Value N/A |
dry_run |
No |
Boolean |
Definition Specifies whether to check the request. If this parameter is set to true, no instance is created. Constraints N/A Range
Default Value false |
Table 4 describes the response parameters.
Parameter |
Type |
Description |
|---|---|---|
job_id |
String |
Definition Specifies the job ID returned after a job is delivered. The job ID can be used to query the job execution progress. For details about how to query the job execution status based on job_id, see Job Status Management. Range N/A |
For details about abnormal responses, see Responses (Jobs).
Change the ECS flavor to c3.15xlarge.2.
POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/resize
{
"resize": {
"flavorRef": "c3.15xlarge.2"
}
}
{
"job_id": "ff80808288d41e1b018990260955686a"
}
See Error Codes.