class CfnScalingPolicyPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.AutoScaling.Mixins.CfnScalingPolicyPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsautoscaling/mixins#CfnScalingPolicyPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.autoscaling.mixins.CfnScalingPolicyPropsMixin |
Python | aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnScalingPolicyPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_autoscaling » mixins » CfnScalingPolicyPropsMixin |
Implements
IMixin
Extends
Mixin
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 { mixins } from '@aws-cdk/mixins-preview';
import { mixins as autoscaling_mixins } from '@aws-cdk/mixins-preview/aws-autoscaling';
const cfnScalingPolicyPropsMixin = new autoscaling_mixins.CfnScalingPolicyPropsMixin({
adjustmentType: 'adjustmentType',
autoScalingGroupName: 'autoScalingGroupName',
cooldown: 'cooldown',
estimatedInstanceWarmup: 123,
metricAggregationType: 'metricAggregationType',
minAdjustmentMagnitude: 123,
policyType: 'policyType',
predictiveScalingConfiguration: {
maxCapacityBreachBehavior: 'maxCapacityBreachBehavior',
maxCapacityBuffer: 123,
metricSpecifications: [{
customizedCapacityMetricSpecification: {
metricDataQueries: [{
expression: 'expression',
id: 'id',
label: 'label',
metricStat: {
metric: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
namespace: 'namespace',
},
stat: 'stat',
unit: 'unit',
},
returnData: false,
}],
},
customizedLoadMetricSpecification: {
metricDataQueries: [{
expression: 'expression',
id: 'id',
label: 'label',
metricStat: {
metric: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
namespace: 'namespace',
},
stat: 'stat',
unit: 'unit',
},
returnData: false,
}],
},
customizedScalingMetricSpecification: {
metricDataQueries: [{
expression: 'expression',
id: 'id',
label: 'label',
metricStat: {
metric: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
namespace: 'namespace',
},
stat: 'stat',
unit: 'unit',
},
returnData: false,
}],
},
predefinedLoadMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
resourceLabel: 'resourceLabel',
},
predefinedMetricPairSpecification: {
predefinedMetricType: 'predefinedMetricType',
resourceLabel: 'resourceLabel',
},
predefinedScalingMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
resourceLabel: 'resourceLabel',
},
targetValue: 123,
}],
mode: 'mode',
schedulingBufferTime: 123,
},
scalingAdjustment: 123,
stepAdjustments: [{
metricIntervalLowerBound: 123,
metricIntervalUpperBound: 123,
scalingAdjustment: 123,
}],
targetTrackingConfiguration: {
customizedMetricSpecification: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
metrics: [{
expression: 'expression',
id: 'id',
label: 'label',
metricStat: {
metric: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
namespace: 'namespace',
},
period: 123,
stat: 'stat',
unit: 'unit',
},
period: 123,
returnData: false,
}],
namespace: 'namespace',
period: 123,
statistic: 'statistic',
unit: 'unit',
},
disableScaleIn: false,
predefinedMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
resourceLabel: 'resourceLabel',
},
targetValue: 123,
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnScalingPolicyPropsMixin(props: CfnScalingPolicyMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Scaling Policy Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::AutoScaling::ScalingPolicy.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript