Skip to content
v2.277.0

CapacityProviderScalingConfigProperty Struct ​

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

Example ​

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
# 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
// 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();
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
    } }
};
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 ​

maxVCpuCountoptionalnumbermax_v_cpu_countoptionalint | floatmaxVCpuCountoptionalNumberMaxVCpuCountoptionaldoubleMaxVCpuCountoptional*float64 #
The maximum number of vCPUs that the capacity provider can provision across all compute instances.
scalingModeoptionalstringscaling_modeoptionalstrscalingModeoptionalStringScalingModeoptionalstringScalingModeoptional*string #
The scaling mode that determines how the capacity provider responds to changes in demand.
scalingPoliciesoptionalIResolvable | IResolvable | CfnCapacityProvider.TargetTrackingScalingPolicyProperty[]scaling_policiesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TargetTrackingScalingPolicyProperty]]]scalingPoliciesoptionalIResolvableScalingPoliciesoptionalIResolvableScalingPoliciesoptionalinterface{} #
A list of target tracking scaling policies for the capacity provider.