# CapacityProviderScalingConfigProperty

Configuration that defines how the capacity provider scales compute instances based on demand and policies.

- 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 capacityProviderScalingConfigProperty: lambda.CfnCapacityProvider.CapacityProviderScalingConfigProperty = {
  maxVCpuCount: 123,
  scalingMode: 'scalingMode',
  scalingPolicies: [{
    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_

capacity_provider_scaling_config_property = lambda.CfnCapacityProvider.CapacityProviderScalingConfigProperty(
    max_v_cpu_count=123,
    scaling_mode="scalingMode",
    scaling_policies=[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.*;

CapacityProviderScalingConfigProperty capacityProviderScalingConfigProperty = CapacityProviderScalingConfigProperty.builder()
        .maxVCpuCount(123)
        .scalingMode("scalingMode")
        .scalingPolicies(List.of(TargetTrackingScalingPolicyProperty.builder()
                .predefinedMetricType("predefinedMetricType")
                .targetValue(123)
                .build()))
        .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 capacityProviderScalingConfigProperty = new CapacityProviderScalingConfigProperty {
    MaxVCpuCount = 123,
    ScalingMode = "scalingMode",
    ScalingPolicies = new [] { 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"

capacityProviderScalingConfigProperty := &CapacityProviderScalingConfigProperty{
	MaxVCpuCount: jsii.Number(123),
	ScalingMode: jsii.String("scalingMode"),
	ScalingPolicies: []interface{}{
		&TargetTrackingScalingPolicyProperty{
			PredefinedMetricType: jsii.String("predefinedMetricType"),
			TargetValue: jsii.Number(123),
		},
	},
}
```

## Properties

- `maxVCpuCount`: number — The maximum number of vCPUs that the capacity provider can provision across all compute instances.

- `scalingMode`: string — The scaling mode that determines how the capacity provider responds to changes in demand.

- `scalingPolicies`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCapacityProvider.TargetTrackingScalingPolicyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnCapacityProvider.TargetTrackingScalingPolicyProperty.html)[] — A list of target tracking scaling policies for the capacity provider.
