Domain name for API request: redis.intl.tencentcloudapi.com.
This API is used to create an TencentDB or Redis instance.
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: CreateInstances. |
| 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. |
| TypeId | Yes | Integer | Instance type.
|
| MemSize | Yes | Integer | Memory capacity, measured in MB, must be a multiple of 1024. For specific specifications, query the sales specifications for all regions via the DescribeProductInfo API.
|
| GoodsNum | Yes | Integer | Instance count. Number of instances to purchase at a time. For details, query sales specifications in all regions via the DescribeProductInfo API. |
| Period | Yes | Integer | Duration of instance purchase.
|
| BillingMode | Yes | Integer | Billing mode.
|
| ZoneId | No | Integer | ID of the AZ to which the instance belongs. See Regions and AZs. |
| Password | No | String | Password for accessing instances.
|
| VpcId | No | String | VPC ID. If you do not configure this parameter, the basic network is selected by default. Log in to the private network console to query the specific ID. |
| SubnetId | No | String | Subnet of the private network VPC. In the basic network, this parameter requires no configuration. Log in to the Private Network console to query the subnet list and obtain the specific ID. |
| ProjectId | No | Integer | Project ID. Log in to the Redis console, select Project Management from the account information menu in the top-right corner, and query the project ID. |
| AutoRenew | No | Integer | Automatic renewal flag.
|
| SecurityGroupIdList.N | No | Array of String | Security group ID array.
|
| VPort | No | Integer | User-defined network port. Defaults to 6379, range [1024,65535]. |
| RedisShardNum | No | Integer | Number of instance shards.
|
| RedisReplicasNum | No | Integer | Instance replica number.
|
| ReplicasReadonly | No | Boolean | Flag whether the instance needs to support read-only replica.
|
| InstanceName | No | String | Instance name. Naming requirement: It only supports Chinese characters, letters, numbers, hyphens ("-"), or underscores ("_"), with a length of less than 60. |
| NoAuth | No | Boolean | Configure whether the instance supports password-free access.
|
| NodeSet.N | No | Array of RedisNodeInfo | Node information of instance, including node ID, node type, node availability zone ID. For details, please see RedisNodeInfo. |
| ResourceTags.N | No | Array of ResourceTag | Set a tag for the instance. |
| ZoneName | No | String | Specify the name of the AZ to which the instance belongs. For details, see Regions and AZs. |
| TemplateId | No | String | Parameter template ID of the specified instance.
|
| DryRun | No | Boolean | Internal parameter to identify whether creating an instance needs to check.
|
| ProductVersion | No | String | Indicates the instance deployment mode.
|
| RedisClusterId | No | String | Dedicated cluster ID.
|
| AlarmPolicyList.N | No | Array of String | Alarm policy ID array.
|
| EncryptPassword | No | Boolean | Whether to enable password encryption for transmission.
|
| PasswordPolicy | No | PasswordPolicy | Instance-level password complexity policy. When not passed in or Enabled=false, deem as not enabling policy, validate by system default rule. |
| EnableSSL | No | Boolean | Whether to enable SSL encryption.
|
| SSLBindPrivateIPv4 | No | Boolean | Whether to write the private IPv4 address of an instance to the domain alias (SAN) of the certificate when SSL is enabled. This parameter is valid only when EnableSSL is true.
|
| ConnectionMode | No | Integer | Instance connectivity access Mode.
|
| Parameter Name | Type | Description |
|---|---|---|
| InstanceIds | Array of String | Instance ID. |
| 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. |
POST / HTTP/1.1
Host: redis.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInstances
<Common request parameters>
{
"TypeId": 18,
"MemSize": 1024,
"GoodsNum": 1,
"Period": 1,
"BillingMode": 0,
"ZoneId": 100002,
"Password": "******MyP*ssword",
"VpcId": "vpc-pxyz****",
"SubnetId": "subnet-26qr****",
"RedisShardNum": 3,
"RedisReplicasNum": 1,
"NodeSet": [
{
"NodeId": 675,
"NodeType": 0,
"ZoneId": 100002,
"ZoneName": "ap-guangzhou-2"
},
{
"NodeId": 676,
"NodeType": 1,
"ZoneId": 100003,
"ZoneName": "ap-guangzhou-3"
}
],
"ResourceTags": [
{
"TagKey": null,
"TagValue": null
}
],
"DryRun": false,
"ConnectionMode": 1
}
{
"Response": {
"DealId": "20250825297021530591847",
"RequestId": "e546784b-709c-401d-aba6-73037eb4e522",
"InstanceIds": [
"crs-bzss****"
]
}
}
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.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.SpecNotExist | The instance specification doesn’t exist. |
| 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.PeriodExceedMaxLimit | The requested length of purchase is more than three years and exceeds the maximum value. |
| LimitExceeded.PeriodLessThanMinLimit | The length of purchase is invalid. It must be at least one month. |
| 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.NoTypeIdRedisService | The requested region currently does not provide the requested type of 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. |
フィードバック