UpdateTable

更新时间:
复制 MD 格式

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

ReservedThroughput

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

TableOptions

No

The settings for Time to Live (TTL) and the maximum number of versions.

StreamSpecification

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

ReservedThroughputDetails

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
  • The minimum interval between adjustments to a table's reserved read or write throughput is 2 minutes. If you call `UpdateTable` less than 2 minutes after the previous call, the request is denied.

  • You can increase or decrease the reserved read/write throughput for a table an unlimited number of times per calendar day (00:00:00 UTC to 00:00:00 UTC of the next day).

table_options

TableOptions

The latest `table_options` values after the update.

stream_details

StreamDetails

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