Class ManagementEventRuleCondition
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.RuleCondition
-
- com.azure.resourcemanager.monitor.models.ManagementEventRuleCondition
-
public class ManagementEventRuleCondition extends RuleCondition
A management event rule condition.
-
-
Constructor Summary
Constructors Constructor Description ManagementEventRuleCondition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagementEventAggregationConditionaggregation()Get the aggregation property: How the data that is collected should be combined over time and when the alert is activated.voidvalidate()Validates the instance.ManagementEventRuleConditionwithAggregation(ManagementEventAggregationCondition aggregation)Set the aggregation property: How the data that is collected should be combined over time and when the alert is activated.ManagementEventRuleConditionwithDataSource(RuleDataSource dataSource)Set the dataSource property: the resource from which the rule collects its data.-
Methods inherited from class com.azure.resourcemanager.monitor.models.RuleCondition
dataSource
-
-
-
-
Method Detail
-
aggregation
public ManagementEventAggregationCondition aggregation()
Get the aggregation property: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.- Returns:
- the aggregation value.
-
withAggregation
public ManagementEventRuleCondition withAggregation(ManagementEventAggregationCondition aggregation)
Set the aggregation property: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.- Parameters:
aggregation- the aggregation value to set.- Returns:
- the ManagementEventRuleCondition object itself.
-
withDataSource
public ManagementEventRuleCondition withDataSource(RuleDataSource dataSource)
Set the dataSource property: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.- Overrides:
withDataSourcein classRuleCondition- Parameters:
dataSource- the dataSource value to set.- Returns:
- the RuleCondition object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classRuleCondition- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-