Skip to main content

TimestreamWriteState

Struct TimestreamWriteState 

Source
pub struct TimestreamWriteState {
    pub databases: HashMap<String, Database>,
    pub tables: HashMap<(String, String), Table>,
    pub batch_load_tasks: HashMap<String, BatchLoadTask>,
}
Expand description

In-memory state for the Timestream Write service.

Fields§

§databases: HashMap<String, Database>

Databases keyed by database name.

§tables: HashMap<(String, String), Table>

Tables keyed by (database_name, table_name).

§batch_load_tasks: HashMap<String, BatchLoadTask>

Batch load tasks keyed by task_id.

Implementations§

Source§

impl TimestreamWriteState

Source

pub fn create_database( &mut self, database_name: &str, account_id: &str, region: &str, kms_key_id: Option<&str>, ) -> Result<&Database, TimestreamWriteError>

Source

pub fn describe_database( &self, database_name: &str, ) -> Result<&Database, TimestreamWriteError>

Source

pub fn delete_database( &mut self, database_name: &str, ) -> Result<(), TimestreamWriteError>

Source

pub fn list_databases(&self) -> Vec<&Database>

Source

pub fn update_database( &mut self, database_name: &str, kms_key_id: &str, ) -> Result<&Database, TimestreamWriteError>

Source

pub fn create_table( &mut self, database_name: &str, table_name: &str, account_id: &str, region: &str, retention_properties: Option<RetentionProperties>, magnetic_store_write_properties: Option<MagneticStoreWriteProperties>, ) -> Result<&Table, TimestreamWriteError>

Source

pub fn describe_table( &self, database_name: &str, table_name: &str, ) -> Result<&Table, TimestreamWriteError>

Source

pub fn delete_table( &mut self, database_name: &str, table_name: &str, ) -> Result<(), TimestreamWriteError>

Source

pub fn list_tables( &self, database_name: &str, ) -> Result<Vec<&Table>, TimestreamWriteError>

Source

pub fn update_table( &mut self, database_name: &str, table_name: &str, retention_properties: Option<RetentionProperties>, magnetic_store_write_properties: Option<MagneticStoreWriteProperties>, ) -> Result<&Table, TimestreamWriteError>

Source

pub fn write_records( &mut self, database_name: &str, table_name: &str, records: Vec<Record>, ) -> Result<i32, TimestreamWriteError>

Source

pub fn tag_resource( &mut self, resource_arn: &str, tags: HashMap<String, String>, ) -> Result<(), TimestreamWriteError>

Source

pub fn untag_resource( &mut self, resource_arn: &str, tag_keys: &[String], ) -> Result<(), TimestreamWriteError>

Source

pub fn list_tags_for_resource( &self, resource_arn: &str, ) -> Result<&HashMap<String, String>, TimestreamWriteError>

Source

pub fn create_batch_load_task( &mut self, task_id: String, database_name: &str, table_name: &str, data_source_configuration: Value, report_configuration: Value, data_model_configuration: Option<Value>, ) -> &BatchLoadTask

Source

pub fn describe_batch_load_task( &self, task_id: &str, ) -> Result<&BatchLoadTask, TimestreamWriteError>

Source

pub fn list_batch_load_tasks( &self, task_status_filter: Option<&str>, ) -> Vec<&BatchLoadTask>

Source

pub fn resume_batch_load_task( &mut self, task_id: &str, ) -> Result<(), TimestreamWriteError>

Trait Implementations§

Source§

impl Debug for TimestreamWriteState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TimestreamWriteState

Source§

fn default() -> TimestreamWriteState

Returns the “default value” for a type. Read more
Source§

impl From<&TimestreamWriteState> for TimestreamWriteStateView

Source§

fn from(state: &TimestreamWriteState) -> Self

Converts to this type from the input type.
Source§

impl From<TimestreamWriteStateView> for TimestreamWriteState

Source§

fn from(view: TimestreamWriteStateView) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more