Class Schedule
Schedule for scheduled scaling actions.
Inheritance
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.AWS.ApplicationAutoScaling.dll
Syntax (csharp)
public abstract class Schedule : DeputyBase
Syntax (vb)
Public MustInherit Class Schedule
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
SomeScalableResource resource;
var capacity = resource.AutoScaleCapacity(new Caps {
MinCapacity = 1,
MaxCapacity = 50
});
capacity.ScaleOnSchedule("PrescaleInTheMorning", new ScalingSchedule {
Schedule = Schedule.Cron(new CronOptions { Hour = "8", Minute = "0" }),
MinCapacity = 20
});
capacity.ScaleOnSchedule("AllowDownscalingAtNight", new ScalingSchedule {
Schedule = Schedule.Cron(new CronOptions { Hour = "20", Minute = "0" }),
MinCapacity = 1
});
Synopsis
Constructors
Schedule() | |
Schedule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Schedule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ExpressionString | Retrieve the expression for this schedule. |
Methods
At(DateTime) | Construct a Schedule from a moment in time. |
Cron(ICronOptions) | Create a schedule from a set of cron fields. |
Expression(String) | Construct a schedule from a literal schedule expression. |
Rate(Duration) | Construct a schedule from an interval and a time unit. |
Constructors
Schedule()
protected Schedule()
Schedule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Schedule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Schedule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Schedule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ExpressionString
Retrieve the expression for this schedule.
public abstract string ExpressionString { get; }
Property Value
System.String
Methods
At(DateTime)
Construct a Schedule from a moment in time.
public static Schedule At(DateTime moment)
Parameters
- moment System.DateTime
Returns
Cron(ICronOptions)
Create a schedule from a set of cron fields.
public static Schedule Cron(ICronOptions options)
Parameters
- options ICronOptions
Returns
Expression(String)
Construct a schedule from a literal schedule expression.
public static Schedule Expression(string expression)
Parameters
- expression System.String
The expression to use.
Returns