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 |
---|---|
Criterion |
criterionType()
Get the criterion |
static
Metric |
fromJson(JsonReader jsonReader)
Reads an instance of Metric |
Operator |
operator()
Get the operator property: the criteria operator. |
double |
threshold()
Get the threshold property: the criteria threshold value that activates the alert. |
Json |
toJson(JsonWriter jsonWriter) |
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
criterionType
public CriterionType criterionType()
Get the criterionType property: Specifies the type of threshold criteria.
Overrides:
MetricCriteria.criterionType()Returns:
fromJson
public static MetricCriteria fromJson(JsonReader jsonReader)
Reads an instance of MetricCriteria from the JsonReader.
Parameters:
Returns:
Throws:
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:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
MetricCriteria.toJson(JsonWriter jsonWriter)Parameters:
Throws:
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