用于开通一个Tair Serverless KV的table实例。
接口说明
请求说明
在调用此接口前,请确保已了解云数据库 Redis 产品的收费方式和价格详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
kvstore:CreateTairSkvDdbTable |
create |
*全部资源
|
无 | 无 |
请求语法
POST HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ClientToken |
string |
否 |
用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,大小写敏感、不超过 64 个 ASCII 字符。 |
ETnLKlblzczshOTUbOCz** |
| RegionId |
string |
是 |
地域 ID,可调用 DescribeRegions 查询,使用此参数指定要创建实例的地域。 |
cn-hangzhou |
| WorkspaceId |
string |
是 |
Workspace 的实例 ID,可调用 DescribeInstances 获取。 |
tt-bp1zxszhcgatnx** |
| TableName |
string |
是 |
表名称。 名称为 2-128 个字符,以大小写字母或中文开头,不支持字符@/:="<>{}[]和空格。 |
apitest |
| InstanceType |
string |
是 |
实例类型,固定取值:tair_skv_ddb_table |
tair_skv_ddb_table |
| SrcDBInstanceId |
string |
否 |
如需基于某个实例的备份集创建新实例,请先在此参数中指定源实例 ID。 说明 本参数需要 BackupId 与组合使用。 |
r-bp1zxszhcgatnx** |
| BackupId |
string |
否 |
部分新集群架构支持集群备份集 ID,您可以通过 DescribeClusterBackupList 接口获取。 |
cb-hyxdof5x9kqb** |
| Schema |
string |
否 |
JSON 形式的表结构配置信息 |
{"AttributeDefinitions":[{"AttributeType":"S","AttributeName":"pk"},{"AttributeType":"S","AttributeName":"sk"}],"KeySchema":[{"KeyType":"HASH","AttributeName":"pk"},{"KeyType":"RANGE","AttributeName":"sk"}]} |
| TtlSpec |
string |
否 |
json 形式的参数配置开关 |
{"attributeName":"Expiretime","enabled":true} |
https://r-kvstore.aliyuncs.com/?Action=CreateInstance &RegionId=cn-hangzhou &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"}]} &<公共请求参数>
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
对象。 |
||
| QPS |
integer |
每秒访问次数,此处为当前规格实例的理论值。 |
100000 |
| ConnectionDomain |
string |
Redis 实例的内网连接地址。 |
r-bp1zxszhcgatnx**.redis.rds.aliyuncs.com |
| ChargeType |
string |
付费类型,返回值:
|
PostPaid |
| InstanceId |
string |
实例 ID(全局唯一)。 |
r-bp1zxszhcgatnx* |
| Port |
integer |
Redis 服务端口。 |
6379 |
| Config |
string |
实例的详细配置,格式为 JSON 字符串。关于各参数的详细解释,请参见参数配置说明。 |
{\"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 |
地域 ID。 |
cn-hangzhou |
| RequestId |
string |
请求 ID。 |
2D9F3768-EDA9-4811-943E-42C8006E**** |
| Bandwidth |
integer |
实例带宽限制,单位:MB/s。 |
96 |
| Connections |
integer |
实例连接数限制。 |
10000 |
| TableName |
string |
实例名称。 |
apitest |
| ZoneId |
string |
实例所属的可用区的 ID。 |
cn-hangzhou-b |
| InstanceStatus |
string |
实例的当前状态,返回值固定为 Creating(创建中)。 |
Creating |
| TaskId |
string |
创建执行的任务流 id |
11111**** |
| OrderId |
integer |
订单 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" }
示例
正常返回示例
JSON格式
{
"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
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 幂等性校验不过。 |
| 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. | VPC未找到,建议检查VPC ID是否正确。 |
| 400 | InvalidEngineVersion.Malformed | Specified engine version is not valid. | 无效的引擎版本 |
| 400 | Zone.Closed | The specified zone is closed. | |
| 400 | InvalidRegion.Format | Specified Region is not valid. | 指定的地域Region无效 |
| 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. | 所指定的存储规格不存在。 |
| 404 | InvalidvSwitchId | The Specified vSwitchId zone not supported. | |
| 404 | InvalidVpcIdOrVswitchId.NotSupported | The Specified vpcId or vSwitchId not supported. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。