docs
api
UHost(UHost)
ResizeUHostInstance

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is ResizeUHostInstance.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
UHostIdstringUHost Instance ID See DescribeUHostInstanceYes
CPUintNumber 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
MemoryintMemory 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
GPUintNumber of GPU card cores. Only GPU models support this field (optional range related to MachineType+GpuType).No
NetCapValueintNetwork card upgrade or downgrade (1 indicates upgrade, 2 indicates downgrade, 0 indicates no change)No
AutoStartbooleanWhether 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 NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
UHostIdstringUHost Instance IDNo

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"
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved