键值存储服务 KVS-创建表:请求参数

时间:2024-05-07 09:20:02

请求参数

表2 请求Body参数

参数

是否必选

参数类型

描述

table_name

String

表名,仓内唯一。

primary_key_schema

primary_key_schema object

主键模板, 最多1个,必须指定主键schema。

local_secondary_index_schema

Array of secondary_index objects

本地二级索引模板,可以多个。

global_secondary_index_schema

Array of global_secondary_index objects

全局二级索引模板。

pre_split_key_options

pre_split_key_options object

按照设定的分裂键值或者键值前缀进行预分裂。

表3 primary_key_schema

参数

是否必选

参数类型

描述

shard_key_fields

Array of field objects

分区键字段名数组,顺序组合。

shard_mode

String

分区模式。

sort_key_fields

Array of field objects

排序键字段名数组,顺序组合。

表4 secondary_index

参数

是否必选

参数类型

描述

index_name

String

二级索引名称,表内唯一。

sort_key_fields

Array of field objects

排序键字段名数组,顺序组合。

abstract_fields

Array of strings

摘要字段名数组。

表5 global_secondary_index

参数

是否必选

参数类型

描述

index_name

String

二级索引名称,表内唯一。

shard_key_fields

Array of field objects

分区键字段名数组,顺序组合。

shard_mode

String

分区模式。

sort_key_fields

Array of field objects

排序键字段名数组,顺序组合。

abstract_fields

Array of strings

摘要字段名数组。

表6 field

参数

是否必选

参数类型

描述

name

String

字段名。

order

Boolean

bool值预留无意义。

表7 pre_split_key_options

参数

是否必选

参数类型

描述

hash_count

Integer

在hash分区时,预分裂分区数量。

range_split_points

Array of strings

在range分区模式有效,最大1000个,与"hash_count"二选一。

support.huaweicloud.com/api-kvs/CreateTable.html