Class MetricTrigger

java.lang.Object
com.microsoft.azure.management.monitor.MetricTrigger

public class MetricTrigger extends Object
The trigger that results in a scaling action.
  • Constructor Details

    • MetricTrigger

      public MetricTrigger()
  • Method Details

    • metricName

      public String metricName()
      Get the name of the metric that defines what the rule monitors.
      Returns:
      the metricName value
    • withMetricName

      public MetricTrigger withMetricName(String metricName)
      Set the name of the metric that defines what the rule monitors.
      Parameters:
      metricName - the metricName value to set
      Returns:
      the MetricTrigger object itself.
    • metricResourceUri

      public String metricResourceUri()
      Get the resource identifier of the resource the rule monitors.
      Returns:
      the metricResourceUri value
    • withMetricResourceUri

      public MetricTrigger withMetricResourceUri(String metricResourceUri)
      Set the resource identifier of the resource the rule monitors.
      Parameters:
      metricResourceUri - the metricResourceUri value to set
      Returns:
      the MetricTrigger object itself.
    • timeGrain

      public org.joda.time.Period timeGrain()
      Get the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.
      Returns:
      the timeGrain value
    • withTimeGrain

      public MetricTrigger withTimeGrain(org.joda.time.Period timeGrain)
      Set the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.
      Parameters:
      timeGrain - the timeGrain value to set
      Returns:
      the MetricTrigger object itself.
    • statistic

      public MetricStatisticType statistic()
      Get the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum'.
      Returns:
      the statistic value
    • withStatistic

      public MetricTrigger withStatistic(MetricStatisticType statistic)
      Set the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum'.
      Parameters:
      statistic - the statistic value to set
      Returns:
      the MetricTrigger object itself.
    • timeWindow

      public org.joda.time.Period timeWindow()
      Get the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.
      Returns:
      the timeWindow value
    • withTimeWindow

      public MetricTrigger withTimeWindow(org.joda.time.Period timeWindow)
      Set the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.
      Parameters:
      timeWindow - the timeWindow value to set
      Returns:
      the MetricTrigger object itself.
    • timeAggregation

      public TimeAggregationType timeAggregation()
      Get time aggregation type. How the data that is collected should be combined over time. The default value is Average. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count', 'Last'.
      Returns:
      the timeAggregation value
    • withTimeAggregation

      public MetricTrigger withTimeAggregation(TimeAggregationType timeAggregation)
      Set time aggregation type. How the data that is collected should be combined over time. The default value is Average. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Count', 'Last'.
      Parameters:
      timeAggregation - the timeAggregation value to set
      Returns:
      the MetricTrigger object itself.
    • operator

      public ComparisonOperationType operator()
      Get the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.
      Returns:
      the operator value
    • withOperator

      public MetricTrigger withOperator(ComparisonOperationType operator)
      Set the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.
      Parameters:
      operator - the operator value to set
      Returns:
      the MetricTrigger object itself.
    • threshold

      public double threshold()
      Get the threshold of the metric that triggers the scale action.
      Returns:
      the threshold value
    • withThreshold

      public MetricTrigger withThreshold(double threshold)
      Set the threshold of the metric that triggers the scale action.
      Parameters:
      threshold - the threshold value to set
      Returns:
      the MetricTrigger object itself.