Share via


MetricsAdvisorAdministrationClient.UpdateHookAsync Method

Definition

Updates an existing NotificationHook. In order to update your hook, you cannot create a NotificationHook directly from its constructor. You need to obtain an instance via GetHookAsync(String, CancellationToken) or another CRUD operation and update it before calling this method.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>> UpdateHookAsync (Azure.AI.MetricsAdvisor.Administration.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateHookAsync : Azure.AI.MetricsAdvisor.Administration.NotificationHook * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>>
override this.UpdateHookAsync : Azure.AI.MetricsAdvisor.Administration.NotificationHook * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>>
Public Overridable Function UpdateHookAsync (hook As NotificationHook, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of NotificationHook))

Parameters

hook
NotificationHook

The NotificationHook model containing the updates to be applied.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A Response containing the result of the operation.

Exceptions

hook or hook.Id is null.

Applies to