aws-cdk-lib.aws_emr.CfnInstanceGroupConfig.AutoScalingPolicyProperty

interface AutoScalingPolicyProperty

LanguageType name
.NETAmazon.CDK.AWS.EMR.CfnInstanceGroupConfig.AutoScalingPolicyProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsemr#CfnInstanceGroupConfig_AutoScalingPolicyProperty
Javasoftware.amazon.awscdk.services.emr.CfnInstanceGroupConfig.AutoScalingPolicyProperty
Pythonaws_cdk.aws_emr.CfnInstanceGroupConfig.AutoScalingPolicyProperty
TypeScript aws-cdk-lib » aws_emr » CfnInstanceGroupConfig » AutoScalingPolicyProperty

AutoScalingPolicy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.

For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_emr as emr } from 'aws-cdk-lib';
const autoScalingPolicyProperty: emr.CfnInstanceGroupConfig.AutoScalingPolicyProperty = {
  constraints: {
    maxCapacity: 123,
    minCapacity: 123,
  },
  rules: [{
    action: {
      simpleScalingPolicyConfiguration: {
        scalingAdjustment: 123,

        // the properties below are optional
        adjustmentType: 'adjustmentType',
        coolDown: 123,
      },

      // the properties below are optional
      market: 'market',
    },
    name: 'name',
    trigger: {
      cloudWatchAlarmDefinition: {
        comparisonOperator: 'comparisonOperator',
        metricName: 'metricName',
        period: 123,
        threshold: 123,

        // the properties below are optional
        dimensions: [{
          key: 'key',
          value: 'value',
        }],
        evaluationPeriods: 123,
        namespace: 'namespace',
        statistic: 'statistic',
        unit: 'unit',
      },
    },

    // the properties below are optional
    description: 'description',
  }],
};

Properties

NameTypeDescription
constraintsIResolvable | ScalingConstraintsPropertyThe upper and lower Amazon EC2 instance limits for an automatic scaling policy.
rulesIResolvable | IResolvable | ScalingRuleProperty[]The scale-in and scale-out rules that comprise the automatic scaling policy.

constraints

Type: IResolvable | ScalingConstraintsProperty

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

Automatic scaling activity will not cause an instance group to grow above or below these limits.


rules

Type: IResolvable | IResolvable | ScalingRuleProperty[]

The scale-in and scale-out rules that comprise the automatic scaling policy.