MetricsAdvisorAdministrationClient.CreateHook Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a NotificationHook and assigns it a unique ID.
public virtual Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook> CreateHook (Azure.AI.MetricsAdvisor.Administration.NotificationHook hook, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateHook : Azure.AI.MetricsAdvisor.Administration.NotificationHook * System.Threading.CancellationToken -> Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>
override this.CreateHook : Azure.AI.MetricsAdvisor.Administration.NotificationHook * System.Threading.CancellationToken -> Azure.Response<Azure.AI.MetricsAdvisor.Administration.NotificationHook>
Public Overridable Function CreateHook (hook As NotificationHook, Optional cancellationToken As CancellationToken = Nothing) As Response(Of NotificationHook)
Parameters
- hook
- NotificationHook
Specifies how the created NotificationHook should be configured.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
A Response<T> containing the result of the operation. The result is a NotificationHook instance containing information about the created hook.
Exceptions
hook
is null; or hook
is an EmailNotificationHook and hook
.EmailsToAlert is null.
hook
is an EmailNotificationHook and hook
.EmailsToAlert is empty.
Applies to
Azure SDK for .NET