aws-cdk-lib.aws_applicationautoscaling.AdjustmentType

enum AdjustmentType

LanguageType name
.NETAmazon.CDK.AWS.ApplicationAutoScaling.AdjustmentType
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapplicationautoscaling#AdjustmentType
Javasoftware.amazon.awscdk.services.applicationautoscaling.AdjustmentType
Pythonaws_cdk.aws_applicationautoscaling.AdjustmentType
TypeScript (source)aws-cdk-lib » aws_applicationautoscaling » AdjustmentType

How adjustment numbers are interpreted.

Example

declare const capacity: ScalableAttribute;
declare const cpuUtilization: cloudwatch.Metric;

capacity.scaleOnMetric('ScaleToCPU', {
  metric: cpuUtilization,
  scalingSteps: [
    { upper: 10, change: -1 },
    { lower: 50, change: +1 },
    { lower: 70, change: +3 },
  ],

  // Change this to AdjustmentType.PercentChangeInCapacity to interpret the
  // 'change' numbers before as percentages instead of capacity counts.
  adjustmentType: appscaling.AdjustmentType.CHANGE_IN_CAPACITY,
});

Members

NameDescription
CHANGE_IN_CAPACITYAdd the adjustment number to the current capacity.
PERCENT_CHANGE_IN_CAPACITYAdd this percentage of the current capacity to itself.
EXACT_CAPACITYMake the capacity equal to the exact number given.

CHANGE_IN_CAPACITY

Add the adjustment number to the current capacity.

A positive number increases capacity, a negative number decreases capacity.


PERCENT_CHANGE_IN_CAPACITY

Add this percentage of the current capacity to itself.

The number must be between -100 and 100; a positive number increases capacity and a negative number decreases it.


EXACT_CAPACITY

Make the capacity equal to the exact number given.