Class LocationThresholdRuleCondition
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.RuleCondition
-
- com.azure.resourcemanager.monitor.models.LocationThresholdRuleCondition
-
public class LocationThresholdRuleCondition extends RuleCondition
A rule condition based on a certain number of locations failing.
-
-
Constructor Summary
Constructors Constructor Description LocationThresholdRuleCondition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfailedLocationCount()Get the failedLocationCount property: the number of locations that must fail to activate the alert.voidvalidate()Validates the instance.DurationwindowSize()Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.LocationThresholdRuleConditionwithDataSource(RuleDataSource dataSource)Set the dataSource property: the resource from which the rule collects its data.LocationThresholdRuleConditionwithFailedLocationCount(int failedLocationCount)Set the failedLocationCount property: the number of locations that must fail to activate the alert.LocationThresholdRuleConditionwithWindowSize(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
-
-
-
-
Method Detail
-
windowSize
public Duration 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
public LocationThresholdRuleCondition 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. 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
public LocationThresholdRuleCondition withFailedLocationCount(int failedLocationCount)
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
public LocationThresholdRuleCondition 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.
-
-