@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:19:53.500Z") public class CfnScalingPlan extends CfnResource implements IInspectable
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:
For more information, see the AWS 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.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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnScalingPlan.ApplicationSourceProperty
`ApplicationSource` is a property of [ScalingPlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscalingplans-scalingplan.html) that specifies the application source to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static class |
CfnScalingPlan.Builder
A fluent builder for
CfnScalingPlan . |
static interface |
CfnScalingPlan.CustomizedLoadMetricSpecificationProperty
`CustomizedLoadMetricSpecification` is a subproperty of [ScalingInstruction](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-scalinginstruction.html) that specifies a customized load metric for predictive scaling to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static interface |
CfnScalingPlan.CustomizedScalingMetricSpecificationProperty
`CustomizedScalingMetricSpecification` is a subproperty of [TargetTrackingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-targettrackingconfiguration.html) that specifies a customized scaling metric for a target tracking configuration to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static interface |
CfnScalingPlan.MetricDimensionProperty
`MetricDimension` is a subproperty of [CustomizedScalingMetricSpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-customizedscalingmetricspecification.html) that specifies a dimension for a customized metric to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static interface |
CfnScalingPlan.PredefinedLoadMetricSpecificationProperty
`PredefinedLoadMetricSpecification` is a subproperty of [ScalingInstruction](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-scalinginstruction.html) that specifies a predefined load metric for predictive scaling to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static interface |
CfnScalingPlan.PredefinedScalingMetricSpecificationProperty
`PredefinedScalingMetricSpecification` is a subproperty of [TargetTrackingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-targettrackingconfiguration.html) that specifies a customized scaling metric for a target tracking configuration to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static interface |
CfnScalingPlan.ScalingInstructionProperty
`ScalingInstruction` is a property of [ScalingPlan](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscalingplans-scalingplan.html) that specifies the scaling instruction for a scalable resource in a scaling plan.
|
static interface |
CfnScalingPlan.TagFilterProperty
`TagFilter` is a subproperty of [ApplicationSource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html) that specifies a tag for an application source to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
static interface |
CfnScalingPlan.TargetTrackingConfigurationProperty
`TargetTrackingConfiguration` is a subproperty of [ScalingInstruction](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-scalinginstruction.html) that specifies a target tracking configuration to use with AWS Auto Scaling ( Auto Scaling Plans ).
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnScalingPlan(Construct scope,
java.lang.String id,
CfnScalingPlanProps props)
Create a new `AWS::AutoScalingPlans::ScalingPlan`.
|
protected |
CfnScalingPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnScalingPlan(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getApplicationSource()
A CloudFormation stack or a set of tags.
|
java.lang.String |
getAttrScalingPlanName() |
java.lang.String |
getAttrScalingPlanVersion() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getScalingInstructions()
The scaling instructions.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setApplicationSource(CfnScalingPlan.ApplicationSourceProperty value)
A CloudFormation stack or a set of tags.
|
void |
setApplicationSource(IResolvable value)
A CloudFormation stack or a set of tags.
|
void |
setScalingInstructions(IResolvable value)
The scaling instructions.
|
void |
setScalingInstructions(java.util.List<java.lang.Object> value)
The scaling instructions.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnScalingPlan(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnScalingPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnScalingPlan(Construct scope, java.lang.String id, CfnScalingPlanProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrScalingPlanName()
public java.lang.String getAttrScalingPlanVersion()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getApplicationSource()
You can create one scaling plan per application source. The ApplicationSource
property must be present to ensure interoperability with the AWS Auto Scaling console.
public void setApplicationSource(CfnScalingPlan.ApplicationSourceProperty value)
You can create one scaling plan per application source. The ApplicationSource
property must be present to ensure interoperability with the AWS Auto Scaling console.
public void setApplicationSource(IResolvable value)
You can create one scaling plan per application source. The ApplicationSource
property must be present to ensure interoperability with the AWS Auto Scaling console.
public java.lang.Object getScalingInstructions()
public void setScalingInstructions(IResolvable value)
public void setScalingInstructions(java.util.List<java.lang.Object> value)