Docs
api
Physical Cloud Host(UPHost)
GetPHostPrice

Get physical machine price - GetPHostPrice

Overview

Get the physical machine price list

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetPHostPrice.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 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
CountintPurchase quantity, range [1-5]Yes
ChargeTypestringBilling mode, enumeration values are: Year/Month”
You should give the translation as follows:
"""Billing mode, enumeration values are: Yearly/Monthly
Yes
QuantityintPurchase duration, 1-10 months or 1-10 years; the default value is 1. When paying monthly, pass this parameter as 0, representing purchase until the end of the month, 1 represents the entire month.Yes
ClusterstringNetwork environment, options include Gigabit: 1G; 10 Gigabit: 10G; 25G network: 25G.No
TypestringDefault is: DB (Database type), can be obtained through the interface DescribePHostMachineTypeNo
Disks.N.IsBootstringBareMetal Machine Type Parameters->Enumeration values:

> True, is the system disk

> False, is the data disk (default). There can only be one disk in the Disks array that is the system disk.
No
Disks.N.TypestringBareMetal Machine Parameters->Disk Type: Enumeration Value: CLOUD_RSSDNo
Disks.N.SizestringBareMetal Machine Parameters->Disk Size, in GB, must be an integer multiple of 10GB. System disk 20-500GB. Data disk is 20-32000G.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
PriceSetarray[PHostPriceSet]Price List See PHostPriceSetNo

Data Model

PHostPriceSet

Field NameTypeDescription InformationRequired
ChargeTypestringYearly/MonthlyNo
PricefloatPrice, Unit: Yuan, retain two decimal placesNo
ProductstringEnumeration values: phost=> represents the price of the host, including the system disk price if it is a cloud disk. cloudDisk=> the price of all data disks, only returned for BareMetal machine types.No
OriginalPricefloatOriginal Price, Unit: Yuan, retain two decimal placesNo

Example

Request Example

https://api.dezai.com/?Action=GetPHostPrice
&Region=DHGABXYf
&Zone=MIihxhSa
&ProjectId=ravaeUSs
&Count=1
&ChargeType=mlmlOvKM
&Quantity=5
&Cluster=zEgKSHSm
&Type=TVJcMiGe
&Disks.N.IsBoot=NApaxNYL
&Disks.N.Type=TnjCDKxx
&Disks.N.Size=lTqTywwH

Response Example

{
  "Action": "GetPHostPriceResponse",
  "PriceSet": [
    {
      "ChargeType": "jAhLLbuU",
      "OriginalPrice": 1.77893,
      "Price": 2.14214,
      "Product": "EnLhGNVP"
    }
  ],
  "RetCode": 0
}