Interface EmrCreateCluster.CloudWatchAlarmDefinitionProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EmrCreateCluster.CloudWatchAlarmDefinitionProperty.Jsii$Proxy
Enclosing class:
EmrCreateCluster

@Stability(Stable) public static interface EmrCreateCluster.CloudWatchAlarmDefinitionProperty extends software.amazon.jsii.JsiiSerializable
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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.stepfunctions.tasks.*;
 CloudWatchAlarmDefinitionProperty cloudWatchAlarmDefinitionProperty = CloudWatchAlarmDefinitionProperty.builder()
         .comparisonOperator(EmrCreateCluster.getCloudWatchAlarmComparisonOperator().GREATER_THAN_OR_EQUAL)
         .metricName("metricName")
         .period(Duration.minutes(30))
         // the properties below are optional
         .dimensions(List.of(MetricDimensionProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .evaluationPeriods(123)
         .namespace("namespace")
         .statistic(EmrCreateCluster.getCloudWatchAlarmStatistic().SAMPLE_COUNT)
         .threshold(123)
         .unit(EmrCreateCluster.getCloudWatchAlarmUnit().NONE)
         .build();
 

See Also:
  • Method Details

    • getComparisonOperator

      @Stability(Stable) @NotNull EmrCreateCluster.CloudWatchAlarmComparisonOperator getComparisonOperator()
      Determines how the metric specified by MetricName is compared to the value specified by Threshold.
    • getMetricName

      @Stability(Stable) @NotNull String getMetricName()
      The name of the CloudWatch metric that is watched to determine an alarm condition.
    • getPeriod

      @Stability(Stable) @NotNull Duration getPeriod()
      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.

    • getDimensions

      @Stability(Stable) @Nullable default List<EmrCreateCluster.MetricDimensionProperty> getDimensions()
      A CloudWatch metric dimension.

      Default: - No dimensions

    • getEvaluationPeriods

      @Stability(Stable) @Nullable default Number getEvaluationPeriods()
      The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.

      Default: 1

    • getNamespace

      @Stability(Stable) @Nullable default String getNamespace()
      The namespace for the CloudWatch metric.

      Default: 'AWS/ElasticMapReduce'

    • getStatistic

      @Stability(Stable) @Nullable default EmrCreateCluster.CloudWatchAlarmStatistic getStatistic()
      The statistic to apply to the metric associated with the alarm.

      Default: CloudWatchAlarmStatistic.AVERAGE

    • getThreshold

      @Stability(Stable) @Nullable default Number getThreshold()
      The value against which the specified statistic is compared.

      Default: - None

    • getUnit

      @Stability(Stable) @Nullable default EmrCreateCluster.CloudWatchAlarmUnit getUnit()
      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.

      Default: CloudWatchAlarmUnit.NONE

    • builder

      Returns:
      a EmrCreateCluster.CloudWatchAlarmDefinitionProperty.Builder of EmrCreateCluster.CloudWatchAlarmDefinitionProperty