Create Replica - CreateUDBReplicationInstance
Overview
Create replica nodes (including arbitration) for MongoDB
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateUDBReplicationInstance . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | 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 | No |
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 |
SrcId | string | The DBId of the primary node, this value can be obtained through DescribeUDBInstance. | Yes |
Name | string | Instance name, at least 6 characters | Yes |
Port | int | Port number, default is 27017, value range is 3306 to 65535. | No |
IsArbiter | boolean | Is it an arbitration node, default is false, the arbitration node is created according to the smallest model | No |
UseSSD | boolean | Whether 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 |
InstanceType | string | UDB 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 |
ChargeType | string | Year, Month, Dynamic, Trial, Default and keep consistent with the master library | No |
Quantity | string | Purchase duration, by default, is consistent with the main library. | No |
CouponId | string | ID of the voucher used | 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 |
DBId | string | Create Slave Node’s DBId | No |
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
}