MetricsAdvisorAdministrationClient.UpdateHook 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 GetHook(String, CancellationToken) or another CRUD operation and update it before calling this method.

public virtual Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook> UpdateHook (Azure.AI.MetricsAdvisor.Administration.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateHook : Azure.AI.MetricsAdvisor.Administration.NotificationHook * System.Threading.CancellationToken -> Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>
override this.UpdateHook : Azure.AI.MetricsAdvisor.Administration.NotificationHook * System.Threading.CancellationToken -> Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>
Public Overridable Function UpdateHook (hook As NotificationHook, Optional cancellationToken As CancellationToken = Nothing) As 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