java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.applicationautoscaling.CfnScalingPolicyPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-19T12:55:16.623Z") @Stability(Stable) public class CfnScalingPolicyPropsMixin extends Mixin implements software.constructs.IMixin
The AWS::ApplicationAutoScaling::ScalingPolicy resource defines a scaling policy that Application Auto Scaling uses to adjust the capacity of a scalable target.

For more information, see Target tracking scaling policies and Step 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.cfnpropertymixins.services.applicationautoscaling.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnScalingPolicyPropsMixin cfnScalingPolicyPropsMixin = CfnScalingPolicyPropsMixin.Builder.create(CfnScalingPolicyMixinProps.builder()
         .policyName("policyName")
         .policyType("policyType")
         .predictiveScalingPolicyConfiguration(PredictiveScalingPolicyConfigurationProperty.builder()
                 .maxCapacityBreachBehavior("maxCapacityBreachBehavior")
                 .maxCapacityBuffer(123)
                 .metricSpecifications(List.of(PredictiveScalingMetricSpecificationProperty.builder()
                         .customizedCapacityMetricSpecification(PredictiveScalingCustomizedCapacityMetricProperty.builder()
                                 .metricDataQueries(List.of(PredictiveScalingMetricDataQueryProperty.builder()
                                         .expression("expression")
                                         .id("id")
                                         .label("label")
                                         .metricStat(PredictiveScalingMetricStatProperty.builder()
                                                 .metric(PredictiveScalingMetricProperty.builder()
                                                         .dimensions(List.of(PredictiveScalingMetricDimensionProperty.builder()
                                                                 .name("name")
                                                                 .value("value")
                                                                 .build()))
                                                         .metricName("metricName")
                                                         .namespace("namespace")
                                                         .build())
                                                 .stat("stat")
                                                 .unit("unit")
                                                 .build())
                                         .returnData(false)
                                         .build()))
                                 .build())
                         .customizedLoadMetricSpecification(PredictiveScalingCustomizedLoadMetricProperty.builder()
                                 .metricDataQueries(List.of(PredictiveScalingMetricDataQueryProperty.builder()
                                         .expression("expression")
                                         .id("id")
                                         .label("label")
                                         .metricStat(PredictiveScalingMetricStatProperty.builder()
                                                 .metric(PredictiveScalingMetricProperty.builder()
                                                         .dimensions(List.of(PredictiveScalingMetricDimensionProperty.builder()
                                                                 .name("name")
                                                                 .value("value")
                                                                 .build()))
                                                         .metricName("metricName")
                                                         .namespace("namespace")
                                                         .build())
                                                 .stat("stat")
                                                 .unit("unit")
                                                 .build())
                                         .returnData(false)
                                         .build()))
                                 .build())
                         .customizedScalingMetricSpecification(PredictiveScalingCustomizedScalingMetricProperty.builder()
                                 .metricDataQueries(List.of(PredictiveScalingMetricDataQueryProperty.builder()
                                         .expression("expression")
                                         .id("id")
                                         .label("label")
                                         .metricStat(PredictiveScalingMetricStatProperty.builder()
                                                 .metric(PredictiveScalingMetricProperty.builder()
                                                         .dimensions(List.of(PredictiveScalingMetricDimensionProperty.builder()
                                                                 .name("name")
                                                                 .value("value")
                                                                 .build()))
                                                         .metricName("metricName")
                                                         .namespace("namespace")
                                                         .build())
                                                 .stat("stat")
                                                 .unit("unit")
                                                 .build())
                                         .returnData(false)
                                         .build()))
                                 .build())
                         .predefinedLoadMetricSpecification(PredictiveScalingPredefinedLoadMetricProperty.builder()
                                 .predefinedMetricType("predefinedMetricType")
                                 .resourceLabel("resourceLabel")
                                 .build())
                         .predefinedMetricPairSpecification(PredictiveScalingPredefinedMetricPairProperty.builder()
                                 .predefinedMetricType("predefinedMetricType")
                                 .resourceLabel("resourceLabel")
                                 .build())
                         .predefinedScalingMetricSpecification(PredictiveScalingPredefinedScalingMetricProperty.builder()
                                 .predefinedMetricType("predefinedMetricType")
                                 .resourceLabel("resourceLabel")
                                 .build())
                         .targetValue(123)
                         .build()))
                 .mode("mode")
                 .schedulingBufferTime(123)
                 .build())
         .resourceId("resourceId")
         .scalableDimension("scalableDimension")
         .scalingTargetId("scalingTargetId")
         .serviceNamespace("serviceNamespace")
         .stepScalingPolicyConfiguration(StepScalingPolicyConfigurationProperty.builder()
                 .adjustmentType("adjustmentType")
                 .cooldown(123)
                 .metricAggregationType("metricAggregationType")
                 .minAdjustmentMagnitude(123)
                 .stepAdjustments(List.of(StepAdjustmentProperty.builder()
                         .metricIntervalLowerBound(123)
                         .metricIntervalUpperBound(123)
                         .scalingAdjustment(123)
                         .build()))
                 .build())
         .targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
                 .customizedMetricSpecification(CustomizedMetricSpecificationProperty.builder()
                         .dimensions(List.of(MetricDimensionProperty.builder()
                                 .name("name")
                                 .value("value")
                                 .build()))
                         .metricName("metricName")
                         .metrics(List.of(TargetTrackingMetricDataQueryProperty.builder()
                                 .expression("expression")
                                 .id("id")
                                 .label("label")
                                 .metricStat(TargetTrackingMetricStatProperty.builder()
                                         .metric(TargetTrackingMetricProperty.builder()
                                                 .dimensions(List.of(TargetTrackingMetricDimensionProperty.builder()
                                                         .name("name")
                                                         .value("value")
                                                         .build()))
                                                 .metricName("metricName")
                                                 .namespace("namespace")
                                                 .build())
                                         .stat("stat")
                                         .unit("unit")
                                         .build())
                                 .returnData(false)
                                 .build()))
                         .namespace("namespace")
                         .statistic("statistic")
                         .unit("unit")
                         .build())
                 .disableScaleIn(false)
                 .predefinedMetricSpecification(PredefinedMetricSpecificationProperty.builder()
                         .predefinedMetricType("predefinedMetricType")
                         .resourceLabel("resourceLabel")
                         .build())
                 .scaleInCooldown(123)
                 .scaleOutCooldown(123)
                 .targetValue(123)
                 .build())
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnScalingPolicyPropsMixin

      protected CfnScalingPolicyPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnScalingPolicyPropsMixin

      protected CfnScalingPolicyPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnScalingPolicyPropsMixin

      @Stability(Stable) public CfnScalingPolicyPropsMixin(@NotNull CfnScalingPolicyMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::ApplicationAutoScaling::ScalingPolicy.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnScalingPolicyPropsMixin

      @Stability(Stable) public CfnScalingPolicyPropsMixin(@NotNull CfnScalingPolicyMixinProps props)
      Create a mixin to apply properties to AWS::ApplicationAutoScaling::ScalingPolicy.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnScalingPolicyMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()