ScaleRule.Update Interface

Implements

public static interface ScaleRule.Update
extends Settable<Update>

Grouping of scale rule update stages.

Method Summary

Modifier and Type Method and Description
abstract Update withCondition(TimeAggregationType timeAggregation, ComparisonOperationType condition, double threshold)

Updates the condition to monitor for the current metric alert.

abstract Update withMetricName(String metricName)

the name of the metric that defines what the rule monitors.

abstract Update withMetricSource(String metricSourceResourceId)

Updates the resource identifier of the resource the rule monitors.

abstract Update withScaleAction(ScaleDirection direction, ScaleType type, int instanceCountChange, Duration cooldown)

Updates the action to be performed when the scale rule will be active.

abstract 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.

abstract Update withStatistic(Duration duration)

Sets statistics for autoscale trigger action with default values of 1 minute for frequency(time grain) and 'Average' for statistic type.

abstract Update withStatistic(Duration duration, MetricStatisticType statisticType)

Sets statistics for autoscale trigger action with default values of 1 minute for frequency(time grain).

abstract Update withStatistic(Duration duration, Duration frequency, MetricStatisticType statisticType)

Updates the statistics for autoscale trigger action.

Method Details

withCondition

public abstract ScaleRule.Update withCondition(TimeAggregationType timeAggregation, ComparisonOperationType condition, double threshold)

Updates the condition to monitor for the current metric alert.

Parameters:

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'.
condition - the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.
threshold - the threshold of the metric that triggers the scale action.

Returns:

the next stage of the scale rule update.

withMetricName

public abstract 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.

withMetricSource

public abstract 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.

withScaleAction

public abstract ScaleRule.Update withScaleAction(ScaleDirection direction, ScaleType type, int instanceCountChange, Duration 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.

withStatistic

public abstract 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

public abstract ScaleRule.Update withStatistic(Duration 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

public abstract ScaleRule.Update withStatistic(Duration 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.

withStatistic

public abstract ScaleRule.Update withStatistic(Duration duration, Duration 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.

Applies to