Dela via


MetricAlertData Constructor

Definition

Initializes a new instance of MetricAlertData.

public MetricAlertData (Azure.Core.AzureLocation location, int severity, bool isEnabled, System.Collections.Generic.IEnumerable<string> scopes, TimeSpan evaluationFrequency, TimeSpan windowSize, Azure.ResourceManager.Monitor.Models.MetricAlertCriteria criteria);
new Azure.ResourceManager.Monitor.MetricAlertData : Azure.Core.AzureLocation * int * bool * seq<string> * TimeSpan * TimeSpan * Azure.ResourceManager.Monitor.Models.MetricAlertCriteria -> Azure.ResourceManager.Monitor.MetricAlertData
Public Sub New (location As AzureLocation, severity As Integer, isEnabled As Boolean, scopes As IEnumerable(Of String), evaluationFrequency As TimeSpan, windowSize As TimeSpan, criteria As MetricAlertCriteria)

Parameters

location
AzureLocation

The location.

severity
Int32

Alert severity {0, 1, 2, 3, 4}.

isEnabled
Boolean

the flag that indicates whether the metric alert is enabled.

scopes
IEnumerable<String>

the list of resource id's that this metric alert is scoped to.

evaluationFrequency
TimeSpan

how often the metric alert is evaluated represented in ISO 8601 duration format.

windowSize
TimeSpan

the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.

criteria
MetricAlertCriteria

defines the specific alert criteria information. Please note MetricAlertCriteria is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include MetricAlertMultipleResourceMultipleMetricCriteria, MetricAlertSingleResourceMultipleMetricCriteria and WebtestLocationAvailabilityCriteria.

Exceptions

scopes is null.

Applies to