Class LocationThresholdRuleCondition
java.lang.Object
com.azure.resourcemanager.monitor.models.RuleCondition
com.azure.resourcemanager.monitor.models.LocationThresholdRuleCondition
A rule condition based on a certain number of locations failing.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of LocationThresholdRuleCondition class. -
Method Summary
Modifier and TypeMethodDescriptionintGet the failedLocationCount property: the number of locations that must fail to activate the alert.voidvalidate()Validates the instance.Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.withDataSource(RuleDataSource dataSource) Set the dataSource property: the resource from which the rule collects its data.withFailedLocationCount(int failedLocationCount) Set the failedLocationCount property: the number of locations that must fail to activate the alert.withWindowSize(Duration windowSize) Set the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.Methods inherited from class com.azure.resourcemanager.monitor.models.RuleCondition
dataSource
-
Constructor Details
-
LocationThresholdRuleCondition
public LocationThresholdRuleCondition()Creates an instance of LocationThresholdRuleCondition class.
-
-
Method Details
-
windowSize
Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.- Returns:
- the windowSize value.
-
withWindowSize
Set the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.- Parameters:
windowSize- the windowSize value to set.- Returns:
- the LocationThresholdRuleCondition object itself.
-
failedLocationCount
public int failedLocationCount()Get the failedLocationCount property: the number of locations that must fail to activate the alert.- Returns:
- the failedLocationCount value.
-
withFailedLocationCount
Set the failedLocationCount property: the number of locations that must fail to activate the alert.- Parameters:
failedLocationCount- the failedLocationCount value to set.- Returns:
- the LocationThresholdRuleCondition object itself.
-
withDataSource
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.
-