IDocumentClient.CreateDocumentCollectionAsync Method

Definition

Overloads

CreateDocumentCollectionAsync(String, DocumentCollection, RequestOptions)

Creates a collection as an asychronous operation in the Azure DocumentDB database service.

CreateDocumentCollectionAsync(Uri, DocumentCollection, RequestOptions)

Creates a collection as an asychronous operation in the Azure DocumentDB database service.

CreateDocumentCollectionAsync(String, DocumentCollection, RequestOptions)

Creates a collection as an asychronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.DocumentCollection>> CreateDocumentCollectionAsync (string databaseLink, Microsoft.Azure.Documents.DocumentCollection documentCollection, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
databaseLink
String

The link of the database to create the collection in. E.g. dbs/db_rid/

documentCollection
DocumentCollection

The DocumentCollection object.

options
RequestOptions

(Optional) The RequestOptions you wish to provide when creating a Collection. E.g. RequestOptions.OfferThroughput=400.

Returns

The DocumentCollection that was created contained within a Task object representing the service response for the asynchronous operation.

CreateDocumentCollectionAsync(Uri, DocumentCollection, RequestOptions)

Creates a collection as an asychronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.DocumentCollection>> CreateDocumentCollectionAsync (Uri databaseUri, Microsoft.Azure.Documents.DocumentCollection documentCollection, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
databaseUri
Uri

The URI of the database to create the collection in.

documentCollection
DocumentCollection

The DocumentCollection object.

options
RequestOptions

(Optional) The RequestOptions for the request.

Returns

The task object representing the service response for the asynchronous operation.