Table of Contents

Class Schedule

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

Schedule for scheduled scaling actions.

public abstract class Schedule : DeputyBase
Inheritance
Schedule

Examples

using Amazon.CDK.AWS.AutoScaling;

            Function fn;

            var alias = fn.AddAlias("prod");

            // Create AutoScaling target
            var as = alias.AddAutoScaling(new AutoScalingOptions { MaxCapacity = 50 });

            // Configure Target Tracking
            as.ScaleOnUtilization(new UtilizationScalingOptions {
                UtilizationTarget = 0.5
            });

            // Configure Scheduled Scaling
            as.ScaleOnSchedule("ScaleUpInTheMorning", new ScalingSchedule {
                Schedule = Schedule.Cron(new CronOptions { Hour = "8", Minute = "0" }),
                MinCapacity = 20
            });

Remarks

ExampleMetadata: infused

Constructors

Schedule()

protected Schedule()

Properties

ExpressionString

Retrieve the expression for this schedule.

public abstract string ExpressionString { get; }

Property Value

string

Methods

Cron(ICronOptions)

Create a schedule from a set of cron fields.

public static Schedule Cron(ICronOptions options)

Parameters

options ICronOptions

Returns

Schedule

Expression(string)

Construct a schedule from a literal schedule expression.

public static Schedule Expression(string expression)

Parameters

expression string

The expression to use.

Returns

Schedule

Remarks