Class CfnScalingPlan
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.autoscalingplans.CfnScalingPlan
- All Implemented Interfaces:
IInspectable,IScalingPlanRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:31.837Z")
@Stability(Stable)
public class CfnScalingPlan
extends CfnResource
implements IInspectable, IScalingPlanRef
The
AWS::AutoScalingPlans::ScalingPlan resource defines an AWS Auto Scaling scaling plan.
A scaling plan is used to scale application resources to size them appropriately to ensure that enough resource is available in the application at peak times and to reduce allocated resource during periods of low utilization. The following resources can be added to a scaling plan:
- Amazon EC2 Auto Scaling groups
- Amazon EC2 Spot Fleet requests
- Amazon ECS services
- Amazon DynamoDB tables and global secondary indexes
- Amazon Aurora Replicas
For more information, see the Scaling Plans 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.autoscalingplans.*;
CfnScalingPlan cfnScalingPlan = CfnScalingPlan.Builder.create(this, "MyCfnScalingPlan")
.applicationSource(ApplicationSourceProperty.builder()
.cloudFormationStackArn("cloudFormationStackArn")
.tagFilters(List.of(TagFilterProperty.builder()
.key("key")
// the properties below are optional
.values(List.of("values"))
.build()))
.build())
.scalingInstructions(List.of(ScalingInstructionProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.resourceId("resourceId")
.scalableDimension("scalableDimension")
.serviceNamespace("serviceNamespace")
.targetTrackingConfigurations(List.of(TargetTrackingConfigurationProperty.builder()
.targetValue(123)
// the properties below are optional
.customizedScalingMetricSpecification(CustomizedScalingMetricSpecificationProperty.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)
.estimatedInstanceWarmup(123)
.predefinedScalingMetricSpecification(PredefinedScalingMetricSpecificationProperty.builder()
.predefinedScalingMetricType("predefinedScalingMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.scaleInCooldown(123)
.scaleOutCooldown(123)
.build()))
// the properties below are optional
.customizedLoadMetricSpecification(CustomizedLoadMetricSpecificationProperty.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())
.disableDynamicScaling(false)
.predefinedLoadMetricSpecification(PredefinedLoadMetricSpecificationProperty.builder()
.predefinedLoadMetricType("predefinedLoadMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.predictiveScalingMaxCapacityBehavior("predictiveScalingMaxCapacityBehavior")
.predictiveScalingMaxCapacityBuffer(123)
.predictiveScalingMode("predictiveScalingMode")
.scalingPolicyUpdateBehavior("scalingPolicyUpdateBehavior")
.scheduledActionBufferTime(123)
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceApplicationSourceis a property of ScalingPlan that specifies the application source to use with a scaling plan.static final classA fluent builder forCfnScalingPlan.static interfaceCustomizedLoadMetricSpecificationis a subproperty of ScalingInstruction that specifies a customized load metric for predictive scaling to use with a scaling plan.static interfaceCustomizedScalingMetricSpecificationis a subproperty of TargetTrackingConfiguration that specifies a customized scaling metric for a target tracking configuration to use with a scaling plan.static interfaceMetricDimensionis a subproperty of CustomizedScalingMetricSpecification that specifies a dimension for a customized metric to use with a scaling plan.static interfacePredefinedLoadMetricSpecificationis a subproperty of ScalingInstruction that specifies a predefined load metric for predictive scaling to use with a scaling plan.static interfacePredefinedScalingMetricSpecificationis a subproperty of TargetTrackingConfiguration that specifies a customized scaling metric for a target tracking configuration to use with a scaling plan.static interfaceScalingInstructionis a property of ScalingPlan that specifies the scaling instruction for a scalable resource in a scaling plan.static interfaceTagFilteris a subproperty of ApplicationSource that specifies a tag for an application source to use with a scaling plan.static interfaceTargetTrackingConfigurationis a subproperty of ScalingInstruction that specifies a target tracking configuration for a scalable resource.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.autoscalingplans.IScalingPlanRef
IScalingPlanRef.Jsii$Default, IScalingPlanRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnScalingPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnScalingPlan(software.amazon.jsii.JsiiObjectRef objRef) CfnScalingPlan(software.constructs.Construct scope, String id, CfnScalingPlanProps props) -
Method Summary
Modifier and TypeMethodDescriptionA CloudFormation stack or a set of tags.The scaling instructions.A reference to a ScalingPlan resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetApplicationSource(IResolvable value) A CloudFormation stack or a set of tags.voidA CloudFormation stack or a set of tags.voidsetScalingInstructions(List<Object> value) The scaling instructions.voidThe scaling instructions.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnScalingPlan
protected CfnScalingPlan(software.amazon.jsii.JsiiObjectRef objRef) -
CfnScalingPlan
protected CfnScalingPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnScalingPlan
@Stability(Stable) public CfnScalingPlan(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnScalingPlanProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getAttrScalingPlanName
-
getAttrScalingPlanVersion
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getScalingPlanRef
A reference to a ScalingPlan resource.- Specified by:
getScalingPlanRefin interfaceIScalingPlanRef
-
getApplicationSource
A CloudFormation stack or a set of tags.Returns union: either
IResolvableorCfnScalingPlan.ApplicationSourceProperty -
setApplicationSource
A CloudFormation stack or a set of tags. -
setApplicationSource
@Stability(Stable) public void setApplicationSource(@NotNull CfnScalingPlan.ApplicationSourceProperty value) A CloudFormation stack or a set of tags. -
getScalingInstructions
The scaling instructions.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnScalingPlan.ScalingInstructionProperty> -
setScalingInstructions
The scaling instructions. -
setScalingInstructions
The scaling instructions.
-