Domain name for API request: tdmysql.intl.tencentcloudapi.com.
This API is used to batch create instances.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateDBInstances. |
| Version | Yes | String | Common Params. The value used for this API: 2021-11-22. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| Zone | Yes | String | Creating an Instance Region |
| VpcId | Yes | String | Character type vpcid |
| SubnetId | Yes | String | Character type subnetid |
| SpecCode | Yes | String | Purchase specification |
| Disk | Yes | Integer | Node disk capacity (unit: GB) |
| StorageNodeNum | Yes | Integer | Number of storage nodes |
| Replications | Yes | Integer | Number of node replicas for storage, up to 5, must be an odd number |
| InstanceCount | Yes | Integer | Instance count. Maximum is 10. |
| FullReplications | No | Integer | Number of replicas |
| CreateVersion | No | String | Create an instance version, using the current latest version by default |
| InstanceName | No | String | Instance name. The required length is 1-60. It can contain Chinese characters, English case, digits, hyphens (-), and underscores (_). |
| ResourceTags.N | No | Array of ResourceTag | Tag key-value pair array |
| InitParams.N | No | Array of InstanceParam | Initialize instance parameters. For example: |
| TimeUnit | No | String | Time unit, m: month |
| TimeSpan | No | Integer | Commodity duration size |
| StorageNodeCpu | No | Integer | CPU cores of the storage node |
| StorageNodeMem | No | Integer | Storage node memory size |
| PayMode | No | String | Payment mode. 0 means pay-as-you-go/postpaid, 1 means prepaid. |
| MCNum | No | Integer | Number of control nodes |
| Vport | No | Integer | Custom port |
| Zones.N | No | Array of String | Multi-AZ availability zone list |
| AutoVoucher | No | Boolean | Whether to use a coupon. |
| VoucherIds.N | No | Array of String | Coupon list |
| InstanceType | No | String | Instance Architecture Type, separate: decoupled architecture; hybrid: peer-to-peer architecture |
| StorageType | No | String | Disk Type, CLOUD_HSSD enhanced SSD, CLOUD_TCS local SSD disk |
| AZMode | No | Integer | AZ mode. 1: Single AZ, 2: Multi-AZ non-primary AZ, 3: Multi-AZ primary AZ |
| InstanceMode | No | String | Instance mode |
| TemplateId | No | String | Parameter template id |
| SQLMode | No | String | Compatible mode, enum:MySQL,HBase |
| AutoScaleConfig | No | AutoScalingConfig | ccu configuration of the svls instance |
| Parameter Name | Type | Description |
|---|---|---|
| InstanceIds | Array of String | Instance ID. |
| FlowId | Integer | Task ID. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: tdmysql.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateDBInstances
<Common request parameters>
{
"Zone": "ap-chengdu-2",
"VpcId": "vpc-jksnni36",
"SubnetId": "subnet-dz7wfk4r",
"SpecCode": "1c2g",
"Disk": 30,
"StorageNodeNum": 3,
"Replications": 3,
"InstanceCount": 1,
"CreateVersion": "21.2.3",
"InitParams": [
{
"Param": "character_set_server",
"Value": "utf8mb4"
}
],
"StorageNodeCpu": 1,
"StorageNodeMem": 2,
"Zones": [
"ap-chengdu-2"
],
"InstanceType": "hybrid",
"StorageType": "CLOUD_HSSD",
"InstanceMode": "enhanced",
"SQLMode": "MySQL"
}
{
"Response": {
"FlowId": 4294998382,
"InstanceIds": [
"tdsql3-ac67c142"
],
"RequestId": "b3e61005-1e6d-48a2-b5af-de6c4f19dd01"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.CamAuthError | CAM authentication error. |
| AuthFailure.CheckCamAuthError | CAM authentication request parameter check failed. |
| AuthFailure.UnauthorizedOperation | CAM authentication failure. |
| DryRunOperation.AddTagDryrunError | Failed to bind the tag. |
| FailedOperation.CreateFlowError | Failed to create the task. |
| FailedOperation.DBCreateInstanceError | Failed to add instance data. |
| InvalidParameterValue.CheckDiskError | Disk size validation error. |
| InvalidParameterValue.CheckInstanceVersionError | Instance version validation error. |
| InvalidParameterValue.CheckNameError | Name verification failed. |
| InvalidParameterValue.CheckSpecError | Instance specification validation error. |
| InvalidParameterValue.CheckVpcError | VPC validation error. |
| InvalidParameterValue.InvalidParameterValueError | Parameter error |
| InvalidParameterValue.NodeReplicasInvalidError | The number of instance replicas created does not meet specifications. |
| LimitExceeded.AddTagCountError | The number of bound tags exceeds the limit. |
| LimitExceeded.OutOfInstanceCntLimitError | The number of batch create instances exceeds the limit. |
| LimitExceeded.OutOfNodeReplicasLimitError | The number of replicas exceeds the limit. |
| LimitExceeded.OutOfSpecLimitError | The specification exceeds the limit. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback