# Create Sharded Cluster - CreateUMongoDBShardedCluster

## Overview

Create a Mongodb Sharded Cluster






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CreateUMongoDBShardedCluster`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.sigcalcloud.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**|
| **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|
| **Name** | string | Replica set instance name, at least 6 characters |**Yes**|
| **DBVersion** | string | Version of MongoDB replica set, such as MongoDB 3.6, MongoDB 4.2 |**Yes**|
| **AdminPassword** | string | Administrator Password |**Yes**|
| **MongosNodeCount** | int | Mongos Node Number |**Yes**|
| **ShardCount** | int | Number of Shards |**Yes**|
| **NodeCount** | int | Number of nodes in each shard |**Yes**|
| **DiskSpace** | int | Data node disk space (GB): Value range 20\~32000, only multiples of 10 are supported. |**Yes**|
| **MachineTypeId** | string | Data Node Machine Configuration,such as o.mongo2m.medium |**Yes**|
| **SubnetId** | string | Subnet ID |No|
| **VPCId** | string | ID of VPC |No|
| **Tag** | string | The name of the business group where the instance is located |No|
| **ChargeType** | string | Payment methods: Yearly, Monthly, Dynamic, Trial, Default: Monthly |No|
| **Quantity** | int | Purchase duration, default value 1 |No|
| **ListenPort** | int | Mongo service port |No|
| **TemplateId** | string | Parameter configuration template id |No|
| **MongosMachineTypeId** | string | Mongos Node Machine Configuration |No|
| **Labels.N.Key** | string | Keys of User Resource Label |No|
| **Labels.N.Value** | string | Values of User Resource Label |No|
| **SecGroupId.N.Id** | string | Security Group ID. Up to 5 security groups can be bound at the same time. |No|
| **SecGroupId.N.Priority** | int | Security Group Priority. Value range [1, 5] |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|




## Example

### Request Example
    
```
https://api.sigcalcloud.com/?Action=CreateUMongoDBShardedCluster
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=nClnlbpK
&Name=ikqLkxcS
&DBVersion=UrsRvxjz
&AdminPassword=CJRsfuaP
&DiskSpace=pNcPQRQc
&MachineTypeId=XnzJIuTI
&NodeCount=2
&SubnetId=eoHMiTqA
&VPCId=MskapaWl
&Tag=DaJVCUSu
&ChargeType=Year
&Quantity=3
&MongosNodeCount=5
&ShardCount=9
&MongosDiskSpace=9
&MongosNodeCount=3
&ShardCount=4
&MongosDiskSpace=1
&ListenPort=6
&TemplateId=QqyhaTzZ
&MongosMachineTypeId=jSdeeQvn
&EnableIPv6=true
&Labels.N.Key=MOEsTWGK
&Labels.N.Value=ybAxuRvN
&SecGroupId.N.Id=OEqihEoU
&SecGroupId.N.Priority=4
```

### Response Example
    
```json
{
  "Action": "CreateUMongoDBShardedClusterResponse",
  "RetCode": 0
}
```





