@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()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot
Fleet request.
|
String |
allocationStrategyAsString()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot
Fleet request.
|
static SpotFleetRequestConfigData.Builder |
builder() |
String |
clientToken()
A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
ExcessCapacityTerminationPolicy |
excessCapacityTerminationPolicy()
Indicates whether running Spot 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 Spot 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()
Returns true if the LaunchSpecifications property was specified by the sender (it may be empty), or false if the
sender did not specify the value (it will be empty).
|
boolean |
hasLaunchTemplateConfigs()
Returns true if the LaunchTemplateConfigs property was specified by the sender (it may be empty), or false if the
sender did not specify the value (it will be empty).
|
String |
iamFleetRole()
The Amazon Resource Name (ARN) of an AWS 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() |
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.
|
Integer |
targetCapacity()
The number of units to request for the Spot Fleet.
|
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, waitcopypublic AllocationStrategy allocationStrategy()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.
If the allocation strategy is lowestPrice, Spot Fleet launches instances from the Spot Instance
pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified, Spot Fleet launches instances from all the Spot Instance
pools that you specify.
If the allocation strategy is capacityOptimized, Spot Fleet launches instances from Spot Instance
pools with optimal capacity for the number of instances that are launching.
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().
If the allocation strategy is lowestPrice, Spot Fleet launches instances from the Spot
Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified, Spot Fleet launches instances from all the Spot
Instance pools that you specify.
If the allocation strategy is capacityOptimized, Spot Fleet launches instances from Spot
Instance pools with optimal capacity for the number of instances that are launching.
AllocationStrategypublic String allocationStrategyAsString()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.
If the allocation strategy is lowestPrice, Spot Fleet launches instances from the Spot Instance
pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified, Spot Fleet launches instances from all the Spot Instance
pools that you specify.
If the allocation strategy is capacityOptimized, Spot Fleet launches instances from Spot Instance
pools with optimal capacity for the number of instances that are launching.
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().
If the allocation strategy is lowestPrice, Spot Fleet launches instances from the Spot
Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified, Spot Fleet launches instances from all the Spot
Instance pools that you specify.
If the allocation strategy is capacityOptimized, Spot Fleet launches instances from Spot
Instance pools with optimal capacity for the number of instances that are launching.
AllocationStrategypublic 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.OnDemandAllocationStrategypublic 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.OnDemandAllocationStrategypublic 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 ExcessCapacityTerminationPolicy excessCapacityTerminationPolicy()
Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
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().
ExcessCapacityTerminationPolicypublic String excessCapacityTerminationPolicyAsString()
Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
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().
ExcessCapacityTerminationPolicypublic Double fulfilledCapacity()
The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.
public Double onDemandFulfilledCapacity()
The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.
public String iamFleetRole()
The Amazon Resource Name (ARN) of an AWS 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 for Linux Instances. 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 boolean hasLaunchSpecifications()
public 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.
You can use hasLaunchSpecifications() to see if a value was sent in this field.
LaunchSpecifications,
you can't specify LaunchTemplateConfigs. If you include On-Demand capacity in your request,
you must use LaunchTemplateConfigs.public boolean hasLaunchTemplateConfigs()
public 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.
You can use hasLaunchTemplateConfigs() to see if a value was sent in this field.
LaunchTemplateConfigs, you can't specify
LaunchSpecifications. If you include On-Demand capacity in your request, you must use
LaunchTemplateConfigs.public String spotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance. The default is the On-Demand price.
public 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 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 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 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 Boolean terminateInstancesWithExpiration()
Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
public 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.FleetTypepublic 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.FleetTypepublic 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 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 Boolean replaceUnhealthyInstances()
Indicates whether Spot Fleet should replace unhealthy instances.
public 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.InstanceInterruptionBehaviorpublic 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.InstanceInterruptionBehaviorpublic 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 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.
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.public SpotFleetRequestConfigData.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<SpotFleetRequestConfigData.Builder,SpotFleetRequestConfigData>public static SpotFleetRequestConfigData.Builder builder()
public static Class<? extends SpotFleetRequestConfigData.Builder> serializableBuilderClass()
public boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic String toString()
Copyright © 2020. All rights reserved.