edit-icon download-icon


Last Updated: Jan 29, 2018


This API supports sharded cluster instances only.

Input parameters

NameTypeRequired or notDescription
ActionStringYesRequired parameter; value: CreateShardingDBInstance.
RegionIdStringYes- Region ID, no longer than 50 characters.
- You can use the DescribeRegions function to view IDs of available regions.
ZoneIdStringYesZone ID. You can use the DescribeRegions function to view available zones.
EngineStringYesDatabase type; value: ApsaraDB for MongoDB.
StorageEngineStringNoStorage engine; optional values: WiredTiger or RocksDB. Default value: WiredTiger.
EngineVersionStringYesDatabase version number; optional values: 3.2 or 3.4.
DBInstanceDescriptionStringNo- Instance description or remarks, with a length of 2 to 256 characters.
- It must start with a Chinese character or an English letter and can consist of Chinese and English characters, underlines (), hyphens (-), and numbers (Sharding instance description).
Mongos.N.ClassStringYesMongos specification. (Assume that a user can purchase N Mongos databases, and the value range of N is [2, 32]).
ReplicaSet.N.ClassStringYesInstance specification; optional values: see the instance type appendix (Assume that a user can purchase N replica sets, and the value range of N is [2, 32]).
ReplicaSet.N.StorageIntegerYes- Custom storage space; value range: [10, 1,000] for ApsaraDB for MongoDB.
- 10-GB increments. Unit: GB. (Assume that a user can purchase N replica sets, and the value range of N is [2, 32].)
ConfigServer.1.ClassStringYesConfigServer specification
ConfigServer.1.StorageIntegerYesStorage space of ConfigServers. Currently, only the 10-GB storage space is available.
SecurityIPListStringNo- List of IP addresses allowed to access all databases in this instance. IP addresses are separated by commas (,) and no duplicate is allowed. The list can contain a maximum of 1,000 IP addresses.
- Supported formats are as follows: %,, (IP), or (CIDR mode; classless inter-domain routing. /24 indicates the length of the prefix in the IP address; the prefix length ranges from 1 to 32). indicates no restriction. By default, no access restriction is applied.
AccountPasswordStringNoPassword of the root account. It is a string of 6 to 32 characters and is composed of letters, numbers, and underlines ().
ChargeTypeStringNo- Payment mode: PrePaid and PostPaid. PrePaid indicates yearly/monthly subscription and PostPaid indicates Pay-As-You-Go.
- Default value: PostPaid. Currently, only PostPaid is available.
ClientTokenStringYes- It is used to guarantee the idempotence of the request.
- The value is generated by the client. It must be unique among all requests and contain a maximum of 64 ASCII characters. For more information, see the Appendix: How to Guarantee Idempotence.
NetworkType StringNoNetwork type of an instance. Optional values: Classic and VPC. Default value: Classic.
VpcIdStringNoVPC ID. If the instance network type is VPC, this parameter cannot be left blank.
VSwitchIdStringNoVSwitch ID. If the instance type is VPC, this parameter cannot be left blank.
SrcDBInstanceIdStringNo- Source instance ID. Currently, only sharding instances can be cloned. (A replica set instance cannot be directly cloned as a sharding instance).
- The number of sharding and replica set must be greater than the number of replica set files.
RestoreTimeStringNoA random UTC time point within seven days, precise to seconds.

Response parameters

Public response parameters-For more information, see public response parameters.
Thank you! We've received your feedback.