### YamlMime:JavaType
uid: "com.azure.cosmos.models.UniqueKeyPolicy"
fullName: "com.azure.cosmos.models.UniqueKeyPolicy"
name: "UniqueKeyPolicy"
nameWithType: "UniqueKeyPolicy"
summary: "Represents the unique key policy configuration for specifying uniqueness constraints on items in the container in the Azure Cosmos DB service."
inheritances:
- ""
inheritedClassMethods:
- classRef: "java.lang.Object"
methodsRef:
- "clone"
- "equals"
- "finalize"
- "getClass"
- "hashCode"
- "notify"
- "notifyAll"
- "toString"
- "wait"
- "wait"
- "wait"
syntax: "public final class **UniqueKeyPolicy**"
constructors:
- uid: "com.azure.cosmos.models.UniqueKeyPolicy.UniqueKeyPolicy()"
fullName: "com.azure.cosmos.models.UniqueKeyPolicy.UniqueKeyPolicy()"
name: "UniqueKeyPolicy()"
nameWithType: "UniqueKeyPolicy.UniqueKeyPolicy()"
summary: "Instantiates a new Unique key policy."
syntax: "public UniqueKeyPolicy()"
desc: "Instantiates a new Unique key policy."
methods:
- uid: "com.azure.cosmos.models.UniqueKeyPolicy.getUniqueKeys()"
fullName: "com.azure.cosmos.models.UniqueKeyPolicy.getUniqueKeys()"
name: "getUniqueKeys()"
nameWithType: "UniqueKeyPolicy.getUniqueKeys()"
summary: "Gets or sets container of that guarantee uniqueness of items in container in the Azure Cosmos DB service."
syntax: "public List getUniqueKeys()"
desc: "Gets or sets container of that guarantee uniqueness of items in container in the Azure Cosmos DB service."
returns:
description: "the unique keys."
type: "List<>"
- uid: "com.azure.cosmos.models.UniqueKeyPolicy.setUniqueKeys(java.util.List)"
fullName: "com.azure.cosmos.models.UniqueKeyPolicy.setUniqueKeys(List uniqueKeys)"
name: "setUniqueKeys(List uniqueKeys)"
nameWithType: "UniqueKeyPolicy.setUniqueKeys(List uniqueKeys)"
summary: "Unique keys unique key policy."
parameters:
- description: "the unique keys"
name: "uniqueKeys"
type: "List<>"
syntax: "public UniqueKeyPolicy setUniqueKeys(List uniqueKeys)"
desc: "Unique keys unique key policy."
returns:
description: "the unique key policy"
type: ""
type: "class"
desc: "Represents the unique key policy configuration for specifying uniqueness constraints on items in the container in the Azure Cosmos DB service."
metadata: {}
package: "com.azure.cosmos.models"
artifact: com.azure:azure-cosmos:4.63.4