pub struct KeyspacesState {
pub keyspaces: HashMap<String, Keyspace>,
pub tables: HashMap<(String, String), Table>,
pub types: HashMap<(String, String), UserDefinedType>,
}Fields§
§keyspaces: HashMap<String, Keyspace>Keyspaces keyed by name.
tables: HashMap<(String, String), Table>Tables keyed by (keyspace_name, table_name).
types: HashMap<(String, String), UserDefinedType>User-defined types keyed by (keyspace_name, type_name).
Implementations§
Source§impl KeyspacesState
impl KeyspacesState
pub fn create_keyspace( &mut self, name: &str, replication_strategy: &str, replication_regions: Vec<String>, tags: HashMap<String, String>, account_id: &str, region: &str, ) -> Result<String, KeyspacesError>
pub fn get_keyspace(&self, name: &str) -> Result<&Keyspace, KeyspacesError>
pub fn delete_keyspace(&mut self, name: &str) -> Result<(), KeyspacesError>
pub fn update_keyspace( &mut self, name: &str, replication_strategy: &str, replication_regions: Vec<String>, ) -> Result<String, KeyspacesError>
pub fn list_keyspaces(&self) -> Vec<&Keyspace>
pub fn create_table( &mut self, keyspace_name: &str, table_name: &str, schema: SchemaDefinition, capacity_mode: &str, read_capacity_units: Option<i64>, write_capacity_units: Option<i64>, encryption_type: &str, kms_key_identifier: Option<String>, point_in_time_recovery: bool, ttl_status: &str, default_time_to_live: Option<i32>, comment: &str, client_side_timestamps: bool, tags: HashMap<String, String>, account_id: &str, region: &str, ) -> Result<String, KeyspacesError>
pub fn get_table( &self, keyspace_name: &str, table_name: &str, ) -> Result<&Table, KeyspacesError>
pub fn delete_table( &mut self, keyspace_name: &str, table_name: &str, ) -> Result<(), KeyspacesError>
pub fn update_table( &mut self, keyspace_name: &str, table_name: &str, capacity_mode: Option<&str>, read_capacity_units: Option<i64>, write_capacity_units: Option<i64>, encryption_type: Option<&str>, kms_key_identifier: Option<String>, point_in_time_recovery: Option<bool>, ttl_status: Option<&str>, default_time_to_live: Option<i32>, client_side_timestamps: Option<bool>, ) -> Result<String, KeyspacesError>
pub fn list_tables( &self, keyspace_name: &str, ) -> Result<Vec<&Table>, KeyspacesError>
pub fn restore_table( &mut self, source_keyspace_name: &str, source_table_name: &str, target_keyspace_name: &str, target_table_name: &str, account_id: &str, region: &str, ) -> Result<String, KeyspacesError>
pub fn create_type( &mut self, keyspace_name: &str, type_name: &str, field_definitions: Vec<FieldDefinition>, ) -> Result<String, KeyspacesError>
pub fn get_type( &self, keyspace_name: &str, type_name: &str, ) -> Result<&UserDefinedType, KeyspacesError>
pub fn delete_type( &mut self, keyspace_name: &str, type_name: &str, ) -> Result<(), KeyspacesError>
pub fn list_types( &self, keyspace_name: &str, ) -> Result<Vec<&UserDefinedType>, KeyspacesError>
Get tags for a resource by ARN. Returns empty map if no tags found.
pub fn tag_resource( &mut self, arn: &str, tags: HashMap<String, String>, ) -> Result<(), KeyspacesError>
pub fn untag_resource( &mut self, arn: &str, tag_keys: &[String], ) -> Result<(), KeyspacesError>
Trait Implementations§
Source§impl Debug for KeyspacesState
impl Debug for KeyspacesState
Source§impl Default for KeyspacesState
impl Default for KeyspacesState
Source§fn default() -> KeyspacesState
fn default() -> KeyspacesState
Returns the “default value” for a type. Read more
Source§impl From<&KeyspacesState> for KeyspacesStateView
impl From<&KeyspacesState> for KeyspacesStateView
Source§fn from(state: &KeyspacesState) -> Self
fn from(state: &KeyspacesState) -> Self
Converts to this type from the input type.
Source§impl From<KeyspacesStateView> for KeyspacesState
impl From<KeyspacesStateView> for KeyspacesState
Source§fn from(view: KeyspacesStateView) -> Self
fn from(view: KeyspacesStateView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KeyspacesState
impl RefUnwindSafe for KeyspacesState
impl Send for KeyspacesState
impl Sync for KeyspacesState
impl Unpin for KeyspacesState
impl UnsafeUnpin for KeyspacesState
impl UnwindSafe for KeyspacesState
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreCreates a shared type from an unshared type.