All Products
Search
Document Center

Tablestore:TableOptions

Last Updated:Sep 22, 2026

TableOptions defines table-level configurations, including data retention (TTL), maximum versions, and version offset constraints.

Data structure

message TableOptions {
    optional int32 time_to_live = 1; 
    optional int32 max_versions = 2; 
    optional int64 deviation_cell_version_in_sec = 5; 
    optional bool allow_update = 6;
    optional bool update_full_row = 7;
}

Parameter

Type

Required

Description

time_to_live

int32

No

The data retention period, in seconds. Tablestore automatically deletes data that exceeds this period.

Valid values: an integer greater than or equal to 86400 (one day), or -1 (data never expires).

max_versions

int32

No

The maximum number of versions that an attribute column can retain. Tablestore automatically deletes the earliest versions when this limit is exceeded.

deviation_cell_version_in_sec

int64

No

The maximum version offset, in seconds. A write request succeeds only when the version number (timestamp) of each column is within this offset from the current system time.

Valid timestamp range for an attribute column: [max{write_time - max_version_offset, write_time - TTL}, write_time + max_version_offset).

allow_update

bool

No

Whether to allow the UpdateRow operation on this table. Default value: true.

Set this parameter to false when the table does not require data updates and the search index TTL feature is enabled.

update_full_row

bool

No

Whether UpdateRow replaces the entire row or only the specified columns. Default value: false (only specified columns are updated).

Set this parameter to true when data updates are required and the search index TTL feature or global table feature is enabled. Keep allow_update at its default value of true.