All Products
Search
Document Center

Tablestore:TableOptions

Last Updated:Apr 08, 2026

The TableOptions data type defines optional table configurations, such as data retention (TTL), maximum versions, and version offset.

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. When stored data exceeds this period, Tablestore automatically deletes the expired data.

Valid values: 86400 (1 day) or greater, or -1 (data never expires).

max_versions

int32

No

The maximum number of data versions that an attribute column can retain. When the number of versions exceeds this limit, Tablestore automatically deletes the earliest versions.

deviation_cell_version_in_sec

int64

No

The maximum allowed offset, in seconds, between the version number (timestamp) of written data and the current system time. A write request fails if the difference between the version number and the write time exceeds this offset.

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

Specifies whether the UpdateRow operation is allowed. Default value: true.

To use the TTL feature of a search index in a scenario where data is not updated, set this parameter to false.

update_full_row

bool

No

Specifies whether the UpdateRow operation updates an entire row or only specified columns. Default value: false (only specified columns are updated).

To use the TTL feature of a search index or the global table feature in a scenario that involves data updates, set this parameter to true and keep allow_update at its default value of true.