DocumentClient.ReplaceUserDefinedFunctionAsync
Method
Definition
Overloads
| ReplaceUserDefinedFunctionAsync(UserDefinedFunction, RequestOptions) |
Replaces a UserDefinedFunction in the Azure DocumentDB database service as an asynchronous operation. |
| ReplaceUserDefinedFunctionAsync(Uri, UserDefinedFunction, RequestOptions) |
Replaces a user defined function as an asynchronous operation in the Azure DocumentDB database service. |
ReplaceUserDefinedFunctionAsync(UserDefinedFunction, RequestOptions)
Replaces a UserDefinedFunction in the Azure DocumentDB database service as an asynchronous operation.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.UserDefinedFunction>> ReplaceUserDefinedFunctionAsync (Microsoft.Azure.Documents.UserDefinedFunction function, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- function
- UserDefinedFunction
The updated UserDefinedFunction to replace the existing resource with.
- options
- RequestOptions
(Optional) The request options for the request.
A System.Threading.Tasks containing a ResourceResponse<TResource> which wraps a UserDefinedFunction containing the updated resource record.
If function 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:
| StatusCode | Reason for exception |
|---|---|
| 404 | NotFound - This means the resource you tried to delete did not exist. |
ReplaceUserDefinedFunctionAsync(Uri, UserDefinedFunction, RequestOptions)
Replaces a user defined function as an asynchronous operation in the Azure DocumentDB database service.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.UserDefinedFunction>> ReplaceUserDefinedFunctionAsync (Uri userDefinedFunctionUri, Microsoft.Azure.Documents.UserDefinedFunction function, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- userDefinedFunctionUri
- Uri
the URI for the user defined function to be updated.
- function
- UserDefinedFunction
the updated user defined function.
- options
- RequestOptions
The request options for the request.
The task object representing the service response for the asynchronous operation.