Skip to content
v2.273.0

ScalingTriggerProperty Struct ​

The conditions that trigger an automatic scaling activity and the definition of a CloudWatch metric alarm.

When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

Example ​

ts
// 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 scalingTriggerProperty: stepfunctions_tasks.EmrCreateCluster.ScalingTriggerProperty = {
  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,
  },
};

Properties ​

cloudWatchAlarmDefinitionEmrCreateCluster.CloudWatchAlarmDefinitionPropertycloud_watch_alarm_definitionCloudWatchAlarmDefinitionPropertycloudWatchAlarmDefinitionCloudWatchAlarmDefinitionPropertyCloudWatchAlarmDefinitionCloudWatchAlarmDefinitionPropertyCloudWatchAlarmDefinitionCloudWatchAlarmDefinitionPropertyrequired#
The definition of a CloudWatch metric alarm.

When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.