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

MetricsAdvisorAdministrationClient.CreateAlertConfigurationAsync Method

Definition

Creates an AnomalyAlertConfiguration and assigns it a unique ID.

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

Parameters

alertConfiguration
AnomalyAlertConfiguration

Specifies how the created AnomalyAlertConfiguration should be configured.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A Response<T> containing the result of the operation. The result is an AnomalyAlertConfiguration instance containing information about the created configuration.

Exceptions

alertConfiguration or alertConfiguration.Name is null.

alertConfiguration.Name is empty.

Applies to