MetricCriteria Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. MultiMetricCriteria - com.
azure. resourcemanager. monitor. models. MetricCriteria
- com.
- com.
public final class MetricCriteria
extends MultiMetricCriteria
Criterion to filter metrics.
Constructor Summary
Constructor | Description |
---|---|
MetricCriteria() |
Creates an instance of Metric |
Method Summary
Modifier and Type | Method and Description |
---|---|
Operator |
operator()
Get the operator property: the criteria operator. |
double |
threshold()
Get the threshold property: the criteria threshold value that activates the alert. |
void |
validate()
Validates the instance. |
Metric |
withDimensions(List<MetricDimension> dimensions)
Set the dimensions property: List of dimension conditions. |
Metric |
withMetricName(String metricName)
Set the metric |
Metric |
withMetricNamespace(String metricNamespace)
Set the metric |
Metric |
withName(String name)
Set the name property: Name of the criteria. |
Metric |
withOperator(Operator operator)
Set the operator property: the criteria operator. |
Metric |
withSkipMetricValidation(Boolean skipMetricValidation)
Set the skip |
Metric |
withThreshold(double threshold)
Set the threshold property: the criteria threshold value that activates the alert. |
Metric |
withTimeAggregation(AggregationTypeEnum timeAggregation)
Set the time |
Methods inherited from MultiMetricCriteria
Methods inherited from java.lang.Object
Constructor Details
MetricCriteria
public MetricCriteria()
Creates an instance of MetricCriteria class.
Method Details
operator
public Operator operator()
Get the operator property: the criteria operator.
Returns:
threshold
public double threshold()
Get the threshold property: the criteria threshold value that activates the alert.
Returns:
validate
public void validate()
Validates the instance.
Overrides:
MetricCriteria.validate()withDimensions
public MetricCriteria withDimensions(List
Set the dimensions property: List of dimension conditions.
Overrides:
MetricCriteria.withDimensions(List<MetricDimension> dimensions)Parameters:
withMetricName
public MetricCriteria withMetricName(String metricName)
Set the metricName property: Name of the metric.
Overrides:
MetricCriteria.withMetricName(String metricName)Parameters:
withMetricNamespace
public MetricCriteria withMetricNamespace(String metricNamespace)
Set the metricNamespace property: Namespace of the metric.
Overrides:
MetricCriteria.withMetricNamespace(String metricNamespace)Parameters:
withName
public MetricCriteria withName(String name)
Set the name property: Name of the criteria.
Overrides:
MetricCriteria.withName(String name)Parameters:
withOperator
public MetricCriteria withOperator(Operator operator)
Set the operator property: the criteria operator.
Parameters:
Returns:
withSkipMetricValidation
public MetricCriteria 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:
MetricCriteria.withSkipMetricValidation(Boolean skipMetricValidation)Parameters:
withThreshold
public MetricCriteria withThreshold(double threshold)
Set the threshold property: the criteria threshold value that activates the alert.
Parameters:
Returns:
withTimeAggregation
public MetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)
Set the timeAggregation property: the criteria time aggregation types.
Overrides:
MetricCriteria.withTimeAggregation(AggregationTypeEnum timeAggregation)Parameters:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for