MetricCriteria Class

public final class MetricCriteria
extends MultiMetricCriteria

Criterion to filter metrics.

Constructor Summary

Constructor Description
MetricCriteria()

Creates an instance of MetricCriteria class.

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.

MetricCriteria withDimensions(List<MetricDimension> dimensions)

Set the dimensions property: List of dimension conditions.

MetricCriteria withMetricName(String metricName)

Set the metricName property: Name of the metric.

MetricCriteria withMetricNamespace(String metricNamespace)

Set the metricNamespace property: Namespace of the metric.

MetricCriteria withName(String name)

Set the name property: Name of the criteria.

MetricCriteria withOperator(Operator operator)

Set the operator property: the criteria operator.

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.

MetricCriteria withThreshold(double threshold)

Set the threshold property: the criteria threshold value that activates the alert.

MetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)

Set the timeAggregation property: the criteria time aggregation types.

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:

the operator value.

threshold

public double threshold()

Get the threshold property: the criteria threshold value that activates the alert.

Returns:

the threshold value.

validate

public void validate()

Validates the instance.

Overrides:

MetricCriteria.validate()

withDimensions

public MetricCriteria withDimensions(List dimensions)

Set the dimensions property: List of dimension conditions.

Overrides:

MetricCriteria.withDimensions(List<MetricDimension> dimensions)

Parameters:

dimensions

withMetricName

public MetricCriteria withMetricName(String metricName)

Set the metricName property: Name of the metric.

Overrides:

MetricCriteria.withMetricName(String metricName)

Parameters:

metricName

withMetricNamespace

public MetricCriteria withMetricNamespace(String metricNamespace)

Set the metricNamespace property: Namespace of the metric.

Overrides:

MetricCriteria.withMetricNamespace(String metricNamespace)

Parameters:

metricNamespace

withName

public MetricCriteria withName(String name)

Set the name property: Name of the criteria.

Overrides:

MetricCriteria.withName(String name)

Parameters:

name

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.

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:

skipMetricValidation

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.

withTimeAggregation

public MetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)

Set the timeAggregation property: the criteria time aggregation types.

Overrides:

MetricCriteria.withTimeAggregation(AggregationTypeEnum timeAggregation)

Parameters:

timeAggregation

Applies to