pub struct DynamoTable {Show 31 fields
pub name: String,
pub arn: String,
pub table_id: String,
pub key_schema: Vec<KeySchemaElement>,
pub attribute_definitions: Vec<AttributeDefinition>,
pub provisioned_throughput: ProvisionedThroughput,
pub items: Vec<HashMap<String, Value>>,
pub gsi: Vec<GlobalSecondaryIndex>,
pub lsi: Vec<LocalSecondaryIndex>,
pub tags: BTreeMap<String, String>,
pub created_at: DateTime<Utc>,
pub status: String,
pub item_count: i64,
pub size_bytes: i64,
pub billing_mode: String,
pub ttl_attribute: Option<String>,
pub ttl_enabled: bool,
pub resource_policy: Option<String>,
pub pitr_enabled: bool,
pub kinesis_destinations: Vec<KinesisDestination>,
pub contributor_insights_status: String,
pub contributor_insights_counters: BTreeMap<String, u64>,
pub stream_enabled: bool,
pub stream_view_type: Option<String>,
pub stream_arn: Option<String>,
pub stream_records: Arc<RwLock<Vec<StreamRecord>>>,
pub sse_type: Option<String>,
pub sse_kms_key_arn: Option<String>,
pub deletion_protection_enabled: bool,
pub on_demand_throughput: Option<OnDemandThroughput>,
pub table_class: String,
}Fields§
§name: String§arn: String§table_id: String§key_schema: Vec<KeySchemaElement>§attribute_definitions: Vec<AttributeDefinition>§provisioned_throughput: ProvisionedThroughput§items: Vec<HashMap<String, Value>>§gsi: Vec<GlobalSecondaryIndex>§lsi: Vec<LocalSecondaryIndex>§created_at: DateTime<Utc>§status: String§item_count: i64§size_bytes: i64§billing_mode: String§ttl_attribute: Option<String>§ttl_enabled: bool§resource_policy: Option<String>§pitr_enabled: boolPITR enabled
kinesis_destinations: Vec<KinesisDestination>Kinesis streaming destinations: stream_arn -> status
contributor_insights_status: StringContributor insights status
contributor_insights_counters: BTreeMap<String, u64>Contributor insights: partition key access counters (key_value_string -> count)
stream_enabled: boolDynamoDB Streams configuration
stream_view_type: Option<String>§stream_arn: Option<String>§stream_records: Arc<RwLock<Vec<StreamRecord>>>Stream records (retained for 24 hours). Not persisted: stream records are ephemeral and would be garbage anyway across restarts.
sse_type: Option<String>Server-side encryption type: AES256 (owned) or KMS
sse_kms_key_arn: Option<String>KMS key ARN for SSE (only when sse_type is KMS)
deletion_protection_enabled: boolDeletion protection: when true, DeleteTable is rejected with
ResourceInUseException. Defaults to false. Returned on every
DescribeTable and toggleable via UpdateTable.
on_demand_throughput: Option<OnDemandThroughput>Table-level on-demand throughput caps. Only meaningful for PAY_PER_REQUEST tables, but real AWS echoes the field on every DescribeTable once set.
table_class: StringStorage class: STANDARD (default) or STANDARD_INFREQUENT_ACCESS.
Returned inside TableClassSummary on DescribeTable; set at
CreateTable and changed via UpdateTable.
Implementations§
Source§impl DynamoTable
impl DynamoTable
Sourcepub fn hash_key_name(&self) -> &str
pub fn hash_key_name(&self) -> &str
Get the hash key attribute name from the key schema.
Sourcepub fn range_key_name(&self) -> Option<&str>
pub fn range_key_name(&self) -> Option<&str>
Get the range key attribute name from the key schema (if any).
Sourcepub fn find_item_index(&self, key: &HashMap<String, Value>) -> Option<usize>
pub fn find_item_index(&self, key: &HashMap<String, Value>) -> Option<usize>
Find an item index by its primary key.
Sourcepub fn record_key_access(&mut self, key: &HashMap<String, Value>)
pub fn record_key_access(&mut self, key: &HashMap<String, Value>)
Record a partition key access for contributor insights. Only records if contributor insights is enabled.
Sourcepub fn record_item_access(&mut self, item: &HashMap<String, Value>)
pub fn record_item_access(&mut self, item: &HashMap<String, Value>)
Record a partition key access from a full item (extracts the key first).
Sourcepub fn top_contributors(&self, n: usize) -> Vec<(&str, u64)>
pub fn top_contributors(&self, n: usize) -> Vec<(&str, u64)>
Get top N contributors sorted by access count (descending).
Sourcepub fn recalculate_stats(&mut self)
pub fn recalculate_stats(&mut self)
Recalculate item_count and size_bytes from the items vec.
Trait Implementations§
Source§impl Clone for DynamoTable
impl Clone for DynamoTable
Source§fn clone(&self) -> DynamoTable
fn clone(&self) -> DynamoTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more