@Stability(value=Stable)
public static interface CfnScalingPolicy.TargetTrackingConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
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 Object |
getCustomizedMetricSpecification()
A customized metric.
|
default Object |
getDisableScaleIn()
Indicates whether scaling in by the target tracking scaling policy is disabled.
|
default Object |
getPredefinedMetricSpecification()
A predefined metric.
|
Number |
getTargetValue()
The target value for the metric.
|
@Stability(value=Stable) @NotNull 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.
@Stability(value=Stable) @Nullable default Object getCustomizedMetricSpecification()
You must specify either a predefined metric or a customized metric.
@Stability(value=Stable) @Nullable default 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
.
@Stability(value=Stable) @Nullable default Object getPredefinedMetricSpecification()
You must specify either a predefined metric or a customized metric.
@Stability(value=Stable) static CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder builder()
Copyright © 2023. All rights reserved.