调用UpdateTable接口更新指定表的预留读吞吐量或预留写吞吐量设置,新设定将于更新成功一分钟内生效。

请求消息结构

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相关的属性。

响应消息结构

message UpdateTableResponse {
    required ReservedThroughputDetails reserved_throughput_details = 1;
    required TableOptions table_options = 2;
}
名称 类型 描述
capacity_unit_details ReservedThroughputDetails 更新后,该表的预留读吞吐量或者预留写吞吐量设置信息除了包含当前的预留读吞吐量或者预留写吞吐量设置值之外,还包含了最近一次更新该表的预留读吞吐量或者预留写吞吐量设置的时间和当日已下调预留读吞吐量或者预留写吞吐量的次数。
说明
  • 调整每个表预留读吞吐量或者预留写吞吐量的最小时间间隔为2分钟,如果本次UpdateTable操作距上次不到2分钟将被拒绝。
  • 每个自然日(UTC时间00:00:00到第二天的00:00:00)内每个表上调和下调预留读写吞吐量次数不限。
table_options TableOptions 修改后,最新的table_options参数值。

使用SDK