# ScalingTriggerProperty

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.

- Source: [`aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts#L1268)

## 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

- `cloudWatchAlarmDefinition`: [EmrCreateCluster.CloudWatchAlarmDefinitionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmDefinitionProperty.html) (required) — The definition of a CloudWatch metric alarm.

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