Interface BasicScheduledActionProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ScheduledActionProps
All Known Implementing Classes:
BasicScheduledActionProps.Jsii$Proxy, ScheduledActionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:12.913Z") @Stability(Stable) public interface BasicScheduledActionProps extends software.amazon.jsii.JsiiSerializable
Properties for a scheduled scaling action.

Example:

 AutoScalingGroup autoScalingGroup;
 autoScalingGroup.scaleOnSchedule("PrescaleInTheMorning", BasicScheduledActionProps.builder()
         .schedule(Schedule.cron(CronOptions.builder().hour("8").minute("0").build()))
         .minCapacity(20)
         .build());
 autoScalingGroup.scaleOnSchedule("AllowDownscalingAtNight", BasicScheduledActionProps.builder()
         .schedule(Schedule.cron(CronOptions.builder().hour("20").minute("0").build()))
         .minCapacity(1)
         .build());
 
  • Method Details

    • getSchedule

      @Stability(Stable) @NotNull Schedule getSchedule()
      When to perform this action.

      Supports cron expressions.

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

    • getDesiredCapacity

      @Stability(Stable) @Nullable default Number getDesiredCapacity()
      The new desired capacity.

      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.

    • getEndTime

      @Stability(Stable) @Nullable default Instant getEndTime()
      When this scheduled action expires.

      Default: - The rule never expires.

    • getMaxCapacity

      @Stability(Stable) @Nullable default Number getMaxCapacity()
      The new maximum capacity.

      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.

    • getMinCapacity

      @Stability(Stable) @Nullable default Number getMinCapacity()
      The new minimum capacity.

      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.

    • getStartTime

      @Stability(Stable) @Nullable default Instant getStartTime()
      When this scheduled action becomes active.

      Default: - The rule is activate immediately.

    • getTimeZone

      @Stability(Stable) @Nullable default String getTimeZone()
      Specifies the time zone for a cron expression.

      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

    • builder

      @Stability(Stable) static BasicScheduledActionProps.Builder builder()
      Returns:
      a BasicScheduledActionProps.Builder of BasicScheduledActionProps