aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.AutoScalingPolicyProperty

interface AutoScalingPolicyProperty

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.Tasks.EmrCreateCluster.AutoScalingPolicyProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#EmrCreateCluster_AutoScalingPolicyProperty
Javasoftware.amazon.awscdk.services.stepfunctions.tasks.EmrCreateCluster.AutoScalingPolicyProperty
Pythonaws_cdk.aws_stepfunctions_tasks.EmrCreateCluster.AutoScalingPolicyProperty
TypeScript (source)aws-cdk-lib » aws_stepfunctions_tasks » EmrCreateCluster » AutoScalingPolicyProperty

An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster.

See also: https://docs.aws.amazon.com/emr/latest/APIReference/API_AutoScalingPolicy.html

Example

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

        // the properties below are optional
        adjustmentType: stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
        coolDown: 123,
      },

      // the properties below are optional
      market: stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND,
    },
    name: 'name',
    trigger: {
      cloudWatchAlarmDefinition: {
        comparisonOperator: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
        metricName: 'metricName',
        period: cdk.Duration.minutes(30),

        // the properties below are optional
        dimensions: [{
          key: 'key',
          value: 'value',
        }],
        evaluationPeriods: 123,
        namespace: 'namespace',
        statistic: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic.SAMPLE_COUNT,
        threshold: 123,
        unit: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit.NONE,
      },
    },

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

Properties

NameTypeDescription
constraintsScalingConstraintsPropertyThe upper and lower EC2 instance limits for an automatic scaling policy.
rulesScalingRuleProperty[]The scale-in and scale-out rules that comprise the automatic scaling policy.

constraints

Type: ScalingConstraintsProperty

The upper and lower 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: ScalingRuleProperty[]

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