aws-cdk-lib.aws_autoscaling.ScheduledActionProps

interface ScheduledActionProps

LanguageType name
.NETAmazon.CDK.AWS.AutoScaling.ScheduledActionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#ScheduledActionProps
Javasoftware.amazon.awscdk.services.autoscaling.ScheduledActionProps
Pythonaws_cdk.aws_autoscaling.ScheduledActionProps
TypeScript (source)aws-cdk-lib » aws_autoscaling » ScheduledActionProps

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';

declare const autoScalingGroup: autoscaling.AutoScalingGroup;
declare const schedule: autoscaling.Schedule;
const scheduledActionProps: autoscaling.ScheduledActionProps = {
  autoScalingGroup: autoScalingGroup,
  schedule: schedule,

  // the properties below are optional
  desiredCapacity: 123,
  endTime: new Date(),
  maxCapacity: 123,
  minCapacity: 123,
  startTime: new Date(),
  timeZone: 'timeZone',
};

Properties

NameTypeDescription
autoScalingGroupIAutoScalingGroupThe AutoScalingGroup to apply the scheduled actions to.
scheduleScheduleWhen to perform this action.
desiredCapacity?numberThe new desired capacity.
endTime?dateWhen this scheduled action expires.
maxCapacity?numberThe new maximum capacity.
minCapacity?numberThe new minimum capacity.
startTime?dateWhen this scheduled action becomes active.
timeZone?stringSpecifies the time zone for a cron expression.

autoScalingGroup

Type: IAutoScalingGroup

The AutoScalingGroup to apply the scheduled actions to.


schedule

Type: Schedule

When to perform this action.

Supports cron expressions.

For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.


desiredCapacity?

Type: number (optional, default: No new desired capacity.)

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.


endTime?

Type: date (optional, default: The rule never expires.)

When this scheduled action expires.


maxCapacity?

Type: number (optional, default: No new maximum capacity.)

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.


minCapacity?

Type: number (optional, default: No new minimum capacity.)

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.


startTime?

Type: date (optional, default: The rule is activate immediately.)

When this scheduled action becomes active.


timeZone?

Type: string (optional, default: UTC)

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.