通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Scripts.DeleteUserDefinedFunctionAsync 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
String

The id of the user defined function to delete.

requestOptions
RequestOptions

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

cancellationToken
CancellationToken

(Optional) CancellationToken representing request cancellation.

Returns

A 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