/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes the configuration of a Spot Fleet request. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SpotFleetRequestConfigData implements Serializable, Cloneable { /** ** 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
*
* 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
.
*
* The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. *
*/ private SpotMaintenanceStrategies spotMaintenanceStrategies; /** ** 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. *
*/ private String clientToken; /** ** 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
.
*
* The number of units fulfilled by this request compared to the set target capacity. You cannot set this value. *
*/ private Double fulfilledCapacity; /** ** The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. *
*/ private Double onDemandFulfilledCapacity; /** *
* 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
.
*
* 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
.
*
* 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
.
*
* 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. *
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. *
*/ private Boolean terminateInstancesWithExpiration; /** *
* 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.
*
* 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. *
*/ private java.util.Date validFrom; /** ** 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. *
*/ private java.util.Date validUntil; /** ** Indicates whether Spot Fleet should replace unhealthy instances. *
*/ private Boolean replaceUnhealthyInstances; /** *
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
* 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. *
*/ private LoadBalancersConfig loadBalancersConfig; /** *
* 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. *
*/ private Integer instancePoolsToUseCount; /** ** Reserved. *
*/ private String context; /** *
* The unit for the target capacity. TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
*
* 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.
*
* 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
*
* 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
* @see AllocationStrategy
*/
public void setAllocationStrategy(String allocationStrategy) {
this.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
*
* 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
* @see AllocationStrategy
*/
public String getAllocationStrategy() {
return this.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
*
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see AllocationStrategy
*/
public SpotFleetRequestConfigData withAllocationStrategy(String allocationStrategy) {
setAllocationStrategy(allocationStrategy);
return this;
}
/**
*
* 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
*
* 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
* @see AllocationStrategy
*/
public void setAllocationStrategy(AllocationStrategy allocationStrategy) {
withAllocationStrategy(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
*
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see AllocationStrategy
*/
public SpotFleetRequestConfigData withAllocationStrategy(AllocationStrategy allocationStrategy) {
this.allocationStrategy = allocationStrategy.toString();
return this;
}
/**
*
* 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
.
*
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
.
* @see OnDemandAllocationStrategy
*/
public void setOnDemandAllocationStrategy(String onDemandAllocationStrategy) {
this.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
.
*
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
.
* @see OnDemandAllocationStrategy
*/
public String getOnDemandAllocationStrategy() {
return this.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
.
*
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
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see OnDemandAllocationStrategy
*/
public SpotFleetRequestConfigData withOnDemandAllocationStrategy(String onDemandAllocationStrategy) {
setOnDemandAllocationStrategy(onDemandAllocationStrategy);
return this;
}
/**
*
* 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
.
*
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
.
* @see OnDemandAllocationStrategy
*/
public void setOnDemandAllocationStrategy(OnDemandAllocationStrategy onDemandAllocationStrategy) {
withOnDemandAllocationStrategy(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
.
*
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
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see OnDemandAllocationStrategy
*/
public SpotFleetRequestConfigData withOnDemandAllocationStrategy(OnDemandAllocationStrategy onDemandAllocationStrategy) {
this.onDemandAllocationStrategy = onDemandAllocationStrategy.toString();
return this;
}
/**
* * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. *
* * @param spotMaintenanceStrategies * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. */ public void setSpotMaintenanceStrategies(SpotMaintenanceStrategies spotMaintenanceStrategies) { this.spotMaintenanceStrategies = spotMaintenanceStrategies; } /** ** The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. *
* * @return The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. */ public SpotMaintenanceStrategies getSpotMaintenanceStrategies() { return this.spotMaintenanceStrategies; } /** ** The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. *
* * @param spotMaintenanceStrategies * The strategies for managing your Spot Instances that are at an elevated risk of being interrupted. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withSpotMaintenanceStrategies(SpotMaintenanceStrategies spotMaintenanceStrategies) { setSpotMaintenanceStrategies(spotMaintenanceStrategies); return this; } /** ** 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. *
* * @param 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 void setClientToken(String clientToken) { this.clientToken = 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. *
* * @return 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 String getClientToken() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** 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
.
*
* Supported only for fleets of type maintain
.
* @see ExcessCapacityTerminationPolicy
*/
public void setExcessCapacityTerminationPolicy(String excessCapacityTerminationPolicy) {
this.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
.
*
* Supported only for fleets of type maintain
.
* @see ExcessCapacityTerminationPolicy
*/
public String getExcessCapacityTerminationPolicy() {
return this.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
.
*
* Supported only for fleets of type maintain
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ExcessCapacityTerminationPolicy
*/
public SpotFleetRequestConfigData withExcessCapacityTerminationPolicy(String excessCapacityTerminationPolicy) {
setExcessCapacityTerminationPolicy(excessCapacityTerminationPolicy);
return this;
}
/**
*
* 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
.
*
* Supported only for fleets of type maintain
.
* @see ExcessCapacityTerminationPolicy
*/
public void setExcessCapacityTerminationPolicy(ExcessCapacityTerminationPolicy excessCapacityTerminationPolicy) {
withExcessCapacityTerminationPolicy(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
.
*
* Supported only for fleets of type maintain
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ExcessCapacityTerminationPolicy
*/
public SpotFleetRequestConfigData withExcessCapacityTerminationPolicy(ExcessCapacityTerminationPolicy excessCapacityTerminationPolicy) {
this.excessCapacityTerminationPolicy = excessCapacityTerminationPolicy.toString();
return this;
}
/**
*
* The number of units fulfilled by this request compared to the set target capacity. You cannot set this value. *
* * @param fulfilledCapacity * The number of units fulfilled by this request compared to the set target capacity. You cannot set this * value. */ public void setFulfilledCapacity(Double fulfilledCapacity) { this.fulfilledCapacity = fulfilledCapacity; } /** ** The number of units fulfilled by this request compared to the set target capacity. You cannot set this value. *
* * @return The number of units fulfilled by this request compared to the set target capacity. You cannot set this * value. */ public Double getFulfilledCapacity() { return this.fulfilledCapacity; } /** ** The number of units fulfilled by this request compared to the set target capacity. You cannot set this value. *
* * @param fulfilledCapacity * The number of units fulfilled by this request compared to the set target capacity. You cannot set this * value. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withFulfilledCapacity(Double fulfilledCapacity) { setFulfilledCapacity(fulfilledCapacity); return this; } /** ** The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. *
* * @param onDemandFulfilledCapacity * The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. */ public void setOnDemandFulfilledCapacity(Double onDemandFulfilledCapacity) { this.onDemandFulfilledCapacity = onDemandFulfilledCapacity; } /** ** The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. *
* * @return The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. */ public Double getOnDemandFulfilledCapacity() { return this.onDemandFulfilledCapacity; } /** ** The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. *
* * @param onDemandFulfilledCapacity * The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withOnDemandFulfilledCapacity(Double onDemandFulfilledCapacity) { setOnDemandFulfilledCapacity(onDemandFulfilledCapacity); return this; } /** *
* 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 void setIamFleetRole(String iamFleetRole) {
this.iamFleetRole = 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 String getIamFleetRole() {
return this.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
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withIamFleetRole(String iamFleetRole) {
setIamFleetRole(iamFleetRole);
return this;
}
/**
*
* 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
.
*
LaunchSpecifications
,
* you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
* you must use LaunchTemplateConfigs
.
*/
public java.util.List
* 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
.
*
LaunchSpecifications
,
* you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
* you must use LaunchTemplateConfigs
.
*/
public void setLaunchSpecifications(java.util.Collection
* 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
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setLaunchSpecifications(java.util.Collection)} or {@link #withLaunchSpecifications(java.util.Collection)} * if you want to override the existing values. *
* * @param launchSpecifications * The launch specifications for the Spot Fleet request. If you specifyLaunchSpecifications
,
* you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
* you must use LaunchTemplateConfigs
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withLaunchSpecifications(SpotFleetLaunchSpecification... launchSpecifications) {
if (this.launchSpecifications == null) {
setLaunchSpecifications(new com.amazonaws.internal.SdkInternalList
* 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
.
*
LaunchSpecifications
,
* you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
* you must use LaunchTemplateConfigs
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withLaunchSpecifications(java.util.Collection
* 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
.
*
LaunchTemplateConfigs
, you can't specify
* LaunchSpecifications
. If you include On-Demand capacity in your request, you must use
* LaunchTemplateConfigs
.
*/
public java.util.List
* 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
.
*
LaunchTemplateConfigs
, you can't specify
* LaunchSpecifications
. If you include On-Demand capacity in your request, you must use
* LaunchTemplateConfigs
.
*/
public void setLaunchTemplateConfigs(java.util.Collection
* 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
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setLaunchTemplateConfigs(java.util.Collection)} or * {@link #withLaunchTemplateConfigs(java.util.Collection)} if you want to override the existing values. *
* * @param launchTemplateConfigs * The launch template and overrides. If you specifyLaunchTemplateConfigs
, you can't specify
* LaunchSpecifications
. If you include On-Demand capacity in your request, you must use
* LaunchTemplateConfigs
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withLaunchTemplateConfigs(LaunchTemplateConfig... launchTemplateConfigs) {
if (this.launchTemplateConfigs == null) {
setLaunchTemplateConfigs(new com.amazonaws.internal.SdkInternalList
* 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
.
*
LaunchTemplateConfigs
, you can't specify
* LaunchSpecifications
. If you include On-Demand capacity in your request, you must use
* LaunchTemplateConfigs
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withLaunchTemplateConfigs(java.util.Collection* 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 void setSpotPrice(String spotPrice) { this.spotPrice = 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 String getSpotPrice() { return this.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. *
* @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withSpotPrice(String spotPrice) { setSpotPrice(spotPrice); return this; } /** *
* 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 void setTargetCapacity(Integer targetCapacity) {
this.targetCapacity = 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 getTargetCapacity() {
return this.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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withTargetCapacity(Integer targetCapacity) {
setTargetCapacity(targetCapacity);
return this;
}
/**
*
* 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 void setOnDemandTargetCapacity(Integer onDemandTargetCapacity) {
this.onDemandTargetCapacity = 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 Integer getOnDemandTargetCapacity() {
return this.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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withOnDemandTargetCapacity(Integer onDemandTargetCapacity) {
setOnDemandTargetCapacity(onDemandTargetCapacity);
return this;
}
/**
*
* 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 void setOnDemandMaxTotalPrice(String onDemandMaxTotalPrice) {
this.onDemandMaxTotalPrice = 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 getOnDemandMaxTotalPrice() {
return this.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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withOnDemandMaxTotalPrice(String onDemandMaxTotalPrice) {
setOnDemandMaxTotalPrice(onDemandMaxTotalPrice);
return this;
}
/**
*
* 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 void setSpotMaxTotalPrice(String spotMaxTotalPrice) {
this.spotMaxTotalPrice = 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 String getSpotMaxTotalPrice() {
return this.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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withSpotMaxTotalPrice(String spotMaxTotalPrice) {
setSpotMaxTotalPrice(spotMaxTotalPrice);
return this;
}
/**
* * Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. *
* * @param terminateInstancesWithExpiration * Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. */ public void setTerminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration) { this.terminateInstancesWithExpiration = terminateInstancesWithExpiration; } /** ** Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. *
* * @return Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. */ public Boolean getTerminateInstancesWithExpiration() { return this.terminateInstancesWithExpiration; } /** ** Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. *
* * @param terminateInstancesWithExpiration * Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withTerminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration) { setTerminateInstancesWithExpiration(terminateInstancesWithExpiration); return this; } /** ** Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. *
* * @return Indicates whether running Spot Instances are terminated when the Spot Fleet request expires. */ public Boolean isTerminateInstancesWithExpiration() { return this.terminateInstancesWithExpiration; } /** *
* 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.
*
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.
* @see FleetType
*/
public void setType(String type) {
this.type = 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.
*
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.
* @see FleetType
*/
public String getType() {
return this.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.
*
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.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FleetType
*/
public SpotFleetRequestConfigData withType(String type) {
setType(type);
return this;
}
/**
*
* 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.
*
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.
* @see FleetType
*/
public void setType(FleetType type) {
withType(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.
*
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.
* @return Returns a reference to this object so that method calls can be chained together.
* @see FleetType
*/
public SpotFleetRequestConfigData withType(FleetType type) {
this.type = type.toString();
return this;
}
/**
* * 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. *
* * @param 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 void setValidFrom(java.util.Date validFrom) { this.validFrom = 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. *
* * @return 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 java.util.Date getValidFrom() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withValidFrom(java.util.Date validFrom) { setValidFrom(validFrom); return this; } /** ** 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. *
* * @param 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 void setValidUntil(java.util.Date validUntil) { this.validUntil = 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. *
* * @return 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 java.util.Date getValidUntil() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withValidUntil(java.util.Date validUntil) { setValidUntil(validUntil); return this; } /** ** Indicates whether Spot Fleet should replace unhealthy instances. *
* * @param replaceUnhealthyInstances * Indicates whether Spot Fleet should replace unhealthy instances. */ public void setReplaceUnhealthyInstances(Boolean replaceUnhealthyInstances) { this.replaceUnhealthyInstances = replaceUnhealthyInstances; } /** ** Indicates whether Spot Fleet should replace unhealthy instances. *
* * @return Indicates whether Spot Fleet should replace unhealthy instances. */ public Boolean getReplaceUnhealthyInstances() { return this.replaceUnhealthyInstances; } /** ** Indicates whether Spot Fleet should replace unhealthy instances. *
* * @param replaceUnhealthyInstances * Indicates whether Spot Fleet should replace unhealthy instances. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withReplaceUnhealthyInstances(Boolean replaceUnhealthyInstances) { setReplaceUnhealthyInstances(replaceUnhealthyInstances); return this; } /** ** Indicates whether Spot Fleet should replace unhealthy instances. *
* * @return Indicates whether Spot Fleet should replace unhealthy instances. */ public Boolean isReplaceUnhealthyInstances() { return this.replaceUnhealthyInstances; } /** *
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
terminate
.
* @see InstanceInterruptionBehavior
*/
public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior) {
this.instanceInterruptionBehavior = instanceInterruptionBehavior;
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
terminate
.
* @see InstanceInterruptionBehavior
*/
public String getInstanceInterruptionBehavior() {
return this.instanceInterruptionBehavior;
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
terminate
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceInterruptionBehavior
*/
public SpotFleetRequestConfigData withInstanceInterruptionBehavior(String instanceInterruptionBehavior) {
setInstanceInterruptionBehavior(instanceInterruptionBehavior);
return this;
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
terminate
.
* @see InstanceInterruptionBehavior
*/
public void setInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior) {
withInstanceInterruptionBehavior(instanceInterruptionBehavior);
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
terminate
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceInterruptionBehavior
*/
public SpotFleetRequestConfigData withInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior) {
this.instanceInterruptionBehavior = instanceInterruptionBehavior.toString();
return this;
}
/**
* * 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. *
* * @param 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. */ public void setLoadBalancersConfig(LoadBalancersConfig loadBalancersConfig) { this.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. *
* * @return 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. */ public LoadBalancersConfig getLoadBalancersConfig() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withLoadBalancersConfig(LoadBalancersConfig loadBalancersConfig) { setLoadBalancersConfig(loadBalancersConfig); return this; } /** *
* 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. *
* * @param instancePoolsToUseCount * The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot * AllocationStrategy is set tolowest-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 void setInstancePoolsToUseCount(Integer instancePoolsToUseCount) { this.instancePoolsToUseCount = 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. *
* * @return The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot * AllocationStrategy is set tolowest-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 Integer getInstancePoolsToUseCount() { return this.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. *
* * @param instancePoolsToUseCount * The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot * AllocationStrategy is set tolowest-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. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withInstancePoolsToUseCount(Integer instancePoolsToUseCount) { setInstancePoolsToUseCount(instancePoolsToUseCount); return this; } /** *
* Reserved. *
* * @param context * Reserved. */ public void setContext(String context) { this.context = context; } /** ** Reserved. *
* * @return Reserved. */ public String getContext() { return this.context; } /** ** Reserved. *
* * @param context * Reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public SpotFleetRequestConfigData withContext(String context) { setContext(context); return this; } /** *
* The unit for the target capacity. TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
*
TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
* @see TargetCapacityUnitType
*/
public void setTargetCapacityUnitType(String targetCapacityUnitType) {
this.targetCapacityUnitType = targetCapacityUnitType;
}
/**
*
* The unit for the target capacity. TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
*
TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
* @see TargetCapacityUnitType
*/
public String getTargetCapacityUnitType() {
return this.targetCapacityUnitType;
}
/**
*
* The unit for the target capacity. TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
*
TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
* @return Returns a reference to this object so that method calls can be chained together.
* @see TargetCapacityUnitType
*/
public SpotFleetRequestConfigData withTargetCapacityUnitType(String targetCapacityUnitType) {
setTargetCapacityUnitType(targetCapacityUnitType);
return this;
}
/**
*
* The unit for the target capacity. TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
*
TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
* @see TargetCapacityUnitType
*/
public void setTargetCapacityUnitType(TargetCapacityUnitType targetCapacityUnitType) {
withTargetCapacityUnitType(targetCapacityUnitType);
}
/**
*
* The unit for the target capacity. TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
*
TargetCapacityUnitType
can only be specified when
* InstanceRequirements
is specified.
*
* Default: units
(translates to number of instances)
* @return Returns a reference to this object so that method calls can be chained together.
* @see TargetCapacityUnitType
*/
public SpotFleetRequestConfigData withTargetCapacityUnitType(TargetCapacityUnitType targetCapacityUnitType) {
this.targetCapacityUnitType = targetCapacityUnitType.toString();
return this;
}
/**
*
* 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.
*
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 java.util.List
* 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.
*
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 void setTagSpecifications(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The key-value pair for tagging the Spot Fleet request on creation. The value forResourceType
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withTagSpecifications(TagSpecification... tagSpecifications) {
if (this.tagSpecifications == null) {
setTagSpecifications(new com.amazonaws.internal.SdkInternalList
* 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.
*
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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withTagSpecifications(java.util.Collection