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 Details

    • DynamicMetricCriteria

      public DynamicMetricCriteria()
      Creates an instance of DynamicMetricCriteria class.
  • Method Details

    • 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:
      withName in class MultiMetricCriteria
      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:
      withMetricName in class MultiMetricCriteria
      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:
      withMetricNamespace in class MultiMetricCriteria
      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:
      withTimeAggregation in class MultiMetricCriteria
      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:
      withDimensions in class MultiMetricCriteria
      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:
      withSkipMetricValidation in class MultiMetricCriteria
      Parameters:
      skipMetricValidation - the skipMetricValidation value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class MultiMetricCriteria
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.