Megosztás a következőn keresztül:


IChangeFeedDocumentClient.ReplaceDocumentAsync Method

Definition

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

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.IResourceResponse<Microsoft.Azure.Documents.Document>> ReplaceDocumentAsync (Uri documentUri, object document, Microsoft.Azure.Documents.Client.RequestOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplaceDocumentAsync : Uri * obj * Microsoft.Azure.Documents.Client.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.IResourceResponse<Microsoft.Azure.Documents.Document>>
Public Function ReplaceDocumentAsync (documentUri As Uri, document As Object, Optional options As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IResourceResponse(Of Document))

Parameters

documentUri
Uri

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

The RequestOptionsfor this request.

cancellationToken
CancellationToken

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

Returns

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

Applies to