CfnScalingPolicyProps Struct
Properties for defining a CfnScalingPolicy.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const cfnScalingPolicyProps: autoscaling.CfnScalingPolicyProps = {
autoScalingGroupName: 'autoScalingGroupName',
// the properties below are optional
adjustmentType: 'adjustmentType',
cooldown: 'cooldown',
estimatedInstanceWarmup: 123,
metricAggregationType: 'metricAggregationType',
minAdjustmentMagnitude: 123,
policyType: 'policyType',
predictiveScalingConfiguration: {
metricSpecifications: [{
targetValue: 123,
// the properties below are optional
customizedCapacityMetricSpecification: {
metricDataQueries: [{
id: 'id',
// the properties below are optional
expression: 'expression',
label: 'label',
metricStat: {
metric: {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
},
stat: 'stat',
// the properties below are optional
unit: 'unit',
},
returnData: false,
}],
},
customizedLoadMetricSpecification: {
metricDataQueries: [{
id: 'id',
// the properties below are optional
expression: 'expression',
label: 'label',
metricStat: {
metric: {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
},
stat: 'stat',
// the properties below are optional
unit: 'unit',
},
returnData: false,
}],
},
customizedScalingMetricSpecification: {
metricDataQueries: [{
id: 'id',
// the properties below are optional
expression: 'expression',
label: 'label',
metricStat: {
metric: {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
},
stat: 'stat',
// the properties below are optional
unit: 'unit',
},
returnData: false,
}],
},
predefinedLoadMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
// the properties below are optional
resourceLabel: 'resourceLabel',
},
predefinedMetricPairSpecification: {
predefinedMetricType: 'predefinedMetricType',
// the properties below are optional
resourceLabel: 'resourceLabel',
},
predefinedScalingMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
// the properties below are optional
resourceLabel: 'resourceLabel',
},
}],
// the properties below are optional
maxCapacityBreachBehavior: 'maxCapacityBreachBehavior',
maxCapacityBuffer: 123,
mode: 'mode',
schedulingBufferTime: 123,
},
scalingAdjustment: 123,
stepAdjustments: [{
scalingAdjustment: 123,
// the properties below are optional
metricIntervalLowerBound: 123,
metricIntervalUpperBound: 123,
}],
targetTrackingConfiguration: {
targetValue: 123,
// the properties below are optional
customizedMetricSpecification: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
metrics: [{
id: 'id',
// the properties below are optional
expression: 'expression',
label: 'label',
metricStat: {
metric: {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
},
stat: 'stat',
// the properties below are optional
period: 123,
unit: 'unit',
},
period: 123,
returnData: false,
}],
namespace: 'namespace',
period: 123,
statistic: 'statistic',
unit: 'unit',
},
disableScaleIn: false,
predefinedMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
// the properties below are optional
resourceLabel: 'resourceLabel',
},
},
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_autoscaling as autoscaling
cfn_scaling_policy_props = autoscaling.CfnScalingPolicyProps(
auto_scaling_group_name="autoScalingGroupName",
# the properties below are optional
adjustment_type="adjustmentType",
cooldown="cooldown",
estimated_instance_warmup=123,
metric_aggregation_type="metricAggregationType",
min_adjustment_magnitude=123,
policy_type="policyType",
predictive_scaling_configuration=autoscaling.CfnScalingPolicy.PredictiveScalingConfigurationProperty(
metric_specifications=[autoscaling.CfnScalingPolicy.PredictiveScalingMetricSpecificationProperty(
target_value=123,
# the properties below are optional
customized_capacity_metric_specification=autoscaling.CfnScalingPolicy.PredictiveScalingCustomizedCapacityMetricProperty(
metric_data_queries=[autoscaling.CfnScalingPolicy.MetricDataQueryProperty(
id="id",
# the properties below are optional
expression="expression",
label="label",
metric_stat=autoscaling.CfnScalingPolicy.MetricStatProperty(
metric=autoscaling.CfnScalingPolicy.MetricProperty(
metric_name="metricName",
namespace="namespace",
# the properties below are optional
dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
name="name",
value="value"
)]
),
stat="stat",
# the properties below are optional
unit="unit"
),
return_data=False
)]
),
customized_load_metric_specification=autoscaling.CfnScalingPolicy.PredictiveScalingCustomizedLoadMetricProperty(
metric_data_queries=[autoscaling.CfnScalingPolicy.MetricDataQueryProperty(
id="id",
# the properties below are optional
expression="expression",
label="label",
metric_stat=autoscaling.CfnScalingPolicy.MetricStatProperty(
metric=autoscaling.CfnScalingPolicy.MetricProperty(
metric_name="metricName",
namespace="namespace",
# the properties below are optional
dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
name="name",
value="value"
)]
),
stat="stat",
# the properties below are optional
unit="unit"
),
return_data=False
)]
),
customized_scaling_metric_specification=autoscaling.CfnScalingPolicy.PredictiveScalingCustomizedScalingMetricProperty(
metric_data_queries=[autoscaling.CfnScalingPolicy.MetricDataQueryProperty(
id="id",
# the properties below are optional
expression="expression",
label="label",
metric_stat=autoscaling.CfnScalingPolicy.MetricStatProperty(
metric=autoscaling.CfnScalingPolicy.MetricProperty(
metric_name="metricName",
namespace="namespace",
# the properties below are optional
dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
name="name",
value="value"
)]
),
stat="stat",
# the properties below are optional
unit="unit"
),
return_data=False
)]
),
predefined_load_metric_specification=autoscaling.CfnScalingPolicy.PredictiveScalingPredefinedLoadMetricProperty(
predefined_metric_type="predefinedMetricType",
# the properties below are optional
resource_label="resourceLabel"
),
predefined_metric_pair_specification=autoscaling.CfnScalingPolicy.PredictiveScalingPredefinedMetricPairProperty(
predefined_metric_type="predefinedMetricType",
# the properties below are optional
resource_label="resourceLabel"
),
predefined_scaling_metric_specification=autoscaling.CfnScalingPolicy.PredictiveScalingPredefinedScalingMetricProperty(
predefined_metric_type="predefinedMetricType",
# the properties below are optional
resource_label="resourceLabel"
)
)],
# the properties below are optional
max_capacity_breach_behavior="maxCapacityBreachBehavior",
max_capacity_buffer=123,
mode="mode",
scheduling_buffer_time=123
),
scaling_adjustment=123,
step_adjustments=[autoscaling.CfnScalingPolicy.StepAdjustmentProperty(
scaling_adjustment=123,
# the properties below are optional
metric_interval_lower_bound=123,
metric_interval_upper_bound=123
)],
target_tracking_configuration=autoscaling.CfnScalingPolicy.TargetTrackingConfigurationProperty(
target_value=123,
# the properties below are optional
customized_metric_specification=autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty(
dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
name="name",
value="value"
)],
metric_name="metricName",
metrics=[autoscaling.CfnScalingPolicy.TargetTrackingMetricDataQueryProperty(
id="id",
# the properties below are optional
expression="expression",
label="label",
metric_stat=autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty(
metric=autoscaling.CfnScalingPolicy.MetricProperty(
metric_name="metricName",
namespace="namespace",
# the properties below are optional
dimensions=[autoscaling.CfnScalingPolicy.MetricDimensionProperty(
name="name",
value="value"
)]
),
stat="stat",
# the properties below are optional
period=123,
unit="unit"
),
period=123,
return_data=False
)],
namespace="namespace",
period=123,
statistic="statistic",
unit="unit"
),
disable_scale_in=False,
predefined_metric_specification=autoscaling.CfnScalingPolicy.PredefinedMetricSpecificationProperty(
predefined_metric_type="predefinedMetricType",
# the properties below are optional
resource_label="resourceLabel"
)
)
)
// 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.*;
CfnScalingPolicyProps cfnScalingPolicyProps = CfnScalingPolicyProps.builder()
.autoScalingGroupName("autoScalingGroupName")
// the properties below are optional
.adjustmentType("adjustmentType")
.cooldown("cooldown")
.estimatedInstanceWarmup(123)
.metricAggregationType("metricAggregationType")
.minAdjustmentMagnitude(123)
.policyType("policyType")
.predictiveScalingConfiguration(PredictiveScalingConfigurationProperty.builder()
.metricSpecifications(List.of(PredictiveScalingMetricSpecificationProperty.builder()
.targetValue(123)
// the properties below are optional
.customizedCapacityMetricSpecification(PredictiveScalingCustomizedCapacityMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.customizedLoadMetricSpecification(PredictiveScalingCustomizedLoadMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.customizedScalingMetricSpecification(PredictiveScalingCustomizedScalingMetricProperty.builder()
.metricDataQueries(List.of(MetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(MetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.unit("unit")
.build())
.returnData(false)
.build()))
.build())
.predefinedLoadMetricSpecification(PredictiveScalingPredefinedLoadMetricProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.predefinedMetricPairSpecification(PredictiveScalingPredefinedMetricPairProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.predefinedScalingMetricSpecification(PredictiveScalingPredefinedScalingMetricProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.build()))
// the properties below are optional
.maxCapacityBreachBehavior("maxCapacityBreachBehavior")
.maxCapacityBuffer(123)
.mode("mode")
.schedulingBufferTime(123)
.build())
.scalingAdjustment(123)
.stepAdjustments(List.of(StepAdjustmentProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.metricIntervalLowerBound(123)
.metricIntervalUpperBound(123)
.build()))
.targetTrackingConfiguration(TargetTrackingConfigurationProperty.builder()
.targetValue(123)
// the properties below are optional
.customizedMetricSpecification(CustomizedMetricSpecificationProperty.builder()
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.metricName("metricName")
.metrics(List.of(TargetTrackingMetricDataQueryProperty.builder()
.id("id")
// the properties below are optional
.expression("expression")
.label("label")
.metricStat(TargetTrackingMetricStatProperty.builder()
.metric(MetricProperty.builder()
.metricName("metricName")
.namespace("namespace")
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.stat("stat")
// the properties below are optional
.period(123)
.unit("unit")
.build())
.period(123)
.returnData(false)
.build()))
.namespace("namespace")
.period(123)
.statistic("statistic")
.unit("unit")
.build())
.disableScaleIn(false)
.predefinedMetricSpecification(PredefinedMetricSpecificationProperty.builder()
.predefinedMetricType("predefinedMetricType")
// the properties below are optional
.resourceLabel("resourceLabel")
.build())
.build())
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
var cfnScalingPolicyProps = new CfnScalingPolicyProps {
AutoScalingGroupName = "autoScalingGroupName",
// the properties below are optional
AdjustmentType = "adjustmentType",
Cooldown = "cooldown",
EstimatedInstanceWarmup = 123,
MetricAggregationType = "metricAggregationType",
MinAdjustmentMagnitude = 123,
PolicyType = "policyType",
PredictiveScalingConfiguration = new PredictiveScalingConfigurationProperty {
MetricSpecifications = new [] { new PredictiveScalingMetricSpecificationProperty {
TargetValue = 123,
// the properties below are optional
CustomizedCapacityMetricSpecification = new PredictiveScalingCustomizedCapacityMetricProperty {
MetricDataQueries = new [] { new MetricDataQueryProperty {
Id = "id",
// the properties below are optional
Expression = "expression",
Label = "label",
MetricStat = new MetricStatProperty {
Metric = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} }
},
Stat = "stat",
// the properties below are optional
Unit = "unit"
},
ReturnData = false
} }
},
CustomizedLoadMetricSpecification = new PredictiveScalingCustomizedLoadMetricProperty {
MetricDataQueries = new [] { new MetricDataQueryProperty {
Id = "id",
// the properties below are optional
Expression = "expression",
Label = "label",
MetricStat = new MetricStatProperty {
Metric = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} }
},
Stat = "stat",
// the properties below are optional
Unit = "unit"
},
ReturnData = false
} }
},
CustomizedScalingMetricSpecification = new PredictiveScalingCustomizedScalingMetricProperty {
MetricDataQueries = new [] { new MetricDataQueryProperty {
Id = "id",
// the properties below are optional
Expression = "expression",
Label = "label",
MetricStat = new MetricStatProperty {
Metric = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} }
},
Stat = "stat",
// the properties below are optional
Unit = "unit"
},
ReturnData = false
} }
},
PredefinedLoadMetricSpecification = new PredictiveScalingPredefinedLoadMetricProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
},
PredefinedMetricPairSpecification = new PredictiveScalingPredefinedMetricPairProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
},
PredefinedScalingMetricSpecification = new PredictiveScalingPredefinedScalingMetricProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
}
} },
// the properties below are optional
MaxCapacityBreachBehavior = "maxCapacityBreachBehavior",
MaxCapacityBuffer = 123,
Mode = "mode",
SchedulingBufferTime = 123
},
ScalingAdjustment = 123,
StepAdjustments = new [] { new StepAdjustmentProperty {
ScalingAdjustment = 123,
// the properties below are optional
MetricIntervalLowerBound = 123,
MetricIntervalUpperBound = 123
} },
TargetTrackingConfiguration = new TargetTrackingConfigurationProperty {
TargetValue = 123,
// the properties below are optional
CustomizedMetricSpecification = new CustomizedMetricSpecificationProperty {
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} },
MetricName = "metricName",
Metrics = new [] { new TargetTrackingMetricDataQueryProperty {
Id = "id",
// the properties below are optional
Expression = "expression",
Label = "label",
MetricStat = new TargetTrackingMetricStatProperty {
Metric = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Name = "name",
Value = "value"
} }
},
Stat = "stat",
// the properties below are optional
Period = 123,
Unit = "unit"
},
Period = 123,
ReturnData = false
} },
Namespace = "namespace",
Period = 123,
Statistic = "statistic",
Unit = "unit"
},
DisableScaleIn = false,
PredefinedMetricSpecification = new PredefinedMetricSpecificationProperty {
PredefinedMetricType = "predefinedMetricType",
// the properties below are optional
ResourceLabel = "resourceLabel"
}
}
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnScalingPolicyProps := &CfnScalingPolicyProps{
AutoScalingGroupName: jsii.String("autoScalingGroupName"),
// the properties below are optional
AdjustmentType: jsii.String("adjustmentType"),
Cooldown: jsii.String("cooldown"),
EstimatedInstanceWarmup: jsii.Number(123),
MetricAggregationType: jsii.String("metricAggregationType"),
MinAdjustmentMagnitude: jsii.Number(123),
PolicyType: jsii.String("policyType"),
PredictiveScalingConfiguration: &PredictiveScalingConfigurationProperty{
MetricSpecifications: []interface{}{
&PredictiveScalingMetricSpecificationProperty{
TargetValue: jsii.Number(123),
// the properties below are optional
CustomizedCapacityMetricSpecification: &PredictiveScalingCustomizedCapacityMetricProperty{
MetricDataQueries: []interface{}{
&MetricDataQueryProperty{
Id: jsii.String("id"),
// the properties below are optional
Expression: jsii.String("expression"),
Label: jsii.String("label"),
MetricStat: &MetricStatProperty{
Metric: &MetricProperty{
MetricName: jsii.String("metricName"),
Namespace: jsii.String("namespace"),
// the properties below are optional
Dimensions: []interface{}{
&MetricDimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
Stat: jsii.String("stat"),
// the properties below are optional
Unit: jsii.String("unit"),
},
ReturnData: jsii.Boolean(false),
},
},
},
CustomizedLoadMetricSpecification: &PredictiveScalingCustomizedLoadMetricProperty{
MetricDataQueries: []interface{}{
&MetricDataQueryProperty{
Id: jsii.String("id"),
// the properties below are optional
Expression: jsii.String("expression"),
Label: jsii.String("label"),
MetricStat: &MetricStatProperty{
Metric: &MetricProperty{
MetricName: jsii.String("metricName"),
Namespace: jsii.String("namespace"),
// the properties below are optional
Dimensions: []interface{}{
&MetricDimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
Stat: jsii.String("stat"),
// the properties below are optional
Unit: jsii.String("unit"),
},
ReturnData: jsii.Boolean(false),
},
},
},
CustomizedScalingMetricSpecification: &PredictiveScalingCustomizedScalingMetricProperty{
MetricDataQueries: []interface{}{
&MetricDataQueryProperty{
Id: jsii.String("id"),
// the properties below are optional
Expression: jsii.String("expression"),
Label: jsii.String("label"),
MetricStat: &MetricStatProperty{
Metric: &MetricProperty{
MetricName: jsii.String("metricName"),
Namespace: jsii.String("namespace"),
// the properties below are optional
Dimensions: []interface{}{
&MetricDimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
Stat: jsii.String("stat"),
// the properties below are optional
Unit: jsii.String("unit"),
},
ReturnData: jsii.Boolean(false),
},
},
},
PredefinedLoadMetricSpecification: &PredictiveScalingPredefinedLoadMetricProperty{
PredefinedMetricType: jsii.String("predefinedMetricType"),
// the properties below are optional
ResourceLabel: jsii.String("resourceLabel"),
},
PredefinedMetricPairSpecification: &PredictiveScalingPredefinedMetricPairProperty{
PredefinedMetricType: jsii.String("predefinedMetricType"),
// the properties below are optional
ResourceLabel: jsii.String("resourceLabel"),
},
PredefinedScalingMetricSpecification: &PredictiveScalingPredefinedScalingMetricProperty{
PredefinedMetricType: jsii.String("predefinedMetricType"),
// the properties below are optional
ResourceLabel: jsii.String("resourceLabel"),
},
},
},
// the properties below are optional
MaxCapacityBreachBehavior: jsii.String("maxCapacityBreachBehavior"),
MaxCapacityBuffer: jsii.Number(123),
Mode: jsii.String("mode"),
SchedulingBufferTime: jsii.Number(123),
},
ScalingAdjustment: jsii.Number(123),
StepAdjustments: []interface{}{
&StepAdjustmentProperty{
ScalingAdjustment: jsii.Number(123),
// the properties below are optional
MetricIntervalLowerBound: jsii.Number(123),
MetricIntervalUpperBound: jsii.Number(123),
},
},
TargetTrackingConfiguration: &TargetTrackingConfigurationProperty{
TargetValue: jsii.Number(123),
// the properties below are optional
CustomizedMetricSpecification: &CustomizedMetricSpecificationProperty{
Dimensions: []interface{}{
&MetricDimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
MetricName: jsii.String("metricName"),
Metrics: []interface{}{
&TargetTrackingMetricDataQueryProperty{
Id: jsii.String("id"),
// the properties below are optional
Expression: jsii.String("expression"),
Label: jsii.String("label"),
MetricStat: &TargetTrackingMetricStatProperty{
Metric: &MetricProperty{
MetricName: jsii.String("metricName"),
Namespace: jsii.String("namespace"),
// the properties below are optional
Dimensions: []interface{}{
&MetricDimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
Stat: jsii.String("stat"),
// the properties below are optional
Period: jsii.Number(123),
Unit: jsii.String("unit"),
},
Period: jsii.Number(123),
ReturnData: jsii.Boolean(false),
},
},
Namespace: jsii.String("namespace"),
Period: jsii.Number(123),
Statistic: jsii.String("statistic"),
Unit: jsii.String("unit"),
},
DisableScaleIn: jsii.Boolean(false),
PredefinedMetricSpecification: &PredefinedMetricSpecificationProperty{
PredefinedMetricType: jsii.String("predefinedMetricType"),
// the properties below are optional
ResourceLabel: jsii.String("resourceLabel"),
},
},
}
Properties
adjustmentTypeoptionalstringadjustment_typeoptionalstradjustmentTypeoptionalStringAdjustmentTypeoptionalstringAdjustmentTypeoptional*string #notes
The valid values are ChangeInCapacity , ExactCapacity , and PercentChangeInCapacity .
Required if the policy type is StepScaling or SimpleScaling . For more information, see Scaling adjustment types in the Amazon EC2 Auto Scaling User Guide .
autoScalingGroupNamestring | IAutoScalingGroupRefauto_scaling_group_nametyping.Union[str, IAutoScalingGroupRef]autoScalingGroupNameStringAutoScalingGroupNamestringAutoScalingGroupNameinterface{} required #cooldownoptionalstringcooldownoptionalstrcooldownoptionalStringCooldownoptionalstringCooldownoptional*string #notes
When a cooldown period is specified here, it overrides the default cooldown.
Valid only if the policy type is SimpleScaling . For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
Default: None
estimatedInstanceWarmupoptionalnumberestimated_instance_warmupoptionalint | floatestimatedInstanceWarmupoptionalNumberEstimatedInstanceWarmupoptionaldoubleEstimatedInstanceWarmupoptional*float64 #notes
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This warm-up period applies to instances launched due to a specific target tracking or step scaling policy. When a warm-up period is specified here, it overrides the default instance warmup.
Valid only if the policy type is TargetTrackingScaling or StepScaling .
The default is to use the value for the default instance warmup defined for the group. If default instance warmup is null, then
EstimatedInstanceWarmupfalls back to the value of default cooldown.
metricAggregationTypeoptionalstringmetric_aggregation_typeoptionalstrmetricAggregationTypeoptionalStringMetricAggregationTypeoptionalstringMetricAggregationTypeoptional*string #The valid values are Minimum , Maximum , and Average . If the aggregation type is null, the value is treated as Average .
Valid only if the policy type is StepScaling .
minAdjustmentMagnitudeoptionalnumbermin_adjustment_magnitudeoptionalint | floatminAdjustmentMagnitudeoptionalNumberMinAdjustmentMagnitudeoptionaldoubleMinAdjustmentMagnitudeoptional*float64 #notes
For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.
Valid only if the policy type is StepScaling or SimpleScaling . For more information, see Scaling adjustment types in the Amazon EC2 Auto Scaling User Guide .
Some Auto Scaling groups use instance weights. In this case, set the
MinAdjustmentMagnitudeto a value that is at least as large as your largest instance weight.
policyTypeoptionalstringpolicy_typeoptionalstrpolicyTypeoptionalStringPolicyTypeoptionalstringPolicyTypeoptional*string #TargetTrackingScalingStepScalingSimpleScaling(default)PredictiveScaling
predictiveScalingConfigurationoptionalIResolvable | CfnScalingPolicy.predictive_scaling_configurationoptionaltyping.Union[IResolvable, PredictiveScalingConfigurationProperty]predictiveScalingConfigurationoptionalIResolvablePredictiveScalingConfigurationoptionalIResolvablePredictiveScalingConfigurationoptionalinterface{} #Predefined metrics include CPU utilization, network in/out, and the Application Load Balancer request count.
Required if the policy type is PredictiveScaling .
scalingAdjustmentoptionalnumberscaling_adjustmentoptionalint | floatscalingAdjustmentoptionalNumberScalingAdjustmentoptionaldoubleScalingAdjustmentoptional*float64 #notes
A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a non-negative value.
Required if the policy type is SimpleScaling . (Not used with any other policy type.)
stepAdjustmentsoptionalIResolvable | IResolvable | CfnScalingPolicy.step_adjustmentsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StepAdjustmentProperty]]]stepAdjustmentsoptionalIResolvableStepAdjustmentsoptionalIResolvableStepAdjustmentsoptionalinterface{} #Required if the policy type is StepScaling . (Not used with any other policy type.)
targetTrackingConfigurationoptionalIResolvable | CfnScalingPolicy.target_tracking_configurationoptionaltyping.Union[IResolvable, TargetTrackingConfigurationProperty]targetTrackingConfigurationoptionalIResolvableTargetTrackingConfigurationoptionalIResolvableTargetTrackingConfigurationoptionalinterface{} #notes
The following predefined metrics are available:
ASGAverageCPUUtilizationASGAverageNetworkInASGAverageNetworkOutALBRequestCountPerTarget
If you specify ALBRequestCountPerTarget for the metric, you must specify the ResourceLabel property with the PredefinedMetricSpecification .
Required if the policy type is TargetTrackingScaling .