aws-cdk-lib.aws_emr.CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty

interface CloudWatchAlarmDefinitionProperty

LanguageType name
.NETAmazon.CDK.AWS.EMR.CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsemr#CfnInstanceGroupConfig_CloudWatchAlarmDefinitionProperty
Javasoftware.amazon.awscdk.services.emr.CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty
Pythonaws_cdk.aws_emr.CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty
TypeScript aws-cdk-lib » aws_emr » CfnInstanceGroupConfig » CloudWatchAlarmDefinitionProperty

CloudWatchAlarmDefinition is a subproperty of the ScalingTrigger property, which determines when to trigger an automatic scaling activity.

Scaling activity begins when you satisfy the defined alarm conditions.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_emr as emr } from 'aws-cdk-lib';
const cloudWatchAlarmDefinitionProperty: emr.CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty = {
  comparisonOperator: 'comparisonOperator',
  metricName: 'metricName',
  period: 123,
  threshold: 123,

  // the properties below are optional
  dimensions: [{
    key: 'key',
    value: 'value',
  }],
  evaluationPeriods: 123,
  namespace: 'namespace',
  statistic: 'statistic',
  unit: 'unit',
};

Properties

NameTypeDescription
comparisonOperatorstringDetermines 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.
periodnumberThe period, in seconds, over which the statistic is applied.
thresholdnumberThe value against which the specified statistic is compared.
dimensions?IResolvable | IResolvable | 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?stringThe statistic to apply to the metric associated with the alarm.
unit?stringThe unit of measure associated with the CloudWatch metric being watched.

comparisonOperator

Type: string

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: number

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

CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300 .


threshold

Type: number

The value against which the specified statistic is compared.


dimensions?

Type: IResolvable | IResolvable | MetricDimensionProperty[] (optional)

A CloudWatch metric dimension.


evaluationPeriods?

Type: number (optional)

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

The default value is 1 .


namespace?

Type: string (optional)

The namespace for the CloudWatch metric.

The default is AWS/ElasticMapReduce .


statistic?

Type: string (optional)

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

The default is AVERAGE .


unit?

Type: string (optional)

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.