You can call UpdateTable to modify the table configuration table_options and the Stream configuration StreamSpecification. If the table is in a compute-optimized instance in CU mode (formerly Pay-As-You-Go mode), you can also configure reserved read/write throughput reserved_throughput for the table. The new settings take effect within one minute after the update is successful.
Request message structure
message UpdateTableRequest {
required string table_name = 1;
optional ReservedThroughput reserved_throughput = 2;
optional TableOptions table_options = 3;
optional StreamSpecification stream_spec = 4;
}Name | Type | Required | Description |
table_name | string | Yes | The name of the table to update. |
reserved_throughput | No | The new reserved read throughput or reserved write throughput for the table. The new settings take effect after one minute. At least one of `read` or `write` in `capacity_unit` must be specified. Otherwise, the request fails and an error is returned. | |
table_options | No | The settings for Time to Live (TTL) and the maximum number of versions. | |
StreamSpecification | No | The properties of the stream, such as whether to enable the Stream feature and the log expiration duration. |
Response message structure
message UpdateTableResponse {
required ReservedThroughputDetails reserved_throughput_details = 1;
required TableOptions table_options = 2;
optional StreamDetails stream_details = 3;
}Name | Type | Description |
capacity_unit_details | The details of the reserved read or write throughput after the update. This includes the current throughput values, the time of the last update, and the number of times the throughput was decreased on the current day. Note
| |
table_options | The latest `table_options` values after the update. | |
stream_details | The configuration details of the stream in Tablestore. This includes whether the Stream feature is enabled, the log expiration duration, and the time when the stream was last enabled. |
Use SDKs
You can use an SDK for one of the following languages to update a table.