Class CfnCluster.CloudWatchAlarmDefinitionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnCluster.CloudWatchAlarmDefinitionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster.CloudWatchAlarmDefinitionProperty>
- Enclosing interface:
CfnCluster.CloudWatchAlarmDefinitionProperty
@Stability(Stable)
public static final class CfnCluster.CloudWatchAlarmDefinitionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCluster.CloudWatchAlarmDefinitionProperty>
A builder for
CfnCluster.CloudWatchAlarmDefinitionProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.comparisonOperator(String comparisonOperator) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getComparisonOperator()dimensions(List<? extends Object> dimensions) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getDimensions()dimensions(IResolvable dimensions) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getDimensions()evaluationPeriods(Number evaluationPeriods) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getEvaluationPeriods()metricName(String metricName) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getMetricName()Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getNamespace()Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getPeriod()Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getStatistic()Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getThreshold()Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
comparisonOperator
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder comparisonOperator(String comparisonOperator) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getComparisonOperator()- Parameters:
comparisonOperator- Determines how the metric specified byMetricNameis compared to the value specified byThreshold. This parameter is required.- Returns:
this
-
metricName
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder metricName(String metricName) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getMetricName()- Parameters:
metricName- The name of the CloudWatch metric that is watched to determine an alarm condition. This parameter is required.- Returns:
this
-
period
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder period(Number period) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getPeriod()- Parameters:
period- The period, in seconds, over which the statistic is applied. This parameter is required. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify300.- Returns:
this
-
threshold
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder threshold(Number threshold) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getThreshold()- Parameters:
threshold- The value against which the specified statistic is compared. This parameter is required.- Returns:
this
-
dimensions
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder dimensions(IResolvable dimensions) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getDimensions()- Parameters:
dimensions- A CloudWatch metric dimension.- Returns:
this
-
dimensions
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder dimensions(List<? extends Object> dimensions) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getDimensions()- Parameters:
dimensions- A CloudWatch metric dimension.- Returns:
this
-
evaluationPeriods
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder evaluationPeriods(Number evaluationPeriods) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getEvaluationPeriods()- Parameters:
evaluationPeriods- 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 is1.- Returns:
this
-
namespace
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder namespace(String namespace) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getNamespace()- Parameters:
namespace- The namespace for the CloudWatch metric. The default isAWS/ElasticMapReduce.- Returns:
this
-
statistic
@Stability(Stable) public CfnCluster.CloudWatchAlarmDefinitionProperty.Builder statistic(String statistic) Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getStatistic()- Parameters:
statistic- The statistic to apply to the metric associated with the alarm. The default isAVERAGE.- Returns:
this
-
unit
Sets the value ofCfnCluster.CloudWatchAlarmDefinitionProperty.getUnit()- Parameters:
unit- The unit of measure associated with the CloudWatch metric being watched. The value specified forUnitmust correspond to the units specified in the CloudWatch metric.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCluster.CloudWatchAlarmDefinitionProperty>- Returns:
- a new instance of
CfnCluster.CloudWatchAlarmDefinitionProperty - Throws:
NullPointerException- if any required attribute was not provided
-