aws-cdk-lib.aws_emr.CfnCluster.ScalingRuleProperty

interface ScalingRuleProperty

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

ScalingRule is a subproperty of the AutoScalingPolicy property type.

ScalingRule defines the scale-in or scale-out rules for scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments. The automatic scaling policy for an instance group can comprise one or more automatic scaling rules.

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 scalingRuleProperty: emr.CfnCluster.ScalingRuleProperty = {
  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
actionIResolvable | ScalingActionPropertyThe conditions that trigger an automatic scaling activity.
namestringThe name used to identify an automatic scaling rule.
triggerIResolvable | ScalingTriggerPropertyThe CloudWatch alarm definition that determines when automatic scaling activity is triggered.
description?stringA friendly, more verbose description of the automatic scaling rule.

action

Type: IResolvable | ScalingActionProperty

The conditions that trigger an automatic scaling activity.


name

Type: string

The name used to identify an automatic scaling rule.

Rule names must be unique within a scaling policy.


trigger

Type: IResolvable | ScalingTriggerProperty

The CloudWatch alarm definition that determines when automatic scaling activity is triggered.


description?

Type: string (optional)

A friendly, more verbose description of the automatic scaling rule.