Class CfnCluster.InstanceTypeConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnCluster.InstanceTypeConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster.InstanceTypeConfigProperty>
- Enclosing interface:
CfnCluster.InstanceTypeConfigProperty
@Stability(Stable)
public static final class CfnCluster.InstanceTypeConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCluster.InstanceTypeConfigProperty>
A builder for
CfnCluster.InstanceTypeConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnCluster.InstanceTypeConfigProperty.getBidPrice()bidPriceAsPercentageOfOnDemandPrice(Number bidPriceAsPercentageOfOnDemandPrice) build()Builds the configured instance.configurations(List<? extends Object> configurations) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getConfigurations()configurations(IResolvable configurations) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getConfigurations()customAmiId(String customAmiId) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getCustomAmiId()ebsConfiguration(IResolvable ebsConfiguration) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getEbsConfiguration()ebsConfiguration(CfnCluster.EbsConfigurationProperty ebsConfiguration) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getEbsConfiguration()instanceType(String instanceType) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getInstanceType()weightedCapacity(Number weightedCapacity) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getWeightedCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceType
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder instanceType(String instanceType) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getInstanceType()- Parameters:
instanceType- An Amazon EC2 instance type, such asm3.xlarge. This parameter is required.- Returns:
this
-
bidPrice
Sets the value ofCfnCluster.InstanceTypeConfigProperty.getBidPrice()- Parameters:
bidPrice- The bid price for each Amazon EC2 Spot Instance type as defined byInstanceType. Expressed in USD. If neitherBidPricenorBidPriceAsPercentageOfOnDemandPriceis provided,BidPriceAsPercentageOfOnDemandPricedefaults to 100%.- Returns:
this
-
bidPriceAsPercentageOfOnDemandPrice
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder bidPriceAsPercentageOfOnDemandPrice(Number bidPriceAsPercentageOfOnDemandPrice) - Parameters:
bidPriceAsPercentageOfOnDemandPrice- The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined byInstanceType. Expressed as a number (for example, 20 specifies 20%). If neitherBidPricenorBidPriceAsPercentageOfOnDemandPriceis provided,BidPriceAsPercentageOfOnDemandPricedefaults to 100%.- Returns:
this
-
configurations
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder configurations(IResolvable configurations) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getConfigurations()- Parameters:
configurations- A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.- Returns:
this
-
configurations
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder configurations(List<? extends Object> configurations) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getConfigurations()- Parameters:
configurations- A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.- Returns:
this
-
customAmiId
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder customAmiId(String customAmiId) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getCustomAmiId()- Parameters:
customAmiId- The custom AMI ID to use for the instance type.- Returns:
this
-
ebsConfiguration
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder ebsConfiguration(IResolvable ebsConfiguration) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getEbsConfiguration()- Parameters:
ebsConfiguration- The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined byInstanceType.- Returns:
this
-
ebsConfiguration
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder ebsConfiguration(CfnCluster.EbsConfigurationProperty ebsConfiguration) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getEbsConfiguration()- Parameters:
ebsConfiguration- The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined byInstanceType.- Returns:
this
-
weightedCapacity
@Stability(Stable) public CfnCluster.InstanceTypeConfigProperty.Builder weightedCapacity(Number weightedCapacity) Sets the value ofCfnCluster.InstanceTypeConfigProperty.getWeightedCapacity()- Parameters:
weightedCapacity- The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined inInstanceFleetConfig. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCluster.InstanceTypeConfigProperty>- Returns:
- a new instance of
CfnCluster.InstanceTypeConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-