Share via


Scripts.DeleteUserDefinedFunctionStreamAsync Method

Definition

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

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

Parameters

id
String
requestOptions
RequestOptions
cancellationToken
CancellationToken

Returns

A Task containing a ResponseMessage 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;
ResponseMessage response = await this.container.DeleteUserDefinedFunctionStreamAsync("existingId");
if (!response.IsSuccessStatusCode)
{
    //Handle and log exception
    return;
}

Applies to