Domain name for API request: cynosdb.intl.tencentcloudapi.com.
This API is used to create a cluster.
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: CreateClusters. |
| Version | Yes | String | Common Params. The value used for this API: 2019-01-07. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo. |
| Zone | Yes | String | AZ. |
| VpcId | Yes | String | VPC network ID |
| SubnetId | Yes | String | Subnet ID. |
| DbType | Yes | String | Database type Enumeration values:
|
| DbVersion | Yes | String | Database version Enumeration values:
|
| ProjectId | No | Integer | Project ID. |
| Cpu | No | Integer | Required when DbMode is NORMAL or left empty |
| Memory | No | Integer | Required when DbMode is NORMAL or not specified |
| InstanceCount | No | Integer | Instance count Value range: [1, 16] Default value: 2
|
| Storage | No | Integer | This parameter is meaningless and abandoned. |
| ClusterName | No | String | Cluster name, length less than 64 characters. Each character can be an uppercase/lowercase letter, digit, or special symbol ('-', '_', '.') |
| AdminPassword | No | String | Account password (8-64 characters, containing any three of the following: uppercase and lowercase letters, digits, and symbols ~!@#$%^&*_-+=`|(){}[]:;'<>,.?/) |
| Port | No | Integer | Port. Default value: 3306. Value range: [0, 65535) |
| PayMode | No | Integer | Billing mode Enumeration values:
Default value: 0 |
| Count | No | Integer | Number of clusters to purchase. Optional value range: [1,50]. Default value: 1 |
| RollbackStrategy | No | String | Rollback type Enumeration values:
|
| RollbackId | No | Integer | Snapshot rollback refers to snapshotId; point-in-time rollback refers to queryId. If it is 0, you need to determine whether the time point is valid. |
| OriginalClusterId | No | String | During rollback, import the source cluster ID to search for the source poolId |
| ExpectTime | No | String | Point-in-time rollback, specified time; snapshot rollback, snapshot time |
| ExpectTimeThresh | No | Integer | This parameter is meaningless and abandoned. |
| StorageLimit | No | Integer | Storage limit of a regular instance, in GB |
| TimeSpan | No | Integer | Annual and monthly subscription duration |
| TimeUnit | No | String | Annual and monthly subscription duration measurement unit, ['s','d','m','y'] |
| AutoRenewFlag | No | Integer | Whether Annual/Monthly Subscription is auto-renewed Enumeration values:
Default value: 0 |
| AutoVoucher | No | Integer | Whether to automatically select a voucher. 1: Yes; 0: No. Default is 0. Enumeration values:
Default value: 0 |
| HaCount | No | Integer | Instance count (this parameter is deprecated and only accommodative for existing use) |
| OrderSource | No | String | Order Source |
| ResourceTags.N | No | Array of Tag | tag array information that needs to be bound for cluster creation |
| DbMode | No | String | DB type Enumeration values:
Default value: NORMAL Selectable when DbType is MYSQL (default: NORMAL) |
| MinCpu | No | Float | Required when DbMode is SERVERLESS |
| MaxCpu | No | Float | Required when DbMode is SERVERLESS: |
| AutoPause | No | String | Whether to auto pause Enumeration values:
Default value: yes Takes effect when DbMode is SERVERLESS |
| AutoPauseDelay | No | Integer | When DbMode is SERVERLESS, specify the delay for Cluster Auto-Pause in seconds. Optional range: [600,691200] |
| StoragePayMode | No | Integer | Cluster storage billing mode. Pay-as-you-go: 0; monthly subscription: 1. Default is pay-as-you-go. |
| SecurityGroupIds.N | No | Array of String | Security group id array |
| AlarmPolicyIds.N | No | Array of String | Alarm policy Id array |
| ClusterParams.N | No | Array of ParamItem | Parameter array. It temporarily supports |
| DealMode | No | Integer | Transaction mode Enumeration values:
Default value: 0 |
| ParamTemplateId | No | Integer | Parameter template ID, which can be obtained by querying parameter template information through DescribeParamTemplates. |
| SlaveZone | No | String | Multi-AZ address |
| InstanceInitInfos.N | No | Array of InstanceInitInfo | Instance initialization configuration information, primarily used for selecting different specification instances during cluster purchase. |
| GdnId | No | String | Global database unique ID |
| ProxyConfig | No | ProxyConfig | Database proxy configuration |
| AutoArchive | No | String | Whether to automatically archive Enumeration values:
Default value: no This parameter takes effect only when the primary instance of the current cluster is SERVERLESS |
| AutoArchiveDelayHours | No | Integer | Archiving processing time after pausing Unit: hour Default value: 12 This parameter takes effect only when the primary instance of the current cluster is SERVERLESS |
| ClusterLevel | No | String | Cluster level, nullable. For example, P0, P1. (This field can be ignored.) |
| CynosVersion | No | String | Kernel minor version number. |
| SyncWay | No | String | Synchronization method. Available values: async, semisync, sync. |
| SemiSyncTimeout | No | Integer | Semi-sync timeout period, in milliseconds. To ensure business stability, semi-sync replication has a degradation logic. When the primary availability zone cluster waits for the standby availability zone cluster to confirm a transaction, if the timeout period is exceeded, the replication method will degrade to asynchronous replication. Value range: [1000, 4294967295] Unit: ms Default value: 10000 |
| Parameter Name | Type | Description |
|---|---|---|
| TranId | String | Frozen transaction ID |
| DealNames | Array of String | Order ID. |
| ResourceIds | Array of String | Resource ID list (this field is no longer maintained. Please use the dealNames field to query the api DescribeResourcesByDealName to obtain resource IDs) |
| ClusterIds | Array of String | Cluster ID list (this field is no longer maintained. Please use the dealNames field to query the DescribeResourcesByDealName API to get the cluster ID) |
| BigDealIds | Array of String | Large order number |
| 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: cynosdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateClusters
<Common request parameters>
{
"Zone": "ap-guangzhou-5",
"VpcId": "0",
"SubnetId": "0",
"DbType": "MYSQL",
"DbVersion": "8.0",
"Cpu": 1,
"Memory": 1,
"InstanceCount": 1
}
{
"Response": {
"BigDealIds": [],
"ClusterIds": [
"cynosdbmysql-********"
],
"DealNames": [
"2026*****************11"
],
"RequestId": "7e55656e-37c6-44fe-9f81-34eafa652820",
"ResourceIds": [
"cynosdbmysql-ins-********"
],
"TranId": "2026061198**5**9*8*****"
}
}
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 |
|---|---|
| FailedOperation.CreateOrder | Failed to create and pay the order. |
| FailedOperation.InsufficientBalance | Insufficient account balance. |
| FailedOperation.OperationFailedError | Operation failed. Try again later. If the issue persists, contact customer service. |
| FailedOperation.QuerySpecBySpecCodeError | Specification information query failed. |
| FailedOperation.TradeCreateOrderError | Failed to create and pay for the order. Try again later. If the issue persists, contact customer service. |
| InternalError.DbOperationFailed | Query database failed. |
| InternalError.GetSubnetFailed | Failed to obtain the subnet. |
| InternalError.GetVpcFailed | Failed to get the VPC. |
| InternalError.InternalHttpServerError | http request execution error. |
| InternalError.UnknownError | Unknown internal error. |
| InvalidParameterValue.DBTypeNotFound | Unsupported instance type. |
| InvalidParameterValue.IllegalPassword | The password does not meet requirements. |
| InvalidParameterValue.InvalidDBVersion | Invalid instance version. |
| InvalidParameterValue.InvalidParameterValueError | Parameter value is invalid. |
| InvalidParameterValue.InvalidSpec | Invalid instance specification. |
| InvalidParameterValue.InvalidZoneIdError | Invalid AZ. |
| InvalidParameterValue.ProjectIdNotFound | ProjectId not found |
| InvalidParameterValue.RegionZoneUnavailable | The selected region and availability zone are unavailable. |
| InvalidParameterValue.SubnetNotFound | Subnet not found. |
| InvalidParameterValue.VpcNotFound | The selected VPC network is not found. |
| LimitExceeded.UserInstanceLimit | Number of user instances exceeds the limit. |
| OperationDenied.CynosdbVersionNotSupportError | Unsupported for instance kernel version {{1}} |
| OperationDenied.DisableNewStorageMultiZoneDeploymentError | Multi-AZ deployment for the new storage architecture is not yet available. |
| OperationDenied.InsufficientBalanceError | Insufficient account balance. |
| OperationDenied.NewStorageOnlySupport80Error | Storage compression is only supported in storage architecture 2.0 for v8.0. |
| OperationDenied.OnlyNewStorageSupportStorageCompressionError | Only storage architecture 2.0 supports the storage compression feature. |
| OperationDenied.UserNotAuthenticatedError | User not verified with real-name authentication. Please proceed with real-name authentication before purchase. |
| UnauthorizedOperation.NotRealNameAccount | Non-verified users are prohibited from purchasing. |
| UnauthorizedOperation.PermissionDenied | CAM authentication failed. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan