Class CfnScalingPolicyPropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnScalingPolicyPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-04-14T18:32:08.904Z")
@Stability(Stable)
public class CfnScalingPolicyPropsMixin
extends Mixin
implements software.constructs.IMixin
The
AWS::AutoScaling::ScalingPolicy resource specifies an Amazon EC2 Auto Scaling scaling policy so that the Auto Scaling group can scale the number of instances available for your application.
For more information about using scaling policies to scale your Auto Scaling group automatically, see Dynamic scaling and Predictive 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.cfnpropertymixins.services.autoscaling.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnScalingPolicyPropsMixin cfnScalingPolicyPropsMixin = CfnScalingPolicyPropsMixin.Builder.create(CfnScalingPolicyMixinProps.builder()
.adjustmentType("adjustmentType")
.autoScalingGroupName("autoScalingGroupName")
.cooldown("cooldown")
.estimatedInstanceWarmup(123)
.metricAggregationType("metricAggregationType")
.minAdjustmentMagnitude(123)
.policyType("policyType")
.predictiveScalingConfiguration(PredictiveScalingConfigurationProperty.builder()
.maxCapacityBreachBehavior("maxCapacityBreachBehavior")
.maxCapacityBuffer(123)
.metricSpecifications(List.of(PredictiveScalingMetricSpecificationProperty.builder()
.customizedCapacityMetricSpecification(PredictiveScalingCustomizedCapacityMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.dimensions(List.of(MetricDimensionProperty.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(MetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.dimensions(List.of(MetricDimensionProperty.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(MetricDataQueryProperty.builder()
.expression("expression")
.id("id")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.dimensions(List.of(MetricDimensionProperty.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())
.scalingAdjustment(123)
.stepAdjustments(List.of(StepAdjustmentProperty.builder()
.metricIntervalLowerBound(123)
.metricIntervalUpperBound(123)
.scalingAdjustment(123)
.build()))
.targetTrackingConfiguration(TargetTrackingConfigurationProperty.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(MetricProperty.builder()
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.namespace("namespace")
.build())
.period(123)
.stat("stat")
.unit("unit")
.build())
.period(123)
.returnData(false)
.build()))
.namespace("namespace")
.period(123)
.statistic("statistic")
.unit("unit")
.build())
.disableScaleIn(false)
.predefinedMetricSpecification(PredefinedMetricSpecificationProperty.builder()
.predefinedMetricType("predefinedMetricType")
.resourceLabel("resourceLabel")
.build())
.targetValue(123)
.build())
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnScalingPolicyPropsMixin.static interfaceContains customized metric specification information for a target tracking scaling policy for Amazon EC2 Auto Scaling.static interfaceThe metric data to return.static interfaceMetricDimensionspecifies a name/value pair that is part of the identity of a CloudWatch metric for theDimensionsproperty of the AWS::AutoScaling::ScalingPolicy CustomizedMetricSpecification property type.static interfaceRepresents a specific metric.static interfaceMetricStatis a property of the AWS::AutoScaling::ScalingPolicy MetricDataQuery property type.static interfaceContains predefined metric specification information for a target tracking scaling policy for Amazon EC2 Auto Scaling.static interfacePredictiveScalingConfigurationis a property of the AWS::AutoScaling::ScalingPolicy resource that specifies a predictive scaling policy for Amazon EC2 Auto Scaling.static interfaceContains capacity metric information for theCustomizedCapacityMetricSpecificationproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.static interfaceContains load metric information for theCustomizedLoadMetricSpecificationproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.static interfaceContains scaling metric information for theCustomizedScalingMetricSpecificationproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.static interfaceA structure that specifies a metric specification for theMetricSpecificationsproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingConfiguration property type.static interfaceContains load metric information for thePredefinedLoadMetricSpecificationproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.static interfaceContains metric pair information for thePredefinedMetricPairSpecificationproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.static interfaceContains scaling metric information for thePredefinedScalingMetricSpecificationproperty of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.static interfaceStepAdjustmentspecifies a step adjustment for theStepAdjustmentsproperty of the AWS::AutoScaling::ScalingPolicy resource.static interfaceTargetTrackingConfigurationis a property of the AWS::AutoScaling::ScalingPolicy resource that specifies a target tracking scaling policy configuration for Amazon EC2 Auto Scaling.static interfaceThe metric data to return.static interfaceThis structure defines the CloudWatch metric to return, along with the statistic and unit.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::AutoScaling::ScalingPolicy.Create a mixin to apply properties toAWS::AutoScaling::ScalingPolicy.protectedCfnScalingPolicyPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnScalingPolicyPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnScalingPolicyMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 toAWS::AutoScaling::ScalingPolicy.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnScalingPolicyPropsMixin
Create a mixin to apply properties toAWS::AutoScaling::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-