ArmMonitorModelFactory.MetricAlertData 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.
Initializes a new instance of MetricAlertData.
public static Azure.ResourceManager.Monitor.MetricAlertData MetricAlertData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, string description = default, int severity = 0, bool isEnabled = false, System.Collections.Generic.IEnumerable<string> scopes = default, TimeSpan evaluationFrequency = default, TimeSpan windowSize = default, Azure.Core.ResourceType? targetResourceType = default, Azure.Core.AzureLocation? targetResourceRegion = default, Azure.ResourceManager.Monitor.Models.MetricAlertCriteria criteria = default, bool? isAutoMitigateEnabled = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Monitor.Models.MetricAlertAction> actions = default, DateTimeOffset? lastUpdatedOn = default, bool? isMigrated = default);
static member MetricAlertData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * System.Collections.Generic.IDictionary<string, string> * Azure.Core.AzureLocation * string * int * bool * seq<string> * TimeSpan * TimeSpan * Nullable<Azure.Core.ResourceType> * Nullable<Azure.Core.AzureLocation> * Azure.ResourceManager.Monitor.Models.MetricAlertCriteria * Nullable<bool> * seq<Azure.ResourceManager.Monitor.Models.MetricAlertAction> * Nullable<DateTimeOffset> * Nullable<bool> -> Azure.ResourceManager.Monitor.MetricAlertData
Public Shared Function MetricAlertData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional location As AzureLocation = Nothing, Optional description As String = Nothing, Optional severity As Integer = 0, Optional isEnabled As Boolean = false, Optional scopes As IEnumerable(Of String) = Nothing, Optional evaluationFrequency As TimeSpan = Nothing, Optional windowSize As TimeSpan = Nothing, Optional targetResourceType As Nullable(Of ResourceType) = Nothing, Optional targetResourceRegion As Nullable(Of AzureLocation) = Nothing, Optional criteria As MetricAlertCriteria = Nothing, Optional isAutoMitigateEnabled As Nullable(Of Boolean) = Nothing, Optional actions As IEnumerable(Of MetricAlertAction) = Nothing, Optional lastUpdatedOn As Nullable(Of DateTimeOffset) = Nothing, Optional isMigrated As Nullable(Of Boolean) = Nothing) As MetricAlertData
Parameters
The id.
- name
- String
The name.
- resourceType
- ResourceType
The resourceType.
- systemData
- SystemData
The systemData.
- tags
- IDictionary<String,String>
The tags.
- location
- AzureLocation
The location.
- description
- String
the description of the metric alert that will be included in the alert email.
- 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.
- targetResourceType
- Nullable<ResourceType>
the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
- targetResourceRegion
- Nullable<AzureLocation>
the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
- 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.
the flag that indicates whether the alert should be auto resolved or not. The default is true.
- actions
- IEnumerable<MetricAlertAction>
the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
- lastUpdatedOn
- Nullable<DateTimeOffset>
Last time the rule was updated in ISO8601 format.
Returns
A new MetricAlertData instance for mocking.
Applies to
Azure SDK for .NET