Creates a Tair Serverless KV table instance.
Operation description
Operation description
Before you call this operation, make sure that you understand the billing methods and pricing of ApsaraDB for Redis.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:CreateTairSkvDdbTable |
create |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| 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. Make sure that the value is unique among different requests. The token is case-sensitive and can contain up to 64 ASCII characters. |
ETnLKlblzczshOTUbOCz** |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query available regions. Use this parameter to specify the region in which to create the instance. |
cn-hangzhou |
| WorkspaceId |
string |
Yes |
The ID of the workspace instance. You can call DescribeInstances to obtain the ID. |
tt-bp1zxszhcgatnx** |
| TableName |
string |
Yes |
The table name. The name must be 2 to 128 characters in length and must start with an uppercase letter, a lowercase letter, or a Chinese character. The name cannot contain the following characters: @/:="<>{}[] or spaces. |
apitest |
| InstanceType |
string |
Yes |
The instance type. Set the value to tair_skv_ddb_table. |
tair_skv_ddb_table |
| SrcDBInstanceId |
string |
No |
To create an instance from a backup set of an existing instance, specify the ID of the source instance in this parameter. Note
This parameter must be used together with BackupId. |
r-bp1zxszhcgatnx** |
| BackupId |
string |
No |
The cluster backup set ID. Some new cluster architectures support cluster backup set IDs. You can call DescribeClusterBackupList to obtain the ID. |
cb-hyxdof5x9kqb** |
| Schema |
string |
No |
The table schema configuration in JSON format. |
{"AttributeDefinitions":[{"AttributeType":"S","AttributeName":"pk"},{"AttributeType":"S","AttributeName":"sk"}],"KeySchema":[{"KeyType":"HASH","AttributeName":"pk"},{"KeyType":"RANGE","AttributeName":"sk"}]} |
| TtlSpec |
string |
No |
The parameter settings switch in JSON format. |
{"attributeName":"Expiretime","enabled":true} |
https://r-kvstore.aliyuncs.com/?Action=CreateInstance
&RegionId=ap-southeast-1
&WorkspaceId=tt-2ze4mktt0xxxxxxxx
&InstanceType=tair_skv_ddb_table
&TableName=table1
&Schema={"AttributeDefinitions":[{"AttributeType":"S","AttributeName":"pk"},{"AttributeType":"S","AttributeName":"sk"}],"KeySchema":[{"KeyType":"HASH","AttributeName":"pk"},{"KeyType":"RANGE","AttributeName":"sk"}]}
&
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| QPS |
integer |
The queries per second (QPS). This value is the theoretical value for the current instance specification. |
100000 |
| ConnectionDomain |
string |
The internal endpoint of the Redis instance. |
r-bp1zxszhcgatnx**.redis.rds.aliyuncs.com |
| ChargeType |
string |
The billing method. Valid values:
|
PostPaid |
| InstanceId |
string |
The globally unique instance ID. |
r-bp1zxszhcgatnx* |
| Port |
integer |
The Redis service port. |
6379 |
| Config |
string |
The detailed configuration of the instance in JSON format. For more information about the parameters, see Parameter settings. |
{\"EvictionPolicy\":\"volatile-lru\",\"hash-max-ziplist-entries\":512,\"zset-max-ziplist-entries\":128,\"zset-max-ziplist-value\":64,\"set-max-intset-entries\":512,\"hash-max-ziplist-value\":64} |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| RequestId |
string |
The request ID. |
2D9F3768-EDA9-4811-943E-42C8006E**** |
| Bandwidth |
integer |
The bandwidth limit of the instance. Unit: MB/s. |
96 |
| Connections |
integer |
The maximum number of connections supported by the instance. |
10000 |
| TableName |
string |
The instance name. |
apitest |
| ZoneId |
string |
The zone ID of the instance. |
cn-hangzhou-b |
| InstanceStatus |
string |
The current status of the instance. The value is fixed to Creating. |
Creating |
| TaskId |
string |
The ID of the task flow that is executed for the creation. |
11111**** |
| OrderId |
integer |
The order ID. |
20741011111111 |
{ "Connections": 0, "RequestId": "37B7A1E8-7590-1345-A0F2-EBD657D1AA8A", "InstanceId": "tt-2zelkttksbyc12x6c", "Port": 443, "OrderId": 274427815940904, "ConnectionDomain": "tt-2ze4mktt0jnguvf7m.tairskvddb.pre.rds.aliyuncs.com", "TableName": "table1", "QPS": 0, "ChargeType": "PostPaid", "InstanceStatus": "Creating", "Bandwidth": 0, "RegionId": "cn-beijing" }
Examples
Success response
JSON format
{
"QPS": 100000,
"ConnectionDomain": "r-bp1zxszhcgatnx**.redis.rds.aliyuncs.com",
"ChargeType": "PostPaid",
"InstanceId": "r-bp1zxszhcgatnx*",
"Port": 6379,
"Config": "{\\\"EvictionPolicy\\\":\\\"volatile-lru\\\",\\\"hash-max-ziplist-entries\\\":512,\\\"zset-max-ziplist-entries\\\":128,\\\"zset-max-ziplist-value\\\":64,\\\"set-max-intset-entries\\\":512,\\\"hash-max-ziplist-value\\\":64}",
"RegionId": "cn-hangzhou",
"RequestId": "2D9F3768-EDA9-4811-943E-42C8006E****",
"Bandwidth": 96,
"Connections": 10000,
"TableName": "apitest",
"ZoneId": "cn-hangzhou-b",
"InstanceStatus": "Creating",
"TaskId": "11111****",
"OrderId": 20741011111111
}
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 | IdempotentParameterMismatch | Request uses a client token in a previous request but is not identical to that request. | Idempotent check. |
| 400 | QuotaNotEnough | Quota not enough in this zone. | |
| 400 | QuotaExceed | Living afterpay instances quota exceed. | |
| 400 | VpcServiceError | Invoke vpc service failed. | |
| 400 | IzNotSupportVpcError | Specify iz not support vpc. | |
| 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 | 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 | InvalidRegion.Format | Specified Region is not valid. | The specified region is invalid. |
| 403 | AuthorizationFailure | The request processing has failed due to authorization failure. | |
| 403 | TokenServiceError | The specified token is duplicated, please change it. | |
| 404 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | The specified storage specification does not exist. |
| 404 | InvalidvSwitchId | The Specified vSwitchId zone not supported. | |
| 404 | InvalidVpcIdOrVswitchId.NotSupported | The Specified vpcId or vSwitchId not supported. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.