public static final class ScheduledAction.Builder
extends java.lang.Object
ScheduledAction
.Modifier and Type | Method and Description |
---|---|
ScheduledAction.Builder |
autoScalingGroup(IAutoScalingGroup autoScalingGroup)
The AutoScalingGroup to apply the scheduled actions to.
|
ScheduledAction |
build() |
static ScheduledAction.Builder |
create(software.constructs.Construct scope,
java.lang.String id) |
ScheduledAction.Builder |
desiredCapacity(java.lang.Number desiredCapacity)
The new desired capacity.
|
ScheduledAction.Builder |
endTime(java.time.Instant endTime)
When this scheduled action expires.
|
ScheduledAction.Builder |
maxCapacity(java.lang.Number maxCapacity)
The new maximum capacity.
|
ScheduledAction.Builder |
minCapacity(java.lang.Number minCapacity)
The new minimum capacity.
|
ScheduledAction.Builder |
schedule(Schedule schedule)
When to perform this action.
|
ScheduledAction.Builder |
startTime(java.time.Instant startTime)
When this scheduled action becomes active.
|
ScheduledAction.Builder |
timeZone(java.lang.String timeZone)
Specifies the time zone for a cron expression.
|
public static ScheduledAction.Builder create(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.ScheduledAction.Builder
.public ScheduledAction.Builder schedule(Schedule schedule)
Supports cron expressions.
For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.
schedule
- When to perform this action. This parameter is required.this
public ScheduledAction.Builder desiredCapacity(java.lang.Number desiredCapacity)
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.
desiredCapacity
- The new desired capacity. This parameter is required.this
public ScheduledAction.Builder endTime(java.time.Instant endTime)
Default: - The rule never expires.
endTime
- When this scheduled action expires. This parameter is required.this
public ScheduledAction.Builder maxCapacity(java.lang.Number maxCapacity)
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.
maxCapacity
- The new maximum capacity. This parameter is required.this
public ScheduledAction.Builder minCapacity(java.lang.Number minCapacity)
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.
minCapacity
- The new minimum capacity. This parameter is required.this
public ScheduledAction.Builder startTime(java.time.Instant startTime)
Default: - The rule is activate immediately.
startTime
- When this scheduled action becomes active. This parameter is required.this
public ScheduledAction.Builder timeZone(java.lang.String timeZone)
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
timeZone
- Specifies the time zone for a cron expression. This parameter is required.this
public ScheduledAction.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup)
autoScalingGroup
- The AutoScalingGroup to apply the scheduled actions to. This parameter is required.this
public ScheduledAction build()