Struct aws_sdk_dynamodb::model::key_schema_element::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for KeySchemaElement
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn attribute_name(self, input: impl Into<String>) -> Self
pub fn attribute_name(self, input: impl Into<String>) -> Self
The name of a key attribute.
sourcepub fn set_attribute_name(self, input: Option<String>) -> Self
pub fn set_attribute_name(self, input: Option<String>) -> Self
The name of a key attribute.
sourcepub fn key_type(self, input: KeyType) -> Self
pub fn key_type(self, input: KeyType) -> Self
The role that this key attribute will assume:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
sourcepub fn set_key_type(self, input: Option<KeyType>) -> Self
pub fn set_key_type(self, input: Option<KeyType>) -> Self
The role that this key attribute will assume:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
sourcepub fn build(self) -> KeySchemaElement
pub fn build(self) -> KeySchemaElement
Consumes the builder and constructs a KeySchemaElement
.