@Generated(value="software.amazon.awssdk:codegen") public final class SpotFleetRequestConfigData extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SpotFleetRequestConfigData.Builder,SpotFleetRequestConfigData>
Describes the configuration of a Spot Fleet request.
Modifier and Type | Class and Description |
---|---|
static interface |
SpotFleetRequestConfigData.Builder |
Modifier and Type | Method and Description |
---|---|
AllocationStrategy |
allocationStrategy()
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
specified by the Spot Fleet launch configuration.
|
String |
allocationStrategyAsString()
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools
specified by the Spot Fleet launch configuration.
|
static SpotFleetRequestConfigData.Builder |
builder() |
String |
clientToken()
A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings.
|
String |
context()
Reserved.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
ExcessCapacityTerminationPolicy |
excessCapacityTerminationPolicy()
Indicates whether running instances should be terminated if you decrease the target capacity of the Spot Fleet
request below the current size of the Spot Fleet.
|
String |
excessCapacityTerminationPolicyAsString()
Indicates whether running instances should be terminated if you decrease the target capacity of the Spot Fleet
request below the current size of the Spot Fleet.
|
Double |
fulfilledCapacity()
The number of units fulfilled by this request compared to the set target capacity.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasLaunchSpecifications()
For responses, this returns true if the service returned a value for the LaunchSpecifications property.
|
boolean |
hasLaunchTemplateConfigs()
For responses, this returns true if the service returned a value for the LaunchTemplateConfigs property.
|
boolean |
hasTagSpecifications()
For responses, this returns true if the service returned a value for the TagSpecifications property.
|
String |
iamFleetRole()
The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the
permission to request, launch, terminate, and tag instances on your behalf.
|
InstanceInterruptionBehavior |
instanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
|
String |
instanceInterruptionBehaviorAsString()
The behavior when a Spot Instance is interrupted.
|
Integer |
instancePoolsToUseCount()
The number of Spot pools across which to allocate your target Spot capacity.
|
List<SpotFleetLaunchSpecification> |
launchSpecifications()
The launch specifications for the Spot Fleet request.
|
List<LaunchTemplateConfig> |
launchTemplateConfigs()
The launch template and overrides.
|
LoadBalancersConfig |
loadBalancersConfig()
One or more Classic Load Balancers and target groups to attach to the Spot Fleet request.
|
OnDemandAllocationStrategy |
onDemandAllocationStrategy()
The order of the launch template overrides to use in fulfilling On-Demand capacity.
|
String |
onDemandAllocationStrategyAsString()
The order of the launch template overrides to use in fulfilling On-Demand capacity.
|
Double |
onDemandFulfilledCapacity()
The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.
|
String |
onDemandMaxTotalPrice()
The maximum amount per hour for On-Demand Instances that you're willing to pay.
|
Integer |
onDemandTargetCapacity()
The number of On-Demand units to request.
|
Boolean |
replaceUnhealthyInstances()
Indicates whether Spot Fleet should replace unhealthy instances.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends SpotFleetRequestConfigData.Builder> |
serializableBuilderClass() |
SpotMaintenanceStrategies |
spotMaintenanceStrategies()
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
|
String |
spotMaxTotalPrice()
The maximum amount per hour for Spot Instances that you're willing to pay.
|
String |
spotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
List<TagSpecification> |
tagSpecifications()
The key-value pair for tagging the Spot Fleet request on creation.
|
Integer |
targetCapacity()
The number of units to request for the Spot Fleet.
|
TargetCapacityUnitType |
targetCapacityUnitType()
The unit for the target capacity.
|
String |
targetCapacityUnitTypeAsString()
The unit for the target capacity.
|
Boolean |
terminateInstancesWithExpiration()
Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
|
SpotFleetRequestConfigData.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
FleetType |
type()
The type of request.
|
String |
typeAsString()
The type of request.
|
Instant |
validFrom()
The start date and time of the request, in UTC format
(YYYY-MM-DDTHH:MM:SSZ).
|
Instant |
validUntil()
The end date and time of the request, in UTC format
(YYYY-MM-DDTHH:MM:SSZ).
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
public final AllocationStrategy allocationStrategy()
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are
launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance
of interruption in the near term. To give certain instance types a higher chance of launching first, use
capacityOptimizedPrioritized
. Set a priority for each instance type by using the
Priority
parameter for LaunchTemplateOverrides
. You can assign the same priority to
different LaunchTemplateOverrides
. EC2 implements the priorities on a best-effort basis, but
optimizes for capacity first. capacityOptimizedPrioritized
is supported only if your Spot Fleet uses
a launch template. Note that if the OnDemandAllocationStrategy
is set to prioritized
,
the same priority is applied when fulfilling On-Demand capacity.
Spot Fleet requests instances from all of the Spot Instance pools that you specify.
Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
Default: lowestPrice
If the service returns an enum value that is not available in the current SDK version,
allocationStrategy
will return AllocationStrategy.UNKNOWN_TO_SDK_VERSION
. The raw value returned
by the service is available from allocationStrategyAsString()
.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that
are launching. This means that we will request Spot Instances from the pools that we believe have the
lowest chance of interruption in the near term. To give certain instance types a higher chance of
launching first, use capacityOptimizedPrioritized
. Set a priority for each instance type by
using the Priority
parameter for LaunchTemplateOverrides
. You can assign the
same priority to different LaunchTemplateOverrides
. EC2 implements the priorities on a
best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized
is
supported only if your Spot Fleet uses a launch template. Note that if the
OnDemandAllocationStrategy
is set to prioritized
, the same priority is applied
when fulfilling On-Demand capacity.
Spot Fleet requests instances from all of the Spot Instance pools that you specify.
Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
Default: lowestPrice
AllocationStrategy
public final String allocationStrategyAsString()
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are
launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance
of interruption in the near term. To give certain instance types a higher chance of launching first, use
capacityOptimizedPrioritized
. Set a priority for each instance type by using the
Priority
parameter for LaunchTemplateOverrides
. You can assign the same priority to
different LaunchTemplateOverrides
. EC2 implements the priorities on a best-effort basis, but
optimizes for capacity first. capacityOptimizedPrioritized
is supported only if your Spot Fleet uses
a launch template. Note that if the OnDemandAllocationStrategy
is set to prioritized
,
the same priority is applied when fulfilling On-Demand capacity.
Spot Fleet requests instances from all of the Spot Instance pools that you specify.
Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
Default: lowestPrice
If the service returns an enum value that is not available in the current SDK version,
allocationStrategy
will return AllocationStrategy.UNKNOWN_TO_SDK_VERSION
. The raw value returned
by the service is available from allocationStrategyAsString()
.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that
are launching. This means that we will request Spot Instances from the pools that we believe have the
lowest chance of interruption in the near term. To give certain instance types a higher chance of
launching first, use capacityOptimizedPrioritized
. Set a priority for each instance type by
using the Priority
parameter for LaunchTemplateOverrides
. You can assign the
same priority to different LaunchTemplateOverrides
. EC2 implements the priorities on a
best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized
is
supported only if your Spot Fleet uses a launch template. Note that if the
OnDemandAllocationStrategy
is set to prioritized
, the same priority is applied
when fulfilling On-Demand capacity.
Spot Fleet requests instances from all of the Spot Instance pools that you specify.
Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
Default: lowestPrice
AllocationStrategy
public final OnDemandAllocationStrategy onDemandAllocationStrategy()
The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify
lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first. If you
specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet launch template
override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to
lowestPrice
.
If the service returns an enum value that is not available in the current SDK version,
onDemandAllocationStrategy
will return OnDemandAllocationStrategy.UNKNOWN_TO_SDK_VERSION
. The
raw value returned by the service is available from onDemandAllocationStrategyAsString()
.
lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first.
If you specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet
launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet
defaults to lowestPrice
.OnDemandAllocationStrategy
public final String onDemandAllocationStrategyAsString()
The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify
lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first. If you
specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet launch template
override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to
lowestPrice
.
If the service returns an enum value that is not available in the current SDK version,
onDemandAllocationStrategy
will return OnDemandAllocationStrategy.UNKNOWN_TO_SDK_VERSION
. The
raw value returned by the service is available from onDemandAllocationStrategyAsString()
.
lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first.
If you specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet
launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet
defaults to lowestPrice
.OnDemandAllocationStrategy
public final SpotMaintenanceStrategies spotMaintenanceStrategies()
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
public final String clientToken()
A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency.
public final ExcessCapacityTerminationPolicy excessCapacityTerminationPolicy()
Indicates whether running instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
Supported only for fleets of type maintain
.
If the service returns an enum value that is not available in the current SDK version,
excessCapacityTerminationPolicy
will return
ExcessCapacityTerminationPolicy.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from excessCapacityTerminationPolicyAsString()
.
Supported only for fleets of type maintain
.
ExcessCapacityTerminationPolicy
public final String excessCapacityTerminationPolicyAsString()
Indicates whether running instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
Supported only for fleets of type maintain
.
If the service returns an enum value that is not available in the current SDK version,
excessCapacityTerminationPolicy
will return
ExcessCapacityTerminationPolicy.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from excessCapacityTerminationPolicyAsString()
.
Supported only for fleets of type maintain
.
ExcessCapacityTerminationPolicy
public final Double fulfilledCapacity()
The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.
public final Double onDemandFulfilledCapacity()
The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.
public final String iamFleetRole()
The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the
permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot
Fleet prerequisites in the Amazon EC2 User Guide. Spot Fleet can terminate Spot Instances on your
behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests or when the Spot Fleet request expires, if you set
TerminateInstancesWithExpiration
.
TerminateInstancesWithExpiration
.public final boolean hasLaunchSpecifications()
isEmpty()
method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<SpotFleetLaunchSpecification> launchSpecifications()
The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
, you can't
specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request, you must use
LaunchTemplateConfigs
.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasLaunchSpecifications()
method.
LaunchSpecifications
,
you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
you must use LaunchTemplateConfigs
.public final boolean hasLaunchTemplateConfigs()
isEmpty()
method on the
property). This is useful because the SDK will never return a null collection or map, but you may need to
differentiate between the service returning nothing (or null) and the service returning an empty collection or
map. For requests, this returns true if a value for the property was specified in the request builder, and false
if a value was not specified.public final List<LaunchTemplateConfig> launchTemplateConfigs()
The launch template and overrides. If you specify LaunchTemplateConfigs
, you can't specify
LaunchSpecifications
. If you include On-Demand capacity in your request, you must use
LaunchTemplateConfigs
.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasLaunchTemplateConfigs()
method.
LaunchTemplateConfigs
, you can't specify
LaunchSpecifications
. If you include On-Demand capacity in your request, you must use
LaunchTemplateConfigs
.public final String spotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public final Integer targetCapacity()
The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of
instances or a performance characteristic that is important to your application workload, such as vCPUs, memory,
or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity
later.
maintain
, you can specify a target capacity of 0 and
add capacity later.public final Integer onDemandTargetCapacity()
The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a
performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the
request type is maintain
, you can specify a target capacity of 0 and add capacity later.
maintain
, you can specify a target capacity of 0 and add
capacity later.public final String onDemandMaxTotalPrice()
The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the
onDemandMaxTotalPrice
parameter, the spotMaxTotalPrice
parameter, or both parameters to
ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand
Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum
amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching
instances even if it hasn’t met the target capacity.
onDemandMaxTotalPrice
parameter, the spotMaxTotalPrice
parameter, or both
parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per
hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances
until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay
is reached, the fleet stops launching instances even if it hasn’t met the target capacity.public final String spotMaxTotalPrice()
The maximum amount per hour for Spot Instances that you're willing to pay. You can use the
spotdMaxTotalPrice
parameter, the onDemandMaxTotalPrice
parameter, or both parameters
to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand
Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum
amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching
instances even if it hasn’t met the target capacity.
spotdMaxTotalPrice
parameter, the onDemandMaxTotalPrice
parameter, or both
parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per
hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances
until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay
is reached, the fleet stops launching instances even if it hasn’t met the target capacity.public final Boolean terminateInstancesWithExpiration()
Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
public final FleetType type()
The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to
maintain it. When this value is request
, the Spot Fleet only places the required requests. It does
not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative
Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the
target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any
interrupted instances. Default: maintain
. instant
is listed but is not used by Spot
Fleet.
If the service returns an enum value that is not available in the current SDK version, type
will return
FleetType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
typeAsString()
.
request
, the Spot Fleet only places the required
requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit
requests in alternative Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet
capacity and automatically replenishes any interrupted instances. Default: maintain
.
instant
is listed but is not used by Spot Fleet.FleetType
public final String typeAsString()
The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to
maintain it. When this value is request
, the Spot Fleet only places the required requests. It does
not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative
Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the
target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any
interrupted instances. Default: maintain
. instant
is listed but is not used by Spot
Fleet.
If the service returns an enum value that is not available in the current SDK version, type
will return
FleetType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
typeAsString()
.
request
, the Spot Fleet only places the required
requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit
requests in alternative Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet
capacity and automatically replenishes any interrupted instances. Default: maintain
.
instant
is listed but is not used by Spot Fleet.FleetType
public final Instant validFrom()
The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). By default, Amazon EC2 starts fulfilling the request immediately.
public final Instant validUntil()
The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.
public final Boolean replaceUnhealthyInstances()
Indicates whether Spot Fleet should replace unhealthy instances.
public final InstanceInterruptionBehavior instanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted. The default is terminate
.
If the service returns an enum value that is not available in the current SDK version,
instanceInterruptionBehavior
will return InstanceInterruptionBehavior.UNKNOWN_TO_SDK_VERSION
.
The raw value returned by the service is available from instanceInterruptionBehaviorAsString()
.
terminate
.InstanceInterruptionBehavior
public final String instanceInterruptionBehaviorAsString()
The behavior when a Spot Instance is interrupted. The default is terminate
.
If the service returns an enum value that is not available in the current SDK version,
instanceInterruptionBehavior
will return InstanceInterruptionBehavior.UNKNOWN_TO_SDK_VERSION
.
The raw value returned by the service is available from instanceInterruptionBehaviorAsString()
.
terminate
.InstanceInterruptionBehavior
public final LoadBalancersConfig loadBalancersConfig()
One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.
With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.
With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.
public final Integer instancePoolsToUseCount()
The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot
AllocationStrategy is set to lowest-price
. Spot Fleet selects the cheapest Spot pools and
evenly allocates your target Spot capacity across the number of Spot pools that you specify.
Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.
lowest-price
. Spot Fleet selects the cheapest Spot pools
and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.
public final String context()
Reserved.
public final TargetCapacityUnitType targetCapacityUnitType()
The unit for the target capacity. TargetCapacityUnitType
can only be specified when
InstanceRequirements
is specified.
Default: units
(translates to number of instances)
If the service returns an enum value that is not available in the current SDK version,
targetCapacityUnitType
will return TargetCapacityUnitType.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from targetCapacityUnitTypeAsString()
.
TargetCapacityUnitType
can only be specified when
InstanceRequirements
is specified.
Default: units
(translates to number of instances)
TargetCapacityUnitType
public final String targetCapacityUnitTypeAsString()
The unit for the target capacity. TargetCapacityUnitType
can only be specified when
InstanceRequirements
is specified.
Default: units
(translates to number of instances)
If the service returns an enum value that is not available in the current SDK version,
targetCapacityUnitType
will return TargetCapacityUnitType.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from targetCapacityUnitTypeAsString()
.
TargetCapacityUnitType
can only be specified when
InstanceRequirements
is specified.
Default: units
(translates to number of instances)
TargetCapacityUnitType
public final boolean hasTagSpecifications()
isEmpty()
method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<TagSpecification> tagSpecifications()
The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
must
be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at launch, specify
the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the
SpotFleetTagSpecification
(valid only if you use LaunchSpecifications
). For information about tagging after launch, see Tagging Your
Resources.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTagSpecifications()
method.
ResourceType
must be spot-fleet-request
, otherwise the Spot Fleet request
fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the
SpotFleetTagSpecification
(valid only if you use LaunchSpecifications
). For information about tagging after launch,
see Tagging
Your Resources.public SpotFleetRequestConfigData.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<SpotFleetRequestConfigData.Builder,SpotFleetRequestConfigData>
public static SpotFleetRequestConfigData.Builder builder()
public static Class<? extends SpotFleetRequestConfigData.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields
in interface SdkPojo
public final String toString()
Copyright © 2023. All rights reserved.