# Get UDB Cloud Database Compute Specification List - ListUDBMachineType

## Overview

Retrieve the list of computing specifications supported by UDB cloud database. Currently, it does not support obtaining the computing specifications of cross-availability zone instances. The currently supported database categories include: NVMe version and SSD cloud disk version MySQL.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `ListUDBMachineType`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.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 [Region and Zone List](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Zone. See [Region and Zone List](/docs/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the [GetProjectList API](/docs/api/summary/get_project_list) |No|
| **InstanceMode** | string | UDB instance mode type, optional values are as follows: "Normal": Standard version UDB instance "HA": High-availability version UDB instance. The default is "Normal"."""<br /> |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[[*MachineType*](#machinetype)] | Specification List |**Yes**|
| **DefaultMachineType** | [*MachineType*](#machinetype) | Default Computing Specifications |**Yes**|

#### Data Model


#### MachineType

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ID** | string | Compute specification id, currently supports three types of CPU and memory ratios: 1:2, 1:4, 1:8;<br /><br />The format of the specification is: "Machine type.Ratio.CPU core specification";<br /><br />Two types of machines are supported: o and n, representing Kuaijie NVMe and SSD cloud disk models respectively;<br /><br />The ratio mapping relationship is as follows:<br />2m represents a CPU to memory ratio of 1:2,<br />4m represents a CPU to memory ratio of 1:4,<br />8m represents a CPU to memory ratio of 1:8,<br /><br />The CPU core specification mapping relationship is as follows:<br />small represents 1C,<br />medium represents 2C,<br />xlarge represents 4C,<br />2xlarge represents 8C,<br />4xlarge represents 16C,<br />8xlarge represents 32C,<br />16xlarge represents 64C,<br /><br />For example, "o.mysql4m.medium" means<br />Creating a Kuaijie NVMe model with 2C8G instance,<br />"o.mysql8m.4xlarge" means creating a Kuaijie NVMe model with 16C128G instance. |No|
| **Description** | string | Description of computing specifications, in the format of "nCmG", indicating an instance with n cores and mG memory. |No|
| **Cpu** | int | CPU Core Count |No|
| **Memory** | int | Specification Memory Size, Unit (GB) |No|
| **Os** | string | Internal cloud host model, "o/n" selectable. |No|
| **Group** | string | Memory/CPU Ratio |No|

## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=ListUDBMachineType
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=JmoFMucA
&InstanceMode=xepGsMAp
&RegionFlag=HbtnSAmN
```

### Response Example
    
```json
{
  "Action": "ListUDBMachineTypeResponse",
  "DataSet": [
    {
      "Cpu": 9,
      "Description": "phSdctBk",
      "Group": "NMGNcZoB",
      "ID": "jlzxzRpr",
      "Memory": 8,
      "Os": "mXvRGwSp"
    }
  ],
  "DefaultMachineType": {},
  "Message": "gpbNNqbc",
  "RetCode": 0
}
```





