# CpuUtilizationScalingProps

The properties for enabling scaling based on CPU utilization.

Extends: CpuUtilizationScalingProps
Extends: BaseTargetTrackingProps

- Source: [`aws-ecs/lib/base/scalable-task-count.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ecs/lib/base/scalable-task-count.ts#L102)

## Example

```ts
declare const target: elbv2.ApplicationTargetGroup;
declare const service: ecs.BaseService;
const scaling = service.autoScaleTaskCount({ maxCapacity: 10 });
scaling.scaleOnCpuUtilization('CpuScaling', {
  targetUtilizationPercent: 50,
});

scaling.scaleOnRequestCount('RequestScaling', {
  requestsPerTarget: 10000,
  targetGroup: target,
});
```

## Properties

- `disableScaleIn`: boolean = 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 scalable resource. Otherwise, scale in is
  enabled and the target tracking policy can remove capacity from the
  scalable resource.

- `policyName`: string — A name for the scaling policy.

  **Default:** Automatically generated name.

- `scaleInCooldown`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — Period after a scale in activity completes before another scale in activity can start.

  **Default:** Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency

- `scaleOutCooldown`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — Period after a scale out activity completes before another scale out activity can start.

  **Default:** Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency

- `targetUtilizationPercent`: number (required) — The target value for CPU utilization across all tasks in the service.
