@Stability(value=Stable)
public static interface CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
For more information, see PutScalingPolicy in the Application Auto Scaling API Reference . For more information about target tracking scaling policies, see Target tracking scaling policies in the Application Auto Scaling User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.applicationautoscaling.*;
TargetTrackingScalingPolicyConfigurationProperty targetTrackingScalingPolicyConfigurationProperty = TargetTrackingScalingPolicyConfigurationProperty.builder()
.targetValue(123)
// the properties below are optional
.customizedMetricSpecification(CustomizedMetricSpecificationProperty.builder()
.metricName("metricName")
.namespace("namespace")
.statistic("statistic")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.unit("unit")
.build())
.disableScaleIn(false)
.predefinedMetricSpecification(PredefinedMetricSpecificationProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.scaleInCooldown(123)
.scaleOutCooldown(123)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.Builder
|
static class |
CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.Jsii$Proxy
An implementation for
CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.Builder |
builder() |
default Object |
getCustomizedMetricSpecification()
A customized metric.
|
default Object |
getDisableScaleIn()
Indicates whether scale in by the target tracking scaling policy is disabled.
|
default Object |
getPredefinedMetricSpecification()
A predefined metric.
|
default Number |
getScaleInCooldown()
The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.
|
default Number |
getScaleOutCooldown()
The amount of time, in seconds, to wait for a previous scale-out activity to take effect.
|
Number |
getTargetValue()
The target value for the metric.
|
@Stability(value=Stable) @NotNull Number getTargetValue()
Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360. The value must be a valid number based on the choice of metric. For example, if the metric is CPU utilization, then the target value is a percent value that represents how much of the CPU can be used before scaling out.
@Stability(value=Stable) @Nullable default Object getCustomizedMetricSpecification()
You can specify either a predefined metric or a customized metric.
@Stability(value=Stable) @Nullable default Object getDisableScaleIn()
If the value is true , scale in is disabled and the target tracking scaling policy won't remove capacity from the scalable target. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable target. The default value is false .
@Stability(value=Stable) @Nullable default Object getPredefinedMetricSpecification()
You can specify either a predefined metric or a customized metric.
@Stability(value=Stable) @Nullable default Number getScaleInCooldown()
With the scale-in cooldown period , the intention is to scale in conservatively to protect your application’s availability, so scale-in activities are blocked until the cooldown period has expired. However, if another alarm triggers a scale-out activity during the scale-in cooldown period, Application Auto Scaling scales out the target immediately. In this case, the scale-in cooldown period stops and doesn't complete.
Application Auto Scaling provides a default value of 600 for Amazon ElastiCache replication groups and a default value of 300 for the following scalable targets:
For all other scalable targets, the default value is 0:
@Stability(value=Stable) @Nullable default Number getScaleOutCooldown()
With the scale-out cooldown period , the intention is to continuously (but not excessively) scale out. After Application Auto Scaling successfully scales out using a target tracking scaling policy, it starts to calculate the cooldown time. The scaling policy won't increase the desired capacity again unless either a larger scale out is triggered or the cooldown period ends. While the cooldown period is in effect, the capacity added by the initiating scale-out activity is calculated as part of the desired capacity for the next scale-out activity.
Application Auto Scaling provides a default value of 600 for Amazon ElastiCache replication groups and a default value of 300 for the following scalable targets:
For all other scalable targets, the default value is 0:
@Stability(value=Stable) static CfnScalingPolicy.TargetTrackingScalingPolicyConfigurationProperty.Builder builder()
Copyright © 2022. All rights reserved.