Sdílet prostřednictvím


AlertRuleData(AzureLocation, String, Boolean, AlertRuleCondition) Constructor

Definition

Initializes a new instance of AlertRuleData.

public AlertRuleData (Azure.Core.AzureLocation location, string alertRuleName, bool isEnabled, Azure.ResourceManager.Monitor.Models.AlertRuleCondition condition);
new Azure.ResourceManager.Monitor.AlertRuleData : Azure.Core.AzureLocation * string * bool * Azure.ResourceManager.Monitor.Models.AlertRuleCondition -> Azure.ResourceManager.Monitor.AlertRuleData
Public Sub New (location As AzureLocation, alertRuleName As String, isEnabled As Boolean, condition As AlertRuleCondition)

Parameters

location
AzureLocation

The location.

alertRuleName
String

the name of the alert rule.

isEnabled
Boolean

the flag that indicates whether the alert rule is enabled.

condition
AlertRuleCondition

the condition that results in the alert rule being activated. Please note AlertRuleCondition 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 LocationThresholdRuleCondition, ManagementEventRuleCondition and ThresholdRuleCondition.

Exceptions

alertRuleName or condition is null.

Applies to