Class DynamicMetricCriteria
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.MultiMetricCriteria
-
- com.azure.resourcemanager.monitor.models.DynamicMetricCriteria
-
public final class DynamicMetricCriteria extends MultiMetricCriteria
Criterion for dynamic threshold.
-
-
Constructor Summary
Constructors Constructor Description DynamicMetricCriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicThresholdSensitivityalertSensitivity()Get the alertSensitivity property: The extent of deviation required to trigger an alert.DynamicThresholdFailingPeriodsfailingPeriods()Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.OffsetDateTimeignoreDataBefore()Get the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).DynamicThresholdOperatoroperator()Get the operator property: The operator used to compare the metric value against the threshold.voidvalidate()Validates the instance.DynamicMetricCriteriawithAlertSensitivity(DynamicThresholdSensitivity alertSensitivity)Set the alertSensitivity property: The extent of deviation required to trigger an alert.DynamicMetricCriteriawithDimensions(List<MetricDimension> dimensions)Set the dimensions property: List of dimension conditions.DynamicMetricCriteriawithFailingPeriods(DynamicThresholdFailingPeriods failingPeriods)Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.DynamicMetricCriteriawithIgnoreDataBefore(OffsetDateTime ignoreDataBefore)Set the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).DynamicMetricCriteriawithMetricName(String metricName)Set the metricName property: Name of the metric.DynamicMetricCriteriawithMetricNamespace(String metricNamespace)Set the metricNamespace property: Namespace of the metric.DynamicMetricCriteriawithName(String name)Set the name property: Name of the criteria.DynamicMetricCriteriawithOperator(DynamicThresholdOperator operator)Set the operator property: The operator used to compare the metric value against the threshold.DynamicMetricCriteriawithSkipMetricValidation(Boolean skipMetricValidation)Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.DynamicMetricCriteriawithTimeAggregation(AggregationTypeEnum timeAggregation)Set the timeAggregation property: the criteria time aggregation types.-
Methods inherited from class com.azure.resourcemanager.monitor.models.MultiMetricCriteria
additionalProperties, dimensions, metricName, metricNamespace, name, skipMetricValidation, timeAggregation, withAdditionalProperties
-
-
-
-
Method Detail
-
operator
public DynamicThresholdOperator operator()
Get the operator property: The operator used to compare the metric value against the threshold.- Returns:
- the operator value.
-
withOperator
public DynamicMetricCriteria withOperator(DynamicThresholdOperator operator)
Set the operator property: The operator used to compare the metric value against the threshold.- Parameters:
operator- the operator value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
alertSensitivity
public DynamicThresholdSensitivity alertSensitivity()
Get the alertSensitivity property: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.- Returns:
- the alertSensitivity value.
-
withAlertSensitivity
public DynamicMetricCriteria withAlertSensitivity(DynamicThresholdSensitivity alertSensitivity)
Set the alertSensitivity property: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.- Parameters:
alertSensitivity- the alertSensitivity value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
failingPeriods
public DynamicThresholdFailingPeriods failingPeriods()
Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.- Returns:
- the failingPeriods value.
-
withFailingPeriods
public DynamicMetricCriteria withFailingPeriods(DynamicThresholdFailingPeriods failingPeriods)
Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.- Parameters:
failingPeriods- the failingPeriods value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
ignoreDataBefore
public OffsetDateTime ignoreDataBefore()
Get the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).- Returns:
- the ignoreDataBefore value.
-
withIgnoreDataBefore
public DynamicMetricCriteria withIgnoreDataBefore(OffsetDateTime ignoreDataBefore)
Set the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).- Parameters:
ignoreDataBefore- the ignoreDataBefore value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
withName
public DynamicMetricCriteria withName(String name)
Set the name property: Name of the criteria.- Overrides:
withNamein classMultiMetricCriteria- Parameters:
name- the name value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withMetricName
public DynamicMetricCriteria withMetricName(String metricName)
Set the metricName property: Name of the metric.- Overrides:
withMetricNamein classMultiMetricCriteria- Parameters:
metricName- the metricName value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withMetricNamespace
public DynamicMetricCriteria withMetricNamespace(String metricNamespace)
Set the metricNamespace property: Namespace of the metric.- Overrides:
withMetricNamespacein classMultiMetricCriteria- Parameters:
metricNamespace- the metricNamespace value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withTimeAggregation
public DynamicMetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)
Set the timeAggregation property: the criteria time aggregation types.- Overrides:
withTimeAggregationin classMultiMetricCriteria- Parameters:
timeAggregation- the timeAggregation value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withDimensions
public DynamicMetricCriteria withDimensions(List<MetricDimension> dimensions)
Set the dimensions property: List of dimension conditions.- Overrides:
withDimensionsin classMultiMetricCriteria- Parameters:
dimensions- the dimensions value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withSkipMetricValidation
public DynamicMetricCriteria withSkipMetricValidation(Boolean skipMetricValidation)
Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.- Overrides:
withSkipMetricValidationin classMultiMetricCriteria- Parameters:
skipMetricValidation- the skipMetricValidation value to set.- Returns:
- the MultiMetricCriteria object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classMultiMetricCriteria- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-