aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmDefinitionProperty

interface CloudWatchAlarmDefinitionProperty

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

The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered.

When the defined alarm conditions are satisfied, scaling activity begins.

See also: https://docs.aws.amazon.com/emr/latest/APIReference/API_CloudWatchAlarmDefinition.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 cloudWatchAlarmDefinitionProperty: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmDefinitionProperty = {
  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

NameTypeDescription
comparisonOperatorCloudWatchAlarmComparisonOperatorDetermines how the metric specified by MetricName is compared to the value specified by Threshold.
metricNamestringThe name of the CloudWatch metric that is watched to determine an alarm condition.
periodDurationThe period, in seconds, over which the statistic is applied.
dimensions?MetricDimensionProperty[]A CloudWatch metric dimension.
evaluationPeriods?numberThe number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.
namespace?stringThe namespace for the CloudWatch metric.
statistic?CloudWatchAlarmStatisticThe statistic to apply to the metric associated with the alarm.
threshold?numberThe value against which the specified statistic is compared.
unit?CloudWatchAlarmUnitThe unit of measure associated with the CloudWatch metric being watched.

comparisonOperator

Type: CloudWatchAlarmComparisonOperator

Determines how the metric specified by MetricName is compared to the value specified by Threshold.


metricName

Type: string

The name of the CloudWatch metric that is watched to determine an alarm condition.


period

Type: Duration

The period, in seconds, over which the statistic is applied.

EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.


dimensions?

Type: MetricDimensionProperty[] (optional, default: No dimensions)

A CloudWatch metric dimension.


evaluationPeriods?

Type: number (optional, default: 1)

The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.


namespace?

Type: string (optional, default: 'AWS/ElasticMapReduce')

The namespace for the CloudWatch metric.


statistic?

Type: CloudWatchAlarmStatistic (optional, default: CloudWatchAlarmStatistic.AVERAGE)

The statistic to apply to the metric associated with the alarm.


threshold?

Type: number (optional, default: None)

The value against which the specified statistic is compared.


unit?

Type: CloudWatchAlarmUnit (optional, default: CloudWatchAlarmUnit.NONE)

The unit of measure associated with the CloudWatch metric being watched.

The value specified for Unit must correspond to the units specified in the CloudWatch metric.