Get physical machine price - GetPHostPrice
Overview
Get the physical machine price list
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetPHostPrice . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | 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 |
Count | int | Purchase quantity, range [1-5] | Yes |
ChargeType | string | Billing mode, enumeration values are: Year/Month" You should give the translation as follows: """Billing mode, enumeration values are: Yearly/Monthly | Yes |
Quantity | int | Purchase 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 |
Cluster | string | Network environment, options include Gigabit: 1G; 10 Gigabit: 10G; 25G network: 25G. | No |
Type | string | Default is: DB (Database type), can be obtained through the interface DescribePHostMachineType | No |
Disks.N.IsBoot | string | BareMetal 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.Type | string | BareMetal Machine Parameters->Disk Type: Enumeration Value: CLOUD_RSSD | No |
Disks.N.Size | string | BareMetal 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 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 |
PriceSet | array[PHostPriceSet] | Price List See PHostPriceSet | No |
Data Model
PHostPriceSet
Field Name | Type | Description Information | Required |
---|---|---|---|
ChargeType | string | Yearly/Monthly | No |
Price | float | Price, Unit: Yuan, retain two decimal places | No |
Product | string | Enumeration 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 |
OriginalPrice | float | Original Price, Unit: Yuan, retain two decimal places | No |
Example
Request Example
https://api.surfercloud.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
}