pub struct ContainerProperties {
pub id: Cow<'static, str>,
pub partition_key: PartitionKeyDefinition,
pub indexing_policy: Option<IndexingPolicy>,
pub unique_key_policy: Option<UniqueKeyPolicy>,
pub conflict_resolution_policy: Option<ConflictResolutionPolicy>,
pub vector_embedding_policy: Option<VectorEmbeddingPolicy>,
pub default_ttl: Option<Duration>,
pub analytical_storage_ttl: Option<Duration>,
pub system_properties: SystemProperties,
}Expand description
Properties of a Cosmos DB container.
§Constructing
When constructing this type, you should always use Struct Update syntax using ..Default::default(), for example:
let properties = ContainerProperties {
id: "NewContainer".into(),
partition_key: "/partitionKey".into(),
..Default::default()
};Using this syntax has two purposes:
- It allows you to construct the type even though
SystemPropertiesis not constructable (these properties should always be empty when you send a request). - It protects you if we add additional properties to this struct.
Also, note that the id and partition_key values are required by the server. You will get an error from the server if you omit them.
Fields§
§id: Cow<'static, str>The ID of the container.
partition_key: PartitionKeyDefinitionThe definition of the partition key for the container.
indexing_policy: Option<IndexingPolicy>The indexing policy for the container.
unique_key_policy: Option<UniqueKeyPolicy>The unique key policy for the container.
conflict_resolution_policy: Option<ConflictResolutionPolicy>The conflict resolution policy for the container.
vector_embedding_policy: Option<VectorEmbeddingPolicy>The vector embedding policy for the container.
default_ttl: Option<Duration>The time-to-live for items in the container.
For more information see https://learn.microsoft.com/azure/cosmos-db/time-to-live#time-to-live-configurations
analytical_storage_ttl: Option<Duration>The time-to-live for the analytical store in the container.
For more information see https://learn.microsoft.com/azure/cosmos-db/analytical-store-introduction#analytical-ttl
system_properties: SystemPropertiesA SystemProperties object containing common system properties for the container.
Trait Implementations§
Source§impl Clone for ContainerProperties
impl Clone for ContainerProperties
Source§fn clone(&self) -> ContainerProperties
fn clone(&self) -> ContainerProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more