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 Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUHostUpgradePrice . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | 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-64 (refer to the console for optional range). The default value is the number of CPU cores of the current instance. | No |
Memory | int | Memory 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 |
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 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 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 |
Price | float | Price difference due to specification adjustment. Accurate to two decimal places. | No |
OriginalPrice | float | Original price before discount for a limited time | No |
Example
Request Example
https://api.dezai.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
}