public static interface EmrCreateCluster.CloudWatchAlarmDefinitionProperty
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.services.stepfunctions.tasks.*; import software.amazon.awscdk.core.*; 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();
Modifier and Type | Interface and Description |
---|---|
static class |
EmrCreateCluster.CloudWatchAlarmDefinitionProperty.Builder
A builder for
EmrCreateCluster.CloudWatchAlarmDefinitionProperty |
static class |
EmrCreateCluster.CloudWatchAlarmDefinitionProperty.Jsii$Proxy
An implementation for
EmrCreateCluster.CloudWatchAlarmDefinitionProperty |
Modifier and Type | Method and Description |
---|---|
static EmrCreateCluster.CloudWatchAlarmDefinitionProperty.Builder |
builder() |
EmrCreateCluster.CloudWatchAlarmComparisonOperator |
getComparisonOperator()
Determines how the metric specified by MetricName is compared to the value specified by Threshold.
|
default java.util.List<EmrCreateCluster.MetricDimensionProperty> |
getDimensions()
A CloudWatch metric dimension.
|
default java.lang.Number |
getEvaluationPeriods()
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.
|
java.lang.String |
getMetricName()
The name of the CloudWatch metric that is watched to determine an alarm condition.
|
default java.lang.String |
getNamespace()
The namespace for the CloudWatch metric.
|
Duration |
getPeriod()
The period, in seconds, over which the statistic is applied.
|
default EmrCreateCluster.CloudWatchAlarmStatistic |
getStatistic()
The statistic to apply to the metric associated with the alarm.
|
default java.lang.Number |
getThreshold()
The value against which the specified statistic is compared.
|
default EmrCreateCluster.CloudWatchAlarmUnit |
getUnit()
The unit of measure associated with the CloudWatch metric being watched.
|
EmrCreateCluster.CloudWatchAlarmComparisonOperator getComparisonOperator()
java.lang.String getMetricName()
Duration getPeriod()
EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.
default java.util.List<EmrCreateCluster.MetricDimensionProperty> getDimensions()
Default: - No dimensions
default java.lang.Number getEvaluationPeriods()
Default: 1
default java.lang.String getNamespace()
Default: 'AWS/ElasticMapReduce'
default EmrCreateCluster.CloudWatchAlarmStatistic getStatistic()
Default: CloudWatchAlarmStatistic.AVERAGE
default java.lang.Number getThreshold()
Default: - None
default EmrCreateCluster.CloudWatchAlarmUnit getUnit()
The value specified for Unit must correspond to the units specified in the CloudWatch metric.
Default: CloudWatchAlarmUnit.NONE