Table of Contents

Interface IBasicScheduledActionProps

Namespace
Amazon.CDK.AWS.AutoScaling
Assembly
Amazon.CDK.AWS.AutoScaling.dll

Properties for a scheduled scaling action.

public interface IBasicScheduledActionProps

Examples

AutoScalingGroup autoScalingGroup;


            autoScalingGroup.ScaleOnSchedule("PrescaleInTheMorning", new BasicScheduledActionProps {
                Schedule = Schedule.Cron(new CronOptions { Hour = "8", Minute = "0" }),
                MinCapacity = 20
            });

            autoScalingGroup.ScaleOnSchedule("AllowDownscalingAtNight", new BasicScheduledActionProps {
                Schedule = Schedule.Cron(new CronOptions { Hour = "20", Minute = "0" }),
                MinCapacity = 1
            });

Remarks

ExampleMetadata: infused

Properties

DesiredCapacity

The new desired capacity.

double? DesiredCapacity { get; }

Property Value

double?

Remarks

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.

EndTime

When this scheduled action expires.

DateTime? EndTime { get; }

Property Value

DateTime?

Remarks

Default: - The rule never expires.

MaxCapacity

The new maximum capacity.

double? MaxCapacity { get; }

Property Value

double?

Remarks

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.

MinCapacity

The new minimum capacity.

double? MinCapacity { get; }

Property Value

double?

Remarks

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.

Schedule

When to perform this action.

Schedule Schedule { get; }

Property Value

Schedule

Remarks

Supports cron expressions.

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

StartTime

When this scheduled action becomes active.

DateTime? StartTime { get; }

Property Value

DateTime?

Remarks

Default: - The rule is activate immediately.

TimeZone

Specifies the time zone for a cron expression.

string? TimeZone { get; }

Property Value

string

Remarks

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