java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.applicationautoscaling.Schedule
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:12.373Z") @Stability(Stable) public abstract class Schedule extends software.amazon.jsii.JsiiObject
Schedule for scheduled scaling actions.

Example:

 import software.amazon.awscdk.TimeZone;
 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)
         .timeZone(TimeZone.AMERICA_DENVER)
         .build());
 capacity.scaleOnSchedule("AllowDownscalingAtNight", ScalingSchedule.builder()
         .schedule(Schedule.cron(CronOptions.builder().hour("20").minute("0").build()))
         .minCapacity(1)
         .timeZone(TimeZone.AMERICA_DENVER)
         .build());
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Schedule(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    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
    Retrieve the expression for this schedule.
    static Schedule
    rate(Duration duration)
    Construct a schedule from an interval and a time unit.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Schedule

      protected Schedule(software.amazon.jsii.JsiiObjectRef objRef)
    • Schedule

      protected Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Schedule

      @Stability(Stable) protected Schedule()
  • Method Details

    • at

      @Stability(Stable) @NotNull public static Schedule at(@NotNull Instant moment)
      Construct a Schedule from a moment in time.

      Parameters:
      moment - This parameter is required.
    • cron

      @Stability(Stable) @NotNull public static Schedule cron(@NotNull CronOptions options)
      Create a schedule from a set of cron fields.

      Parameters:
      options - This parameter is required.
    • expression

      @Stability(Stable) @NotNull public static Schedule expression(@NotNull String expression)
      Construct a schedule from a literal schedule expression.

      Parameters:
      expression - The expression to use. This parameter is required.
    • rate

      @Stability(Stable) @NotNull public static Schedule rate(@NotNull Duration duration)
      Construct a schedule from an interval and a time unit.

      Parameters:
      duration - This parameter is required.
    • getExpressionString

      @Stability(Stable) @NotNull public abstract String getExpressionString()
      Retrieve the expression for this schedule.