Class MetricCriteria


  • public class MetricCriteria
    extends Object
    Criterion to filter metrics.
    • Constructor Detail

      • MetricCriteria

        public MetricCriteria()
    • 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.