Class ScheduledAction.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScheduledAction>
- Enclosing class:
ScheduledAction
ScheduledAction
.-
Method Summary
Modifier and TypeMethodDescriptionautoScalingGroup
(IAutoScalingGroup autoScalingGroup) The AutoScalingGroup to apply the scheduled actions to.build()
static ScheduledAction.Builder
desiredCapacity
(Number desiredCapacity) The new desired capacity.When this scheduled action expires.maxCapacity
(Number maxCapacity) The new maximum capacity.minCapacity
(Number minCapacity) The new minimum capacity.When to perform this action.When this scheduled action becomes active.Specifies the time zone for a cron expression.
-
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
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
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
When this scheduled action expires.Default: - The rule never expires.
- Parameters:
endTime
- When this scheduled action expires. This parameter is required.- Returns:
this
-
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
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
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ScheduledAction>
- Returns:
- a newly built instance of
ScheduledAction
.
-