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

Scripts.DeleteTriggerAsync(String, RequestOptions, CancellationToken) 方法

定义

TriggerProperties从 Azure Cosmos 服务中删除 作为异步操作。

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

参数

id
String

要删除的触发器的 ID。

requestOptions
RequestOptions

(可选) 触发器请求的选项。

cancellationToken
CancellationToken

(表示请求取消的可选) CancellationToken

返回

包含 Task 的 , TriggerResponse 它包装 TriggerProperties 将包含有关发出的请求的信息的 。

示例

此示例获取对现有触发器的引用并将其删除。

Scripts scripts = this.container.Scripts;
TriggerResponse response = await scripts.DeleteTriggerAsync("existingId");

适用于