Class AwsFleetSpotOptions.Builder

java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<AwsFleetSpotOptions>
co.yellowdog.platform.model.AwsFleetSpotOptions.Builder
Enclosing class:
AwsFleetSpotOptions

public static class AwsFleetSpotOptions.Builder extends ValidatedBuilder<AwsFleetSpotOptions>
A builder that can be used to build a new AwsFleetSpotOptions that is automatically validated on build.
  • 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

      public AwsFleetSpotOptions.Builder instancePoolsToUseCount(Integer 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

      public AwsFleetSpotOptions.Builder maxTotalPrice(Double maxTotalPrice)
      The maximum amount per hour for Spot instances.
      Returns:
      this.
    • minInstanceCount

      public AwsFleetSpotOptions.Builder minInstanceCount(Integer minInstanceCount)
      The minimum number of Spot instances that must be provisioned in the fleet.
      Returns:
      this.
    • singleAvailabilityZone

      public AwsFleetSpotOptions.Builder singleAvailabilityZone(Boolean singleAvailabilityZone)
      Indicates that AWS EC2 Fleet should provision all Spot instances into a single availability zone.
      Returns:
      this.
    • singleInstanceType

      public AwsFleetSpotOptions.Builder singleInstanceType(Boolean singleInstanceType)
      Indicates that AWS EC2 Fleet should use a single instance type to provision all Spot instances.
      Returns:
      this.
    • buildUnchecked

      public AwsFleetSpotOptions buildUnchecked()
      Description copied from class: ValidatedBuilder
      Builds the object without enforcing validation constraints. This should only be used for testing purposes
      Overrides:
      buildUnchecked in class ValidatedBuilder<AwsFleetSpotOptions>
      Returns:
      the object being built
    • toString

      public String toString()
      Overrides:
      toString in class Object