Class ScheduledAction.Builder

java.lang.Object
software.amazon.awscdk.services.autoscaling.ScheduledAction.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ScheduledAction>
Enclosing class:
ScheduledAction

@Stability(Stable) public static final class ScheduledAction.Builder extends Object implements software.amazon.jsii.Builder<ScheduledAction>
A fluent builder for ScheduledAction.
  • Method Details

    • create

      @Stability(Stable) public static ScheduledAction.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of ScheduledAction.Builder.
    • schedule

      @Stability(Stable) public ScheduledAction.Builder schedule(Schedule schedule)
      When to perform this action.

      Supports cron expressions.

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

      Parameters:
      schedule - When to perform this action. This parameter is required.
      Returns:
      this
    • desiredCapacity

      @Stability(Stable) public ScheduledAction.Builder desiredCapacity(Number desiredCapacity)
      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.

      Parameters:
      desiredCapacity - The new desired capacity. This parameter is required.
      Returns:
      this
    • endTime

      @Stability(Stable) public ScheduledAction.Builder endTime(Instant endTime)
      When this scheduled action expires.

      Default: - The rule never expires.

      Parameters:
      endTime - When this scheduled action expires. This parameter is required.
      Returns:
      this
    • maxCapacity

      @Stability(Stable) public ScheduledAction.Builder maxCapacity(Number maxCapacity)
      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.

      Parameters:
      maxCapacity - The new maximum capacity. This parameter is required.
      Returns:
      this
    • minCapacity

      @Stability(Stable) public ScheduledAction.Builder minCapacity(Number minCapacity)
      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.

      Parameters:
      minCapacity - The new minimum capacity. This parameter is required.
      Returns:
      this
    • startTime

      @Stability(Stable) public ScheduledAction.Builder startTime(Instant startTime)
      When this scheduled action becomes active.

      Default: - The rule is activate immediately.

      Parameters:
      startTime - When this scheduled action becomes active. This parameter is required.
      Returns:
      this
    • timeZone

      @Stability(Stable) public ScheduledAction.Builder timeZone(String timeZone)
      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

      Parameters:
      timeZone - Specifies the time zone for a cron expression. This parameter is required.
      Returns:
      this
    • autoScalingGroup

      @Stability(Stable) public ScheduledAction.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup)
      The AutoScalingGroup to apply the scheduled actions to.

      Parameters:
      autoScalingGroup - The AutoScalingGroup to apply the scheduled actions to. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public ScheduledAction build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ScheduledAction>
      Returns:
      a newly built instance of ScheduledAction.