全部产品
Search
文档中心

表格存储:UpdateTable

更新时间:Oct 15, 2024

您可以调用 UpdateTable 接口修改表的配置信息 table_options 和 Stream 配置 StreamSpecification。如果表处于高性能型实例中,您还可以为数据表配置预留读/写吞吐量 reserved_throughput,新设定将于更新成功后的一分钟内生效。

请求消息结构

message UpdateTableRequest {
    required string table_name = 1;
    optional ReservedThroughput reserved_throughput = 2;
    optional TableOptions table_options = 3;
    optional StreamSpecification stream_spec = 4;
}

名称

类型

是否必选

描述

table_name

string

更改预留读写吞吐量设置的数据表对应的表名称。

reserved_throughput

ReservedThroughput

将要更改的表的预留读吞吐量或者预留写吞吐量设定,该设定将于一分钟后生效。

capacity_unit 中 read 和 write 应至少有一个非空,否则请求失败,返回错误。

table_options

TableOptions

主要设置 TimeToLive 和最大版本数。

StreamSpecification

StreamSpecification

Stream 的属性信息。如是否开启 Stream 功能、日志过期时长、上次 Stream 开启时间等。

响应消息结构

message UpdateTableResponse {
    required ReservedThroughputDetails reserved_throughput_details = 1;
    required TableOptions table_options = 2;
    optional StreamDetails stream_details = 3;
}

名称

类型

描述

capacity_unit_details

ReservedThroughputDetails

更新后,该表的预留读吞吐量或者预留写吞吐量设置信息除了包含当前的预留读吞吐量或者预留写吞吐量设置值之外,还包含了最近一次更新该表的预留读吞吐量或者预留写吞吐量设置的时间和当日已下调预留读吞吐量或者预留写吞吐量的次数。

说明
  • 调整每个表预留读吞吐量或者预留写吞吐量的最小时间间隔为 2 分钟,如果本次 UpdateTable 操作距上次不到 2 分钟将被拒绝。

  • 每个自然日(UTC 时间 00:00:00 到第二天的 00:00:00)内每个表上调和下调预留读写吞吐量次数不限。

table_options

TableOptions

修改后,最新的 table_options 参数值。

stream_details

StreamDetails

表格存储中的 Stream 流的配置信息,记录了表的 Stream 功能是否开启、日志过期时长、上次 Stream 开启时间等。

使用 SDK