class CfnScalingPolicyPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.ApplicationAutoScaling.Mixins.CfnScalingPolicyPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsapplicationautoscaling/mixins#CfnScalingPolicyPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.applicationautoscaling.mixins.CfnScalingPolicyPropsMixin |
Python | aws_cdk.mixins_preview.aws_applicationautoscaling.mixins.CfnScalingPolicyPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_applicationautoscaling » mixins » CfnScalingPolicyPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::ApplicationAutoScaling::ScalingPolicy resource defines a scaling policy that Application Auto Scaling uses to adjust the capacity of a scalable target.
For more information, see Target tracking scaling policies and Step scaling policies in the Application 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 applicationautoscaling_mixins } from '@aws-cdk/mixins-preview/aws-applicationautoscaling';
const cfnScalingPolicyPropsMixin = new applicationautoscaling_mixins.CfnScalingPolicyPropsMixin({
policyName: 'policyName',
policyType: 'policyType',
predictiveScalingPolicyConfiguration: {
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,
},
resourceId: 'resourceId',
scalableDimension: 'scalableDimension',
scalingTargetId: 'scalingTargetId',
serviceNamespace: 'serviceNamespace',
stepScalingPolicyConfiguration: {
adjustmentType: 'adjustmentType',
cooldown: 123,
metricAggregationType: 'metricAggregationType',
minAdjustmentMagnitude: 123,
stepAdjustments: [{
metricIntervalLowerBound: 123,
metricIntervalUpperBound: 123,
scalingAdjustment: 123,
}],
},
targetTrackingScalingPolicyConfiguration: {
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',
},
stat: 'stat',
unit: 'unit',
},
returnData: false,
}],
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
disableScaleIn: false,
predefinedMetricSpecification: {
predefinedMetricType: 'predefinedMetricType',
resourceLabel: 'resourceLabel',
},
scaleInCooldown: 123,
scaleOutCooldown: 123,
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::ApplicationAutoScaling::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