class CfnScheduledActionPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.AutoScaling.Mixins.CfnScheduledActionPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsautoscaling/mixins#CfnScheduledActionPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.autoscaling.mixins.CfnScheduledActionPropsMixin |
Python | aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnScheduledActionPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_autoscaling » mixins » CfnScheduledActionPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::AutoScaling::ScheduledAction resource specifies an Amazon EC2 Auto Scaling scheduled action so that the Auto Scaling group can change the number of instances available for your application in response to predictable load changes.
When you update a stack with an Auto Scaling group and scheduled action, CloudFormation always sets the min size, max size, and desired capacity properties of your group to the values that are defined in the AWS::AutoScaling::AutoScalingGroup section of your template. However, you might not want CloudFormation to do that when you have a scheduled action in effect. You can use an UpdatePolicy attribute to prevent CloudFormation from changing the min size, max size, or desired capacity property values during a stack update unless you modified the individual values in your template. If you have rolling updates enabled, before you can update the Auto Scaling group, you must suspend scheduled actions by specifying an UpdatePolicy attribute for the Auto Scaling group. You can find a sample update policy for rolling updates in Configure Amazon EC2 Auto Scaling resources .
For more information, see Scheduled scaling and Suspending and resuming scaling processes 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 cfnScheduledActionPropsMixin = new autoscaling_mixins.CfnScheduledActionPropsMixin({
autoScalingGroupName: 'autoScalingGroupName',
desiredCapacity: 123,
endTime: 'endTime',
maxSize: 123,
minSize: 123,
recurrence: 'recurrence',
startTime: 'startTime',
timeZone: 'timeZone',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnScheduledActionPropsMixin(props: CfnScheduledActionMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Scheduled Action Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::AutoScaling::ScheduledAction.
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