Creates an ApsaraDB for Redis Enhanced Edition (Tair) instance that uses cloud disks.
Operation Description
For information about instance selection, see Select an ApsaraDB for Redis instance.
Before you call this operation, make sure that you are familiar with the billing methods and pricing of ApsaraDB for Redis.
For information about how to create an ApsaraDB for Redis Enhanced Edition (Tair) instance that uses cloud disks in the ApsaraDB for Redis console, see Create an ApsaraDB for Redis instance.
To create an instance of another edition or series such as an ApsaraDB for Redis Community Edition instance or a Tair DRAM-based instance that uses local disks, call CreateInstance.
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:
- The required resource types are displayed in bold characters.
- 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.
Operation | Access level | Resource type | Condition key | Association operation |
---|---|---|---|---|
kvstore:CreateTairInstance | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where you want to create the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
InstanceName | string | No | The name of the instance. The name must meet the following requirements:
| apitest |
Password | string | No | The password that is used to connect to the instance. The password must meet the following requirements:
| Pass!123456 |
InstanceClass | string | Yes | The instance type. For more information, see the following topics: | tair.scm.standard.4m.32d |
ZoneId | string | Yes | The primary zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list. NoteIf 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. | cn-hangzhou-e |
ChargeType | string | No | The billing method of the instance. Default value: PrePaid. Valid values:
| PrePaid |
VpcId | string | Yes | The ID of the virtual private cloud (VPC). You can call the DescribeVpcs operation to query the ID of the VPC. | vpc-bp1nme44gek34slfc**** |
VSwitchId | string | Yes | The ID of the vSwitch that belongs to the VPC. You can call the DescribeVpcs operation to query the ID of the vSwitch. | vsw-bp1e7clcw529l773d**** |
Period | integer | No | The subscription duration. Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24,36, and 60. NoteThis parameter is required only if you set the ChargeType parameter to PrePaid. | 1 |
BusinessInfo | string | No | The ID of the promotion event or the business information. | 000000000 |
CouponNo | string | No | The coupon code. | youhuiquan_promotion_option_id_for_blank |
SrcDBInstanceId | string | No | The ID of the source instance. NoteTo 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. | r-bp1zxszhcgatnx**** |
BackupId | string | No | The ID of the backup set of the source instance. You can call the DescribeBackups operation to query the ID of the backup set. NoteTo create an instance based on the backup set of an existing instance, you must specify this parameter after you specify the SrcDBInstanceId parameter. The system creates an instance based on the backup set that is specified by this parameter. | 11111111 |
PrivateIpAddress | string | No | The private IP address of the instance. NoteThe IP address must be within the CIDR block of the vSwitch to which the instance is connected. You can call the DescribeVSwitches operation of VPC to query the CIDR block information. | 172.16.88.*** |
AutoUseCoupon | string | No | Specifies whether to use a coupon. Default value: false. Valid values:
| true |
AutoRenew | string | No | Specifies whether to enable auto-renewal for the instance. Default value: false. Valid values:
| true |
AutoRenewPeriod | string | No | The subscription duration that is supported by auto-renewal. Unit: months. Valid values: 1, 2, 3, 6, and 12. NoteThis parameter is required only if the AutoRenew parameter is set to true. | 3 |
ResourceGroupId | string | No | The ID of the resource group to which you want to assign the instance. Note
| rg-acfmyiu4ekp**** |
AutoPay | boolean | No | Specifies whether to enable automatic payment. Set the value to true. | true |
ClientToken | string | No | 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 the token is unique among different requests. The token is case-sensitive. The token can contain only ASCII characters and cannot exceed 64 characters in length. | ETnLKlblzczshOTUbOCz**** |
StorageType | string | No | The storage type of the instance. Set the value to essd_pl1. NoteThis parameter is available only if the InstanceType parameter is set to tair_essd. Enumeration Value:
| essd_pl1 |
Storage | integer | No | The storage space of cloud disks. Valid values vary based on the instance specifications. For more information, see ESSD-based instances. NoteThis parameter is available and required only if the InstanceType parameter is set to tair_essd. | 60 |
ShardType | string | No | The category of the instance. Default value: MASTER_SLAVE. Valid values:
| MASTER_SLAVE |
ShardCount | integer | Yes | The number of data nodes in the instance. Default value: 1. Valid values:
NoteOnly 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. | 1 |
ReadOnlyCount | integer | No | The number of read-only nodes in the instance. This parameter is available only if you create a read/write splitting instance that uses cloud disks. Valid values: 1 to 5. | 5 |
EngineVersion | string | No | The database engine version of the instance. Default value: 1.0. The default version is developed by Alibaba Cloud and compatible with Redis 5.0. | 1.0 |
InstanceType | string | Yes | The storage medium of the instance. Valid values:
| tair_scm |
SecondaryZoneId | string | No | The ID of the secondary zone. You can call the DescribeRegions operation to query the ID of the secondary zone. Note
| cn-hangzhou-h |
GlobalInstanceId | string | No | The ID of the distributed instance. | gr-bp14rkqrhac**** |
Tag | array | No | The tags of the instance. | |
object | No | Details of the tags. | ||
Key | string | No | The key of the tag. A tag is a key-value pair. NoteA maximum of five key-value pairs can be specified at a time. | key1_test |
Value | string | No | The value of the tag. NoteN specifies the serial number of the 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 |
DryRun | boolean | No | Specifies whether to perform a dry run. Default value: false. Valid values:
| false |
Port | integer | No | The service port number of the instance. Valid values:1024 to 65535. Default value: 6379. | 6379 |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter | Period is mandatory for this action. | - |
400 | InvalidToken.Malformed | The Specified parameter Token is not valid. | - |
400 | InvalidInstanceName.Malformed | The Specified parameter InstanceName is not valid. | - |
400 | InvalidPassword.Malformed | The Specified parameter Password is not valid. | - |
400 | InsufficientBalance | Your account does not have enough balance. | Your account balance is insufficient. Add funds to your account and try again. |
400 | QuotaExceed.AfterpayInstance | Living afterpay instances quota exceeded. | The maximum number of instances has been reached. |
400 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | The specified instance capacity is invalid. |
400 | ResourceNotAvailable | Resource you requested is not available for finance user. | The requested resource is unavailable to users of Alibaba Finance Cloud. |
400 | PaymentMethodNotFound | No payment method has been registered on the account. | No payment methods are specified for your account. |
400 | IdempotentParameterMismatch | Request 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. |
400 | QuotaNotEnough | Quota not enough in this zone. | The number of instances specified for this region is insufficient. |
400 | QuotaExceed | Living afterpay instances quota exceed. | The maximum number of instances has been reached. |
400 | VpcServiceError | Invoke vpc service failed. | - |
400 | IzNotSupportVpcError | Specify iz not support vpc. | The specified iz does not support VPCs. |
400 | InvalidvSwitchId | The vpc does not cover the vswitch. | - |
400 | InvalidIzNo.NotSupported | The Specified vpc zone not supported. | - |
400 | InvalidAccountPassword.Format | Specified account password is not valid. | - |
400 | InstanceClass.NotMatch | Current instance class and instance type is not match. | - |
400 | InvalidVPCId.NotFound | Specified virtual vpc is not found. | The specified VPC is not found. Check whether the VPC ID is correct. |
400 | AccountMoneyValidateError | Account money validate error. | - |
400 | RequestTokenConflict | Specified request token conflict. | - |
400 | InvalidIPNotInSubnet | Error ip not in subnet. | - |
400 | InvalidEngineVersion.Malformed | Specified engine version is not valid. | The error message returned because the instance engine version is invalid. |
400 | Zone.Closed | The specified zone is closed. | - |
400 | VSwithNotBelongToNotVpcFault | The vSwitch does not belong to current vpc. | - |
400 | PayIllegalAgreement | Pay mayi with holding agreement illegal. | - |
400 | IllegalParamError | validateSaleConditionWithSubArticle failed. | - |
400 | CASH_BOOK_INSUFFICIENT | No payment method is specified for your account. We recommend that you add a payment method or maitain a minimum prepayment balance of INR 1000. | - |
400 | InvalidRegion.Format | Specified Region is not valid. | - |
403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | Your account has not completed real-name verification. |
403 | AuthorizationFailure | The request processing has failed due to authorization failure. | - |
403 | TokenServiceError | The specified token is duplicated, please change it. | - |
403 | UserCannotBuyNotInnerCommodity | The user can not buy this commodity without alibaba group tag. | - |
404 | InvalidvSwitchId | The Specified vSwitchId zone not supported. | - |
404 | InvalidVpcIdOrVswitchId.NotSupported | The Specified vpcId or vSwitchId not supported. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-04-03 | The error codes of the API operation change.,The input parameters of the API operation change. | |||||||||||||
| ||||||||||||||
2022-11-14 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-07-27 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-06-15 | The error codes of the API operation change.,The response structure of the API operation changes. | |||||||||||||
|