# Create mongos instance - CreateUDBRouteInstance

## Overview

This API applies to Bare Metal MongoDB. This architecture will be deprecated soon. If you want to use QuickJet MongoDB, please refer to QuickJet MongoDB API Documentation






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CreateUDBRouteInstance`.                      | **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 [List of Regions and Availability Zones](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Availability Zone. See [Availability Zone List](/docs/api/summary/regionlist) |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](/docs/api/summary/get_project_list). |No|
| **DBTypeId** | string | DB type id, mongodb is subdivided by version into 1: mongodb-2.4, 2: mongodb-2.6, 3: mongodb-3.0, 4: mongodb-3.2 |**Yes**|
| **Name** | string | Instance name, at least 6 characters |**Yes**|
| **Port** | int | Port number, mongodb default 27017 |**Yes**|
| **ParamGroupId** | int | Configuration parameter group id used by the DB instance |**Yes**|
| **MemoryLimit** | int | Memory Limit (MB), currently supports the following levels 600M/1500M/3000M /6000M/15000M/30000M |**Yes**|
| **DiskSpace** | int | Disk Space (GB), temporarily supports 20G - 500G |**Yes**|
| **ConfigsvrId.N** | string | Configure the server's dbid, allow one or three. |**Yes**|
| **ChargeType** | string | Yearly, Monthly, Dynamic, Trial, Default: Monthly |No|
| **Quantity** | int | Purchase duration, default value 1 |No|
| **UseSSD** | boolean | Use SSD, default is true |No|
| **CouponId** | string | ID of the voucher used |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|
| **DBId** | string | db instance id |No|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=CreateUDBRouteInstance
&Region=cn-bj2
&DBTypeId=mongodb-2.6
&ChargeType=Month   
&Name=udb-xxxxxxx
&Port=27017
&ParamGroupId=23
&MemoryLimit=600
&DiskSpace=20
&ConfigsvrId.0=udb-xxxxx
&ConfigsvrId.1=udb-xxxxx
&ConfigsvrId.2=udb-xxxxx
&ShardedClusterId=EmlJjnIa
```

### Response Example
    
```json
{
  "Action": "CreateUDBRouteInstanceResponse",
  "DBId": "udb-xxxxx",
  "RetCode": 0
}
```





