Modifying the Specifications of an ECS (V1.1)
Function
This API is used to modify ECS specifications.
Constraints
- You can modify the ECS specifications only when the ECS is stopped.
- The flavor (memory and vCPUs) after the modification cannot be lower than that before the modification.
URI
POST /v1.1/{project_id}/cloudservers/{server_id}/resize
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. You can obtain the ECS ID from the console or by following the instructions provided in "Querying Details About an ECS". |
Request
Parameter description
Parameter | Mandatory | Type | Description |
---|---|---|---|
resize | Yes | Object | Specifies the operation to modify ECS specifications. For details, see Table 2. |
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. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
flavorRef | Yes | String | Specifies the flavor ID of the ECS after the modification. You can view Querying the Target ECS Flavors to Which a Flavor Can Be Changed to query the target flavors to which a specified ECS flavor can be changed. NOTE:
|
dedicated_host_id | No | String | Specifies the DeH ID after the modification. This parameter is mandatory only for ECSs deployed on DeHs. |
extendparam | No | Object | Specifies the extended information about an ECS after the modification. For details, see Table 3. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
isAutoPay | No | String | Specifies whether the order is automatically or manually paid.
|
Response
Parameter | Mandatory | Type | Description |
---|---|---|---|
job_id | No | String | Specifies the task ID. For details about task statuses, see Querying Task Execution Status. |
order_id | No | String | Specifies the order ID. |
Example Request
POST https://{endpoint}/v1.1/{project_id}/cloudservers/{server_id}/resize
{"resize": {"flavorRef": "s3.large.2","dedicated_host_id": "459a2b9d-804a-4745-ab19-a113bb1b4ddc","extendparam":{"isAutoPay": "true"},}}
Example Response
{"job_id": "70a599e0-31e7-49b7-b260-868f441e862b"}
Or
{"order_id": "CS1711152257C60TL","job_id": "70a599e0-31e7-49b7-b260-868f441e862b"}
Or
{"error": {"message": "XXXX","code": "XXX"}}
Returned Values
Error Codes
See Error Codes.
- Function
- Constraints
- URI
- Request
- Response
- Example Request
- Example Response
- Returned Values
- Error Codes