aws-cdk-lib.aws_autoscaling.CpuUtilizationScalingProps

interface CpuUtilizationScalingProps

LanguageType name
.NETAmazon.CDK.AWS.AutoScaling.CpuUtilizationScalingProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#CpuUtilizationScalingProps
Javasoftware.amazon.awscdk.services.autoscaling.CpuUtilizationScalingProps
Pythonaws_cdk.aws_autoscaling.CpuUtilizationScalingProps
TypeScript (source)aws-cdk-lib » aws_autoscaling » CpuUtilizationScalingProps

Properties for enabling scaling based on CPU utilization.

Example

declare const autoScalingGroup: autoscaling.AutoScalingGroup;

autoScalingGroup.scaleOnCpuUtilization('KeepSpareCPU', {
  targetUtilizationPercent: 50
});

Properties

NameTypeDescription
targetUtilizationPercentnumberTarget average CPU utilization across the task.
cooldown?DurationPeriod after a scaling completes before another scaling activity can start.
disableScaleIn?booleanIndicates whether scale in by the target tracking policy is disabled.
estimatedInstanceWarmup?DurationEstimated time until a newly launched instance can send metrics to CloudWatch.

targetUtilizationPercent

Type: number

Target average CPU utilization across the task.


cooldown?

Type: Duration (optional, default: The default cooldown configured on the AutoScalingGroup.)

Period after a scaling completes before another scaling activity can start.


disableScaleIn?

Type: boolean (optional, default: false)

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the autoscaling group. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the group.


estimatedInstanceWarmup?

Type: Duration (optional, default: Same as the cooldown.)

Estimated time until a newly launched instance can send metrics to CloudWatch.