Interface EnableScalingProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
BaseScalableAttributeProps,ScalableInstanceCountProps,ScalableTaskCountProps
- All Known Implementing Classes:
BaseScalableAttributeProps.Jsii$Proxy,EnableScalingProps.Jsii$Proxy,ScalableInstanceCountProps.Jsii$Proxy,ScalableTaskCountProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:04.728Z")
@Stability(Stable)
public interface EnableScalingProps
extends software.amazon.jsii.JsiiSerializable
Properties for enabling Application Auto Scaling.
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())
.minHealthyPercent(100)
.build();
ScalableTaskCount scalableTarget = loadBalancedFargateService.service.autoScaleTaskCount(EnableScalingProps.builder()
.minCapacity(1)
.maxCapacity(20)
.build());
scalableTarget.scaleOnCpuUtilization("CpuScaling", CpuUtilizationScalingProps.builder()
.targetUtilizationPercent(50)
.build());
scalableTarget.scaleOnMemoryUtilization("MemoryScaling", MemoryUtilizationScalingProps.builder()
.targetUtilizationPercent(50)
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEnableScalingPropsstatic final classAn implementation forEnableScalingProps -
Method Summary
Modifier and TypeMethodDescriptionstatic EnableScalingProps.Builderbuilder()Maximum capacity to scale to.default NumberMinimum capacity to scale to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMaxCapacity
Maximum capacity to scale to. -
getMinCapacity
Minimum capacity to scale to.Default: 1
-
builder
- Returns:
- a
EnableScalingProps.BuilderofEnableScalingProps
-