Class ScheduledActionProps.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.ScheduledActionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScheduledActionProps>
- Enclosing interface:
- ScheduledActionProps
@Stability(Stable)
public static final class ScheduledActionProps.Builder
extends Object
implements software.amazon.jsii.Builder<ScheduledActionProps>
A builder for
ScheduledActionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoScalingGroup(IAutoScalingGroup autoScalingGroup) Sets the value ofScheduledActionProps.getAutoScalingGroup()build()Builds the configured instance.desiredCapacity(Number desiredCapacity) Sets the value ofBasicScheduledActionProps.getDesiredCapacity()Sets the value ofBasicScheduledActionProps.getEndTime()maxCapacity(Number maxCapacity) Sets the value ofBasicScheduledActionProps.getMaxCapacity()minCapacity(Number minCapacity) Sets the value ofBasicScheduledActionProps.getMinCapacity()Sets the value ofBasicScheduledActionProps.getSchedule()Sets the value ofBasicScheduledActionProps.getStartTime()Sets the value ofBasicScheduledActionProps.getTimeZone()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
autoScalingGroup
@Stability(Stable) public ScheduledActionProps.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup) Sets the value ofScheduledActionProps.getAutoScalingGroup()- Parameters:
autoScalingGroup- The AutoScalingGroup to apply the scheduled actions to. This parameter is required.- Returns:
this
-
schedule
Sets the value ofBasicScheduledActionProps.getSchedule()- Parameters:
schedule- When to perform this action. This parameter is required. Supports cron expressions.For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.
- Returns:
this
-
desiredCapacity
Sets the value ofBasicScheduledActionProps.getDesiredCapacity()- Parameters:
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.
- Returns:
this
-
endTime
Sets the value ofBasicScheduledActionProps.getEndTime()- Parameters:
endTime- When this scheduled action expires.- Returns:
this
-
maxCapacity
Sets the value ofBasicScheduledActionProps.getMaxCapacity()- Parameters:
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.
- Returns:
this
-
minCapacity
Sets the value ofBasicScheduledActionProps.getMinCapacity()- Parameters:
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.
- Returns:
this
-
startTime
Sets the value ofBasicScheduledActionProps.getStartTime()- Parameters:
startTime- When this scheduled action becomes active.- Returns:
this
-
timeZone
Sets the value ofBasicScheduledActionProps.getTimeZone()- Parameters:
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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ScheduledActionProps>- Returns:
- a new instance of
ScheduledActionProps - Throws:
NullPointerException- if any required attribute was not provided
-