Class CfnCluster.SimpleScalingPolicyConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnCluster.SimpleScalingPolicyConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster.SimpleScalingPolicyConfigurationProperty>
- Enclosing interface:
CfnCluster.SimpleScalingPolicyConfigurationProperty
@Stability(Stable)
public static final class CfnCluster.SimpleScalingPolicyConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCluster.SimpleScalingPolicyConfigurationProperty>
A builder for
CfnCluster.SimpleScalingPolicyConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadjustmentType(String adjustmentType) Sets the value ofCfnCluster.SimpleScalingPolicyConfigurationProperty.getAdjustmentType()build()Builds the configured instance.Sets the value ofCfnCluster.SimpleScalingPolicyConfigurationProperty.getCoolDown()scalingAdjustment(Number scalingAdjustment)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
scalingAdjustment
@Stability(Stable) public CfnCluster.SimpleScalingPolicyConfigurationProperty.Builder scalingAdjustment(Number scalingAdjustment) - Parameters:
scalingAdjustment- The amount by which to scale in or scale out, based on the specifiedAdjustmentType. This parameter is required. A positive value adds to the instance group's Amazon EC2 instance count while a negative number removes instances. IfAdjustmentTypeis set toEXACT_CAPACITY, the number should only be a positive integer. IfAdjustmentTypeis set toPERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.- Returns:
this
-
adjustmentType
@Stability(Stable) public CfnCluster.SimpleScalingPolicyConfigurationProperty.Builder adjustmentType(String adjustmentType) Sets the value ofCfnCluster.SimpleScalingPolicyConfigurationProperty.getAdjustmentType()- Parameters:
adjustmentType- The way in which Amazon EC2 instances are added (ifScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer.- Returns:
this
-
coolDown
@Stability(Stable) public CfnCluster.SimpleScalingPolicyConfigurationProperty.Builder coolDown(Number coolDown) Sets the value ofCfnCluster.SimpleScalingPolicyConfigurationProperty.getCoolDown()- Parameters:
coolDown- The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCluster.SimpleScalingPolicyConfigurationProperty>- Returns:
- a new instance of
CfnCluster.SimpleScalingPolicyConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-