CloudWatchAlarmDefinitionProperty Struct
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
ts
// 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.CfnCluster.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
comparisonOperatorstringcomparison_operatorstrcomparisonOperatorStringComparisonOperatorstringComparisonOperator*stringrequired#Determines how the metric specified by `MetricName` is compared to the value specified by `Threshold` .
dimensionsoptionalIResolvable | IResolvable | CfnCluster.MetricDimensionProperty[]dimensionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricDimensionProperty]]]dimensionsoptionalIResolvableDimensionsoptionalIResolvableDimensionsoptionalinterface{}#A CloudWatch metric dimension.
evaluationPeriodsoptionalnumberevaluation_periodsoptionalint | floatevaluationPeriodsoptionalNumberEvaluationPeriodsoptionaldoubleEvaluationPeriodsoptional*float64#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 .
The name of the CloudWatch metric that is watched to determine an alarm condition.
namespaceoptionalstringnamespaceoptionalstrnamespaceoptionalStringNamespaceoptionalstringNamespaceoptional*string#The namespace for the CloudWatch metric.
The default is AWS/ElasticMapReduce .
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 .
statisticoptionalstringstatisticoptionalstrstatisticoptionalStringStatisticoptionalstringStatisticoptional*string#The statistic to apply to the metric associated with the alarm.
The default is AVERAGE .
The value against which the specified statistic is compared.
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.