Scripts.DeleteUserDefinedFunctionAsync(String, RequestOptions, CancellationToken) Method

Definition

Delete a UserDefinedFunctionProperties from the Azure Cosmos DB service as an asynchronous operation.

public abstract System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.Scripts.UserDefinedFunctionResponse> DeleteUserDefinedFunctionAsync (string id, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteUserDefinedFunctionAsync : string * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.Scripts.UserDefinedFunctionResponse>
Public MustOverride Function DeleteUserDefinedFunctionAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of UserDefinedFunctionResponse)

Parameters

id
System.String

The id of the user defined function to delete.

requestOptions
RequestOptions

(Optional) The options for the user defined function request.

cancellationToken
System.Threading.CancellationToken

(Optional) System.Threading.CancellationToken representing request cancellation.

Returns

System.Threading.Tasks.Task<UserDefinedFunctionResponse>

A System.Threading.Tasks.Task containing a UserDefinedFunctionResponse which wraps a UserDefinedFunctionProperties which will contain information about the request issued.

Examples

This examples gets a reference to an existing user defined function and deletes it.

Scripts scripts = this.container.Scripts;
UserDefinedFunctionResponse response = await this.container.DeleteUserDefinedFunctionAsync("existingId");

Applies to