UpdateTable

Updated at:

Call UpdateTable to modify the table configuration table_options and the Stream configuration StreamSpecification. For tables in a compute-optimized instance in CU mode (formerly Pay-As-You-Go mode), you can also configure reserved read/write throughput reserved_throughput. Changes take effect within one minute.

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. At least one of read or write in capacity_unit must be specified. Otherwise, the request fails and an error is returned. Changes take effect within one minute.

table_options

TableOptions

No

The Time to Live (TTL) and max versions settings for the table.

StreamSpecification

StreamSpecification

No

The Stream properties, including whether the Stream feature is enabled 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 reserved read/write throughput after the update, including current values, the time of the last update, and the number of decreases on the current calendar day (00:00:00 UTC to 00:00:00 UTC of the next day). The minimum interval between throughput adjustments is 2 minutes — requests submitted less than 2 minutes after a previous call are denied. You can increase or decrease the reserved read/write throughput an unlimited number of times per calendar day.

table_options

TableOptions

The latest table_options values after the update.

stream_details

StreamDetails

The stream configuration details, including whether the Stream feature is enabled, the log expiration duration, and the time the stream was last enabled.

Use SDKs

Use one of the following SDK guides to update a table.