Interface ScalingSchedule
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ScalingSchedule.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:56.721Z")
@Stability(Stable)
public interface ScalingSchedule
extends software.amazon.jsii.JsiiSerializable
A scheduled scaling action.
Example:
Cluster cluster; ApplicationLoadBalancedFargateService loadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service") .cluster(cluster) .memoryLimitMiB(1024) .desiredCount(1) .cpu(512) .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .build()) .build(); ScalableTaskCount scalableTarget = loadBalancedFargateService.service.autoScaleTaskCount(EnableScalingProps.builder() .minCapacity(5) .maxCapacity(20) .build()); scalableTarget.scaleOnSchedule("DaytimeScaleDown", ScalingSchedule.builder() .schedule(Schedule.cron(CronOptions.builder().hour("8").minute("0").build())) .minCapacity(1) .build()); scalableTarget.scaleOnSchedule("EveningRushScaleUp", ScalingSchedule.builder() .schedule(Schedule.cron(CronOptions.builder().hour("20").minute("0").build())) .minCapacity(10) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forScalingSchedule
static final class
An implementation forScalingSchedule
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScalingSchedule.Builder
builder()
default Instant
When this scheduled action expires.default Number
The new maximum capacity.default Number
The new minimum capacity.When to perform this action.default Instant
When this scheduled action becomes active.default 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.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getSchedule
When to perform this action. -
getEndTime
When this scheduled action expires.Default: The rule never expires.
-
getMaxCapacity
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.
Default: No new maximum capacity
-
getMinCapacity
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.
Default: No new minimum capacity
-
getStartTime
When this scheduled action becomes active.Default: The rule is activate immediately
-
getTimeZone
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.Default: - UTC
-
builder
- Returns:
- a
ScalingSchedule.Builder
ofScalingSchedule
-