Creates a persistent memory-optimized or storage-optimized instance of ApsaraDB for Redis Enhanced Edition (Tair) that uses cloud disks.
For more information about instance selection, see Select ApsaraDB for Redis instances.
Before you call this operation, make sure that you understand the billing methods and pricing of ApsaraDB for Redis.
- For more information about how to create a persistent memory-optimized or storage-optimized instance of ApsaraDB for Redis Enhanced Edition (Tair) that uses cloud disks in the ApsaraDB for Redis console, see Step 1: Create an ApsaraDB for Redis instance.
- If you want to create other types of instances, such as ApsaraDB for Redis Community Edition instances or performance-enhanced instances of ApsaraDB for Redis Enhanced Edition (Tair),you can call the CreateInstance operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateTairInstance |
The operation that you want to perform. Set the value to CreateTairInstance. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the region ID of the instance. |
InstanceName | String | No | apitest |
The name of the instance. The name must meet the following requirements:
|
Password | String | No | Pass!123456 |
The password used to connect to the instance. The password must meet the following requirements:
|
InstanceClass | String | Yes | tair.scm.standard.4m.32d |
The type of the instance. For more information, see the following topics: |
ZoneId | String | Yes | cn-hangzhou-e |
The primary zone ID of the instance. You can call the DescribeRegions operation to query the primary zone ID of the instance. Note If you want to create an instance that adopts the zone-disaster recovery architecture,
you can deploy the master node and replica node of the instance in different zones
within the same region. You can set the SecondaryZoneId parameter to specify the secondary zone. In this case, do not set the ZoneId parameter
to multiple zone IDs.
|
ChargeType | String | No | PrePaid |
The billing method of the instance. Set the value to PrePaid. This value indicates subscription. |
VpcId | String | Yes | vpc-bp1nme44gek34slfc**** |
The ID of the virtual private cloud (VPC). You can call the DescribeVpcs operation to query the ID of the VPC. |
VSwitchId | String | Yes | vsw-bp1e7clcw529l773d**** |
The ID of the vSwitch that belongs to the VPC. You can call the DescribeVpcs operation to query the ID of the vSwitch. |
Period | Integer | No | 1 |
The subscription duration. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. Unit: months. Note This parameter is required only if you set the ChargeType parameter to PrePaid.
|
BusinessInfo | String | No | 000000000 |
The ID of the promotion event or the business information. |
CouponNo | String | No | youhuiquan_promotion_option_id_for_blank |
The coupon code. |
SrcDBInstanceId | String | No | r-bp1zxszhcgatnx**** |
The ID of the source instance. Note To create an instance based on the backup set of an existing instance, set this parameter
to the ID of the source instance and the BackupId parameter to the backup set that you want to use.
|
BackupId | String | No | 11111111 |
The ID of the backup set of the source instance. You can call the DescribeBackups operation to query the ID of the backup set. Note If you want to create an instance based on the backup set of an existing instance,
you must set this parameter after you set the SrcDBInstanceId parameter. The system creates an instance based on the backup set that is specified
by this parameter.
|
PrivateIpAddress | String | No | 172.16.88.*** |
The private IP address of the instance. Note The IP address must be within the CIDR block of the vSwitch to which the instance
belongs. You can call the DescribeVSwitches operation of the VPC API to query the CIDR block information.
|
AutoUseCoupon | String | No | true |
Specifies whether to use a coupon. Valid values:
|
AutoRenew | String | No | true |
Specifies whether to enable auto-renewal. Valid values:
|
AutoRenewPeriod | String | No | 3 |
The auto-renewal period. Unit: months. Valid values: 1, 2, 3, 6, and 12. Note This parameter is required if the AutoRenew parameter is set to true.
|
ResourceGroupId | String | No | rg-acfmyiu4ekp**** |
The ID of the resource group. Note
|
AutoPay | Boolean | No | true |
Specifies whether to enable automatic payment. Set the value to true. |
ClientToken | String | No | ETnLKlblzczshOTUbOCz**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token is case-sensitive. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
StorageType | String | No | essd_pl1 |
The storage type. Set the value to essd_pl1. Note This parameter is valid only if the InstanceType parameter is set to tair_essd.
|
Storage | Integer | No | 60 |
The storage space of the cloud disk. Valid values vary with specifications. For more information, see Storage-optimized instances. Note This parameter is valid and required only if the InstanceType parameter is set to tair_essd.
|
ShardType | String | No | MASTER_SLAVE |
The node type of the instance. Set the value to MASTER_SLAVE. This value indicates that the instance uses the master-replica architecture to ensure service availability. |
ShardCount | Integer | No | 1 |
The number of data nodes in the instance. Valid values:
Note Only persistent memory-optimized instances can use the cluster architecture. Therefore,
you can set this parameter to an integer from 2 to 32 only if you set the InstanceType parameter to tair_scm.
|
EngineVersion | String | No | 1.0 |
The database engine version of the instance. Default value: 1.0. V1.0 is developed by Alibaba Cloud and compatible with Redis 5.0. |
InstanceType | String | Yes | tair_scm |
The series type of the instance. Valid values:
|
SecondaryZoneId | String | No | cn-hangzhou-h |
The ID of the secondary zone. You can call the DescribeRegions operation to query the ID of the secondary zone. Note
|
GlobalInstanceId | String | No | gr-bp14rkqrhac**** |
The ID of the distributed instance to which the instance belongs. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
QPS | Long | 100000 |
The maximum number of read and write operations that can be processed by the instance per second. The value is a theoretical value. |
ConnectionDomain | String | r-bp13ac3d047b****.tairpena.rds.aliyuncs.com |
The internal endpoint of the instance. |
ChargeType | String | PrePaid |
The billing method of the instance. The return value is PrePaid, which indicates subscription. |
InstanceId | String | r-bp13ac3d047b**** |
The ID of the instance. |
Port | Integer | 6379 |
The port number of the instance. |
Config | String | {\"EvictionPolicy\":\"volatile-lru\",\"hash-max-ziplist-entries\":512,\"zset-max-ziplist-entries\":128,\"list-max-ziplist-entries\":512,\"list-max-ziplist-value\":64,\"zset-max-ziplist-value\":64,\"set-max-intset-entries\":512,\"hash-max-ziplist-value\":64} |
The detailed configurations of the instance. The value is a JSON string. For more information about parameter description, see Modify the parameters of an ApsaraDB for Redis instance. |
RegionId | String | cn-hangzhou |
The region ID of the instance. |
RequestId | String | 12123216-4B00-4378-BE4B-08005BFC**** |
The ID of the request. |
Bandwidth | Long | 96 |
The maximum bandwidth of the instance. Unit: MB/s. |
Connections | Long | 10000 |
The maximum number of connections supported by the instance. |
InstanceName | String | redistest |
The name of the instance. Note This parameter is returned only if the InstanceName parameter is set in the request.
|
ZoneId | String | cn-hangzhou-h |
The zone ID of the instance. |
InstanceStatus | String | Creating |
The state of the instance. The return value is Creating. |
TaskId | String | 10**** |
The ID of the task. |
Examples
Sample requests
http(s)://r-kvstore.aliyuncs.com/?Action=CreateTairInstance
&InstanceClass=tair.scm.standard.4m.32d
&InstanceType=tair_scm
&RegionId=cn-hangzhou
&VpcId=vpc-bp1nme44gek34slfc****
&VSwitchId=vsw-bp1e7clcw529l773d****
&ZoneId=cn-hangzhou-e
&Period=1
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateTairInstanceResponse>
<Connections>10000</Connections>
<TaskId>10****</TaskId>
<RequestId>F371C892-2143-4640-810E-74553F37****</RequestId>
<ZoneId>cn-hangzhou-h</ZoneId>
<InstanceId>r-bp13ac3d047b****</InstanceId>
<Config>{"EvictionPolicy":"volatile-lru","hash-max-ziplist-entries":512,"zset-max-ziplist-entries":128,"list-max-ziplist-entries":512,"list-max-ziplist-value":64,"zset-max-ziplist-value":64,"set-max-intset-entries":512,"hash-max-ziplist-value":64}</Config>
<Port>6379</Port>
<InstanceName>redistest</InstanceName>
<ConnectionDomain>r-bp13ac3d047b****.tairpena.rds.aliyuncs.com</ConnectionDomain>
<QPS>100000</QPS>
<InstanceStatus>Creating</InstanceStatus>
<ChargeType>PrePaid</ChargeType>
<Bandwidth>96</Bandwidth>
<RegionId>cn-hangzhou</RegionId>
</CreateTairInstanceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Connections" : 10000,
"TaskId" : "10****",
"RequestId" : "F371C892-2143-4640-810E-74553F37****",
"ZoneId" : "cn-hangzhou-h",
"InstanceId" : "r-bp13ac3d047b****",
"Config" : "{\"EvictionPolicy\":\"volatile-lru\",\"hash-max-ziplist-entries\":512,\"zset-max-ziplist-entries\":128,\"list-max-ziplist-entries\":512,\"list-max-ziplist-value\":64,\"zset-max-ziplist-value\":64,\"set-max-intset-entries\":512,\"hash-max-ziplist-value\":64}",
"Port" : 6379,
"InstanceName" : "redistest",
"ConnectionDomain" : "r-bp13ac3d047b****.tairpena.rds.aliyuncs.com",
"QPS" : 100000,
"InstanceStatus" : "Creating",
"ChargeType" : "PrePaid",
"Bandwidth" : 96,
"RegionId" : "cn-hangzhou"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InsufficientBalance | Your account does not have enough balance. | The error message returned because you do not have sufficient balance within your Alibaba Cloud account. Add funds to your Alibaba Cloud account and try again. |
400 | QuotaExceed.AfterpayInstance | Living afterpay instances quota exceeded. | The error message returned because the maximum number of instances has been reached. |
400 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | The error message returned because the specified capacity is invalid. |
400 | ResourceNotAvailable | Resource you requested is not available for finance user. | The error message returned because the requested resource is unavailable to users of Alibaba Finance Cloud. |
400 | PaymentMethodNotFound | No payment method has been registered on the account. | The error message returned because no payment method is specified for your account. |
400 | IdempotentParameterMismatch | Request uses a client token in a previous request but is not identical to that request. | The error message returned because the current request uses a token that has been used in an earlier request but the two requests are not identical. |
400 | QuotaNotEnough | Quota not enough in this zone. | The error message returned because the maximum number of instances for this zone has been reached. |
400 | QuotaExceed | Living afterpay instances quota exceed. | The error message returned because the maximum number of instances has been reached. |
400 | IzNotSupportVpcError | Specify iz not support vpc. | The error message returned because the specified zone does not support this operation. |
403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | The error message returned because your Alibaba Cloud account has not passed real-name verification. |
For a list of error codes, visit the API Error Center.