Create DB Replica Set - CreateMongoDBReplicaSet
Overview
One-click Create DB Replica Set
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateMongoDBReplicaSet . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | 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. | No |
Name | string | PrimaryDB instance name, at least 6 characters | Yes |
AdminPassword | string | Administrator Password | Yes |
DBTypeId | string | String form of DB type id corresponding to mongodb-3.4, mongodb-3.6, mongodb-4.0 | Yes |
DiskSpace | int | Disk Space (GB), temporarily supports 20G - 3000G | Yes |
ParamGroupId | int | Configuration parameter group id used by the DB instance | Yes |
MemoryLimit | int | Memory Limit (MB), currently supports the following levels 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M | Yes |
Port | int | Port Number | Yes |
ChargeType | string | Yearly, Monthly, Dynamic, Trial, Default: Monthly | No |
Quantity | int | Purchase duration (N months), default value is 1 month. If it is 0, it means purchase until the end of the month. | No |
AdminUser | string | Administrator account name, default is root | No |
BackupCount | int | Backup strategy, number of backups per week, default is 7 times | No |
BackupTime | int | Backup strategy, backup start time, calculated in units of hours, default is 1 o'clock | No |
BackupDuration | int | Backup strategy, backup time interval, calculated in hours, default is 24 hours. | No |
CPU | int | CPU Cores | No |
SubnetId | string | Subnet ID | No |
VPCId | string | ID of VPC | No |
ClusterId | string | ID of the affiliated shard cluster | No |
CouponId.N | string | CouponId.0 represents the first coupon id, for multiple coupon ids input, the following are CouponId.1, CouponId.2 and so on. | 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 |
DBIds | array[string] | Return the Id of all replica set members | No |
Example
Request Example
https://api.surfercloud.com/?Action=CreateMongoDBReplicaSet
&Region=cosmAFbt
&Zone=xBxVTiMQ
&ProjectId=jrKVXipN
&Name=ydhfcdle
&AdminPassword=IMYNtZID
&DBTypeId=csTyuCveUvRbSNuMEQjiZkVcZdbiJnzuoxyZEfCPaUaMqJkcULmxcWTuGzYIaJdNtyPyfTifdEQIWGFGALkrDbHvVVAiRmdqHvtMBSsnnFRRLSOnMoAKdzSaBPxbEKrwVPZHMtivhOKqIPdMYnnbZklWtPCuHzGdwkfoPQFNAgEzLdxQieISIPOlTBdJYUfLGvCjtzICKdUaSlstsdQMvHluipqJscHJfpzqQBLYJSclSxXLtpxoiDYEjZdGmjeBsVpxcNIKIsRAHLLVLAtzGdsKbmyZphqiTHhjAHvtcmtccHYmqdeYMNLRMingKSPGgEFpqVmkvOrwAngbxiOwCDkgOVstLPwptFuYUfSzopDWOhupQAWKZDVEsADvdcBQTUXzrclMdoQhFusTDPWxmyGfWuwfzlNDgMhGaNWZkNKJQFRiDQgueKwnOvlzKfRuXGserAzG
&DiskSpace=8
&ParamGroupId=8
&MemoryLimit=2
&Quantity=7
&Port=7
&ChargeType=HDrrxEEl
&AdminUser=EbSfMBeG
&BackupCount=3
&BackupTime=2
&BackupDuration=7
&UseSSD=true
&SSDType=TnKaeTIe
&CPU=8
&InstanceType=JSduiQwk
&SubnetId=tjsNjPHZ
&VPCId=mCBucsAy
&ClusterId=LvRXciyw
&CouponId.n=uBpRaUqU
Response Example
{
"Action": "CreateMongoDBReplicaSetResponse",
"DBIds": [
"DUZMytjm"
],
"RetCode": 0
}