@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 capacity across the Spot pools specified by the Spot Fleet request.
|
String |
allocationStrategyAsString()
Indicates how to allocate the target capacity across the Spot 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) |
ExcessCapacityTerminationPolicy |
excessCapacityTerminationPolicy()
Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is
decreased below the current size of the Spot Fleet.
|
String |
excessCapacityTerminationPolicyAsString()
Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is
decreased 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() |
String |
iamFleetRole()
Grants the Spot Fleet permission to 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 . |
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.
|
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 |
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.
|
Boolean |
terminateInstancesWithExpiration()
Indicates whether running Spot Instances should be terminated when the Spot Fleet request expires.
|
SpotFleetRequestConfigData.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
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 (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
Instant |
validUntil()
The end date and time of the request, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
copy
public AllocationStrategy allocationStrategy()
Indicates how to allocate the target capacity across the Spot pools specified by the Spot Fleet request. The
default is 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()
.
lowestPrice
.AllocationStrategy
public String allocationStrategyAsString()
Indicates how to allocate the target capacity across the Spot pools specified by the Spot Fleet request. The
default is 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()
.
lowestPrice
.AllocationStrategy
public 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 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 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 the target capacity of the Spot Fleet request is decreased 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()
.
ExcessCapacityTerminationPolicy
public String excessCapacityTerminationPolicyAsString()
Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is decreased 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()
.
ExcessCapacityTerminationPolicy
public 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()
Grants the Spot Fleet permission to 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 List<SpotFleetLaunchSpecification> launchSpecifications()
The launch specifications for the Spot Fleet request.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<LaunchTemplateConfig> launchTemplateConfigs()
The launch template and overrides.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
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. 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 Boolean terminateInstancesWithExpiration()
Indicates whether running Spot Instances should be 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. To maintain a certain target capacity, the Spot Fleet places the
required requests to meet capacity and automatically replenishes any interrupted instances. Default:
maintain
.
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. To maintain a certain target capacity,
the Spot Fleet places the required requests to meet capacity and automatically replenishes any
interrupted instances. Default: maintain
.FleetType
public 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. To maintain a certain target capacity, the Spot Fleet places the
required requests to meet capacity and automatically replenishes any interrupted instances. Default:
maintain
.
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. To maintain a certain target capacity,
the Spot Fleet places the required requests to meet capacity and automatically replenishes any
interrupted instances. Default: maintain
.FleetType
public Instant validFrom()
The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
public Instant validUntil()
The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new Spot Instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date.
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
.InstanceInterruptionBehavior
public 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 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()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<SpotFleetRequestConfigData.Builder,SpotFleetRequestConfigData>
public static SpotFleetRequestConfigData.Builder builder()
public static Class<? extends SpotFleetRequestConfigData.Builder> serializableBuilderClass()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.