@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class InstanceTypeConfig extends Object implements Serializable, Cloneable, StructuredPojo
An instance type configuration for each instance type in an instance fleet, which determines the Amazon EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. When you use an allocation strategy, you can include a maximum of 30 instance type configurations for a fleet. For more information about how to use an allocation strategy, see Configure Instance Fleets. Without an allocation strategy, you may specify a maximum of five instance type configurations for a fleet.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
Constructor and Description |
---|
InstanceTypeConfig() |
Modifier and Type | Method and Description |
---|---|
InstanceTypeConfig |
clone() |
boolean |
equals(Object obj) |
String |
getBidPrice()
The bid price for each Amazon EC2 Spot Instance type as defined by
InstanceType . |
Double |
getBidPriceAsPercentageOfOnDemandPrice()
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType . |
List<Configuration> |
getConfigurations()
A configuration classification that applies when provisioning cluster instances, which can include configurations
for applications and software that run on the cluster.
|
String |
getCustomAmiId()
The custom AMI ID to use for the instance type.
|
EbsConfiguration |
getEbsConfiguration()
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType . |
String |
getInstanceType()
An Amazon EC2 instance type, such as
m3.xlarge . |
Integer |
getWeightedCapacity()
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities
defined in InstanceFleetConfig.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setBidPrice(String bidPrice)
The bid price for each Amazon EC2 Spot Instance type as defined by
InstanceType . |
void |
setBidPriceAsPercentageOfOnDemandPrice(Double bidPriceAsPercentageOfOnDemandPrice)
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType . |
void |
setConfigurations(Collection<Configuration> configurations)
A configuration classification that applies when provisioning cluster instances, which can include configurations
for applications and software that run on the cluster.
|
void |
setCustomAmiId(String customAmiId)
The custom AMI ID to use for the instance type.
|
void |
setEbsConfiguration(EbsConfiguration ebsConfiguration)
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType . |
void |
setInstanceType(String instanceType)
An Amazon EC2 instance type, such as
m3.xlarge . |
void |
setWeightedCapacity(Integer weightedCapacity)
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities
defined in InstanceFleetConfig.
|
String |
toString()
Returns a string representation of this object.
|
InstanceTypeConfig |
withBidPrice(String bidPrice)
The bid price for each Amazon EC2 Spot Instance type as defined by
InstanceType . |
InstanceTypeConfig |
withBidPriceAsPercentageOfOnDemandPrice(Double bidPriceAsPercentageOfOnDemandPrice)
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType . |
InstanceTypeConfig |
withConfigurations(Collection<Configuration> configurations)
A configuration classification that applies when provisioning cluster instances, which can include configurations
for applications and software that run on the cluster.
|
InstanceTypeConfig |
withConfigurations(Configuration... configurations)
A configuration classification that applies when provisioning cluster instances, which can include configurations
for applications and software that run on the cluster.
|
InstanceTypeConfig |
withCustomAmiId(String customAmiId)
The custom AMI ID to use for the instance type.
|
InstanceTypeConfig |
withEbsConfiguration(EbsConfiguration ebsConfiguration)
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType . |
InstanceTypeConfig |
withInstanceType(String instanceType)
An Amazon EC2 instance type, such as
m3.xlarge . |
InstanceTypeConfig |
withWeightedCapacity(Integer weightedCapacity)
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities
defined in InstanceFleetConfig.
|
public void setInstanceType(String instanceType)
An Amazon EC2 instance type, such as m3.xlarge
.
instanceType
- An Amazon EC2 instance type, such as m3.xlarge
.public String getInstanceType()
An Amazon EC2 instance type, such as m3.xlarge
.
m3.xlarge
.public InstanceTypeConfig withInstanceType(String instanceType)
An Amazon EC2 instance type, such as m3.xlarge
.
instanceType
- An Amazon EC2 instance type, such as m3.xlarge
.public void setWeightedCapacity(Integer weightedCapacity)
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. 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.
weightedCapacity
- The number of units that a provisioned instance of this type provides toward fulfilling the target
capacities defined in InstanceFleetConfig. 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.public Integer getWeightedCapacity()
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. 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.
public InstanceTypeConfig withWeightedCapacity(Integer weightedCapacity)
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. 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.
weightedCapacity
- The number of units that a provisioned instance of this type provides toward fulfilling the target
capacities defined in InstanceFleetConfig. 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.public void setBidPrice(String bidPrice)
The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType
. Expressed in USD.
If neither BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
bidPrice
- The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType
. Expressed in
USD. If neither BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.public String getBidPrice()
The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType
. Expressed in USD.
If neither BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
InstanceType
. Expressed
in USD. If neither BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is
provided, BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.public InstanceTypeConfig withBidPrice(String bidPrice)
The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType
. Expressed in USD.
If neither BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
bidPrice
- The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType
. Expressed in
USD. If neither BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.public void setBidPriceAsPercentageOfOnDemandPrice(Double bidPriceAsPercentageOfOnDemandPrice)
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType
. Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
bidPriceAsPercentageOfOnDemandPrice
- The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType
. Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.public Double getBidPriceAsPercentageOfOnDemandPrice()
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType
. Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
InstanceType
. Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.public InstanceTypeConfig withBidPriceAsPercentageOfOnDemandPrice(Double bidPriceAsPercentageOfOnDemandPrice)
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType
. Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.
bidPriceAsPercentageOfOnDemandPrice
- The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by
InstanceType
. Expressed as a number (for example, 20 specifies 20%). If neither
BidPrice
nor BidPriceAsPercentageOfOnDemandPrice
is provided,
BidPriceAsPercentageOfOnDemandPrice
defaults to 100%.public void setEbsConfiguration(EbsConfiguration ebsConfiguration)
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType
.
ebsConfiguration
- The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType
.public EbsConfiguration getEbsConfiguration()
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType
.
InstanceType
.public InstanceTypeConfig withEbsConfiguration(EbsConfiguration ebsConfiguration)
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType
.
ebsConfiguration
- The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType
.public List<Configuration> getConfigurations()
A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
public void setConfigurations(Collection<Configuration> configurations)
A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
configurations
- A configuration classification that applies when provisioning cluster instances, which can include
configurations for applications and software that run on the cluster.public InstanceTypeConfig withConfigurations(Configuration... configurations)
A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
NOTE: This method appends the values to the existing list (if any). Use
setConfigurations(java.util.Collection)
or withConfigurations(java.util.Collection)
if you want
to override the existing values.
configurations
- A configuration classification that applies when provisioning cluster instances, which can include
configurations for applications and software that run on the cluster.public InstanceTypeConfig withConfigurations(Collection<Configuration> configurations)
A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
configurations
- A configuration classification that applies when provisioning cluster instances, which can include
configurations for applications and software that run on the cluster.public void setCustomAmiId(String customAmiId)
The custom AMI ID to use for the instance type.
customAmiId
- The custom AMI ID to use for the instance type.public String getCustomAmiId()
The custom AMI ID to use for the instance type.
public InstanceTypeConfig withCustomAmiId(String customAmiId)
The custom AMI ID to use for the instance type.
customAmiId
- The custom AMI ID to use for the instance type.public String toString()
toString
in class Object
Object.toString()
public InstanceTypeConfig clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.