pub struct UpdateTableRequest {
pub table_name: String,
pub reserved_throughput_read: Option<i32>,
pub reserved_throughput_write: Option<i32>,
pub ttl_seconds: Option<i32>,
pub max_versions: Option<i32>,
pub deviation_cell_version_in_sec: Option<i64>,
pub allow_update: Option<bool>,
pub stream_enabled: bool,
pub stream_expiration_hour: Option<i32>,
pub stream_columns: HashSet<String>,
}
Expand description
修改表的配置信息 table_options 和 Stream 配置 StreamSpecification。 如果表处于 CU 模式(原按量模式)的高性能型实例中, 您还可以为数据表配置预留读/写吞吐量 reserved_throughput,新设定将于更新成功后的一分钟内生效。
官方文档:https://help.aliyun.com/zh/tablestore/developer-reference/updatetable-of-tablestore
Fields§
§table_name: String
§reserved_throughput_read: Option<i32>
§reserved_throughput_write: Option<i32>
§ttl_seconds: Option<i32>
§max_versions: Option<i32>
§deviation_cell_version_in_sec: Option<i64>
§allow_update: Option<bool>
§stream_enabled: bool
§stream_expiration_hour: Option<i32>
§stream_columns: HashSet<String>
Implementations§
Source§impl UpdateTableRequest
impl UpdateTableRequest
pub fn new(table_name: &str) -> Self
Sourcepub fn reserved_throughput_read(self, read_cu: i32) -> Self
pub fn reserved_throughput_read(self, read_cu: i32) -> Self
预设读取吞吐量。最大 100000 CU
Sourcepub fn reserved_throughput_write(self, write_cu: i32) -> Self
pub fn reserved_throughput_write(self, write_cu: i32) -> Self
预设写入吞吐量。最大 100000 CU
Sourcepub fn ttl_seconds(self, ttl_seconds: i32) -> Self
pub fn ttl_seconds(self, ttl_seconds: i32) -> Self
数据生命周期,即数据的过期时间。当数据的保存时间超过设置的数据生命周期时,系统会自动清理超过数据生命周期的数据。
数据生命周期至少为 86400
秒(一天)或 -1
(数据永不过期)。
Sourcepub fn max_versions(self, max_versions: i32) -> Self
pub fn max_versions(self, max_versions: i32) -> Self
最大版本数,即属性列能够保留数据的最大版本个数。当属性列数据的版本个数超过设置的最大版本数时,系统会自动删除较早版本的数据。
Sourcepub fn deviation_cell_version_seconds(self, dev: i64) -> Self
pub fn deviation_cell_version_seconds(self, dev: i64) -> Self
有效版本偏差,即写入数据的时间戳与系统当前时间的偏差允许最大值。只有当写入数据所有列的版本号与写入时时间的差值在数据有效版本偏差范围内,数据才能成功写入。
属性列的有效版本范围为 [max{数据写入时间-有效版本偏差,数据写入时间-数据生命周期},数据写入时间+有效版本偏差)
。
Sourcepub fn allow_update(self, allow_update: bool) -> Self
pub fn allow_update(self, allow_update: bool) -> Self
是否允许通过 UpdateRow
更新写入数据。默认值为 true
,表示允许通过 UpdateRow
更新写入数据。
当要使用多元索引生命周期功能时,您必须设置此参数为 false
,即不允许通过 UpdateRow
更新写入数据。
Sourcepub fn stream_expiration(self, exp: i32) -> Self
pub fn stream_expiration(self, exp: i32) -> Self
设置 stream 过期时间
Sourcepub fn add_stream_column(self, col_name: impl Into<String>) -> Self
pub fn add_stream_column(self, col_name: impl Into<String>) -> Self
添加 stream 列
Trait Implementations§
Source§impl Clone for UpdateTableRequest
impl Clone for UpdateTableRequest
Source§fn clone(&self) -> UpdateTableRequest
fn clone(&self) -> UpdateTableRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UpdateTableRequest
impl Debug for UpdateTableRequest
Source§impl Default for UpdateTableRequest
impl Default for UpdateTableRequest
Source§fn default() -> UpdateTableRequest
fn default() -> UpdateTableRequest
Returns the “default value” for a type. Read more
Source§impl From<UpdateTableRequest> for UpdateTableRequest
impl From<UpdateTableRequest> for UpdateTableRequest
Source§fn from(value: UpdateTableRequest) -> Self
fn from(value: UpdateTableRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UpdateTableRequest
impl RefUnwindSafe for UpdateTableRequest
impl Send for UpdateTableRequest
impl Sync for UpdateTableRequest
impl Unpin for UpdateTableRequest
impl UnwindSafe for UpdateTableRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more