DocumentClient.ReplaceTriggerAsync Method

Definition

Overloads

ReplaceTriggerAsync(Trigger, RequestOptions)

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

ReplaceTriggerAsync(Uri, Trigger, RequestOptions)

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

ReplaceTriggerAsync(Trigger, RequestOptions)

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

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Trigger>> ReplaceTriggerAsync (Microsoft.Azure.Documents.Trigger trigger, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
trigger
Trigger

The updated Trigger to replace the existing resource with.

options
RequestOptions

(Optional) The request options for the request.

Returns

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

Exceptions

If trigger is not set.

This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:

StatusCodeReason for exception
404NotFound - This means the resource you tried to delete did not exist.

ReplaceTriggerAsync(Uri, Trigger, RequestOptions)

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

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Trigger>> ReplaceTriggerAsync (Uri triggerUri, Microsoft.Azure.Documents.Trigger trigger, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
triggerUri
Uri

the URI for the trigger to be updated.

trigger
Trigger

the updated trigger.

options
RequestOptions

The request options for the request.

Returns

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