public static interface CfnScalingPolicy.TargetTrackingConfigurationProperty
For more information about scaling policies, see Dynamic scaling in the Amazon EC2 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.autoscaling.*; TargetTrackingConfigurationProperty targetTrackingConfigurationProperty = TargetTrackingConfigurationProperty.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()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder
A builder for
CfnScalingPolicy.TargetTrackingConfigurationProperty |
static class |
CfnScalingPolicy.TargetTrackingConfigurationProperty.Jsii$Proxy
An implementation for
CfnScalingPolicy.TargetTrackingConfigurationProperty |
Modifier and Type | Method and Description |
---|---|
static CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder |
builder() |
default java.lang.Object |
getCustomizedMetricSpecification()
A customized metric.
|
default java.lang.Object |
getDisableScaleIn()
Indicates whether scaling in by the target tracking scaling policy is disabled.
|
default java.lang.Object |
getPredefinedMetricSpecification()
A predefined metric.
|
java.lang.Number |
getTargetValue()
The target value for the metric.
|
java.lang.Number getTargetValue()
Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.
default java.lang.Object getCustomizedMetricSpecification()
You must specify either a predefined metric or a customized metric.
default java.lang.Object getDisableScaleIn()
If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is false
.
default java.lang.Object getPredefinedMetricSpecification()
You must specify either a predefined metric or a customized metric.