Skip to content
v2.278.0

ScalingConstraintsProperty Struct ​

The upper and lower EC2 instance limits for an automatic scaling policy.

Automatic scaling activities triggered by automatic scaling rules will not cause an instance group to grow above or below these limits.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
const scalingConstraintsProperty: stepfunctions_tasks.EmrCreateCluster.ScalingConstraintsProperty = {
  maxCapacity: 123,
  minCapacity: 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_stepfunctions_tasks as stepfunctions_tasks

scaling_constraints_property = stepfunctions_tasks.EmrCreateCluster.ScalingConstraintsProperty(
    max_capacity=123,
    min_capacity=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.stepfunctions.tasks.*;

ScalingConstraintsProperty scalingConstraintsProperty = ScalingConstraintsProperty.builder()
        .maxCapacity(123)
        .minCapacity(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.StepFunctions.Tasks;

var scalingConstraintsProperty = new ScalingConstraintsProperty {
    MaxCapacity = 123,
    MinCapacity = 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"

scalingConstraintsProperty := &ScalingConstraintsProperty{
	MaxCapacity: jsii.Number(123),
	MinCapacity: jsii.Number(123),
}

Properties ​

maxCapacitynumbermax_capacityint | floatmaxCapacityNumberMaxCapacitydoubleMaxCapacity*float64 required #
The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow.

Scale-out activities will not add instances beyond this boundary.

minCapacitynumbermin_capacityint | floatminCapacityNumberMinCapacitydoubleMinCapacity*float64 required #
The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink.

Scale-in activities will not terminate instances below this boundary.