ArmMonitorModelFactory.MetricAlertPatch 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 MetricAlertPatch.
public static Azure.ResourceManager.Monitor.Models.MetricAlertPatch MetricAlertPatch(System.Collections.Generic.IDictionary<string,string> tags = default, Azure.ResourceManager.Models.ManagedServiceIdentity identity = default, string description = default, int? severity = default, bool? isEnabled = default, 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.ResolveConfiguration 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);
static member MetricAlertPatch : System.Collections.Generic.IDictionary<string, string> * Azure.ResourceManager.Models.ManagedServiceIdentity * string * Nullable<int> * Nullable<bool> * seq<string> * Nullable<TimeSpan> * Nullable<TimeSpan> * Nullable<Azure.Core.ResourceType> * Nullable<Azure.Core.AzureLocation> * Azure.ResourceManager.Monitor.Models.MetricAlertCriteria * Nullable<bool> * Azure.ResourceManager.Monitor.Models.ResolveConfiguration * seq<Azure.ResourceManager.Monitor.Models.MetricAlertAction> * Nullable<DateTimeOffset> * Nullable<bool> * System.Collections.Generic.IDictionary<string, string> * System.Collections.Generic.IDictionary<string, string> -> Azure.ResourceManager.Monitor.Models.MetricAlertPatch
Public Shared Function MetricAlertPatch (Optional tags As IDictionary(Of String, String) = Nothing, Optional identity As ManagedServiceIdentity = Nothing, Optional description As String = Nothing, Optional severity As Nullable(Of Integer) = Nothing, Optional isEnabled As Nullable(Of Boolean) = Nothing, Optional scopes As IEnumerable(Of String) = Nothing, Optional evaluationFrequency As Nullable(Of TimeSpan) = Nothing, Optional windowSize As Nullable(Of 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 ResolveConfiguration = 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) As MetricAlertPatch
Parameters
- tags
- IDictionary<String,String>
Resource tags.
- identity
- ManagedServiceIdentity
The identity of the resource. Current supported identity types: None, SystemAssigned, UserAssigned.
- description
- String
The description of the metric alert that will be included in the alert email.
- scopes
- IEnumerable<String>
The list of resource id's that this metric alert is scoped to.
How often the metric alert is evaluated represented in ISO 8601 duration format.
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 for MultipleResourceMultipleMetricCriteria.
- targetResourceRegion
- Nullable<AzureLocation>
The region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
- 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.
The flag that indicates whether the alert should be auto resolved or not. The default is true.
- resolveConfiguration
- ResolveConfiguration
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.
Returns
A new MetricAlertPatch instance for mocking.