- class aws_cdk.aws_autoscaling.ScheduledAction(scope, id, *, auto_scaling_group, schedule, desired_capacity=None, end_time=None, max_capacity=None, min_capacity=None, start_time=None, time_zone=None)
Define a scheduled scaling action.
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_autoscaling as autoscaling # auto_scaling_group: autoscaling.AutoScalingGroup # schedule: autoscaling.Schedule scheduled_action = autoscaling.ScheduledAction(self, "MyScheduledAction", auto_scaling_group=auto_scaling_group, schedule=schedule, # the properties below are optional desired_capacity=123, end_time=Date(), max_capacity=123, min_capacity=123, start_time=Date(), time_zone="timeZone" )
IAutoScalingGroup) – The AutoScalingGroup to apply the scheduled actions to.
None]) – The new desired capacity. At the scheduled time, set the desired capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new desired capacity.
datetime]) – When this scheduled action expires. Default: - The rule never expires.
None]) – The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.
None]) – The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.
datetime]) – When this scheduled action becomes active. Default: - The rule is activate immediately.
str]) – Specifies the time zone for a cron expression. If a time zone is not provided, UTC is used by default. Valid values are the canonical names of the IANA time zones, derived from the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default: - UTC
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (
- Return type
Returns a string representation of this construct.
- Return type
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
The construct tree node associated with this construct.
The name of the scheduled action.
The stack in which this resource is defined.
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Return type