@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.414Z") @Stability(value=Stable) public abstract class Schedule extends software.amazon.jsii.JsiiObject
Example:
SomeScalableResource resource;
ScalableAttribute capacity = resource.autoScaleCapacity(new Caps()
.minCapacity(1)
.maxCapacity(50)
);
capacity.scaleOnSchedule("PrescaleInTheMorning", ScalingSchedule.builder()
.schedule(Schedule.cron(CronOptions.builder().hour("8").minute("0").build()))
.minCapacity(20)
.build());
capacity.scaleOnSchedule("AllowDownscalingAtNight", ScalingSchedule.builder()
.schedule(Schedule.cron(CronOptions.builder().hour("20").minute("0").build()))
.minCapacity(1)
.build());
| Modifier | Constructor and Description |
|---|---|
protected |
Schedule() |
protected |
Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Schedule(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static Schedule |
at(Instant moment)
Construct a Schedule from a moment in time.
|
static Schedule |
cron(CronOptions options)
Create a schedule from a set of cron fields.
|
static Schedule |
expression(String expression)
Construct a schedule from a literal schedule expression.
|
abstract String |
getExpressionString()
Retrieve the expression for this schedule.
|
static Schedule |
rate(Duration duration)
Construct a schedule from an interval and a time unit.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Schedule(software.amazon.jsii.JsiiObjectRef objRef)
protected Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected Schedule()
@Stability(value=Stable) @NotNull public static Schedule at(@NotNull Instant moment)
moment - This parameter is required.@Stability(value=Stable) @NotNull public static Schedule cron(@NotNull CronOptions options)
options - This parameter is required.@Stability(value=Stable) @NotNull public static Schedule expression(@NotNull String expression)
expression - The expression to use. This parameter is required.@Stability(value=Stable) @NotNull public static Schedule rate(@NotNull Duration duration)
duration - This parameter is required.@Stability(value=Stable) @NotNull public abstract String getExpressionString()
Copyright © 2022. All rights reserved.