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.
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, Azure.ResourceManager.Monitor.Models.MetricAlertResolveConfiguration resolveConfiguration = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Monitor.Models.MetricAlertAction> actions = default, DateTimeOffset? lastUpdatedOn = default, bool? isMigrated = default, System.Collections.Generic.IDictionary<string,string> customProperties = default, System.Collections.Generic.IDictionary<string,string> actionProperties = default, Azure.ResourceManager.Models.ManagedServiceIdentity identity = 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> * Azure.ResourceManager.Monitor.Models.MetricAlertResolveConfiguration * seq<Azure.ResourceManager.Monitor.Models.MetricAlertAction> * Nullable<DateTimeOffset> * Nullable<bool> * System.Collections.Generic.IDictionary<string, string> * System.Collections.Generic.IDictionary<string, string> * Azure.ResourceManager.Models.ManagedServiceIdentity -> 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 resolveConfiguration As MetricAlertResolveConfiguration = Nothing, Optional actions As IEnumerable(Of MetricAlertAction) = Nothing, Optional lastUpdatedOn As Nullable(Of DateTimeOffset) = Nothing, Optional isMigrated As Nullable(Of Boolean) = Nothing, Optional customProperties As IDictionary(Of String, String) = Nothing, Optional actionProperties As IDictionary(Of String, String) = Nothing, Optional identity As ManagedServiceIdentity = Nothing) As MetricAlertData
Parameters
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
- name
- String
The name of the resource.
- resourceType
- ResourceType
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
- systemData
- SystemData
Azure Resource Manager metadata containing createdBy and modifiedBy information.
- tags
- IDictionary<String,String>
Resource tags.
- location
- AzureLocation
The geo-location where the resource lives.
- 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. 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.
- 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.
The flag that indicates whether the alert should be auto resolved or not. The default is true.
- resolveConfiguration
- MetricAlertResolveConfiguration
The configuration for how the alert is resolved. Applicable for PromQLCriteria.
- 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.
- customProperties
- IDictionary<String,String>
The properties of an alert payload.
- actionProperties
- IDictionary<String,String>
The properties of an action properties.
- identity
- ManagedServiceIdentity
The identity of the resource.
Returns
A new MetricAlertData instance for mocking.