IDocumentClient.ReplaceAttachmentAsync Method

Definition

Overloads

ReplaceAttachmentAsync(Uri, Attachment, RequestOptions)

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

ReplaceAttachmentAsync(Attachment, RequestOptions)

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

ReplaceAttachmentAsync(Uri, Attachment, RequestOptions)

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

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Attachment>> ReplaceAttachmentAsync (Uri attachmentUri, Microsoft.Azure.Documents.Attachment attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
attachmentUri
Uri

The URI of the attachment to be updated.

attachment
Attachment

The attachment resource.

options
RequestOptions

(Optional) The RequestOptions for the request.

Returns

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

ReplaceAttachmentAsync(Attachment, RequestOptions)

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

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Attachment>> ReplaceAttachmentAsync (Microsoft.Azure.Documents.Attachment attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
attachment
Attachment

The updated Attachment 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 Attachment containing the updated resource record.