tencent cloud

APIs

CreateCloneInstance

Download
Focus Mode
Font Size
Last updated: 2026-06-01 17:01:52

1. API Description

Domain name for API request: cdb.intl.tencentcloudapi.com.

This API is used to create a clone instance from the source instance. You can specify a physical backup file or a rollback time point for the clone 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: CreateCloneInstance.
Version Yes String Common Params. The value used for this API: 2017-03-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String

Clone source instance ID, which can be obtained through the DescribeDBInstances API.

SpecifiedRollbackTime No String

If necessary, specify this value when cloning an instance and rolling back to a specified time. The time format is yyyy-mm-dd hh:mm:ss.
Note: This parameter and the SpecifiedBackupId parameter require a choice between the two for configuration.

SpecifiedBackupId No Integer

If necessary to clone an instance and roll back to a designated backup set, specify this value as the Id of the backup file. Please use query data backup file list.

If it is a clone of a two-node, three-node, or four-node instance, the backup file is a physical backup. If it is a clone of a single-node or cloud disk edition instance, the backup file is a snapshot backup.

UniqVpcId No String

VPC ID. Please use Querying VPC List.

UniqSubnetId No String

Subnet ID in the private network. If UniqVpcId is set up, UniqSubnetId is required. Please use query subnet list.

Memory No Integer

Instance memory size, unit: MB, must not be less than the clone source instance. Default is same as the source instance.

Volume No Integer

Instance disk size, unit: GB, must not be less than the clone source instance. Default is same as the source instance.

InstanceName No String

Name of the newly generated clone instance. Support input of up to 60 characters.

SecurityGroup.N No Array of String

Security group parameters. Use the API Query Project Security Group Information to query security group details of a certain project.

ResourceTags.N No Array of TagInfo

Tag information of the instance.

Cpu No Integer

Instance Cpu cores, must not be less than the clone source instance. Default is same as the source instance.

ProtectMode No Integer

Data replication method, defaults to 0. Supported values include: 0 - means async replication, 1 - means semi-sync replication, 2 - means strong sync replication.

DeployMode No Integer

Multiple Availability Zones, defaults to 0. Supported values include: 0 - means single availability zone, 1 - means multi-availability zone.

SlaveZone No String

The AZ information of the newly generated clone instance standby 1 is the same as the source instance Zone by default.

BackupZone No String

AZ information of standby 2, empty by default. Specify this parameter when you clone a strong sync primary instance.

DeviceType No String

Clone instance type. Supported values include: "UNIVERSAL" - general-purpose instance, "EXCLUSIVE" - dedicated instance, "CLOUD_NATIVE_CLUSTER" - standard type for CLOUD disk, "CLOUD_NATIVE_CLUSTER_EXCLUSIVE" - enhanced type for CLOUD disk. If not specified, it defaults to general-purpose instance.

InstanceNodes No Integer

Number of nodes in the new clone instance.

To clone a three-node instance, set this value to 3 or specify the BackupZone parameter. To clone a dual-node instance, set this value to 2. By default, a dual-node instance is cloned. To clone a four-node instance, set this value to 4 or specify the FourthZone parameter.

DeployGroupId No String

Placement group ID.

DryRun No Boolean

Whether to only pre-check this request. true: Send a check request without creating an instance. Check items include required parameters, request format, and service limits. If the check fails, return the corresponding error code; if the check passes, return RequestId. Default false: Send a normal request and create the instance directly after passing the check.

CageId No String

Financial Enclosure ID.

ProjectId No Integer

Project ID. Default project ID 0.

PayType No String

Payment type. Valid values: PRE_PAID (prepaid, also known as yearly/monthly subscription) and USED_PAID (pay-as-you-go). Default billing mode is pay-as-you-go.

Period No Integer

Instance duration, required when PayType is PRE_PAID, measurement unit: month, optional values include [1,2,3,4,5,6,7,8,9,10,11,12,24,36].

ClusterTopology No ClusterTopology

Topology configuration for cloud disk edition nodes.

SrcRegion No String

Original instance region. Required when importing a remote backup, for example: ap-guangzhou

SpecifiedSubBackupId No Integer

Offsite data backup id

Zone No String

The AZ information of the newly generated clone instance's primary database defaults to the same as the source instance's Zone.

FourthZone No String

AZ information of standby 3, empty by default. Specify this parameter when you proceed to purchase a four-node primary instance.

3. Output Parameters

Parameter Name Type Description
AsyncRequestId String

Request ID of the asynchronous task. Use this ID to query the outcome of the async task.

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 Clone an instance and rollback to specified time

Clone an instance and rollback to specified time

Input Example

POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateCloneInstance
<Common request parameters>

{
    "UniqVpcId": "vpc-594gwq4l",
    "InstanceId": "cdb-9303wd4x",
    "Volume": 50,
    "UniqSubnetId": "subnet-dz5pj862",
    "SpecifiedRollbackTime": "2020-08-01 16:27:43",
    "Memory": 1000
}

Output Example

{
    "Response": {
        "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
        "AsyncRequestId": "256117ed-efa08b54-61784d44-91781bbd"
    }
}

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
CdbError Backend or process error.
CdbError.DatabaseError Backend database error.
FailedOperation.StatusConflict Task status conflict.
InternalError.CdbError System error.
InternalError.DfwError Security group operation error.
InternalError.TradeError Transaction system error.
InternalError.UndefinedError Unknown error
InternalError.VpcError VPC or subnet error.
InvalidParameter Parameter error.
InvalidParameter.InstanceNotFound The instance does not exist.
OperationDenied Operation denied.
OperationDenied.OtherOderInProcess There are other orders being submitted. Please try again later.
OperationDenied.UserHasNoStrategy This account is not authorized to access the requested resource.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback