Udostępnij przez


ArmMonitorModelFactory.MetricAlertPatch Method

Definition

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.

severity
Nullable<Int32>

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

isEnabled
Nullable<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
Nullable<TimeSpan>

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

windowSize
Nullable<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 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.

isAutoMitigateEnabled
Nullable<Boolean>

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.

isMigrated
Nullable<Boolean>

The value indicating whether this alert rule is migrated.

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.

Applies to