Package com.azure.cosmos.models
Class UniqueKeyPolicy
java.lang.Object
com.azure.cosmos.models.UniqueKeyPolicy
Represents the unique key policy configuration for specifying uniqueness constraints on items in the
container in the Azure Cosmos DB service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets or sets container ofUniqueKeythat guarantee uniqueness of items in container in the Azure Cosmos DB service.setUniqueKeys(List<UniqueKey> uniqueKeys) Unique keys unique key policy.
-
Constructor Details
-
UniqueKeyPolicy
public UniqueKeyPolicy()Instantiates a new Unique key policy.
-
-
Method Details
-
getUniqueKeys
Gets or sets container ofUniqueKeythat guarantee uniqueness of items in container in the Azure Cosmos DB service.- Returns:
- the unique keys.
-
setUniqueKeys
Unique keys unique key policy.- Parameters:
uniqueKeys- the unique keys- Returns:
- the unique key policy
- Throws:
IllegalArgumentException- thrown if an error occurs
-