Docs
api
Cloud Database(UDB)
CreateUDBReplicationInstance

Create Replica - CreateUDBReplicationInstance

Overview

Create replica nodes (including arbitration) for MongoDB

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateUDBReplicationInstance.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
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 ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
SrcIdstringThe DBId of the primary node, this value can be obtained through DescribeUDBInstance.Yes
NamestringInstance name, at least 6 charactersYes
PortintPort number, default is 27017, value range is 3306 to 65535.No
IsArbiterbooleanIs it an arbitration node, default is false, the arbitration node is created according to the smallest modelNo
UseSSDbooleanWhether to use SSD, the default is true. Currently, the main available zones, overseas data centers, and new data centers only provide SSD resources, and non-SSD resources are no longer provided.No
InstanceTypestringUDB Database Models: “Normal”: “Standard Model” , “SATA_SSD”: “SSD Model” , “PCIE_SSD”: “High Performance SSD Model” , “Normal_Volume”: “Standard Large Capacity Model”, “SATA_SSD_Volume”: “SSD Large Capacity Model” , “PCIE_SSD_Volume”: “High Performance SSD Large Capacity Model”, “NVMe_SSD”: “Rapid Model”.No
ChargeTypestringYear, Month, Dynamic, Trial, Default and keep consistent with the master libraryNo
QuantitystringPurchase duration, by default, is consistent with the main library.No
CouponIdstringID of the voucher usedNo

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
DBIdstringCreate Slave Node’s DBIdNo

Example

Request Example

https://api.dezai.com/?Action=CreateUDBReplicationInstance
&Region=cn-bj2
&SrcId=udb-xxxxx
&Name=mongodb-xxxxxxx-01
&InstanceType=OfalVzHs
&ChargeType=pAfhbuZY
&Quantity=sREIXrXW
&CouponId=tsZYXxdk

Response Example

{
  "Action": "CreateUDBReplicationInstanceResponse",
  "DBId": "udb-xxxxx",
  "RetCode": 0
}