Interface CfnExpressGatewayService.ExpressGatewayScalingTargetProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnExpressGatewayService.ExpressGatewayScalingTargetProperty.Jsii$Proxy
- Enclosing class:
CfnExpressGatewayService
@Stability(Stable)
public static interface CfnExpressGatewayService.ExpressGatewayScalingTargetProperty
extends software.amazon.jsii.JsiiSerializable
Defines the auto-scaling configuration for an Express service.
This determines how the service automatically adjusts the number of running tasks based on demand metrics such as CPU utilization, memory utilization, or request count per target.
Auto-scaling helps ensure your application can handle varying levels of traffic while optimizing costs by scaling down during low-demand periods. You can specify the minimum and maximum number of tasks, the scaling metric, and the target value for that metric.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
ExpressGatewayScalingTargetProperty expressGatewayScalingTargetProperty = ExpressGatewayScalingTargetProperty.builder()
.autoScalingMetric("autoScalingMetric")
.autoScalingTargetValue(123)
.maxTaskCount(123)
.minTaskCount(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnExpressGatewayService.ExpressGatewayScalingTargetProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringThe metric used for auto-scaling decisions.default NumberThe target value for the auto-scaling metric.default NumberThe maximum number of tasks to run in the Express service.default NumberThe minimum number of tasks to run in the Express service.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAutoScalingMetric
The metric used for auto-scaling decisions.The default metric used for an Express service is
CPUUtilization.Default: - "AVERAGE_CPU"
- See Also:
-
getAutoScalingTargetValue
The target value for the auto-scaling metric.The default value for an Express service is 60.
Default: - 60
- See Also:
-
getMaxTaskCount
The maximum number of tasks to run in the Express service.Default: - 1
- See Also:
-
getMinTaskCount
The minimum number of tasks to run in the Express service.Default: - 1
- See Also:
-
builder
@Stability(Stable) static CfnExpressGatewayService.ExpressGatewayScalingTargetProperty.Builder builder()
-