tencent cloud

Feedback

CreateDedicatedClusterDCDBInstance

Last updated: 2024-07-19 14:30:40

    1. API Description

    Domain name for API request: dcdb.tencentcloudapi.com.

    This API is used to create a dedicated TDSQL cluster instance.

    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: CreateDedicatedClusterDCDBInstance.
    Version Yes String Common Params. The value used for this API: 2018-04-11.
    Region No String Common Params. This parameter is not required for this API.
    GoodsNum Yes Integer Number of created instances
    ShardNum Yes Integer Shard count
    ShardMemory Yes Integer Shard memory size in GB
    ShardStorage Yes Integer Shard disk size in GB
    ClusterId Yes String UUID of the dedicated cluster
    Zone No String (Disused) AZ
    ProjectId No Integer Project ID
    Cpu No Integer (Disused) Number of CPU cores
    VpcId No String VPC ID
    SubnetId No String Subnet ID
    ShardMachine No String (Disused) Shard model
    ShardNodeNum No Integer Number of shard nodes
    ShardNodeCpu No Integer (Disused) Number of node CPU cores. Value range: 1-100.
    ShardNodeMemory No Integer (Disused) Node memory size in GB
    ShardNodeStorage No Integer (Disused) Node disk size in GB
    DbVersionId No String Database version
    SecurityGroupId No String Security group ID
    SecurityGroupIds.N No Array of String List of security group IDs
    DcnInstanceId No String DCN source instance ID
    DcnRegion No String Region of DCN source instance
    InstanceName No String Custom instance name
    ResourceTags.N No Array of ResourceTag Tag
    Ipv6Flag No Integer Whether IPv6 flag is supported. Valid values: 1 (yes), 0 (no).
    Pid No Integer (Disused) Pid, which can be queried by the DescribeSpecInfo API.
    InitParams.N No Array of DBParamValue List of parameters. Valid values: character_set_server (character set; required), lower_case_table_names (table name case sensitivity; required; 0: case-sensitive; 1: case-insensitive), innodb_page_size (InnoDB data page; default size: 16 KB), sync_mode (sync mode; 0: async; 1: strong sync; 2: downgradable strong sync. Default value: 2).
    MasterHostId No String Specified UUID for the source node. If left empty, it will be assigned by the system randomly.
    SlaveHostIds.N No Array of String Specified UUID for the replica node. If left empty, it will be assigned by the system randomly.
    RollbackInstanceId No String ID of the source instance to be rolled back
    RollbackTime No String Rollback time
    DcnSyncMode No Integer

    3. Output Parameters

    Parameter Name Type Description
    InstanceIds Array of String Array of assigned resource IDs
    FlowId Integer Flow 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.

    4. Example

    Example1 Creating a dedicated TDSQL cluster instance

    This example shows you how to create a dedicated TDSQL cluster instance.

    Input Example

    POST / HTTP/1.1
    Host: dcdb.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateDedicatedClusterDCDBInstance
    <Common request parameters>
    
    {
        "Zone": "ap-guangzhou-2",
        "ClusterId": "cage-shjr-2-15",
        "GoodsNum": 1,
        "ShardNum": 2,
        "ShardMemory": 2,
        "ShardStorage": 10,
        "Pid": 100
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "14f6980a-7fe1-11ea-b896-525400542aa6",
            "InstanceIds": [
                "tdsql-xxxxxx"
            ],
            "FlowId": 1122
        }
    }
    

    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.TagQuotaExceedLimit Insufficient tags
    InternalError.DbOperationFailed Failed to query the database.
    InternalError.FenceError Failed to query the information of a dedicated cluster.
    InternalError.GetSubnetFailed Failed to query the VPC subnet information.
    InternalError.GetVpcFailed Failed to query the VPC information.
    InternalError.InnerSystemError Internal system error.
    InternalError.OperateDatabaseFailed Database operation failed.
    InvalidParameter.VpcNotFound The specified VPC was not found.
    InvalidParameterValue.IllegalExclusterID The dedicated cluster to which the database instance belongs was not found.
    InvalidParameterValue.IllegalZone The specified AZ was not found.
    InvalidParameterValue.SpecIdIllegal The specification information of the database instance was not found.
    ResourceInsufficient Insufficient resources
    ResourceUnavailable.ExclusterStatusAbnormal Abnormal dedicated cluster status
    UnauthorizedOperation.PermissionDenied You have no permission to manipulate this API or resource.