Table of Contents

Class SqlContainerResource

Namespace
Microsoft.Azure.Management.CosmosDB.Fluent.Models
Assembly
Microsoft.Azure.Management.CosmosDB.Fluent.dll

Cosmos DB SQL container resource object

public class SqlContainerResource
Inheritance
SqlContainerResource
Inherited Members

Constructors

SqlContainerResource()

Initializes a new instance of the SqlContainerResource class.

public SqlContainerResource()

SqlContainerResource(string, IndexingPolicy, ContainerPartitionKey, int?, UniqueKeyPolicy, ConflictResolutionPolicy)

Initializes a new instance of the SqlContainerResource class.

public SqlContainerResource(string id, IndexingPolicy indexingPolicy = null, ContainerPartitionKey partitionKey = null, int? defaultTtl = null, UniqueKeyPolicy uniqueKeyPolicy = null, ConflictResolutionPolicy conflictResolutionPolicy = null)

Parameters

id string

Name of the Cosmos DB SQL container

indexingPolicy IndexingPolicy

The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container

partitionKey ContainerPartitionKey

The configuration of the partition key to be used for partitioning data into multiple partitions

defaultTtl int?

Default time to live

uniqueKeyPolicy UniqueKeyPolicy

The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.

conflictResolutionPolicy ConflictResolutionPolicy

The conflict resolution policy for the container.

Properties

ConflictResolutionPolicy

Gets or sets the conflict resolution policy for the container.

public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; }

Property Value

ConflictResolutionPolicy

DefaultTtl

Gets or sets default time to live

public int? DefaultTtl { get; set; }

Property Value

int?

Id

Gets or sets name of the Cosmos DB SQL container

public string Id { get; set; }

Property Value

string

IndexingPolicy

Gets or sets the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container

public IndexingPolicy IndexingPolicy { get; set; }

Property Value

IndexingPolicy

PartitionKey

Gets or sets the configuration of the partition key to be used for partitioning data into multiple partitions

public ContainerPartitionKey PartitionKey { get; set; }

Property Value

ContainerPartitionKey

UniqueKeyPolicy

Gets or sets the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.

public UniqueKeyPolicy UniqueKeyPolicy { get; set; }

Property Value

UniqueKeyPolicy

Methods

Validate()

Validate the object.

public virtual void Validate()

Exceptions

Microsoft.Rest.ValidationException

Thrown if validation fails