# Get UDB Price - DescribeUDBInstancePrice

## Overview

Get UDB Instance Price Information






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeUDBInstancePrice`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.genesissai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Availability Zone. See [Availability Zone List](/docs/api/summary/regionlist) |**Yes**|
| **MemoryLimit** | int | Memory Limit (MB), unit is MB. Currently supports: 2000-96000 |**Yes**|
| **DiskSpace** | int | Disk Space (GB), temporarily supports 20 (GB) - 3000 (GB), input without unit |**Yes**|
| **DBTypeId** | string | DB version string of UDB instance |**Yes**|
| **Count** | int | Purchase DB instance quantity, the maximum number is 10, the default is 1 |No|
| **ChargeType** | string | Year, Pay Yearly;<br />Month, Pay Monthly;<br />Dynamic, Pay as You Go (Permission Required);<br />Trial, Trial Version (Permission Required);<br />Default is Monthly Payment. |No|
| **Quantity** | int | How many "Billing Time Units" to purchase for the DB, the default value is 1. For example: if you buy for 2 months, the Quantity is 2. If the billing unit is "Monthly" and the Quantity is 0, it means "Purchase until the end of the month". |No|
| **SSDType** | string | This field has been deprecated. |No|
| **InstanceMode** | string | The deployment type of the instance. Optional values are: Normal: Normal single-point instance, Slave: Slave instance, HA: High availability deployment instance, the default is Normal. |No|
| **CPU** | int | Number of CPUs, a mandatory parameter if the db type is sqlserver. |No|
| **InstanceType** | string | When creating high-performance instances, please use the latest SpecificationClass and StorageClass fields.<br />Currently, only a limited number of regions support the SATA_SSD storage type. For SATA_SSD instances, this field can be used to specify the storage type. |No|
| **SpecificationType** | int | The type of instance computing specification, 0 or not passed means purchasing using memory method, 1 means purchasing using memory-CPU optional configuration ratio method, need to fill in MachineType. |No|
| **MachineType** | string | Specification Type ID, valid when SpecificationType is 1 |No|
| **StorageClass** | string | Storage Type CLOUD_SSD: SSD Cloud Disk, CLOUD_RSSD: RSSD Cloud Disk, CLOUD_SSD_ESSENTIAL: SSD Essential Cloud Disk, this field combined with SpecificationClass has a higher priority than the InstanceType field. |No|
| **SpecificationClass** | string | Specification Type O: NVME, OM: Shared, N: General |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|
| **DataSet** | array[[*UDBInstancePriceSet*](#udbinstancepriceset)] | Price Refer to UDBInstancePriceSet |No|

#### Data Model


#### UDBInstancePriceSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ChargeType** | string | Yearly, Monthly, Dynamic, Trial |No|
| **Price** | int | Price, in cents |No|

## Example

### Request Example
    
```
https://api.genesissai.com/?Action=DescribeUDBInstancePrice
&Region=cn-bj2
&Zone=cn-bj2-04
&Count=1   
&ChargeType=Month   
&Quantity=12
&MemoryLimit=600
&DiskSpace=20
&DBTypeId=mysql-5.5
&InstanceType=dsztMviC
&CPU=3
&InstanceType=QOajbSxZ
&SpecificationType=uaqGNDue
&MachineType=ENbIvUer
&StorageClass=cinLFUIr
&SpecificationClass=XyDTTLNH
```

### Response Example
    
```json
{
  "Action": "DescribeUDBInstancePriceResponse",
  "DataSet": [
    {
      "ChargeType": "Month",
      "Price": 1360
    }
  ],
  "RetCode": 0
}
```





