interface ExpressGatewayScalingTargetProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.CfnExpressGatewayService.ExpressGatewayScalingTargetProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#CfnExpressGatewayService_ExpressGatewayScalingTargetProperty |
Java | software.amazon.awscdk.services.ecs.CfnExpressGatewayService.ExpressGatewayScalingTargetProperty |
Python | aws_cdk.aws_ecs.CfnExpressGatewayService.ExpressGatewayScalingTargetProperty |
TypeScript | aws-cdk-lib » aws_ecs » CfnExpressGatewayService » ExpressGatewayScalingTargetProperty |
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 { aws_ecs as ecs } from 'aws-cdk-lib';
const expressGatewayScalingTargetProperty: ecs.CfnExpressGatewayService.ExpressGatewayScalingTargetProperty = {
autoScalingMetric: 'autoScalingMetric',
autoScalingTargetValue: 123,
maxTaskCount: 123,
minTaskCount: 123,
};
Properties
| Name | Type | Description |
|---|---|---|
| auto | string | The metric used for auto-scaling decisions. |
| auto | number | The target value for the auto-scaling metric. |
| max | number | The maximum number of tasks to run in the Express service. |
| min | number | The minimum number of tasks to run in the Express service. |
autoScalingMetric?
Type:
string
(optional, default: "AVERAGE_CPU")
The metric used for auto-scaling decisions.
The default metric used for an Express service is CPUUtilization .
autoScalingTargetValue?
Type:
number
(optional, default: 60)
The target value for the auto-scaling metric.
The default value for an Express service is 60.
maxTaskCount?
Type:
number
(optional, default: 1)
The maximum number of tasks to run in the Express service.
minTaskCount?
Type:
number
(optional, default: 1)
The minimum number of tasks to run in the Express service.

.NET
Go
Java
Python
TypeScript