Interface CfnScalingPolicy.TargetTrackingConfigurationProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnScalingPolicy.TargetTrackingConfigurationProperty.Jsii$Proxy
Enclosing class:
CfnScalingPolicy

@Stability(Stable) public static interface CfnScalingPolicy.TargetTrackingConfigurationProperty extends software.amazon.jsii.JsiiSerializable
TargetTrackingConfiguration is a property of the AWS::AutoScaling::ScalingPolicy resource that specifies a target tracking scaling policy configuration for Amazon EC2 Auto Scaling.

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();
 
  • Method Details

    • getTargetValue

      @Stability(Stable) @NotNull Number getTargetValue()
      The target value for the metric.

      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.

    • getCustomizedMetricSpecification

      @Stability(Stable) @Nullable default Object getCustomizedMetricSpecification()
      A customized metric.

      You must specify either a predefined metric or a customized metric.

    • getDisableScaleIn

      @Stability(Stable) @Nullable default Object getDisableScaleIn()
      Indicates whether scaling in by the target tracking scaling policy is disabled.

      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 .

    • getPredefinedMetricSpecification

      @Stability(Stable) @Nullable default Object getPredefinedMetricSpecification()
      A predefined metric.

      You must specify either a predefined metric or a customized metric.

    • builder

      Returns:
      a CfnScalingPolicy.TargetTrackingConfigurationProperty.Builder of CfnScalingPolicy.TargetTrackingConfigurationProperty