You can call the UpdateTable operation to modify the configuration information that is specified by the table_options
parameter and the Stream configurations that are specified by the StreamSpecification
parameter for a data table. If a data table is in a high-performance instance, you can also modify the reserved read or write throughput that is specified by the reserved_throughput
parameter for the data table. The new reserved read or write throughput takes effect within 1 minute after a successful update.
Request syntax
message UpdateTableRequest {
required string table_name = 1;
optional ReservedThroughput reserved_throughput = 2;
optional TableOptions table_options = 3;
optional StreamSpecification stream_spec = 4;
}
Parameter | Type | Required | Description |
table_name | string | Yes | The name of the data table for which you want to modify the reserved read or write throughput. |
reserved_throughput | No | The new reserved read or write throughput of the data table. The new reserved read or write throughput takes effect within 1 minute after a successful update. You must specify a non-null value for the reserved read or write throughput by using the capacity_unit parameter. Otherwise, the request fails and an error is returned. | |
table_options | No | The settings of time to live (TTL) and max versions. | |
StreamSpecification | No | The Stream information about the data table, including whether the Stream feature is enabled and the validity period of logs. |
Response syntax
message UpdateTableResponse {
required ReservedThroughputDetails reserved_throughput_details = 1;
required TableOptions table_options = 2;
optional StreamDetails stream_details = 3;
}
Parameter | Type | Description |
capacity_unit_details | The reserved read or write throughput settings of the data table after a successful update. The settings include the most recent reserved read or write throughput value, the time when the reserved read or write throughput value was last updated, and the number of times that the reserved read or write throughput value was decreased on the current day. Note
| |
table_options | The latest value of the table_options parameter after the update. | |
stream_details | The Stream information about the data table, including whether the Stream feature is enabled for the data table, the validity period of logs, and the last time when the Stream feature was enabled. |
Use Tablestore SDKs
You can use the following Tablestore SDKs to update a data table:
Tablestore SDK for Java: UpdateTable
Tablestore SDK for Go: UpdateTable
Tablestore SDK for Python: UpdateTable
Tablestore SDK for Node.js: UpdateTable
Tablestore SDK for .NET: UpdateTable
Tablestore SDK for PHP: UpdateTable