Interface EmrCreateCluster.ICloudWatchAlarmDefinitionProperty
The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered.
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICloudWatchAlarmDefinitionProperty
Syntax (vb)
Public Interface ICloudWatchAlarmDefinitionProperty
Remarks
When the defined alarm conditions are satisfied, scaling activity begins.
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_CloudWatchAlarmDefinition.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.StepFunctions.Tasks;
var cloudWatchAlarmDefinitionProperty = new CloudWatchAlarmDefinitionProperty {
ComparisonOperator = EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
MetricName = "metricName",
Period = Duration.Minutes(30),
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Key = "key",
Value = "value"
} },
EvaluationPeriods = 123,
Namespace = "namespace",
Statistic = EmrCreateCluster.CloudWatchAlarmStatistic.SAMPLE_COUNT,
Threshold = 123,
Unit = EmrCreateCluster.CloudWatchAlarmUnit.NONE
};
Synopsis
Properties
ComparisonOperator | Determines how the metric specified by MetricName is compared to the value specified by Threshold. |
Dimensions | A CloudWatch metric dimension. |
EvaluationPeriods | The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. |
MetricName | The name of the CloudWatch metric that is watched to determine an alarm condition. |
Namespace | The namespace for the CloudWatch metric. |
Period | The period, in seconds, over which the statistic is applied. |
Statistic | The statistic to apply to the metric associated with the alarm. |
Threshold | The value against which the specified statistic is compared. |
Unit | The unit of measure associated with the CloudWatch metric being watched. |
Properties
ComparisonOperator
Determines how the metric specified by MetricName is compared to the value specified by Threshold.
EmrCreateCluster.CloudWatchAlarmComparisonOperator ComparisonOperator { get; }
Property Value
EmrCreateCluster.CloudWatchAlarmComparisonOperator
Dimensions
A CloudWatch metric dimension.
virtual EmrCreateCluster.IMetricDimensionProperty[] Dimensions { get; }
Property Value
EmrCreateCluster.IMetricDimensionProperty[]
Remarks
Default: - No dimensions
EvaluationPeriods
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.
virtual Nullable<double> EvaluationPeriods { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 1
MetricName
The name of the CloudWatch metric that is watched to determine an alarm condition.
string MetricName { get; }
Property Value
System.String
Namespace
The namespace for the CloudWatch metric.
virtual string Namespace { get; }
Property Value
System.String
Remarks
Default: 'AWS/ElasticMapReduce'
Period
The period, in seconds, over which the statistic is applied.
Duration Period { get; }
Property Value
Remarks
EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.
Statistic
The statistic to apply to the metric associated with the alarm.
virtual Nullable<EmrCreateCluster.CloudWatchAlarmStatistic> Statistic { get; }
Property Value
System.Nullable<EmrCreateCluster.CloudWatchAlarmStatistic>
Remarks
Default: CloudWatchAlarmStatistic.AVERAGE
Threshold
The value against which the specified statistic is compared.
virtual Nullable<double> Threshold { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - None
Unit
The unit of measure associated with the CloudWatch metric being watched.
virtual Nullable<EmrCreateCluster.CloudWatchAlarmUnit> Unit { get; }
Property Value
System.Nullable<EmrCreateCluster.CloudWatchAlarmUnit>
Remarks
The value specified for Unit must correspond to the units specified in the CloudWatch metric.
Default: CloudWatchAlarmUnit.NONE