tencent cloud

Tencent Cloud Distributed Cache (Redis OSS-Compatible)

CloneInstances

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-08-14 16:53:18

1. API Description

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

This API is used to clone a complete new instance based on the current instance backup file.

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: CloneInstances.
Version Yes String Common Params. The value used for this API: 2018-04-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String

Specify the source instance ID to be cloned. Example: crs-xjhsdj****. Log in to the Redis console and copy the instance ID from the instance list.

GoodsNum Yes Integer

The number of clone instances per operation.

  • The maximum allowed number for each Monthly Subscription purchase is 100.
  • The maximum allowed number for each Pay-As-You-Go purchase is 30.
ZoneId Yes Integer

Availability zone ID of the cloned instance. For supported AZ IDs, see Regions and Availability Zones.

BillingMode Yes Integer

Payment method.

  • 0: Pay-As-You-Go.
  • 1: Monthly Subscription.

Period Yes Integer

Instance Purchase Duration.

  • Unit: month.
  • When the payment method is set to Monthly Subscription, the value range is [1,2,3,4,5,6,7,8,9,10,11,12,24,36,48,60].
  • When the payment method is set to Pay-As-You-Go, it is set to 1.

SecurityGroupIdList.N Yes Array of String

Security group ID. Call the DescribeInstanceSecurityGroup API to obtain the security group ID for the instance.

BackupId Yes String

Backup ID used to clone an instance. Use the interface DescribeInstanceBackups to obtain the backup ID.

NoAuth No Boolean

Configure whether the cloned instance supports password-free access. Enabling SSL or public network does not support password-free access.

  • true: Password-free instance,
  • false: Non-password-free instance. Default for non-passwordless instance.

VpcId No String

Configure the VPC ID for the clone instance. If not configured, the basic network is selected by default.

SubnetId No String

Configure the subnet of the private network for the cloned instance. This parameter requires no configuration for the basic network.

InstanceName No String

Name of the cloned instance.
Only Chinese characters, English letters, numbers, dashes ("-"), or underscores ("_") are allowed, with a length of less than 60.

Password No String

The access password of the clone instance.

  • When the input parameter NoAuth is true, setting this parameter is optional.
  • For Redis 2.8, 4.0, and 5.0 instances, the password format is: 8-30 characters, containing at least lowercase letters, uppercase letters, digits, and 2 types of characters from ()`~!@#$%^&*-+=_|{}[]:;<>,.?/, and cannot start with "/".
  • For CKV 3.2 instances, the password format is: 8-30 characters, must include letters and digits, and exclude other characters.

AutoRenew No Integer

Automatic renewal flag.

  • 0: default status, manual renewal.
  • 1: automatic renewal.
  • 2: no automatic renewal, auto-isolation upon expiration.

VPort No Integer

User-defined port, defaults to 6379, in the range of [1024,65535].

NodeSet.N No Array of RedisNodeInfo

Node information of instance.

  • Currently supports configuring node type (primary node or replica node) and its availability zone info. For details, please refer to RedisNodeInfo.
  • This parameter can be left blank for single-AZ deployment.

ProjectId No Integer

Project ID. Log in to the Redis console. You can find the project ID in the Account Center > Project Management at the top-right corner.

ResourceTags.N No Array of ResourceTag

Tag bound to the clone instance.

TemplateId No String

Specify the parameter template ID related to the cloned instance.

  • If this parameter is not configured, the system will automatically adapt the corresponding default template based on the selected compatible version and architecture.
  • Query the parameter template list of the instance through the DescribeParamTemplates API to obtain the template ID number.
AlarmPolicyList.N No Array of String

Specify the alarm policy ID of the clone instance. Log in to the Tencent Cloud observability platform console, and get policy ID information on the alarm management > policy management page.

CloneTime No String

Clone the time when data is recovered.
Only instances with second-level backup enabled are supported.

EncryptPassword No Boolean

Whether to encrypt the password

PasswordPolicy No PasswordPolicy

Instance password complexity policy

Input parameter limit: If not passed or Enabled=false, deem as not enabled and verify by default rule.

EnableSSL No Boolean

Whether to enable SSL encryption.

Enumeration value:

  • true: Enable.
  • false: Disable (default value).

Default value: false

SSLBindPrivateIPv4 No Boolean

Whether to write the private IPv4 address of the instance to the domain alias (SAN) of the certificate when SSL is enabled. This parameter is valid only when EnableSSL is true.

Enumeration value:

  • true: The private IP is allowed for SSL certificate verification.
  • false: The SAN extended information of the certificate is not added.

Default value: false

ProductVersion No String

Indicates the instance type.

Enumeration value:

  • local: Common I
  • localv2: Common II

If not passed, it remains the same as the original instance type by default.

3. Output Parameters

Parameter Name Type Description
InstanceIds Array of String

ID of the clone instance.

DealName String

Order 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 Example

Input Example

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

{
    "InstanceId": "crs-qbhudciv",
    "GoodsNum": 1,
    "ZoneId": 10002,
    "BillingMode": 0,
    "Period": 1,
    "SecurityGroupIdList": [
        "sg-bmadczm1"
    ],
    "BackupId": "154572601-1165734322-153705740",
    "VpcId": "vpc-bmadczcc",
    "SubnetId": "subnet-bmadczcc"
}

Output Example

{
    "Response": {
        "DealId": "20250825297021530591847",
        "DealName": "20260407296022526727811",
        "InstanceIds": [
            "crs-lqz7y86j"
        ],
        "RequestId": "b841398d-94ea-42a1-ac2c-663853bcf5f9"
    }
}

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.PayFailed Payment failed.
FailedOperation.SystemError Internal system error, which is irrelevant to the business.
FailedOperation.Unknown Invalid data is entered for weekday.
InternalError.InternalError Internal error.
InvalidParameter.EmptyParam The parameter is empty.
InvalidParameter.OnlyVPCOnSpecZoneId Only VPCs are provided in the Shanghai Finance AZ.
InvalidParameter.PermissionDenied The API has no CAM permissions.
InvalidParameterValue.BaseNetWorkAccessDeny The instance is not in a VPC.
InvalidParameterValue.CheckNotPass Business verification failed
InvalidParameterValue.InvalidInstanceTypeId The type of instances requested for purchase is incorrect (TypeId - 1: Cluster Edition; 2: Master-Replica Edition, i.e., the legacy Master-Replica Edition).
InvalidParameterValue.InvalidSubnetId The vpcid or subnet ID in the VPC is invalid.
InvalidParameterValue.PasswordEmpty The password is empty.
InvalidParameterValue.PasswordFreeDenied Tencent internal accounts are not allowed to use password-free instances.
InvalidParameterValue.PasswordRuleError When the password is set, the old password passed in by MC does not match the previously set password.
InvalidParameterValue.SecurityGroupIdsNotExists The request parameter or security group ID is incorrect.
InvalidParameterValue.UnVpcIdNotExists The uniqVpcId or subnet ID in the VPC is invalid.
LimitExceeded The quota limit has been reached.
LimitExceeded.InvalidMemSize The requested capacity is out of the purchasable specification range (memSize should be an integer multiple of 1,024 in MB).
LimitExceeded.InvalidParameterGoodsNumNotInRange The number of instances requested for purchase at a time is out of the purchasable quantity range.
LimitExceeded.PeriodLessThanMinLimit The length of purchase is invalid. It must be at least one month.
LimitExceeded.ReachTheAmountLimit The quantity of requested TencentDB for Redis instances falls out of the limit range.
ResourceInsufficient The resource is insufficient.
ResourceNotFound.AccountDoesNotExists The UIN value is empty.
ResourceNotFound.InstanceNotExists No Redis instance is found by the serialId.
ResourceUnavailable.InstanceDeleted The instance has already been repossessed.
ResourceUnavailable.NoEnoughVipInVPC The IP resources in the VPC are insufficient.
ResourceUnavailable.NoRedisService The requested region currently does not provide the Redis service.
ResourceUnavailable.NoServiceAvailableForThisZoneId The requested zoneId doesn’t provide Redis service.
ResourceUnavailable.SaleOut Resources of the specified type in the region are sold out.
UnauthorizedOperation.NoCAMAuthed No CAM permissions.
UnauthorizedOperation.UserNotInWhiteList The user is not in the allowlist.
UnsupportedOperation The operation is not supported.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック