Share via


MetricsAdvisorAdministrationClient.CreateDetectionConfigurationAsync Method

Definition

Creates an AnomalyDetectionConfiguration and assigns it a unique ID.

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

Parameters

detectionConfiguration
AnomalyDetectionConfiguration

Specifies how the created AnomalyDetectionConfiguration 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 AnomalyDetectionConfiguration instance containing information about the created configuration.

Exceptions

detectionConfiguration, detectionConfiguration.MetricId, detectionConfiguration.Name, or detectionConfiguration.WholeSeriesDetectionConditions is null.

detectionConfiguration.MetricId or detectionConfiguration.Name is empty.

Applies to