Class RuleCondition
java.lang.Object
com.azure.resourcemanager.monitor.models.RuleCondition
- Direct Known Subclasses:
LocationThresholdRuleCondition,ManagementEventRuleCondition,ThresholdRuleCondition
The condition that results in the alert rule being activated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the dataSource property: the resource from which the rule collects its data.voidvalidate()Validates the instance.withDataSource(RuleDataSource dataSource) Set the dataSource property: the resource from which the rule collects its data.
-
Constructor Details
-
RuleCondition
public RuleCondition()Creates an instance of RuleCondition class.
-
-
Method Details
-
dataSource
Get the dataSource property: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.- Returns:
- the dataSource value.
-
withDataSource
Set the dataSource property: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.- Parameters:
dataSource- the dataSource value to set.- Returns:
- the RuleCondition object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-