docs
api
Cloud Database(UDB)
CreateMongoDBReplicaSet

Create DB Replica Set - CreateMongoDBReplicaSet

Overview

One-click Create DB Replica Set

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateMongoDBReplicaSet.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
NamestringPrimaryDB instance name, at least 6 charactersYes
AdminPasswordstringAdministrator PasswordYes
DBTypeIdstringString form of DB type id corresponding to mongodb-3.4, mongodb-3.6, mongodb-4.0Yes
DiskSpaceintDisk Space (GB), temporarily supports 20G - 3000GYes
ParamGroupIdintConfiguration parameter group id used by the DB instanceYes
MemoryLimitintMemory Limit (MB), currently supports the following levels 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000MYes
PortintPort NumberYes
ChargeTypestringYearly, Monthly, Dynamic, Trial, Default: MonthlyNo
QuantityintPurchase duration (N months), default value is 1 month. If it is 0, it means purchase until the end of the month.No
AdminUserstringAdministrator account name, default is rootNo
BackupCountintBackup strategy, number of backups per week, default is 7 timesNo
BackupTimeintBackup strategy, backup start time, calculated in units of hours, default is 1 o'clockNo
BackupDurationintBackup strategy, backup time interval, calculated in hours, default is 24 hours.No
CPUintCPU CoresNo
SubnetIdstringSubnet IDNo
VPCIdstringID of VPCNo
ClusterIdstringID of the affiliated shard clusterNo
CouponId.NstringCouponId.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 NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
DBIdsarray[string]Return the Id of all replica set membersNo

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
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved