Docs
api
Physical Cloud Host(UPHost)
GetPHostDiskUpgradePrice

Get the upgrade price for mounting cloud disk on physical cloud BareMetal - GetPHostDiskUpgradePrice

Overview

Get the upgrade price for mounting a disk on a physical cloud BareMetal

ℹ️ This interface is only valid for BareMetal machine types.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetPHostDiskUpgradePrice.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
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 ListYes
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
PHostIdstringUPHost Instance ID.Yes
DiskSpaceintDisk size, in GB, must be an integer multiple of 10GB. System disk 20-500GB, single data disk 20-32000GB.Yes
UDiskIdstringDisk ID. Required for obtaining expansion price (can only expand, not reduce); No need to fill when reinstalling (determined by the selected disk size)No
ReinstallTagbooleanWhether to get the price for reinstallation. Reuse this interface. Expansion can only increase the size of the cloud disk. There are no restrictions for reinstallation. Enumeration value: true/falseNo

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
PricefloatUpgrade price difference. Precision is up to 2 decimal places.Yes
OriginalPricefloatPrice increase difference original price. The precision is to the second decimal place.No

Example

Request Example

https://api.dezai.com/?Action=GetPHostDiskUpgradePrice
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=btTvhpal
&PHostId=APyurAbq
&DiskSpace=5
&UDiskId=GcwAWPhw
&ReinstallTag=false

Response Example

{
  "Action": "GetPHostDiskUpgradePriceResponse",
  "OriginalPrice": 1.85835,
  "Price": 8.55895,
  "RetCode": 0
}