interface CloudWatchAlarmDefinitionProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EMR.CfnCluster.CloudWatchAlarmDefinitionProperty |
Java | software.amazon.awscdk.services.emr.CfnCluster.CloudWatchAlarmDefinitionProperty |
Python | aws_cdk.aws_emr.CfnCluster.CloudWatchAlarmDefinitionProperty |
TypeScript | @aws-cdk/aws-emr » CfnCluster » 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 * as emr from '@aws-cdk/aws-emr';
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
| Name | Type | Description |
|---|---|---|
| comparison | string | Determines how the metric specified by MetricName is compared to the value specified by Threshold . |
| metric | string | The name of the CloudWatch metric that is watched to determine an alarm condition. |
| period | number | The period, in seconds, over which the statistic is applied. |
| threshold | number | The value against which the specified statistic is compared. |
| dimensions? | IResolvable | IResolvable | Metric[] | A CloudWatch metric dimension. |
| evaluation | number | The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. |
| namespace? | string | The namespace for the CloudWatch metric. |
| statistic? | string | The statistic to apply to the metric associated with the alarm. |
| unit? | string | The 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 | Metric[]
(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.

.NET
Java
Python
TypeScript