ScheduledActionProps Struct
Properties for a scheduled action on an AutoScalingGroup.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
import { aws_autoscaling as interfaces_autoscaling } from 'aws-cdk-lib/interfaces';
declare const autoScalingGroupRef: interfaces_autoscaling.IAutoScalingGroupRef;
declare const schedule: autoscaling.Schedule;
const scheduledActionProps: autoscaling.ScheduledActionProps = {
autoScalingGroup: autoScalingGroupRef,
schedule: schedule,
// the properties below are optional
desiredCapacity: 123,
endTime: new Date(),
maxCapacity: 123,
minCapacity: 123,
startTime: new Date(),
timeZone: 'timeZone',
};
Properties
autoScalingGroupIAutoScalingGroupRefauto_scaling_groupIAutoScalingGroupRefautoScalingGroupIAutoScalingGroupRefAutoScalingGroupIAutoScalingGroupRefAutoScalingGroupIAutoScalingGroupRefrequired#desiredCapacityoptionalnumberdesired_capacityoptionalint | floatdesiredCapacityoptionalNumberDesiredCapacityoptionaldoubleDesiredCapacityoptional*float64#Default: No 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.
endTimeoptionaldateend_timeoptionaldatetimeendTimeoptionalInstantEndTimeoptionalDateTimeEndTimeoptional*time.Time#Default: The rule never expires.
notes
Warning! You should not set this field! After the scheduled end time, the AutoScaling service will delete the ScheduledAction without CloudFormation's knowledge, and subsequent stack deployments that try to modify or delete this ScheduledAction will fail.
maxCapacityoptionalnumbermax_capacityoptionalint | floatmaxCapacityoptionalNumberMaxCapacityoptionaldoubleMaxCapacityoptional*float64#Default: No 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.
minCapacityoptionalnumbermin_capacityoptionalint | floatminCapacityoptionalNumberMinCapacityoptionaldoubleMinCapacityoptional*float64#Default: No 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.
Supports cron expressions.
For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.
startTimeoptionaldatestart_timeoptionaldatetimestartTimeoptionalInstantStartTimeoptionalDateTimeStartTimeoptional*time.Time#Default: The rule is activate immediately.
timeZoneoptionalstringtime_zoneoptionalstrtimeZoneoptionalStringTimeZoneoptionalstringTimeZoneoptional*string= UTC#notes
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.