Class CfnExpressGatewayService.ExpressGatewayScalingTargetProperty
Defines the auto-scaling configuration for an Express service.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnExpressGatewayService.ExpressGatewayScalingTargetProperty : CfnExpressGatewayService.IExpressGatewayScalingTargetProperty
Syntax (vb)
Public Class CfnExpressGatewayService.ExpressGatewayScalingTargetProperty Implements CfnExpressGatewayService.IExpressGatewayScalingTargetProperty
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var expressGatewayScalingTargetProperty = new ExpressGatewayScalingTargetProperty {
AutoScalingMetric = "autoScalingMetric",
AutoScalingTargetValue = 123,
MaxTaskCount = 123,
MinTaskCount = 123
};
Synopsis
Constructors
| ExpressGatewayScalingTargetProperty() | Defines the auto-scaling configuration for an Express service. |
Properties
| AutoScalingMetric | The metric used for auto-scaling decisions. |
| AutoScalingTargetValue | The target value for the auto-scaling metric. |
| MaxTaskCount | The maximum number of tasks to run in the Express service. |
| MinTaskCount | The minimum number of tasks to run in the Express service. |
Constructors
ExpressGatewayScalingTargetProperty()
Defines the auto-scaling configuration for an Express service.
public ExpressGatewayScalingTargetProperty()
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var expressGatewayScalingTargetProperty = new ExpressGatewayScalingTargetProperty {
AutoScalingMetric = "autoScalingMetric",
AutoScalingTargetValue = 123,
MaxTaskCount = 123,
MinTaskCount = 123
};
Properties
AutoScalingMetric
The metric used for auto-scaling decisions.
public string? AutoScalingMetric { get; set; }
Property Value
Remarks
The default metric used for an Express service is CPUUtilization .
Default: - "AVERAGE_CPU"
AutoScalingTargetValue
The target value for the auto-scaling metric.
public double? AutoScalingTargetValue { get; set; }
Property Value
Remarks
The default value for an Express service is 60.
Default: - 60
MaxTaskCount
The maximum number of tasks to run in the Express service.
public double? MaxTaskCount { get; set; }
Property Value
Remarks
MinTaskCount
The minimum number of tasks to run in the Express service.
public double? MinTaskCount { get; set; }