Class MetricCriteria
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.MultiMetricCriteria
-
- com.azure.resourcemanager.monitor.models.MetricCriteria
-
public final class MetricCriteria extends MultiMetricCriteria
Criterion to filter metrics.
-
-
Constructor Summary
Constructors Constructor Description MetricCriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Operatoroperator()Get the operator property: the criteria operator.doublethreshold()Get the threshold property: the criteria threshold value that activates the alert.voidvalidate()Validates the instance.MetricCriteriawithDimensions(List<MetricDimension> dimensions)Set the dimensions property: List of dimension conditions.MetricCriteriawithMetricName(String metricName)Set the metricName property: Name of the metric.MetricCriteriawithMetricNamespace(String metricNamespace)Set the metricNamespace property: Namespace of the metric.MetricCriteriawithName(String name)Set the name property: Name of the criteria.MetricCriteriawithOperator(Operator operator)Set the operator property: the criteria operator.MetricCriteriawithSkipMetricValidation(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.MetricCriteriawithThreshold(double threshold)Set the threshold property: the criteria threshold value that activates the alert.MetricCriteriawithTimeAggregation(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 Operator operator()
Get the operator property: the criteria operator.- Returns:
- the operator value.
-
withOperator
public MetricCriteria withOperator(Operator operator)
Set the operator property: the criteria operator.- Parameters:
operator- the operator value to set.- Returns:
- the MetricCriteria object itself.
-
threshold
public double threshold()
Get the threshold property: the criteria threshold value that activates the alert.- Returns:
- the threshold value.
-
withThreshold
public MetricCriteria withThreshold(double threshold)
Set the threshold property: the criteria threshold value that activates the alert.- Parameters:
threshold- the threshold value to set.- Returns:
- the MetricCriteria object itself.
-
withName
public MetricCriteria 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 MetricCriteria 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 MetricCriteria 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 MetricCriteria 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 MetricCriteria 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 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:
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.
-
-