All Products
Search
Document Center

Tablestore:UpdateTable

Last Updated:Nov 06, 2024

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

ReservedThroughput

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

TableOptions

No

The settings of time to live (TTL) and max versions.

StreamSpecification

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

ReservedThroughputDetails

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
  • The minimum interval for updating the reserved read or write throughput of a data table is 2 minutes. If you call the UpdateTable operation again within 2 minutes after the previous call, the operation fails.

  • The reserved read or write throughput of a data table can be raised or lowered an unlimited number of times within a single day (from 00:00:00 to 00:00:00 the next day in UTC time).

table_options

TableOptions

The latest value of the table_options parameter after the update.

stream_details

StreamDetails

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: