Skip to content
v2.277.0

TargetTrackingScalingPolicyProperty Struct ​

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

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 targetTrackingScalingPolicyProperty: lambda.CfnCapacityProvider.TargetTrackingScalingPolicyProperty = {
  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_

target_tracking_scaling_policy_property = 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.*;

TargetTrackingScalingPolicyProperty targetTrackingScalingPolicyProperty = TargetTrackingScalingPolicyProperty.builder()
        .predefinedMetricType("predefinedMetricType")
        .targetValue(123)
        .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 targetTrackingScalingPolicyProperty = 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"

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

Properties ​

predefinedMetricTypestringpredefined_metric_typestrpredefinedMetricTypeStringPredefinedMetricTypestringPredefinedMetricType*string required #
The predefined metric type to track for scaling decisions.
targetValuenumbertarget_valueint | floattargetValueNumberTargetValuedoubleTargetValue*float64 required #
The target value for the metric that the scaling policy attempts to maintain through scaling actions.