Class CfnInstanceGroupConfig.ScalingRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnInstanceGroupConfig.ScalingRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstanceGroupConfig.ScalingRuleProperty>
- Enclosing interface:
CfnInstanceGroupConfig.ScalingRuleProperty
@Stability(Stable)
public static final class CfnInstanceGroupConfig.ScalingRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstanceGroupConfig.ScalingRuleProperty>
A builder for
CfnInstanceGroupConfig.ScalingRuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaction
(IResolvable action) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getAction()
Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getAction()
build()
Builds the configured instance.description
(String description) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getDescription()
Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getName()
trigger
(IResolvable trigger) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getTrigger()
Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getTrigger()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
@Stability(Stable) public CfnInstanceGroupConfig.ScalingRuleProperty.Builder action(IResolvable action) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getAction()
- Parameters:
action
- The conditions that trigger an automatic scaling activity. This parameter is required.- Returns:
this
-
action
@Stability(Stable) public CfnInstanceGroupConfig.ScalingRuleProperty.Builder action(CfnInstanceGroupConfig.ScalingActionProperty action) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getAction()
- Parameters:
action
- The conditions that trigger an automatic scaling activity. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getName()
- Parameters:
name
- The name used to identify an automatic scaling rule. This parameter is required. Rule names must be unique within a scaling policy.- Returns:
this
-
trigger
@Stability(Stable) public CfnInstanceGroupConfig.ScalingRuleProperty.Builder trigger(IResolvable trigger) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getTrigger()
- Parameters:
trigger
- The CloudWatch alarm definition that determines when automatic scaling activity is triggered. This parameter is required.- Returns:
this
-
trigger
@Stability(Stable) public CfnInstanceGroupConfig.ScalingRuleProperty.Builder trigger(CfnInstanceGroupConfig.ScalingTriggerProperty trigger) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getTrigger()
- Parameters:
trigger
- The CloudWatch alarm definition that determines when automatic scaling activity is triggered. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public CfnInstanceGroupConfig.ScalingRuleProperty.Builder description(String description) Sets the value ofCfnInstanceGroupConfig.ScalingRuleProperty.getDescription()
- Parameters:
description
- A friendly, more verbose description of the automatic scaling rule.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstanceGroupConfig.ScalingRuleProperty>
- Returns:
- a new instance of
CfnInstanceGroupConfig.ScalingRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-