用於開通一個 Tair Serverless KV 的 table 執行個體。
介面說明
請求說明
在呼叫此介面前,請確保已了解雲端資料庫 Redis 產品的收費方式和價格詳情。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
kvstore:CreateTairSkvDdbTable |
create |
*All Resource
|
無 | 無 |
請求文法
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 形式的表結構設定資訊。 |
{"AttributeDefinitions":[{"AttributeType":"S","AttributeName":"pk"},{"AttributeType":"S","AttributeName":"sk"}],"KeySchema":[{"KeyType":"HASH","AttributeName":"pk"},{"KeyType":"RANGE","AttributeName":"sk"}]} |
|
否 |
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. | |
| 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. | |
| 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。