AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ScheduledAction

Define a scheduled scaling action.

Import

import { ScheduledAction } from 'aws-cdk-lib/aws-autoscaling';

Or use the module namespace:

import * as autoscaling from 'aws-cdk-lib/aws-autoscaling';
// autoscaling.ScheduledAction

Properties

Configuration passed to the constructor as ScheduledActionProps.

autoScalingGroupRequired
IAutoScalingGroupRef

The AutoScalingGroup to apply the scheduled actions to.

7 properties inherited from BasicScheduledActionProps
scheduleRequiredinherited from BasicScheduledActionProps
Schedule

When to perform this action. Supports cron expressions. For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.

desiredCapacityOptionalinherited from BasicScheduledActionProps
number

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.

endTimeOptionalinherited from BasicScheduledActionProps
date

When this scheduled action expires.

Default: - The rule never expires.

maxCapacityOptionalinherited from BasicScheduledActionProps
number

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.

minCapacityOptionalinherited from BasicScheduledActionProps
number

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.

startTimeOptionalinherited from BasicScheduledActionProps
date

When this scheduled action becomes active.

Default: - The rule is activate immediately.

timeZoneOptionalinherited from BasicScheduledActionProps
string

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

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter