Class AwsFleetSpotOptions.Builder
java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<AwsFleetSpotOptions>
co.yellowdog.platform.model.AwsFleetSpotOptions.Builder
- Enclosing class:
AwsFleetSpotOptions
A builder that can be used to build a new AwsFleetSpotOptions that is automatically validated on build.
-
Method Summary
Modifier and TypeMethodDescriptionallocationStrategy
(AwsFleetSpotAllocationStrategy allocationStrategy) Determines the order of the instance overrides to use in fulfilling Spot capacity.Builds the object without enforcing validation constraints.instancePoolsToUseCount
(Integer instancePoolsToUseCount) The number of Spot pools across which AWS EC2 Fleet should allocate Spot capacity when using LOWEST_PRICE Spot allocation strategy.launchReplacementInstanceOnRebalance
(Boolean launchReplacementInstanceOnRebalance) Allow AWS EC2 Fleet to launch a replacement Spot instance when an instance rebalance notification is emitted for an existing Spot instance.maxTotalPrice
(Double maxTotalPrice) The maximum amount per hour for Spot instances.minInstanceCount
(Integer minInstanceCount) The minimum number of Spot instances that must be provisioned in the fleet.singleAvailabilityZone
(Boolean singleAvailabilityZone) Indicates that AWS EC2 Fleet should provision all Spot instances into a single availability zone.singleInstanceType
(Boolean singleInstanceType) Indicates that AWS EC2 Fleet should use a single instance type to provision all Spot instances.toString()
Methods inherited from class co.yellowdog.platform.model.builders.ValidatedBuilder
build, validate
-
Method Details
-
allocationStrategy
public AwsFleetSpotOptions.Builder allocationStrategy(AwsFleetSpotAllocationStrategy allocationStrategy) Determines the order of the instance overrides to use in fulfilling Spot capacity.- Returns:
this
.
-
instancePoolsToUseCount
The number of Spot pools across which AWS EC2 Fleet should allocate Spot capacity when using LOWEST_PRICE Spot allocation strategy.- Returns:
this
.
-
launchReplacementInstanceOnRebalance
public AwsFleetSpotOptions.Builder launchReplacementInstanceOnRebalance(Boolean launchReplacementInstanceOnRebalance) Allow AWS EC2 Fleet to launch a replacement Spot instance when an instance rebalance notification is emitted for an existing Spot instance.- Returns:
this
.
-
maxTotalPrice
The maximum amount per hour for Spot instances.- Returns:
this
.
-
minInstanceCount
The minimum number of Spot instances that must be provisioned in the fleet.- Returns:
this
.
-
singleAvailabilityZone
Indicates that AWS EC2 Fleet should provision all Spot instances into a single availability zone.- Returns:
this
.
-
singleInstanceType
Indicates that AWS EC2 Fleet should use a single instance type to provision all Spot instances.- Returns:
this
.
-
buildUnchecked
Description copied from class:ValidatedBuilder
Builds the object without enforcing validation constraints. This should only be used for testing purposes- Overrides:
buildUnchecked
in classValidatedBuilder<AwsFleetSpotOptions>
- Returns:
- the object being built
-
toString
-