调用 UpdateTable 接口修改表的配置信息 table_options 和 Stream 配置 StreamSpecification。对于CU 模式(原按量模式)的高性能型实例中的表,还可配置预留读/写吞吐量 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 |
否 |
表的预留读/写吞吐量新设定值。 |
|
|
table_options |
否 |
表的 Time to Live(TTL)和 max versions 设置。 |
|
|
StreamSpecification |
否 |
Stream 的属性,包括是否开启 Stream 功能及日志过期时长。 |
响应消息结构
message UpdateTableResponse {
required ReservedThroughputDetails reserved_throughput_details = 1;
required TableOptions table_options = 2;
optional StreamDetails stream_details = 3;
}
|
名称 |
类型 |
描述 |
|
capacity_unit_details |
更新后的预留读/写吞吐量详情,包含当前设定值、最近一次更新时间,以及当日(UTC 00:00:00 至次日 UTC 00:00:00)已下调次数。两次调整的最小间隔为 2 分钟,间隔不足时请求将被拒绝。每个自然日内上调和下调次数均不限。 |
|
|
table_options |
更新后最新的 |
|
|
stream_details |
Stream 配置详情,包括是否开启 Stream 功能、日志过期时长及最近一次开启时间。 |
使用 SDK
通过以下SDK更新数据表。
该文章对您有帮助吗?