Class ContainerResource
- java.lang.Object
-
- com.microsoft.azure.management.cosmosdb.ContainerResource
-
public class ContainerResource extends Object
Cosmos DB container resource object.
-
-
Constructor Summary
Constructors Constructor Description ContainerResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConflictResolutionPolicyconflictResolutionPolicy()Get the conflict resolution policy for the container.IntegerdefaultTtl()Get default time to live.Stringid()Get name of the Cosmos DB container.IndexingPolicyindexingPolicy()Get the configuration of the indexing policy.ContainerPartitionKeypartitionKey()Get the configuration of the partition key to be used for partitioning data into multiple partitions.UniqueKeyPolicyuniqueKeyPolicy()Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.ContainerResourcewithConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy)Set the conflict resolution policy for the container.ContainerResourcewithDefaultTtl(Integer defaultTtl)Set default time to live.ContainerResourcewithId(String id)Set name of the Cosmos DB container.ContainerResourcewithIndexingPolicy(IndexingPolicy indexingPolicy)Set the configuration of the indexing policy.ContainerResourcewithPartitionKey(ContainerPartitionKey partitionKey)Set the configuration of the partition key to be used for partitioning data into multiple partitions.ContainerResourcewithUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
-
-
-
Method Detail
-
id
public String id()
Get name of the Cosmos DB container.- Returns:
- the id value
-
withId
public ContainerResource withId(String id)
Set name of the Cosmos DB container.- Parameters:
id- the id value to set- Returns:
- the ContainerResource object itself.
-
indexingPolicy
public IndexingPolicy indexingPolicy()
Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container.- Returns:
- the indexingPolicy value
-
withIndexingPolicy
public ContainerResource withIndexingPolicy(IndexingPolicy indexingPolicy)
Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container.- Parameters:
indexingPolicy- the indexingPolicy value to set- Returns:
- the ContainerResource object itself.
-
partitionKey
public ContainerPartitionKey partitionKey()
Get the configuration of the partition key to be used for partitioning data into multiple partitions.- Returns:
- the partitionKey value
-
withPartitionKey
public ContainerResource withPartitionKey(ContainerPartitionKey partitionKey)
Set the configuration of the partition key to be used for partitioning data into multiple partitions.- Parameters:
partitionKey- the partitionKey value to set- Returns:
- the ContainerResource object itself.
-
defaultTtl
public Integer defaultTtl()
Get default time to live.- Returns:
- the defaultTtl value
-
withDefaultTtl
public ContainerResource withDefaultTtl(Integer defaultTtl)
Set default time to live.- Parameters:
defaultTtl- the defaultTtl value to set- Returns:
- the ContainerResource object itself.
-
uniqueKeyPolicy
public UniqueKeyPolicy uniqueKeyPolicy()
Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.- Returns:
- the uniqueKeyPolicy value
-
withUniqueKeyPolicy
public ContainerResource withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)
Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.- Parameters:
uniqueKeyPolicy- the uniqueKeyPolicy value to set- Returns:
- the ContainerResource object itself.
-
conflictResolutionPolicy
public ConflictResolutionPolicy conflictResolutionPolicy()
Get the conflict resolution policy for the container.- Returns:
- the conflictResolutionPolicy value
-
withConflictResolutionPolicy
public ContainerResource withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy)
Set the conflict resolution policy for the container.- Parameters:
conflictResolutionPolicy- the conflictResolutionPolicy value to set- Returns:
- the ContainerResource object itself.
-
-