MetricAlertData Constructor
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.
Initializes a new instance of MetricAlertData.
public MetricAlertData(Azure.Core.AzureLocation location, int severity, bool isEnabled, System.Collections.Generic.IEnumerable<string> scopes, TimeSpan evaluationFrequency, Azure.ResourceManager.Monitor.Models.MetricAlertCriteria criteria);
new Azure.ResourceManager.Monitor.MetricAlertData : Azure.Core.AzureLocation * int * bool * seq<string> * 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, 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. You cannot change the scope of a metric rule based on logs.
- evaluationFrequency
- TimeSpan
How often the metric alert is evaluated represented in ISO 8601 duration format.
- 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, PromQLCriteria, MetricAlertSingleResourceMultipleMetricCriteria and WebtestLocationAvailabilityCriteria.
Exceptions
scopes is null.