ContainerDefinition<T> Class

Definition

Azure Cosmos container fluent definition.

public abstract class ContainerDefinition<T> where T : ContainerDefinition<T>
type ContainerDefinition<'T (requires 'T :> ContainerDefinition<'T>)> = class
Public MustInherit Class ContainerDefinition(Of T)

Type Parameters

T
Inheritance
ContainerDefinition<T>
Derived

Constructors

ContainerDefinition<T>()

Creates an instance for unit-testing

Methods

Build()

Applies the current Fluent definition and creates a container configuration.

WithDefaultTimeToLive(Int32)

DefaultTimeToLive will be applied to all the items in the container as the default time-to-live policy. The individual item could override the default time-to-live policy by setting its time to live.

WithDefaultTimeToLive(TimeSpan)

DefaultTimeToLive will be applied to all the items in the container as the default time-to-live policy. The individual item could override the default time-to-live policy by setting its time to live.

WithIndexingPolicy()

IndexingPolicy definition for the current Azure Cosmos container.

WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion)

Sets the PartitionKeyDefinitionVersion

The partition key definition version 1 uses a hash function that computes hash based on the first 100 bytes of the partition key. This can cause conflicts for documents with partition keys greater than 100 bytes.

The partition key definition version 2 uses a hash function that computes hash based on the first 2 KB of the partition key.

WithTimeToLivePropertyPath(String)

Sets the time to live base timestamp property path.

Applies to

See also