@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-14T16:25:27.005Z")
public interface ScalingSchedule
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());
Modifier and Type | Interface and Description |
---|---|
static class |
ScalingSchedule.Builder
A builder for
ScalingSchedule |
static class |
ScalingSchedule.Jsii$Proxy
An implementation for
ScalingSchedule |
Modifier and Type | Method and Description |
---|---|
static ScalingSchedule.Builder |
builder() |
default java.time.Instant |
getEndTime()
When this scheduled action expires.
|
default java.lang.Number |
getMaxCapacity()
The new maximum capacity.
|
default java.lang.Number |
getMinCapacity()
The new minimum capacity.
|
Schedule |
getSchedule()
When to perform this action.
|
default java.time.Instant |
getStartTime()
When this scheduled action becomes active.
|
Schedule getSchedule()
default java.time.Instant getEndTime()
Default: The rule never expires.
default java.lang.Number getMaxCapacity()
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
default java.lang.Number getMinCapacity()
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
default java.time.Instant getStartTime()
Default: The rule is activate immediately
static ScalingSchedule.Builder builder()
ScalingSchedule.Builder
of ScalingSchedule