@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SpotOptions extends Object implements Serializable, Cloneable
Describes the configuration of Spot Instances in an EC2 Fleet.
Constructor and Description |
---|
SpotOptions() |
Modifier and Type | Method and Description |
---|---|
SpotOptions |
clone() |
boolean |
equals(Object obj) |
String |
getAllocationStrategy()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2
Fleet.
|
String |
getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
|
Integer |
getInstancePoolsToUseCount()
The number of Spot pools across which to allocate your target Spot capacity.
|
String |
getMaxTotalPrice()
The maximum amount per hour for Spot Instances that you're willing to pay.
|
Integer |
getMinTargetCapacity()
The minimum target capacity for Spot Instances in the fleet.
|
Boolean |
getSingleAvailabilityZone()
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
|
Boolean |
getSingleInstanceType()
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
|
int |
hashCode() |
Boolean |
isSingleAvailabilityZone()
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
|
Boolean |
isSingleInstanceType()
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
|
void |
setAllocationStrategy(String allocationStrategy)
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2
Fleet.
|
void |
setInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
void |
setInstancePoolsToUseCount(Integer instancePoolsToUseCount)
The number of Spot pools across which to allocate your target Spot capacity.
|
void |
setMaxTotalPrice(String maxTotalPrice)
The maximum amount per hour for Spot Instances that you're willing to pay.
|
void |
setMinTargetCapacity(Integer minTargetCapacity)
The minimum target capacity for Spot Instances in the fleet.
|
void |
setSingleAvailabilityZone(Boolean singleAvailabilityZone)
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
|
void |
setSingleInstanceType(Boolean singleInstanceType)
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
|
String |
toString()
Returns a string representation of this object.
|
SpotOptions |
withAllocationStrategy(SpotAllocationStrategy allocationStrategy)
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2
Fleet.
|
SpotOptions |
withAllocationStrategy(String allocationStrategy)
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2
Fleet.
|
SpotOptions |
withInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
SpotOptions |
withInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
SpotOptions |
withInstancePoolsToUseCount(Integer instancePoolsToUseCount)
The number of Spot pools across which to allocate your target Spot capacity.
|
SpotOptions |
withMaxTotalPrice(String maxTotalPrice)
The maximum amount per hour for Spot Instances that you're willing to pay.
|
SpotOptions |
withMinTargetCapacity(Integer minTargetCapacity)
The minimum target capacity for Spot Instances in the fleet.
|
SpotOptions |
withSingleAvailabilityZone(Boolean singleAvailabilityZone)
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
|
SpotOptions |
withSingleInstanceType(Boolean singleInstanceType)
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
|
public void setAllocationStrategy(String allocationStrategy)
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot Instance
pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot Instance
pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot Instance
pools with optimal capacity for the number of instances that are launching.
allocationStrategy
- Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by
the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot
Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot
Instance pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot
Instance pools with optimal capacity for the number of instances that are launching.
SpotAllocationStrategy
public String getAllocationStrategy()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot Instance
pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot Instance
pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot Instance
pools with optimal capacity for the number of instances that are launching.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot
Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot
Instance pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot
Instance pools with optimal capacity for the number of instances that are launching.
SpotAllocationStrategy
public SpotOptions withAllocationStrategy(String allocationStrategy)
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot Instance
pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot Instance
pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot Instance
pools with optimal capacity for the number of instances that are launching.
allocationStrategy
- Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by
the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot
Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot
Instance pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot
Instance pools with optimal capacity for the number of instances that are launching.
SpotAllocationStrategy
public SpotOptions withAllocationStrategy(SpotAllocationStrategy allocationStrategy)
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot Instance
pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot Instance
pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot Instance
pools with optimal capacity for the number of instances that are launching.
allocationStrategy
- Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by
the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot
Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all the Spot
Instance pools that you specify.
If the allocation strategy is capacity-optimized
, EC2 Fleet launches instances from Spot
Instance pools with optimal capacity for the number of instances that are launching.
SpotAllocationStrategy
public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.SpotInstanceInterruptionBehavior
public String getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted. The default is terminate
.
terminate
.SpotInstanceInterruptionBehavior
public SpotOptions withInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.SpotInstanceInterruptionBehavior
public SpotOptions withInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.SpotInstanceInterruptionBehavior
public void setInstancePoolsToUseCount(Integer instancePoolsToUseCount)
The number of Spot pools across which to allocate your target Spot capacity. Valid only when
AllocationStrategy is set to lowest-price
. EC2 Fleet selects the cheapest Spot pools and
evenly allocates your target Spot capacity across the number of Spot pools that you specify.
instancePoolsToUseCount
- The number of Spot pools across which to allocate your target Spot capacity. Valid only when
AllocationStrategy is set to lowest-price
. EC2 Fleet selects the cheapest Spot pools
and evenly allocates your target Spot capacity across the number of Spot pools that you specify.public Integer getInstancePoolsToUseCount()
The number of Spot pools across which to allocate your target Spot capacity. Valid only when
AllocationStrategy is set to lowest-price
. EC2 Fleet selects the cheapest Spot pools and
evenly allocates your target Spot capacity across the number of Spot pools that you specify.
lowest-price
. EC2 Fleet selects the cheapest Spot pools
and evenly allocates your target Spot capacity across the number of Spot pools that you specify.public SpotOptions withInstancePoolsToUseCount(Integer instancePoolsToUseCount)
The number of Spot pools across which to allocate your target Spot capacity. Valid only when
AllocationStrategy is set to lowest-price
. EC2 Fleet selects the cheapest Spot pools and
evenly allocates your target Spot capacity across the number of Spot pools that you specify.
instancePoolsToUseCount
- The number of Spot pools across which to allocate your target Spot capacity. Valid only when
AllocationStrategy is set to lowest-price
. EC2 Fleet selects the cheapest Spot pools
and evenly allocates your target Spot capacity across the number of Spot pools that you specify.public void setSingleInstanceType(Boolean singleInstanceType)
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
singleInstanceType
- Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.public Boolean getSingleInstanceType()
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
public SpotOptions withSingleInstanceType(Boolean singleInstanceType)
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
singleInstanceType
- Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.public Boolean isSingleInstanceType()
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
public void setSingleAvailabilityZone(Boolean singleAvailabilityZone)
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
singleAvailabilityZone
- Indicates that the fleet launches all Spot Instances into a single Availability Zone.public Boolean getSingleAvailabilityZone()
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
public SpotOptions withSingleAvailabilityZone(Boolean singleAvailabilityZone)
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
singleAvailabilityZone
- Indicates that the fleet launches all Spot Instances into a single Availability Zone.public Boolean isSingleAvailabilityZone()
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
public void setMinTargetCapacity(Integer minTargetCapacity)
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
minTargetCapacity
- The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not
reached, the fleet launches no instances.public Integer getMinTargetCapacity()
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
public SpotOptions withMinTargetCapacity(Integer minTargetCapacity)
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
minTargetCapacity
- The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not
reached, the fleet launches no instances.public void setMaxTotalPrice(String maxTotalPrice)
The maximum amount per hour for Spot Instances that you're willing to pay.
maxTotalPrice
- The maximum amount per hour for Spot Instances that you're willing to pay.public String getMaxTotalPrice()
The maximum amount per hour for Spot Instances that you're willing to pay.
public SpotOptions withMaxTotalPrice(String maxTotalPrice)
The maximum amount per hour for Spot Instances that you're willing to pay.
maxTotalPrice
- The maximum amount per hour for Spot Instances that you're willing to pay.public String toString()
toString
in class Object
Object.toString()
public SpotOptions clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.