Class MetricCriteria
java.lang.Object
com.azure.resourcemanager.monitor.models.MultiMetricCriteria
com.azure.resourcemanager.monitor.models.MetricCriteria
Criterion to filter metrics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionoperator()Get the operator property: the criteria operator.doubleGet the threshold property: the criteria threshold value that activates the alert.voidvalidate()Validates the instance.withDimensions(List<MetricDimension> dimensions) Set the dimensions property: List of dimension conditions.withMetricName(String metricName) Set the metricName property: Name of the metric.withMetricNamespace(String metricNamespace) Set the metricNamespace property: Namespace of the metric.Set the name property: Name of the criteria.withOperator(Operator operator) Set the operator property: the criteria operator.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.withThreshold(double threshold) Set the threshold property: the criteria threshold value that activates the alert.withTimeAggregation(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
-
Constructor Details
-
MetricCriteria
public MetricCriteria()Creates an instance of MetricCriteria class.
-
-
Method Details
-
operator
Get the operator property: the criteria operator.- Returns:
- the operator value.
-
withOperator
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
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
Set the name property: Name of the criteria.- Overrides:
withNamein classMultiMetricCriteria- Parameters:
name- the name value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withMetricName
Set the metricName property: Name of the metric.- Overrides:
withMetricNamein classMultiMetricCriteria- Parameters:
metricName- the metricName value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withMetricNamespace
Set the metricNamespace property: Namespace of the metric.- Overrides:
withMetricNamespacein classMultiMetricCriteria- Parameters:
metricNamespace- the metricNamespace value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withTimeAggregation
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
Set the dimensions property: List of dimension conditions.- Overrides:
withDimensionsin classMultiMetricCriteria- Parameters:
dimensions- the dimensions value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withSkipMetricValidation
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.
-