public class CreateDBInstanceRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
CreateDBInstanceRequest() |
CreateDBInstanceRequest(CreateDBInstanceRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
Long |
getAutoRenewFlag()
Get Automatic renewal flag.
|
Long |
getAutoVoucher()
Get Whether to automatically select a voucher.
|
String[] |
getAvailabilityZoneList()
Get Specifies the list of AZs during multi-AZ deployment of TencentDB for MongoDB instances.
|
Long |
getClone()
Get Instance type.
|
String |
getClusterType()
Get Instance architecture type.
|
String |
getFather()
Get Parent instance ID.
|
Long |
getGoodsNum()
Get Number of instances.
|
String |
getHiddenZone()
Get AZ of the hidden node.
|
String |
getInstanceName()
Get Instance name.
|
String |
getMachineCode()
Get Product specification type.
|
Long |
getMemory()
Get Instance memory size.
|
Long |
getMongosCpu()
Get Number of Mongos node CPU cores.
|
Long |
getMongosMemory()
Get Mongos node memory size.
|
Long |
getMongosNodeNum()
Get Number of Mongos nodes.
|
String |
getMongoVersion()
Get Refers to version information.
|
Long |
getNodeNum()
Get - Specifies the number of primary and secondary nodes for each replica set during replica set instance creation.
|
String |
getParamTemplateId()
Get Parameter template ID.
|
String |
getPassword()
Get Instance password.
|
Long |
getPeriod()
Get Specifies the purchase duration during the instance purchase, in months.
|
Long |
getProjectId()
Get Project ID.
|
String[] |
getReadonlyNodeAvailabilityZoneList()
Get Array of AZs of read-only nodes.
|
Long |
getReadonlyNodeNum()
Get Number of read-only nodes.
|
Long |
getReplicateSetNum()
Get - Specifies the number of replica sets during replica set instance creation.
|
String |
getRestoreTime()
Get Rollback time of the cloned instance.
|
String[] |
getSecurityGroup()
Get Security group ID.
|
String |
getSubnetId()
Get Subnet ID of the VPC.
|
TagInfo[] |
getTags()
Get Instance tag information.
|
Long |
getVolume()
Get Instance disk size.
|
String |
getVpcId()
Get VPC ID.
|
String |
getZone()
Get AZ information.
|
void |
setAutoRenewFlag(Long AutoRenewFlag)
Set Automatic renewal flag.
|
void |
setAutoVoucher(Long AutoVoucher)
Set Whether to automatically select a voucher.
|
void |
setAvailabilityZoneList(String[] AvailabilityZoneList)
Set Specifies the list of AZs during multi-AZ deployment of TencentDB for MongoDB instances.
|
void |
setClone(Long Clone)
Set Instance type.
|
void |
setClusterType(String ClusterType)
Set Instance architecture type.
|
void |
setFather(String Father)
Set Parent instance ID.
|
void |
setGoodsNum(Long GoodsNum)
Set Number of instances.
|
void |
setHiddenZone(String HiddenZone)
Set AZ of the hidden node.
|
void |
setInstanceName(String InstanceName)
Set Instance name.
|
void |
setMachineCode(String MachineCode)
Set Product specification type.
|
void |
setMemory(Long Memory)
Set Instance memory size.
|
void |
setMongosCpu(Long MongosCpu)
Set Number of Mongos node CPU cores.
|
void |
setMongosMemory(Long MongosMemory)
Set Mongos node memory size.
|
void |
setMongosNodeNum(Long MongosNodeNum)
Set Number of Mongos nodes.
|
void |
setMongoVersion(String MongoVersion)
Set Refers to version information.
|
void |
setNodeNum(Long NodeNum)
Set - Specifies the number of primary and secondary nodes for each replica set during replica set instance creation.
|
void |
setParamTemplateId(String ParamTemplateId)
Set Parameter template ID.
|
void |
setPassword(String Password)
Set Instance password.
|
void |
setPeriod(Long Period)
Set Specifies the purchase duration during the instance purchase, in months.
|
void |
setProjectId(Long ProjectId)
Set Project ID.
|
void |
setReadonlyNodeAvailabilityZoneList(String[] ReadonlyNodeAvailabilityZoneList)
Set Array of AZs of read-only nodes.
|
void |
setReadonlyNodeNum(Long ReadonlyNodeNum)
Set Number of read-only nodes.
|
void |
setReplicateSetNum(Long ReplicateSetNum)
Set - Specifies the number of replica sets during replica set instance creation.
|
void |
setRestoreTime(String RestoreTime)
Set Rollback time of the cloned instance.
|
void |
setSecurityGroup(String[] SecurityGroup)
Set Security group ID.
|
void |
setSubnetId(String SubnetId)
Set Subnet ID of the VPC.
|
void |
setTags(TagInfo[] Tags)
Set Instance tag information.
|
void |
setVolume(Long Volume)
Set Instance disk size.
|
void |
setVpcId(String VpcId)
Set VPC ID.
|
void |
setZone(String Zone)
Set AZ information.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public CreateDBInstanceRequest()
public CreateDBInstanceRequest(CreateDBInstanceRequest source)
public Long getNodeNum()
public void setNodeNum(Long NodeNum)
NodeNum
- - Specifies the number of primary and secondary nodes for each replica set during replica set instance creation. Call the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API to obtain the maximum and minimum number of nodes supported for each replica set.
- Specifies the number of primary and secondary nodes for each shard during sharded cluster instance creation. Call the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API to obtain the maximum and minimum number of nodes supported for each shard.public Long getMemory()
public void setMemory(Long Memory)
Memory
- Instance memory size. Unit: GB. Call the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API to obtain specific saleable memory specifications.public Long getVolume()
public void setVolume(Long Volume)
Volume
- Instance disk size. Unit: GB. Call the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API to obtain the maximum and minimum disk sizes corresponding to each CPU specification.public String getMongoVersion()
public void setMongoVersion(String MongoVersion)
MongoVersion
- Refers to version information. The [DescribeSpecInfo](https://www.tencentcloud.comom/document/product/240/38567?from_cn_redirect=1) API can be called to obtain detailed information about the supported versions.
- MONGO_40_WT: version of the MongoDB 4.0 WiredTiger storage engine.
- MONGO_42_WT: version of the MongoDB 4.2 WiredTiger storage engine.
- MONGO_44_WT: version of the MongoDB 4.4 WiredTiger storage engine.
- MONGO_50_WT: version of the MongoDB 5.0 WiredTiger storage engine.
- MONGO_60_WT: version of the MongoDB 6.0 WiredTiger storage engine.
- MONGO_70_WT: version of the MongoDB 7.0 WiredTiger storage engine.public Long getGoodsNum()
public void setGoodsNum(Long GoodsNum)
GoodsNum
- Number of instances. The minimum value is 1, and the maximum value is 30.public String getZone()
public void setZone(String Zone)
Zone
- AZ information. Format: ap-guangzhou-2.
- Call the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API to obtain the specific information.
- This parameter indicates the primary AZ. If multi-AZ deployment is adopted, the value of Zone should be one of the values of AvailabilityZoneList.public Long getPeriod()
public void setPeriod(Long Period)
Period
- Specifies the purchase duration during the instance purchase, in months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.public String getMachineCode()
public void setMachineCode(String MachineCode)
MachineCode
- Product specification type.
- HIO10G: general high-I/O 10GE type.
- HCD: cloud disk type.public String getClusterType()
public void setClusterType(String ClusterType)
ClusterType
- Instance architecture type.
- REPLSET: replica set.
- SHARD: sharded cluster.public Long getReplicateSetNum()
public void setReplicateSetNum(Long ReplicateSetNum)
ReplicateSetNum
- - Specifies the number of replica sets during replica set instance creation. This parameter can only be set to 1.
- Specifies the number of shards during sharded cluster instance creation. Call the [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API to query the range of shard quantity. The parameters MinReplicateSetNum and MaxReplicateSetNum in the returned data structure SpecItems correspond to the minimum value and maximum value, respectively.public Long getProjectId()
public void setProjectId(Long ProjectId)
ProjectId
- Project ID. - The default project is used if this parameter is not specified.
- The project ID can be obtained on the [project management page in the TencentDB for MongoDB console](https://console.cloud.tencent.com/project).public String getVpcId()
public void setVpcId(String VpcId)
VpcId
- VPC ID.
- Only VPC configuration is supported, and a VPC in the same region as the instance should be selected. Log in to the [VPC console](https://console.cloud.tencent.com/vpc) to obtain the available VPC ID.
- After successful instance creation, VPCs can be changed. For detailed operations, see [Changing the Network](https://www.tencentcloud.comom/document/product/239/30910?from_cn_redirect=1).public String getSubnetId()
public void setSubnetId(String SubnetId)
SubnetId
- Subnet ID of the VPC.
- A subnet should be specified within the selected VPC. Log in to the [VPC console](https://console.cloud.tencent.com/vpc) to obtain the available subnet ID.
- After successful instance creation, VPCs and subnets can be changed. For detailed operations, see [Changing the Network](https://www.tencentcloud.comom/document/product/239/30910?from_cn_redirect=1).public String getPassword()
public void setPassword(String Password)
Password
- Instance password. The requirements are as follows:
- The number of characters should be in the range of [8, 32].
- Characters within the ranges [A,Z], [a,z], and [0,9] are allowed.
- Special characters that can be entered include exclamation marks (!), at signs (@), number signs (#), percent signs (%), carets (^), asterisks (\*), brackets (()), and underscores (_).
- It cannot contain only the same letters or digits.public TagInfo[] getTags()
public void setTags(TagInfo[] Tags)
Tags
- Instance tag information.public Long getAutoRenewFlag()
public void setAutoRenewFlag(Long AutoRenewFlag)
AutoRenewFlag
- Automatic renewal flag.
- 0: no automatic renewal.
- 1: automatic renewal.public Long getAutoVoucher()
public void setAutoVoucher(Long AutoVoucher)
AutoVoucher
- Whether to automatically select a voucher.
- 1: yes.
- 0: no. Default value: 0.public Long getClone()
public void setClone(Long Clone)
Clone
- Instance type.
- 1: formal instance.
- 3: read-only instance.
- 4: disaster recovery instance.
- 5: cloned instance. Note: For a cloned instance, RestoreTime is required.public String getFather()
public void setFather(String Father)
Father
- Parent instance ID.
- This parameter is required when the value of the **Clone** parameter is set to 3 or 4, indicating a read-only or disaster recovery instance.
- Log in to the [TencentDB for MongoDB console](https://console.cloud.tencent.com/mongodb), and copy the parent instance ID from the instance list.public String[] getSecurityGroup()
public void setSecurityGroup(String[] SecurityGroup)
SecurityGroup
- Security group ID. Log in to the [security group console](https://console.cloud.tencent.com/vpc/security-group) to obtain the ID of the security group in the same region as the database instance.public String getRestoreTime()
public void setRestoreTime(String RestoreTime)
RestoreTime
- Rollback time of the cloned instance. It is required when the Clone value is 5 or 6. - This parameter is required for cloned instances. Format: 2021-08-13 16:30:00. - Rollback time range: Only data within the last 7 days can be rolled back.public String getInstanceName()
public void setInstanceName(String InstanceName)
InstanceName
- Instance name. Only Chinese characters, letters, digits, underscores (_), and delimiters (-) are supported, with a length of 128 characters. When database instances are purchased in batches, the automatic ascending feature is supported through the custom naming pattern string and numeric suffix to set instance names efficiently.
- Basic mode: prefix + automatic ascending number (starting from 1 by default). Only a custom instance name prefix is required for **lnstanceName**. For example, it can be set to cmgo. If the purchase quantity is set to 5, after purchase, the instances will be sequentially named cmgo1, cmgo2, cmgo3, cmgo4, and cmgo5, respectively.
- Custom starting number mode: prefix + {R:x} (x is the custom starting number). Prefix{R:x} is required for **InstanceName**. For example, cmgo{R:3}. If the purchase quantity is set to 5, the instance names will be sequentially named cmgo3, cmgo4, cmgo5, cmgo6, and cmgo7.
- Composite pattern string: prefix 1{R:x} + prefix 2{R:y}+ ⋯ + fixed suffix, where x and y are the starting numbers of each prefix. A composite pattern string is required for **instanceName**. For example, cmgo{R:10}\_node{R:12}\_db. If the batch purchase quantity is set to 5, the instances will be sequentially named cmgo10\_node12\_db, cmgo11\_node13\_db, cmgo12\_node14\_db, cmgo13\_node15\_db, and cmgo14\_node16\_db.public String[] getAvailabilityZoneList()
public void setAvailabilityZoneList(String[] AvailabilityZoneList)
AvailabilityZoneList
- Specifies the list of AZs during multi-AZ deployment of TencentDB for MongoDB instances.
- For instances in multi-AZ deployment mode, the **Zone** parameter specifies the primary AZ, and **AvailabilityZoneList** specifies all AZs, including the primary AZ. Format: [ap-guangzhou-2,ap-guangzhou-3,ap-guangzhou-4].
- The [DescribeSpecInfo](https://intl.cloud.tencent.com/document/product/240/38567?from_cn_redirect=1) API can be called to obtain AZs planned for TencentDB for MongoDB instances in different regions, helping you specify valid AZs.
- Nodes in multi-AZ deployment mode can only be deployed in 3 different AZs. Deploying most nodes of a cluster in the same AZ is not supported. For example, a 3-node cluster does not support deploying 2 nodes in the same AZ.public Long getMongosCpu()
public void setMongosCpu(Long MongosCpu)
MongosCpu
- Number of Mongos node CPU cores. Valid values: 1, 2, 4, 8, and 16. This parameter is required during sharded cluster instance purchase.public Long getMongosMemory()
public void setMongosMemory(Long MongosMemory)
MongosMemory
- Mongos node memory size.
- This parameter is required during sharded cluster instance purchase.
- Unit: GB. 1-core 2GB, 2-core 4GB, 4-core 8GB, 8-core 16GB, and 16-core 32GB are supported.public Long getMongosNodeNum()
public void setMongosNodeNum(Long MongosNodeNum)
MongosNodeNum
- Number of Mongos nodes. This parameter is required during sharded cluster instance purchase.
- For instances in single-AZ deployment mode, the value range is [3,32].
- For instances in multi-AZ deployment mode, the value range is [6,32].public Long getReadonlyNodeNum()
public void setReadonlyNodeNum(Long ReadonlyNodeNum)
ReadonlyNodeNum
- Number of read-only nodes. Value ranges: [0,5].public String[] getReadonlyNodeAvailabilityZoneList()
public void setReadonlyNodeAvailabilityZoneList(String[] ReadonlyNodeAvailabilityZoneList)
ReadonlyNodeAvailabilityZoneList
- Array of AZs of read-only nodes. This parameter is required for instances in multi-AZ deployment mode when **ReadonlyNodeNum** is not set to **0**.public String getHiddenZone()
public void setHiddenZone(String HiddenZone)
HiddenZone
- AZ of the hidden node. This parameter is required for instances in multi-AZ deployment mode.public String getParamTemplateId()
public void setParamTemplateId(String ParamTemplateId)
ParamTemplateId
- Parameter template ID.
- A parameter template is a collection of predefined parameter values that can be used to quickly configure new MongoDB instances. Proper use of parameter templates can significantly enhance the deployment efficiency and operational performance of the database.
- The [DescribeDBInstanceParamTpl](https://www.tencentcloud.comom/document/product/240/109155?from_cn_redirect=1) API can be called to obtain the parameter template ID. Select the parameter template ID corresponding to the instance version and architecture.Copyright © 2025. All rights reserved.