Class MetricCriteria
- java.lang.Object
-
- com.microsoft.azure.management.monitor.MetricCriteria
-
public class MetricCriteria extends Object
Criterion to filter metrics.
-
-
Constructor Summary
Constructors Constructor Description MetricCriteria()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MetricDimension>dimensions()Get list of dimension conditions.StringmetricName()Get name of the metric.StringmetricNamespace()Get namespace of the metric.Stringname()Get name of the criteria.MetricAlertRuleConditionoperator()Get the criteria operator.doublethreshold()Get the criteria threshold value that activates the alert.MetricAlertRuleTimeAggregationtimeAggregation()Get the criteria time aggregation types.MetricCriteriawithDimensions(List<MetricDimension> dimensions)Set list of dimension conditions.MetricCriteriawithMetricName(String metricName)Set name of the metric.MetricCriteriawithMetricNamespace(String metricNamespace)Set namespace of the metric.MetricCriteriawithName(String name)Set name of the criteria.MetricCriteriawithOperator(MetricAlertRuleCondition operator)Set the criteria operator.MetricCriteriawithThreshold(double threshold)Set the criteria threshold value that activates the alert.MetricCriteriawithTimeAggregation(MetricAlertRuleTimeAggregation timeAggregation)Set the criteria time aggregation types.
-
-
-
Method Detail
-
name
public String name()
Get name of the criteria.- Returns:
- the name value
-
withName
public MetricCriteria withName(String name)
Set name of the criteria.- Parameters:
name- the name value to set- Returns:
- the MetricCriteria object itself.
-
metricName
public String metricName()
Get name of the metric.- Returns:
- the metricName value
-
withMetricName
public MetricCriteria withMetricName(String metricName)
Set name of the metric.- Parameters:
metricName- the metricName value to set- Returns:
- the MetricCriteria object itself.
-
metricNamespace
public String metricNamespace()
Get namespace of the metric.- Returns:
- the metricNamespace value
-
withMetricNamespace
public MetricCriteria withMetricNamespace(String metricNamespace)
Set namespace of the metric.- Parameters:
metricNamespace- the metricNamespace value to set- Returns:
- the MetricCriteria object itself.
-
operator
public MetricAlertRuleCondition operator()
Get the criteria operator. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.- Returns:
- the operator value
-
withOperator
public MetricCriteria withOperator(MetricAlertRuleCondition operator)
Set the criteria operator. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.- Parameters:
operator- the operator value to set- Returns:
- the MetricCriteria object itself.
-
timeAggregation
public MetricAlertRuleTimeAggregation timeAggregation()
Get the criteria time aggregation types. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total'.- Returns:
- the timeAggregation value
-
withTimeAggregation
public MetricCriteria withTimeAggregation(MetricAlertRuleTimeAggregation timeAggregation)
Set the criteria time aggregation types. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total'.- Parameters:
timeAggregation- the timeAggregation value to set- Returns:
- the MetricCriteria object itself.
-
threshold
public double threshold()
Get the criteria threshold value that activates the alert.- Returns:
- the threshold value
-
withThreshold
public MetricCriteria withThreshold(double threshold)
Set the criteria threshold value that activates the alert.- Parameters:
threshold- the threshold value to set- Returns:
- the MetricCriteria object itself.
-
dimensions
public List<MetricDimension> dimensions()
Get list of dimension conditions.- Returns:
- the dimensions value
-
withDimensions
public MetricCriteria withDimensions(List<MetricDimension> dimensions)
Set list of dimension conditions.- Parameters:
dimensions- the dimensions value to set- Returns:
- the MetricCriteria object itself.
-
-