Change host specifications - ResizeUHostInstance
Overview
Modify the resource configuration of the specified UHost instance, such as the number of CPU cores, memory capacity size, network enhancement, etc. Please refer to UHost Model Description for the optional configuration range.
💡 If you need to adjust the disk size, please call ResizeAttachedDisk.
ℹ️ 1. Before modifying the configuration, please make sure that the instance has been shut down.
2. After changing the disk space size, please follow the instructions to operate in the operating system after startup.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ResizeUHostInstance . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | No |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
UHostId | string | UHost Instance ID See DescribeUHostInstance | Yes |
CPU | int | Number of virtual CPU cores. Optional parameters: 1-240 (optional range related to UHostType). The default value is the current instance's CPU core number. | No |
Memory | int | Memory size. Unit: MB. Range: [1024, 1966080], must be a multiple of 1024 (optional range is related to UHostType). The default value is the current instance's memory size. | No |
GPU | int | Number of GPU card cores. Only GPU models support this field (optional range related to MachineType+GpuType). | No |
NetCapValue | int | Network card upgrade or downgrade (1 indicates upgrade, 2 indicates downgrade, 0 indicates no change) | No |
AutoStart | boolean | Whether to immediately power on after the expansion is completed, default is false, If set to true, power on immediately after successful expansion; Spot and Postpaid chargeType uhost do not support the current feature; | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
UHostId | string | UHost Instance ID | No |
Example
Request Example
https://api.surfercloud.com/?Action=ResizeUHostInstance
&Region=cn-bj2
&Zone=cn-bj2-04
&ProjectId=org-xxx
&UHostId=uhost-xxx
&CPU=4
&Memory=2048
&GPU=5
&GPU=6
&AutoStart=false
&AutoStart=false
&AutoStart=true
&AutoStart=true
Response Example
{
"Action": "ResizeUHostInstanceResponse",
"RetCode": 0,
"UHostId": "uhost-xxx"
}