CfnScheduledActionPropsMixin

class aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnScheduledActionPropsMixin(props, *, strategy=None)

Bases: 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-scheduledaction.html

CloudformationResource:

AWS::AutoScaling::ScheduledAction

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_autoscaling import mixins as autoscaling_mixins

cfn_scheduled_action_props_mixin = autoscaling_mixins.CfnScheduledActionPropsMixin(autoscaling_mixins.CfnScheduledActionMixinProps(
    auto_scaling_group_name="autoScalingGroupName",
    desired_capacity=123,
    end_time="endTime",
    max_size=123,
    min_size=123,
    recurrence="recurrence",
    start_time="startTime",
    time_zone="timeZone"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::AutoScaling::ScheduledAction.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['autoScalingGroupName', 'desiredCapacity', 'endTime', 'maxSize', 'minSize', 'recurrence', 'startTime', 'timeZone']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental