Class ScalingSchedule.Builder
java.lang.Object
software.amazon.awscdk.services.applicationautoscaling.ScalingSchedule.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScalingSchedule>
- Enclosing interface:
ScalingSchedule
@Stability(Stable)
public static final class ScalingSchedule.Builder
extends Object
implements software.amazon.jsii.Builder<ScalingSchedule>
A builder for
ScalingSchedule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofScalingSchedule.getEndTime()
maxCapacity
(Number maxCapacity) Sets the value ofScalingSchedule.getMaxCapacity()
minCapacity
(Number minCapacity) Sets the value ofScalingSchedule.getMinCapacity()
Sets the value ofScalingSchedule.getSchedule()
Sets the value ofScalingSchedule.getStartTime()
Sets the value ofScalingSchedule.getTimeZone()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
schedule
Sets the value ofScalingSchedule.getSchedule()
- Parameters:
schedule
- When to perform this action. This parameter is required.- Returns:
this
-
endTime
Sets the value ofScalingSchedule.getEndTime()
- Parameters:
endTime
- When this scheduled action expires.- Returns:
this
-
maxCapacity
Sets the value ofScalingSchedule.getMaxCapacity()
- Parameters:
maxCapacity
- The new maximum capacity. During the scheduled time, the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.At least one of maxCapacity and minCapacity must be supplied.
- Returns:
this
-
minCapacity
Sets the value ofScalingSchedule.getMinCapacity()
- Parameters:
minCapacity
- The new minimum capacity. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity.At least one of maxCapacity and minCapacity must be supplied.
- Returns:
this
-
startTime
Sets the value ofScalingSchedule.getStartTime()
- Parameters:
startTime
- When this scheduled action becomes active.- Returns:
this
-
timeZone
Sets the value ofScalingSchedule.getTimeZone()
- Parameters:
timeZone
- The time zone used when referring to the date and time of a scheduled action, when the scheduled action uses an at or cron expression.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ScalingSchedule>
- Returns:
- a new instance of
ScalingSchedule
- Throws:
NullPointerException
- if any required attribute was not provided
-