Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
10 KiB
Modifying the Specifications of an ECS
Function
ECS specifications can be modified, for example, upgrading the vCPUs and memory, to meet service requirements. This API is used to modify ECS specifications.
An ECS flavor cannot be changed to certain flavors. For details, see Querying the Target Flavors to Which an ECS Flavor Can Be Changed.
Constraints
- You can modify the ECS specifications only when the ECS is stopped.
URI
POST /v1/{project_id}/cloudservers/{server_id}/resize
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resize |
Yes |
Object |
Specifies the operation to modify ECS specifications. For details, see Table 3. |
dry_run |
No |
Boolean |
Specifies whether to only check the request and not modify the ECS specifications. true: The request is sent and the ECS specifications will not be modified. Check items include mandatory parameters and request format.
false: The request is sent and the ECS specifications will be modified if the check is successful. |
Response
See Responses (Task).
Example Request
POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/resize
{ "resize": { "flavorRef": "c3.15xlarge.2" } }
Example Response
{ "job_id": "70a599e0-31e7-49b7-b260-868f441e862b" }
Returned Values
Error Codes
See Error Codes.