All Products
Search
Document Center

Tair (Redis® OSS-Compatible):CreateTairInstance

Last Updated:Apr 23, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Creates a Tair (Enterprise Edition) cloud-native instance.

Operation description

For information about instance selection, see Instructions for selecting an appropriate Tair (Redis OSS-compatible) instance.

Before you call this operation, make sure that you understand the billing methods and pricing of Tair (Redis OSS-compatible).

Note

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
kvstore:CreateTairInstancecreate
*DBInstance
acs:kvstore:{#regionId}:{#accountId}:instance/*
  • kvstore:InstanceClass
  • kvstore:InstanceType
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceNamestringNo

The name of the instance. The name must meet the following requirements:

  • The name must be 2 to 80 characters in length.
  • The name must start with a letter and cannot contain spaces or special characters. Special characters include @ / : = " < > { [ ] }
apitest
PasswordstringNo

The password that is used to connect to the instance. The password must meet the following requirements:

  • The password must be 8 to 32 characters in length.
  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! @ # $ % ^ & * ( ) _ + - =
Pass!123456
InstanceClassstringYes

The instance series. For more information, see the following topics:

tair.scm.standard.4m.32d
ZoneIdstringYes

The ID of the primary zone. You can call the DescribeRegions operation to query the most recent zone list.

Note You can also set the SecondaryZoneId parameter to specify the secondary zone. The primary and secondary nodes will then be deployed in the specified primary and secondary zones to implement the master-replica zone-disaster recovery architecture. For example, you can set the ZoneId parameter to cn-hangzhou-h and the SecondaryZoneId parameter to cn-hangzhou-g.
cn-hangzhou-e
SecondaryZoneIdstringNo

The ID of the secondary zone. You can call the DescribeRegions operation to query the ID of the secondary zone.

Note You cannot specify multiple zone IDs or set this parameter to a value that is the same as that of the ZoneId parameter.
cn-hangzhou-h
ChargeTypestringNo

The billing method of the instance. Valid values:

  • PrePaid (default): subscription
  • PostPaid: pay-as-you-go
PrePaid
VpcIdstringYes

The ID of the VPC. You can call the DescribeVpcs operation to query VPC IDs.

vpc-bp1nme44gek34slfc****
VSwitchIdstringYes

The ID of the vSwitch that belongs to the VPC. You can call the DescribeVpcs operation to query vSwitch IDs.

vsw-bp1e7clcw529l773d****
PeriodintegerNo

The subscription duration. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. Unit: month.

Note This parameter is required only if the ChargeType parameter is set to PrePaid.
1
BusinessInfostringNo

The ID of the promotional event or the business information.

000000000
CouponNostringNo

The coupon code.

youhuiquan_promotion_option_id_for_blank
SrcDBInstanceIdstringNo

If you want to create an instance based on the backup set of an existing instance, set this parameter to the ID of the source instance.

Note After you specify the SrcDBInstanceId parameter, use the BackupId, ClusterBackupId (recommended for cloud-native cluster instances), or RestoreTime parameter to specify the backup set or the specific point in time that you want to use to create an instance. The SrcDBInstanceId parameter must be used in combination with one of the preceding three parameters.
r-bp1zxszhcgatnx****
BackupIdstringNo

You can set the BackupId parameter to the backup set ID of the source instance. The system uses the data stored in the backup set to create an instance. You can call the DescribeBackups operation to query the backup set ID. If the source instance is a cluster instance, set the BackupId parameter to the backup set IDs of all shards of the source instance, separated by commas (,). Example: "10**,11**,15**".

Note If your instance is a cloud-native cluster instance, we recommend that you use DescribeClusterBackupList to query the backup set ID of the cluster instance, such as cb-xx. Then, set the ClusterBackupId request parameter to the backup set ID to clone the cluster instance. This eliminates the need to specify the backup set ID of each shard.
11111111
ClusterBackupIdstringNo

This parameter is supported for specific new cluster instances. You can query the backup set ID by calling the DescribeClusterBackupList operation.

  • If this parameter is supported, you can specify the backup set ID. In this case, you do not need to specify the BackupId parameter.
  • If this parameter is not supported, set the BackupId parameter to the IDs of backup sets in all shards of the source instance, separated by commas (,). Example: "2158****20,2158****22".
cb-hyxdof5x9kqb****
RecoverConfigModestringNo

Specifies whether to restore the account, kernel parameter, and whitelist information from the original backup set when you create an instance from the specified backup set. For example, if you want to restore the account information, set the parameter to {"account":true}.

This parameter is empty by default, which indicates that the account, kernel parameter, and whitelist information is not restored from the original backup set.

Note This parameter applies only to cloud-native cluster instances. The account, kernel parameter, and whitelist information must be stored in the original backup set. You can call the DescribeBackups operation to check whether the RecoverConfigMode configurations in the specified backup set contain the preceding information.
{"whitelist":true,"config":true,"account":true}
PrivateIpAddressstringNo

The internal IP address of the instance.

Note The IP address must be within the CIDR block of the vSwitch to which you want the instance to connect. You can call the DescribeVSwitches operation of VPC to query the CIDR block information.
172.16.88.***
AutoUseCouponstringNo

Specifies whether to use a coupon. Valid values:

  • true: uses a coupon.
  • false (default): does not use a coupon.
true
AutoRenewstringNo

Specifies whether to enable auto-renewal for the instance. Valid values:

  • true: enables auto-renewal.
  • false (default): disables auto-renewal.
true
AutoRenewPeriodstringNo

The subscription duration that is supported by auto-renewal. Unit: month. Valid values: 1, 2, 3, 6, and 12.

Note This parameter is required if the AutoRenew parameter is set to true.
3
ResourceGroupIdstringNo

The ID of the resource group that you want to manage.

Note
rg-acfmyiu4ekp****
AutoPaybooleanNo

Specifies whether to enable automatic payment. Set the value to true.

true
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests and is case-sensitive. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCz****
StorageTypestringNo

The storage type. Valid values: essd_pl1, essd_pl2, and essd_pl3.

Note This parameter is required only when you set the InstanceType parameter to tair_essd to create an ESSD-based instance.

Enumerated values:

  • essd_pl0
  • essd_pl1
  • essd_pl2
  • essd_pl3
essd_pl1
StorageintegerNo

The storage capacity of the ESSD/SSD-based instance. The valid values vary based on the instance type. For more information, see ESSD/SSD-based instances.

Note This parameter is required only when you set the InstanceType parameter to tair_essd to create an ESSD-based instance. If you create a Tair SSD-based instance, the Storage parameter is automatically specified based on predefined specifications. You do not need to specify this parameter.
60
ShardTypestringNo

The shard type of the instance. Valid values:

  • MASTER_SLAVE (default): runs in a master-replica architecture that provides high availability.
  • STAND_ALONE: runs in a standalone architecture. If the only node fails, the system creates a new instance and switches the workloads to the new instance. This may cause data loss. You can set the ShardType parameter to this value only if the instance uses the single-zone deployment mode. If you set the ShardType parameter to this value, you cannot create cluster or read/write splitting instances.
MASTER_SLAVE
ShardCountintegerNo

The number of data nodes in the instance. Valid values:

  • 1 (default): You can create a standard instance that contains only one data node.
  • 2 to 32: You can create a cluster instance that contains the specified number of data nodes.
Note When the InstanceType parameter is set to tair_rdb or tair_scm, this parameter can be set to a value in the range of 2 to 32. Only DRAM-based and persistent memory-optimized instances support the cluster architecture.
1
ReplicaCountintegerNo

The number of replica nodes in the primary zone. This parameter applies only to cloud-native multi-replica cluster instances. Valid values: 1 to 4.

Note
  • The sum of the values of this parameter and the SlaveReplicaCount parameter cannot exceed 4.

  • You can specify only one of the ReplicaCount and ReadOnlyCount parameters.

  • Master-replica instances do not support multiple replicas.

2
SlaveReplicaCountintegerNo

The number of replica nodes in the secondary zone when you create a cloud-native multi-replica cluster instance deployed across multiple zones. The sum of the values of this parameter and the ReplicaCount parameter cannot exceed 4.

Note When you create a cloud-native multi-replica cluster instance deployed across multiple zones, you must specify both SlaveReplicaCount and SecondaryZoneId.
2
ReadOnlyCountintegerNo

The number of read replicas in the primary zone. This parameter applies only to cloud-native read/write splitting instances. Valid values: 1 to 9.

Note The sum of the values of this parameter and the SlaveReadOnlyCount parameter cannot exceed 9.
5
SlaveReadOnlyCountintegerNo

The number of read replicas in the secondary zone when you create a multi-zone read/write splitting instance. The sum of the values of this parameter and the ReadOnlyCount parameter cannot exceed 9.

Note When you create a multi-zone read/write splitting instance, you must specify both SlaveReadOnlyCount and SecondaryZoneId.
1
EngineVersionstringNo

The database engine version. Default value: 1.0. The parameter value varies based on the Tair instance series.

  • To create a Tair DRAM-based instance (Tair_rdb) that is compatible with Redis 5.0, 6.0, or 7.0, set this parameter to 5.0, 6.0, or 7.0.
  • To create a Tair persistent memory-optimized instance (tair_scm) that is compatible with Redis 6.0, set this parameter to 1.0.
  • To create a Tair ESSD-based instance (tair_essd) that is compatible with Redis 6.0, set this parameter to 1.0. To create a Tair SSD-based instance that is compatible with Redis 6.0, set this parameter to 2.0.
1.0
InstanceTypestringYes

The instance series. Valid values:

  • tair_rdb: Tair DRAM-based instance
  • tair_scm: Tair persistent memory-optimized instance
  • tair_essd: Tair ESSD/SSD-based instance
tair_scm
GlobalInstanceIdstringNo

Specifies whether to use the created instance as a child instance of a distributed instance.

  • If you want the created instance to be used as the first child instance, enter true.
  • If you want the created instance to be used as the second or third child instance, enter the ID of the distributed instance, such as gr-bp14rkqrhac****.
  • If you do not want the created instance to be used as a distributed instance, leave the parameter empty.
Note If you want the created instance to be used as a distributed instance, the created instance must be a Tair DRAM-based instance.
gr-bp14rkqrhac****
Tagarray<object>No

Details of the tags.

objectNo

The information about the tag.

KeystringNo

The tag key. A tag is a key-value pair.

Note A maximum of five key-value pairs can be specified at a time.
key1_test
ValuestringNo

The value of the tag.

Note N specifies the value of the nth tag. For example, Tag.1.Value specifies the value of the first tag, and Tag.2.Value specifies the value of the second tag.
value1_test
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs a dry run and does not create the instance. The system prechecks the request parameters, request format, service limits, and available resources. If the request fails the dry run, an error code is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (false): performs a dry run and performs the actual request. If the request passes the dry run, the instance is directly created.
false
PortintegerNo

The service port number of the instance. Valid values: 1024 to 65535. Default value: 6379.

6379
GlobalSecurityGroupIdsstringNo

The global IP whitelist templates of the instance. Separate multiple IP whitelist templates with commas (,). Each IP whitelist template must be unique.

g-zsldxfiwjmti0kcm****
ParamGroupIdstringNo

The ID of the parameter template. The instance is created based on the parameters in the parameter template. The ID must be unique.

g-50npzjcqb1ua6q6j****
RestoreTimestringNo

If data flashback is enabled for the source instance, you can use this parameter to specify a point in time within the backup retention period of the source instance. The system uses the backup data of the source instance at the point in time to create an instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2021-07-06T07:25:57Z
ConnectionStringPrefixstringNo

The prefix of the endpoint. The prefix must be 8 to 40 characters in length and can contain lowercase letters and digits. It must start with a lowercase letter.

Note The endpoint must be in the <prefix>.redis.rds.aliyuncs.com format.
r-bp1zxszhcgatnx****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

QPSlong

The maximum number of read and write operations that can be processed by the instance per second. The value is a theoretical value.

100000
ConnectionDomainstring

The internal endpoint of the instance.

r-bp13ac3d047b****.tairpena.rds.aliyuncs.com
ChargeTypestring

The billing method of the instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
PrePaid
InstanceIdstring

The ID of the instance.

r-bp13ac3d047b****
Portinteger

The service port number of the instance.

6379
Configstring

The detailed configurations of the instance. The value is a JSON string. For more information about the parameters, see Configure parameters.

{\"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}
RegionIdstring

The region ID.

cn-hangzhou
RequestIdstring

The request ID.

12123216-4B00-4378-BE4B-08005BFC****
Bandwidthlong

The maximum bandwidth of the instance. Unit: Mbit/s.

96
Connectionslong

The maximum number of connections to the instance.

10000
InstanceNamestring

The instance name.

Note This parameter is returned only if the InstanceName parameter is specified in the request.
redistest
ZoneIdstring

The zone ID.

cn-hangzhou-h
InstanceStatusstring

The current status of the instance. The value is Creating.

Creating
TaskIdstring

The task ID.

10****
OrderIdlong

The order ID.

2084452111111

Examples

Sample success responses

JSONformat

{
  "QPS": 100000,
  "ConnectionDomain": "r-bp13ac3d047b****.tairpena.rds.aliyuncs.com",
  "ChargeType": "PrePaid",
  "InstanceId": "r-bp13ac3d047b****",
  "Port": 6379,
  "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}",
  "RegionId": "cn-hangzhou",
  "RequestId": "12123216-4B00-4378-BE4B-08005BFC****",
  "Bandwidth": 96,
  "Connections": 10000,
  "InstanceName": "redistest",
  "ZoneId": "cn-hangzhou-h",
  "InstanceStatus": "Creating",
  "TaskId": "10****",
  "OrderId": 2084452111111
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterPeriod is mandatory for this action.-
400InvalidToken.MalformedThe Specified parameter Token is not valid.-
400InvalidInstanceName.MalformedThe Specified parameter InstanceName is not valid.-
400InvalidPassword.MalformedThe Specified parameter Password is not valid.-
400InsufficientBalanceYour account does not have enough balance.Your account balance is insufficient. Add funds to your account and try again.
400QuotaExceed.AfterpayInstanceLiving afterpay instances quota exceeded.The maximum number of instances has been reached.
400InvalidCapacity.NotFoundThe Capacity provided does not exist in our records.The specified storage specification does not exist
400ResourceNotAvailableResource you requested is not available for finance user.The requested resource is unavailable to users of Alibaba Finance Cloud.
400PaymentMethodNotFoundNo payment method has been registered on the account.No payment methods are specified for your account.
400IdempotentParameterMismatchRequest uses a client token in a previous request but is not identical to that request.The current request uses a token that was already used in a different request.
400QuotaNotEnoughQuota not enough in this zone.The number of instances specified for this region is insufficient.
400QuotaExceedLiving afterpay instances quota exceed.The maximum number of instances has been reached.
400VpcServiceErrorInvoke vpc service failed.-
400IzNotSupportVpcErrorSpecify iz not support vpc.The specified iz does not support VPCs.
400InvalidvSwitchIdThe vpc does not cover the vswitch.-
400InvalidIzNo.NotSupportedThe Specified vpc zone not supported.-
400InvalidAccountPassword.FormatSpecified account password is not valid.-
400InstanceClass.NotMatchCurrent instance class and instance type is not match.-
400InvalidVPCId.NotFoundSpecified virtual vpc is not found.The specified VPC is not found. Check whether the VPC ID is correct.
400AccountMoneyValidateErrorAccount money validate error.-
400RequestTokenConflictSpecified request token conflict.-
400InvalidIPNotInSubnetError ip not in subnet.-
400InvalidEngineVersion.MalformedSpecified engine version is not valid.The error message returned because the instance engine version is invalid.
400Zone.ClosedThe specified zone is closed.-
400VSwithNotBelongToNotVpcFaultThe vSwitch does not belong to current vpc.-
400PayIllegalAgreementPay mayi with holding agreement illegal.-
400IllegalParamErrorvalidateSaleConditionWithSubArticle failed.-
400CASH_BOOK_INSUFFICIENTNo payment method is specified for your account. We recommend that you add a payment method or maitain a minimum prepayment balance of INR 1000.-
400InvalidRegion.FormatSpecified Region is not valid.The specified region is invalid.
403RealNameAuthenticationErrorYour account has not passed the real-name authentication yet.Your account has not completed real-name verification.
403AuthorizationFailureThe request processing has failed due to authorization failure.-
403TokenServiceErrorThe specified token is duplicated, please change it.-
403UserCannotBuyNotInnerCommodityThe user can not buy this commodity without alibaba group tag.-
404InvalidvSwitchIdThe Specified vSwitchId zone not supported.The specified vswitch is not supported in this Availability Zone
404InvalidVpcIdOrVswitchId.NotSupportedThe Specified vpcId or vSwitchId not supported.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-03-14The Error code has changedView Change Details
2025-02-27The Error code has changedView Change Details
2024-11-20The Error code has changed. The request parameters of the API has changedView Change Details
2024-10-09The Error code has changed. The request parameters of the API has changedView Change Details
2024-07-30The Error code has changedView Change Details
2024-05-23The Error code has changed. The request parameters of the API has changedView Change Details
2024-04-26The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-29The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-12The Error code has changed. The request parameters of the API has changedView Change Details
2024-01-03The Error code has changedView Change Details
2023-12-22The Error code has changedView Change Details
2023-09-14API Description Update. The Error code has changedView Change Details
2023-07-25The Error code has changed. The request parameters of the API has changedView Change Details
2023-06-21The Error code has changed. The request parameters of the API has changedView Change Details
2023-06-21The Error code has changed. The request parameters of the API has changedView Change Details
2023-04-03The Error code has changed. The request parameters of the API has changedView Change Details
2022-11-14The Error code has changedView Change Details
2022-07-27The Error code has changedView Change Details
2022-06-15The Error code has changed. The response structure of the API has changedView Change Details