# TargetTrackingScalingPolicyProperty

A scaling policy for the capacity provider that automatically adjusts capacity to maintain a target value for a specific metric.

- Source: Generated at build time
- Type last changed: v2.231.0 · 1 Dec 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const targetTrackingScalingPolicyProperty: lambda.CfnCapacityProvider.TargetTrackingScalingPolicyProperty = {
  predefinedMetricType: 'predefinedMetricType',
  targetValue: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

target_tracking_scaling_policy_property = lambda.CfnCapacityProvider.TargetTrackingScalingPolicyProperty(
    predefined_metric_type="predefinedMetricType",
    target_value=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

TargetTrackingScalingPolicyProperty targetTrackingScalingPolicyProperty = TargetTrackingScalingPolicyProperty.builder()
        .predefinedMetricType("predefinedMetricType")
        .targetValue(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var targetTrackingScalingPolicyProperty = new TargetTrackingScalingPolicyProperty {
    PredefinedMetricType = "predefinedMetricType",
    TargetValue = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

targetTrackingScalingPolicyProperty := &TargetTrackingScalingPolicyProperty{
	PredefinedMetricType: jsii.String("predefinedMetricType"),
	TargetValue: jsii.Number(123),
}
```

## Properties

- `predefinedMetricType`: string (required) — The predefined metric type to track for scaling decisions.

- `targetValue`: number (required) — The target value for the metric that the scaling policy attempts to maintain through scaling actions.
