pub struct DynamoTable {Show 27 fields
pub name: String,
pub arn: String,
pub key_schema: Vec<KeySchemaElement>,
pub attribute_definitions: Vec<AttributeDefinition>,
pub provisioned_throughput: ProvisionedThroughput,
pub items: Vec<HashMap<String, AttributeValue>>,
pub gsi: Vec<GlobalSecondaryIndex>,
pub lsi: Vec<LocalSecondaryIndex>,
pub tags: HashMap<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: HashMap<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>,
}Fields§
§name: String§arn: String§key_schema: Vec<KeySchemaElement>§attribute_definitions: Vec<AttributeDefinition>§provisioned_throughput: ProvisionedThroughput§items: Vec<HashMap<String, AttributeValue>>§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: HashMap<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)
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)
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, AttributeValue>,
) -> Option<usize>
pub fn find_item_index( &self, key: &HashMap<String, AttributeValue>, ) -> Option<usize>
Find an item index by its primary key.
Sourcepub fn record_key_access(&mut self, key: &HashMap<String, AttributeValue>)
pub fn record_key_access(&mut self, key: &HashMap<String, AttributeValue>)
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, AttributeValue>)
pub fn record_item_access(&mut self, item: &HashMap<String, AttributeValue>)
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more