# UtilizationScalingProps

Properties for enabling DynamoDB utilization tracking.

Extends: [BaseTargetTrackingProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_applicationautoscaling.BaseTargetTrackingProps.html)
Used as argument in: [IScalableTableAttribute.scaleOnUtilization](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.IScalableTableAttribute.html#scaleonutilization)

- Source: [`aws-dynamodb/lib/scalable-attribute-api.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-dynamodb/lib/scalable-attribute-api.ts#L36)

## Example

TypeScript:

```ts
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';

declare const table: dynamodb.Table;

const readCapacity = table.autoScaleReadCapacity({
  minCapacity: 10,
  maxCapacity: 1000
});
readCapacity.scaleOnUtilization({
  targetUtilizationPercent: 60
});
```

Python:

```python
import aws_cdk.aws_dynamodb as dynamodb

# table: dynamodb.Table

read_capacity = table.auto_scale_read_capacity(
    min_capacity=10,
    max_capacity=1000
)
read_capacity.scale_on_utilization(
    target_utilization_percent=60
)
```

Java:

```java
import software.amazon.awscdk.services.dynamodb.*;

Table table;

IScalableTableAttribute readCapacity = table.autoScaleReadCapacity(EnableScalingProps.builder()
        .minCapacity(10)
        .maxCapacity(1000)
        .build());
readCapacity.scaleOnUtilization(UtilizationScalingProps.builder()
        .targetUtilizationPercent(60)
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.DynamoDB;

Table table;

var readCapacity = table.AutoScaleReadCapacity(new EnableScalingProps {
    MinCapacity = 10,
    MaxCapacity = 1000
});
readCapacity.ScaleOnUtilization(new UtilizationScalingProps {
    TargetUtilizationPercent = 60
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import dynamodb "github.com/aws/aws-cdk-go/awscdk"

var table Table

readCapacity := table.AutoScaleReadCapacity(&EnableScalingProps{
	MinCapacity: jsii.Number(10),
	MaxCapacity: jsii.Number(1000),
})
readCapacity.ScaleOnUtilization(&UtilizationScalingProps{
	TargetUtilizationPercent: jsii.Number(60),
})
```

## 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](https://docs.aws.amazon.com/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](https://docs.aws.amazon.com/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) — Target utilization percentage for the attribute.
