tencent cloud

TDSQL-C MySQL 版

动态与公告
产品动态
产品公告
新手指引
产品简介
产品概述
产品优势
应用场景
产品架构
产品规格
实例类型
产品功能列表
数据库版本
地域和可用区
常用概念
使用限制
使用规范建议
自研内核
内核概述
内核版本更新动态
内核优化版本
功能类特性
性能类特性
安全类特性
稳定性特性
分析引擎特性
内核问题检查与修复
购买指南
计费概述
产品价格
创建集群
变配说明
续费说明
欠费说明
退费说明
按量转包年包月
按量转 Serverless
增值服务计费说明
查看费用账单
快速入门
数据库审计
简介
查看审计实例列表
开通审计服务
查看审计日志
日志投递
配置事后告警
修改审计规则
修改审计服务
关闭审计服务
审计规则模板
查看审计任务
授权子用户使用数据库审计
Serverless 服务
Serverless 简介
创建和管理 Serverless 版集群
弹性管理工具
Serverless 资源包
多可用区部署
配置变更
常见问题
Serverless 成本预估器
操作指南
操作总览
控制台切换集群页面视图
数据库连接
实例管理
配置变更
实例形态管理
集群管理
只读实例管理
数据库代理
账号管理
数据库管理
数据库管理工具(DMC)
参数配置
多可用区部署
全球数据库
备份与恢复
操作日志
迁移数据
并行查询
列存索引 CSI
分析引擎
数据库安全和加密
监控与告警
SQL 基本操作
使用 SCF 连接 TDSQL-C MySQL 版
标签
实践教程
TDSQL-C MySQL 版数据库审计等保实践
通过 DTS 升级数据库版本 MySQL5.7至8.0
TDSQL-C MySQL 版使用规范
新版本控制台
数据库代理多连接地址实现多 RO 组
数据库代理的优势
如何选择存储空间计费模式
通过 DTS 构建异地灾备
为集群创建 VPC
如何进行数据恢复
如何解决 CPU 使用率高的问题
如何授权子用户查看监控
白皮书
安全白皮书
性能白皮书
故障处理
连接相关
性能相关
API 文档
History
Introduction
API Category
Making API Requests
Instance APIs
Multi-Availability Zone APIs
Other APIs
Audit APIs
Database Proxy APIs
Backup and Recovery APIs
Parameter Management APIs
Billing APIs
serverless APIs
Resource Package APIs
Account APIs
Performance Analysis APIs
Data Types
Error Codes
常见问题
基础概念
购买与计费
兼容与格式
连接与网络
功能特性
控制台操作
数据库表
性能与日志
数据库审计
TDSQL-C MySQL 版和云数据库 MySQL 有什么区别
相关协议
服务等级协议
服务条款
TDSQL-C 政策
隐私政策
数据处理和安全协议
通用参考
标准与认证
词汇表
联系我们

CreateClusters

PDF
聚焦模式
字号
最后更新时间: 2026-03-19 17:35:17

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 ID
SubnetId Yes String Subnet ID
DbType Yes String Database type. Valid values:
  • MYSQL
  • DbVersion Yes String Database version. Valid values:
  • Valid values for MYSQL: 5.7 and 8.0
  • ProjectId No Integer Project ID.
    Cpu No Integer It is required when DbMode is set to NORMAL or left empty.
    Number of CPU cores of normal instance
    Memory No Integer It is required when DbMode is set to NORMAL or left empty.
    Memory of a non-serverless instance in GB
    InstanceCount No Integer Instance count. valid values: a quantity range from 0 to 16. the default value is 2 (that is, one rw instance + one ro instance). the transmitted n represents 1 rw instance + (n - 1) ro instances (with identical specifications). if a more precise cluster composition collocation is required, please use InstanceInitInfos.
    Storage No Integer This parameter has been deprecated.
    Storage capacity in GB
    ClusterName No String Cluster name, which can contain less than 64 letters, digits, or symbols (-_.).
    AdminPassword No String Account password, which must contain 8-64 characters in at least three of the following four types: uppercase letters, lowercase letters, digits, and symbols (~!@#$%^&*_-+=`
    Port No Integer Port. Valid range: [0, 65535). Default value: 3306
    PayMode No Integer Billing mode. supported values: 0 and 1. default value: 0.
    Value is 0, indicating pay-as-you-go billing.
    Value is 1, which means yearly/monthly subscription.
    Count No Integer Number of purchased clusters. Valid range: [1,50]. Default value: 1
    RollbackStrategy No String Rollback type:
    noneRollback: no rollback;
    snapRollback: rollback by snapshot;
    timeRollback: rollback by time point
    RollbackId No Integer snapshotId for snapshot rollback or queryId for time point rollback. 0 indicates to determine whether the time point is valid
    OriginalClusterId No String The source cluster ID passed in during rollback to find the source poolId
    ExpectTime No String Specified time for time point rollback or snapshot time for snapshot rollback
    ExpectTimeThresh No Integer This parameter has been deprecated.
    Specified allowed time range for time point rollback
    StorageLimit No Integer Storage upper limit of normal instance in GB
    If DbType is MYSQL and the storage billing mode is yearly/monthly subscription, the parameter value can't exceed the maximum storage corresponding to the CPU and memory specifications.
    TimeSpan No Integer Purchase duration of yearly/monthly subscription plan
    TimeUnit No String Duration unit of yearly/monthly subscription. Valid values: s, d, m, y
    AutoRenewFlag No Integer Specifies whether the annual/yearly/monthly subscription is auto-renewed. the default value is 0.
    0 indicates the default renewal method. 1 means auto-renewal. 2 means no auto-renewal.
    AutoVoucher No Integer Whether to automatically select a voucher. 1: yes; 0: no. Default value: 0
    HaCount No Integer Number of instances (this parameter has been disused and is retained only for compatibility with existing instances)
    OrderSource No String Order source
    ResourceTags.N No Array of Tag Array of tags to be bound to the created cluster
    DbMode No String Database type
    Valid values when DbType is MYSQL (default value: NORMAL):
  • NORMAL
  • SERVERLESS
  • MinCpu No Float This parameter is required if DbMode is SERVERLESS.
    Minimum number of CPU cores. For the value range, see the returned result of DescribeServerlessInstanceSpecs.
    MaxCpu No Float This parameter is required if DbMode is SERVERLESS.
    Maximum number of CPU cores. For the value range, see the returned result of DescribeServerlessInstanceSpecs.
    AutoPause No String This parameter specifies whether the cluster will be automatically paused if DbMode is SERVERLESS. Valid values:
  • yes
  • no

  • Default value: yes
    AutoPauseDelay No Integer This parameter specifies the delay for automatic cluster pause in seconds if DbMode is SERVERLESS. Value range: [600,691200]
    Default value: 600
    StoragePayMode No Integer The billing mode of cluster storage. Valid values: 0 (pay-as-you-go), 1 (yearly/monthly subscription). Default value: 0.
    If DbType is MYSQL and the billing mode of cluster compute is pay-as-you-go (or the DbMode is SERVERLESS), the billing mode of cluster storage must be pay-as-you-go.
    Clusters with storage billed in yearly/monthly subscription can't be cloned or rolled back.
    SecurityGroupIds.N No Array of String Array of security group IDs
    AlarmPolicyIds.N No Array of String Array of alarm policy IDs
    ClusterParams.N No Array of ParamItem Array of parameters. Valid values: character_set_server (utf8/latin1/gbk/utf8mb4), lower_case_table_names. 0: case-sensitive; 1: case-insensitive).
    DealMode No Integer Transaction mode. Valid values: 0 (place and pay for an order), 1 (place an order)
    ParamTemplateId No Integer Parameter template ID, which can be obtained by querying parameter template information "DescribeParamTemplates"
    SlaveZone No String Multi-AZ address
    InstanceInitInfos.N No Array of InstanceInitInfo Instance initialization configuration information, which is used to select instances with different specifications when purchasing a cluster.
    GdnId No String Global database unique identifier.
    ProxyConfig No ProxyConfig Database proxy configuration.
    AutoArchive No String Automatically archive.
    AutoArchiveDelayHours No Integer Archiving processing time after pausing.
    CynosVersion No String Kernel minor version number.

    3. Output Parameters

    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 and the DescribeResourcesByDealName query API to obtain resource ids.).
    ClusterIds Array of String Cluster ID list. this field is no longer maintained. please use the dealNames field and the DescribeResourcesByDealName query API to get the cluster ID.
    BigDealIds Array of String Big 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.

    4. Example

    Example1 Purchase a New Cluster

    Purchase a new cluster

    Input Example

    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
    }
    

    Output Example

    {
        "Response": {
            "ResourceIds": [
                "cynosdbmysql-ins-67rmucgk"
            ],
            "RequestId": "132075",
            "TranId": "20190522160000003106844584180998",
            "ClusterIds": [
                "cynosdbmysql-sls-9nts65r2"
            ],
            "BigDealIds": [
                "142759"
            ],
            "DealNames": [
                "20190522112283"
            ]
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.DisableNewStorageMultiZoneDeploymentError
    OperationDenied.InsufficientBalanceError Insufficient account balance.
    OperationDenied.NewStorageOnlySupport80Error
    OperationDenied.OnlyNewStorageSupportStorageCompressionError
    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.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈