Domain name for API request: redis.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.
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 | No | String | Common Params. This parameter is not required for this API. |
InstanceId | Yes | String | The ID of the source instance to be cloned, such as "crs-xjhsdj****". Log in to the Redis console and copy the instance ID in the instance list. |
GoodsNum | Yes | Integer | The number of clone instances at a time - The maximum number of monthly subscribed instances is 100 for each purchase. - The maximum number of pay-as-you-go instances is 30 for each purchase. |
ZoneId | Yes | Integer | ID of the AZ where the clone instance resides. For more information, see Regions and AZs. |
BillingMode | Yes | Integer | Billing mode. Valid values:
|
Period | Yes | Integer | Purchase duration of an instance.
|
SecurityGroupIdList.N | Yes | Array of String | Security group ID, which can be obtained on the Security Group page in the console. |
BackupId | Yes | String | Backup ID of the clone instance, which can be obtained through the DescribeInstanceBackups API. |
NoAuth | No | Boolean | Whether the clone instance supports password-free access. Valid values:
|
VpcId | No | String | The VPC ID of the clone instance. If this parameter is not passed in, the classic network will be selected by default. |
SubnetId | No | String | The VPC subnet ID to which the clone instance belongs, which is not required for the classic network. |
InstanceName | No | String | Name of the clone instance. Enter up to 60 letters, digits, hyphens, and underscores. |
Password | No | String | The access password of the clone instance.
|
AutoRenew | No | Integer | The auto-renewal flag. Valid values
|
VPort | No | Integer | Customized port. Valid range: 1024-65535. Default value: 6379 . |
NodeSet.N | No | Array of RedisNodeInfo | Node information of an instance.
|
ProjectId | No | Integer | Project ID. Log in to the Redis console, and find the project ID in Account Center > Project Management in the top-right corner. |
ResourceTags.N | No | Array of ResourceTag | Tag to be bound for the clone instance |
TemplateId | No | String | The parameter template ID associated with the clone instance - If this parameter is not configured, the system will automatically adapt the corresponding default template based on the selected compatible version and architecture. - You can query the parameter template list of the instance to get the template ID through the DescribeParamTemplates API. |
AlarmPolicyList.N | No | Array of String | The alarm policy ID of the instance to be cloned. Log in to the Tencent Cloud Observable Platform console, and get the policy ID in Alarm Management > Policy Management. |
Parameter Name | Type | Description |
---|---|---|
DealId | String | Request task ID |
InstanceIds | Array of String | Clone instance 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. |
This example shows you how to clone an instance.
POST / HTTP/1.1
Host: redis.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CloneInstances
<Common request parameters>
{
"InstanceId": "abc",
"GoodsNum": 1,
"NoAuth": true,
"VpcId": "abc",
"SubnetId": "abc",
"ZoneId": 1,
"InstanceName": "abc",
"BillingMode": 0,
"Period": 1,
"Password": "abc",
"AutoRenew": 1,
"SecurityGroupIdList": [
"abc"
],
"VPort": 1,
"BackupId": "abc",
"NodeSet": [
{
"NodeId": 0,
"NodeType": 0,
"ZoneId": 1,
"ZoneName": "abc"
}
],
"ProjectId": 0,
"ResourceTags": [
{
"TagKey": "abc",
"TagValue": "abc"
}
],
"TemplateId": "abc",
"AlarmPolicyList": [
"abc"
]
}
{
"Response": {
"RequestId": "2a836c00-175f-11eb-aeb3-db134c8d8fec",
"InstanceIds": [
"crs-kic3****"
],
"DealId": "22716"
}
}
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.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. |
この記事はお役に立ちましたか?