aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.ScalingRuleProperty

interface ScalingRuleProperty

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

A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments.

See also: https://docs.aws.amazon.com/emr/latest/APIReference/API_ScalingRule.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 scalingRuleProperty: stepfunctions_tasks.EmrCreateCluster.ScalingRuleProperty = {
  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
actionScalingActionPropertyThe conditions that trigger an automatic scaling activity.
namestringThe name used to identify an automatic scaling rule.
triggerScalingTriggerPropertyThe CloudWatch alarm definition that determines when automatic scaling activity is triggered.
description?stringA friendly, more verbose description of the automatic scaling rule.

action

Type: 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: ScalingTriggerProperty

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


description?

Type: string (optional, default: None)

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