Docs
api
Cloud Database(UDB)
CreateUDBSlave

Create Slave - CreateUDBSlave

Overview

Create a slave for UDB instance

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateUDBSlave.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
SrcIdstringDBId of the master instance, this value can be obtained through DescribeUDBInstanceYes
NamestringInstance name, at least 6 charactersYes
PortintPort NumberNo
SSDTypestringOnly valid for instances with SSD as the main. Optional values “SATA”,“NVMe”.No
IsLockbooleanWhether to lock the master library, default is trueNo
MemoryLimitintMemory Limit (MB), currently supports the following levels 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000MNo
DiskSpaceintDisk Space (GB), temporarily supports 20G - 3000G (API supported, front-end temporarily only supports memory customization)No
SubnetIdstringSubnet ID (Use default subnet if not provided)No
VPCIdstringVPCID (Use the default VPC if not passed)No
ChargeTypestringYear, Month, Dynamic, Trial, Default and keep consistent with the master libraryNo
QuantityintPurchase duration, by default, is consistent with the main library.No
ParamGroupIdintThe ID of the configuration parameter group used by the DB instance, which is kept consistent with the primary database by default.No
IsCreatePhysicallybooleanCreate a slave library in a physical way, currently only for creating outstanding slave libraries, default is false.No
DelaySecondsintSet the delay replication duration for the slave database (in seconds)No
SpecificationTypeintThe type of instance computing specification, 0 or no transmission means purchasing by memory method, 1 means purchasing by optional memory-cpu ratio method, need to fill in MachineType.No
MachineTypestringSpecification Type ID, valid when SpecificationType is 1No
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’s DBIdNo

Example

Request Example

https://api.dezai.com/?Action=CreateUDBSlave 
&Region=cn-bj2
&SrcId=udb-xxxxx
&Name=udb-xxxxxxx-slave
&Port=3306     
&MemoryLimit=4
&DiskSpace=4
&SubnetId=CSKpxQOp
&SubnetId=ICAmjpca
&VPCId=iGLJHujL
&ChargeType=RyAdXrgR
&Quantity=5
&ChargeType=IPwSWCtM
&Quantity=5
&ParamGroupId=4
&IsCreatePhysically=false
&DelaySeconds=6
&UseSSD=true
&SSDType=GnsgKEyT
&SpecificationType=cYBUpmpw
&MachineType=EEMCUisF

Response Example

{
  "Action": "CreateUDBSlaveResponse",
  "DBId": "udb-xxxxxx",
  "RetCode": 0
}