RangePartitionResolver<T>.ResolveForCreate(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Given a partition key, returns the correct collection self-link for creating a document using the range partition map in the Azure Cosmos DB service.
public virtual string ResolveForCreate (object partitionKey);
abstract member ResolveForCreate : obj -> string
override this.ResolveForCreate : obj -> string
Public Overridable Function ResolveForCreate (partitionKey As Object) As String
Parameters
- partitionKey
- Object
The partition key used to determine the target collection for create
Returns
The target collection link that will be used for document creation.
Implements
Exceptions
Thrown if partitionKey
is null.
Thrown if the partitionKey
is an invalid type or if none of the ranges match the specified partition key.
Remarks
If multiple ranges match the specified partitionKey, then the resolver returns one of the matching ranges. If none of the ranges match, then the method throws a InvalidOperationException. If partitionKey is null, then all collections are returned.
Applies to
Azure SDK for .NET