docs
api
UHost(UHost)
GetUHostUpgradePrice

Get host specification adjustment difference - GetUHostUpgradePrice

Overview

Get the price for upgrading the configuration of the UHost instance. For optional configuration ranges, please refer to UHost Model Description.

💡 If you need to query the price for adjusting disk size, please call GetAttachedDiskUpgradePrice.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUHostUpgradePrice.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 DescribeUHostInstance.Yes
CPUintNumber of virtual CPU cores. Optional parameters: 1-64 (refer to the console for optional range). The default value is the number of CPU cores of the current instance.No
MemoryintMemory size. Unit: MB. Range: [1024, 262144], must be a multiple of 1024 (optional range refers to the console). The default value is the memory size of the current instance.No
GPUintNumber of GPU card cores. Only GPU models support this field (optional range related to MachineType+GpuType).No
NetCapValueintNetwork card upgrade and downgrade (1 indicates upgrade, 2 indicates downgrade, 0 indicates no change). Only the opening and closing of Network Enhancement 1.0 and Network Enhancement 2.0 are supported, mutual conversion of network enhancement features is not supported, such as upgrading from Network Enhancement 1.0 to Network Enhancement 2.0 is not supported.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
PricefloatPrice difference due to specification adjustment. Accurate to two decimal places.No
OriginalPricefloatOriginal price before discount for a limited timeNo

Example

Request Example

https://api.surfercloud.com/?Action=GetUHostUpgradePrice
&Region=cn-bj2
&Zone=cn-bj2-04
&ProjectId=org-xxx
&UHostId=uhost-xxx
&CPU=4

&GPU=3
&GPU=8

Response Example

{
  "Action": "GetUHostUpgradePriceResponse",
  "OriginalPrice": 5.21987,
  "Price": 19.96,
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved