ChangeFeedDocumentClient.CreateDocumentAsync(String, Object, RequestOptions, Boolean, CancellationToken) ChangeFeedDocumentClient.CreateDocumentAsync(String, Object, RequestOptions, Boolean, CancellationToken) Method

Definition

Creates the document.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.IResourceResponse<Microsoft.Azure.Documents.Document>> CreateDocumentAsync (string documentsFeedOrDatabaseLink, object document, Microsoft.Azure.Documents.Client.RequestOptions options = null, bool disableAutomaticIdGeneration = false, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateDocumentAsync : string * obj * Microsoft.Azure.Documents.Client.RequestOptions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.IResourceResponse<Microsoft.Azure.Documents.Document>>
override this.CreateDocumentAsync : string * obj * Microsoft.Azure.Documents.Client.RequestOptions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.IResourceResponse<Microsoft.Azure.Documents.Document>>

Parameters

documentsFeedOrDatabaseLink
String String

Collection Self Link.

document
Object Object

Document to store.

options
RequestOptions RequestOptions

The RequestOptionsfor this request.

disableAutomaticIdGeneration
Boolean Boolean

Disables the automatic id generation, If this is True the system will throw an exception if the id property is missing from the Document.

cancellationToken
CancellationToken CancellationToken

A CancellationTokenthat can be used by other objects or threads to receive notice of cancellation.

Returns

A response containing a Document.

Implements

Applies to