IDocumentClient.ReplaceDocumentAsync Method

Definition

Overloads

ReplaceDocumentAsync(Document, RequestOptions)

Replaces a Document as an asynchronous operation in the Azure DocumentDB database service.

ReplaceDocumentAsync(String, Object, RequestOptions)

Replaces a Document as an asynchronous operation in the Azure DocumentDB database service.

ReplaceDocumentAsync(Uri, Object, RequestOptions)

Replaces a document as an asynchronous operation in the Azure DocumentDB database service.

ReplaceDocumentAsync(Document, RequestOptions)

Replaces a Document as an asynchronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Document>> ReplaceDocumentAsync (Microsoft.Azure.Documents.Document document, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
document
Document

The updated Document to replace the existing resource with.

options
RequestOptions

(Optional) The RequestOptionsfor this request.

Returns

A System.Threading.Tasks containing a ResourceResponse<TResource> which wraps a Document containing the updated resource record.

ReplaceDocumentAsync(String, Object, RequestOptions)

Replaces a Document as an asynchronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Document>> ReplaceDocumentAsync (string documentLink, object document, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
documentLink
String

The link of the document to be updated. E.g. dbs/db_rid/colls/col_rid/docs/doc_rid/

document
Object

The updated Document to replace the existing resource with.

options
RequestOptions

(Optional) The RequestOptionsfor this request.

Returns

A System.Threading.Tasks containing a ResourceResponse<TResource> which wraps a Document containing the updated resource record.

ReplaceDocumentAsync(Uri, Object, RequestOptions)

Replaces a document as an asynchronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Document>> ReplaceDocumentAsync (Uri documentUri, object document, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
documentUri
Uri

The URI of the document to be updated.

document
Object

The updated document.

options
RequestOptions

(Optional) The RequestOptions for the request.

Returns

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