Get host price - GetUHostInstancePrice
Overview
Get the price of the UHost instance based on the UHost instance configuration.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUHostInstancePrice . | 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 |
CPU | int | Number of CPU cores. Optional parameters: 1-64. Refer to the control panel for optional range. Default value: 4 | Yes |
Memory | int | Memory size. Unit: MB. Range: [1024, 262144], must be a multiple of 1024 (optional range refers to the control panel). Default value: 8192 | Yes |
Count | int | Number of purchases, range [1,5] | Yes |
Disks.N.IsBoot | string | Is it a system disk. Enumeration value: > True, it is a system disk > False, it is a data disk (default). There can only be one disk in the Disks array that is a system disk. | Yes |
Disks.N.Size | int | Disk size, in GB. Please refer to Disk Type. | Yes |
Disks.N.Type | string | Disk type. Please refer to Disk Type. | Yes |
Disks.N.BackupType | string | Disk Backup Plan. Enumerated values: > NONE, no backup > DATAARK, UDataArk > SNAPSHOT, USnap The backup modes currently supported by the disk refer to Disk Type”. | No |
ImageId | string | Image Id, can be obtained through DescribeImage. If the Image Id is not provided, the system disk size must be provided. | No |
GPU | int | Number of GPU card cores. Only GPU models support this field. | No |
ChargeType | string | Billing mode. Enumeration values are: > Year, pay annually; > Month, pay monthly; > Dynamic, pay hourly // >Preemptive, preemptive instance If a certain enumeration value is not passed, the default return is a combination of annual, monthly, and hourly prices. | No |
NetCapability | string | Network Enhancement. Enumeration values: Normal, not enabled; Super, enable Network Enhancement 1.0. The default value is Normal. | No |
UHostType | string | [To be deprecated] Cloud host machine type (V1 version concept). Refer to Cloud host machine type description. | No |
MachineType | string | Cloud Host Type (Concept of V2 version). Enumeration values [“N”, “C”, “G”, “O”, “OS”, “OPRO”, “OMAX”, “O.BM”, “O.EPC”]. Refer to Cloud Host Type Description. | No |
GpuType | string | GPU type, enumeration values [“K80”, “P40”, “V100”, “T4”,“T4S”,“2080Ti”,“2080Ti-4C”,“1080Ti”, “T4/4”,“MI100”,“V100S”] | No |
Quantity | int | Purchase duration. Default: 1. This parameter is not required when purchasing hourly (Dynamic). When paying monthly, pass this parameter as 0, which represents purchase until the end of the month. | No |
CpuPlatform | string | Value “Intel” “Amd”, default value “Intel”. | No |
UDSetUHostInstance | boolean | Dedicated Cloud Host. If you want to create a cloud host on a dedicated host, this parameter can be set to true. | No |
ShowPriceDetails | boolean | Return detailed price information | 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[UHostPriceSet] | Price List UHostPriceSet | No |
Data Model
UHostPriceSet
Field Name | Type | Description Information | Required |
---|---|---|---|
ChargeType | string | Billing Type. Yearly, Monthly, Dynamic | Yes |
Price | float | Price, unit: Yuan, retain two valid digits after the decimal point | Yes |
OriginalPrice | float | The original price before the limited-time discount (i.e., the unit price after the list price is multiplied by the business discount). | Yes |
ListPrice | float | Product list price. | No |
PriceDetail | PriceDetail | Detailed price information (only returned by the inquiry interface). | No |
OriginalPriceDetail | PriceDetail | Original price details (only returned by the inquiry interface). | No |
ListPriceDetail | PriceDetail | Detailed list price information (only returned by the inquiry interface). | No |
PriceDetail
Field Name | Type | Description Information | Required |
---|---|---|---|
UHost | float | Host Price | No |
UDisk | float | UDisk Price | No |
Snapshot | float | Snapshot Price | No |
Volume | float | Volume Price | No |
Example
Request Example
https://api.dezai.com/?Action=GetUHostInstancePrice
&Region=cn-bj2
&Zone=cn-bj2-04
&ProjectId=org-xxx
&ImageId=xxx
&MachineType=N
&CPU=2
&Memory=4096
&Count=1
&ChargeType=Dynamic
&Disks.0.Size=40
&Disks.0.IsBoot=True
&Disks.0.Type=CLOUD_SSD
&CpuPlatform=pmuJsysU
&Volumes.N.Type=asluorww
&Volumes.N.Size=3
&Volumes.N.IsBoot=eHeLEeHi
&HpcEnhanced=false
&GpuTyp=pmujj
&GPU=1
&UDSetUHostInstance=true
&ShowPriceDetails=true
Response Example
{
"Action": "GetUHostInstancePriceResponse",
"PriceSet": [
{
"ChargeType": "Dynamic",
"Price": 0.42
}
],
"RetCode": 0
}