Interface ScaleRule.Update

All Superinterfaces:
Settable<AutoscaleProfile.Update>
Enclosing interface:
ScaleRule

public static interface ScaleRule.Update extends Settable<AutoscaleProfile.Update>
Grouping of scale rule update stages.
  • Method Details

    • withMetricSource

      ScaleRule.Update withMetricSource(String metricSourceResourceId)
      Updates the resource identifier of the resource the rule monitors.
      Parameters:
      metricSourceResourceId - resourceId of the resource.
      Returns:
      the next stage of the scale rule update.
    • withMetricName

      ScaleRule.Update withMetricName(String metricName)
      the name of the metric that defines what the rule monitors.
      Parameters:
      metricName - metricName name of the metric.
      Returns:
      the next stage of the scale rule update.
    • withStatistic

      ScaleRule.Update withStatistic(org.joda.time.Period duration, org.joda.time.Period frequency, MetricStatisticType statisticType)
      Updates the statistics for autoscale trigger action.
      Parameters:
      duration - 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.
      frequency - 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.
      statisticType - the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum'.
      Returns:
      the next stage of the scale rule update.
    • withStatistic

      ScaleRule.Update withStatistic()
      Sets statistics for autoscale trigger action with default values of 10 minutes for duration, 1 minute for frequency(time grain) and 'Average' for statistic type.
      Returns:
      the next stage of the definition.
    • withStatistic

      ScaleRule.Update withStatistic(org.joda.time.Period duration)
      Sets statistics for autoscale trigger action with default values of 1 minute for frequency(time grain) and 'Average' for statistic type.
      Parameters:
      duration - 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 next stage of the definition.
    • withStatistic

      ScaleRule.Update withStatistic(org.joda.time.Period duration, MetricStatisticType statisticType)
      Sets statistics for autoscale trigger action with default values of 1 minute for frequency(time grain).
      Parameters:
      duration - 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.
      statisticType - the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum'.
      Returns:
      the next stage of the definition.
    • withCondition

      ScaleRule.Update withCondition(TimeAggregationType timeAggregation, ComparisonOperationType condition, double threshold)
      Updates the condition to monitor for the current metric alert.
      Parameters:
      condition - the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.
      timeAggregation - the 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'.
      threshold - the threshold of the metric that triggers the scale action.
      Returns:
      the next stage of the scale rule update.
    • withScaleAction

      ScaleRule.Update withScaleAction(ScaleDirection direction, ScaleType type, int instanceCountChange, org.joda.time.Period cooldown)
      Updates the action to be performed when the scale rule will be active.
      Parameters:
      direction - the scale direction. Whether the scaling action increases or decreases the number of instances. Possible values include: 'None', 'Increase', 'Decrease'.
      type - the type of action that should occur when the scale rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount'.
      instanceCountChange - the number of instances that are involved in the scaling action.
      cooldown - the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format.
      Returns:
      the next stage of the scale rule update.