Domain name for API request: cynosdb.intl.tencentcloudapi.com.
This API is used to purchase new clusters.
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 value:
|
| DbVersion | Yes | String | Database version Enumeration value:
|
| ProjectId | No | Integer | project-ID |
| Cpu | No | Integer | Required when DbMode is NORMAL or left blank |
| Memory | No | Integer | Required when DbMode is NORMAL or left blank |
| InstanceCount | No | Integer | Instance count Value ranges from [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 value ranges from uppercase/lowercase letters, digits, special symbols ('-', '_', '.') |
| AdminPassword | No | String | Account (8-64 characters, a combination of uppercase and lowercase letters, digits and symbols ~!@#$%^&*_-+=` |
| Port | No | Integer | Port, default 3306, in the range of [0, 65535) |
| PayMode | No | Integer | Billing mode Enumeration value:
Default value: 0 |
| Count | No | Integer | Number of clusters to purchase. Optional value range: [1,50]. Default is 1. |
| RollbackStrategy | No | String | Rollback type Enumeration value:
|
| RollbackId | No | Integer | Snapshot rollback means snapshotId; point-in-time rollback means queryId. A value of 0 indicates requirement to judge whether the time point is valid. |
| OriginalClusterId | No | String | During rollback, input 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 | Ordinary instance storage cap, in GB |
| TimeSpan | No | Integer | Annual and monthly subscription duration |
| TimeUnit | No | String | Annual and monthly subscription duration unit, ['s', 'd', 'm', 'y'] |
| AutoRenewFlag | No | Integer | Whether Annual/Monthly Subscription is auto-renewed Enumeration value:
Default value: 0 |
| AutoVoucher | No | Integer | Whether to automatically select voucher 1 Yes 0 No Default value: 0 Enumeration value:
Default value: 0 |
| HaCount | No | Integer | Instance count (this parameter is deprecated and only for existing accommodative) |
| OrderSource | No | String | Order source |
| ResourceTags.N | No | Array of Tag | tag Array info that should be bound for cluster creation |
| DbMode | No | String | Db type Enumeration value:
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 | No auto pause Enumeration value:
Default value: yes Take 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 | The storage billing mode of the cluster. 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, temporarily supports character_set_server (utf8 |
| DealMode | No | Integer | Transaction mode Enumeration value:
Default value: 0 |
| ParamTemplateId | No | Integer | Parameter template ID. The parameter template ID can be obtained through querying parameter template information DescribeParamTemplates. |
| SlaveZone | No | String | Multi-AZ address |
| InstanceInitInfos.N | No | Array of InstanceInitInfo | Instance initialization configuration information is mainly used to select different specification instances during cluster purchase. |
| GdnId | No | String | Global database unique ID |
| ProxyConfig | No | ProxyConfig | Database proxy configuration |
| AutoArchive | No | String | Auto archive or not Enumeration value:
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 Measurement 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, optional. Example: P0, P1. (This field can be ignored) |
| CynosVersion | No | String | Kernel minor version |
| 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 and the query API DescribeResourcesByDealName to get the cluster ID) |
| BigDealIds | Array of String | Large Order ID Note: This field may return null, indicating that no valid values can be obtained. |
| 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. |
Purchase a new cluster
POST / HTTP/1.1
Host: cynosdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateClusters
<Common request parameters>
{
"Count": 1,
"StoragePayMode": 0,
"VpcId": "vpc-1ptuei0b",
"Zone": "ap-guangzhou-3",
"AdminPassword": "passwd@admin",
"DbType": "MYSQL",
"ProjectId": 0,
"DbVersion": "10.0",
"Storage": 100,
"PayMode": 0,
"ClusterName": "newInstance",
"StorageLimit": 100,
"RollbackStrategy": "noneRollback",
"Memory": 4,
"SubnetId": "subnet-1tmw9t4o",
"Cpu": 2,
"HaCount": 1
}
{
"Response": {
"ResourceIds": [
"cynosdbmysql-ins-67rmucgk"
],
"RequestId": "132075",
"TranId": "20190522160000003106844584180998",
"ClusterIds": [
"cynosdbmysql-sls-9nts65r2"
],
"BigDealIds": [
"142759"
],
"DealNames": [
"20190522112283"
]
}
}
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 the order and make a payment. |
| FailedOperation.InsufficientBalance | Insufficient account balance |
| FailedOperation.OperationFailedError | Operation failed. Try again later. If the problem persists, contact customer service. |
| FailedOperation.QuerySpecBySpecCodeError | Failed to query specifications. |
| FailedOperation.TradeCreateOrderError | Failed to create the order and make a payment. Please try again later. If the problem persists, please contact customer service. |
| InternalError.DbOperationFailed | Failed to query the database. |
| InternalError.GetSubnetFailed | Failed to get the subnet. |
| InternalError.GetVpcFailed | Failed to get the VPC. |
| InternalError.InternalHttpServerError | An exception occurred while executing the HTTP request. |
| InternalError.UnknownError | Unknown internal error. |
| InvalidParameterValue.DBTypeNotFound | Unsupported instance type. |
| InvalidParameterValue.IllegalPassword | The password does not meet the requirement. |
| InvalidParameterValue.InvalidDBVersion | Invalid instance version. |
| InvalidParameterValue.InvalidParameterValueError | Invalid parameter value. |
| InvalidParameterValue.InvalidSpec | Invalid instance specification. |
| InvalidParameterValue.InvalidZoneIdError | Invalid AZ |
| InvalidParameterValue.ProjectIdNotFound | The ProjectId was not found. |
| InvalidParameterValue.RegionZoneUnavailable | The selected region and AZ are unavailable. |
| InvalidParameterValue.SubnetNotFound | The selected subnet could not be found. |
| InvalidParameterValue.VpcNotFound | The selected VPC could not be found. |
| LimitExceeded.UserInstanceLimit | The number of instances exceeds the limit. |
| OperationDenied.CynosdbVersionNotSupportError | Kernel version not supported for the instance |
| OperationDenied.DisableNewStorageMultiZoneDeploymentError | Multi-AZ deployment functionality for the new storage architecture is not yet available. |
| OperationDenied.InsufficientBalanceError | Insufficient account balance. |
| OperationDenied.NewStorageOnlySupport80Error | New storage architecture 2.0 only supports 8.0 |
| OperationDenied.OnlyNewStorageSupportStorageCompressionError | Only Storage Architecture 2.0 supports the compression feature |
| OperationDenied.UserNotAuthenticatedError | You need to verify your identity to make a purchase. |
| UnauthorizedOperation.NotRealNameAccount | Users who haven't completed identity verification can’t make purchases. |
| UnauthorizedOperation.PermissionDenied | CAM authentication failed. |
文档反馈