com.amazonaws.services.ec2.model.SpotFleetRequestConfigData Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* 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.
*
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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
*
*/
private String allocationStrategy;
/**
*
* 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
.
*
*/
private String onDemandAllocationStrategy;
/**
*
* 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
.
*
*/
private String excessCapacityTerminationPolicy;
/**
*
* 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
.
*
*/
private String iamFleetRole;
/**
*
* 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
.
*
*/
private com.amazonaws.internal.SdkInternalList launchSpecifications;
/**
*
* 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
.
*
*/
private com.amazonaws.internal.SdkInternalList 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.
*
*
*/
private String spotPrice;
/**
*
* 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.
*
*/
private Integer targetCapacity;
/**
*
* 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.
*
*/
private Integer onDemandTargetCapacity;
/**
*
* 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.
*
*/
private String onDemandMaxTotalPrice;
/**
*
* 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.
*
*/
private String spotMaxTotalPrice;
/**
*
* 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.
*
*/
private String type;
/**
*
* 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
.
*
*/
private String instanceInterruptionBehavior;
/**
*
* 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)
*
*/
private String targetCapacityUnitType;
/**
*
* 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.
*
*/
private com.amazonaws.internal.SdkInternalList tagSpecifications;
/**
*
* 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.
*
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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
*
*
* @param 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.
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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.
*
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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 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.
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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.
*
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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
*
*
* @param 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.
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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.
*
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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
*
*
* @param 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.
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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.
*
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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
*
*
* @param 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.
*
* - priceCapacityOptimized (recommended)
* -
*
* 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.
*
*
* - capacityOptimized
* -
*
* 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.
*
*
* - diversified
* -
*
* Spot Fleet requests instances from all of the Spot Instance pools that you specify.
*
*
* - lowestPrice
* -
*
* 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
.
*
*
* @param 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
.
* @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
.
*
*
* @return 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @return 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @param 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
.
* @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
.
*
*
* @param 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
.
*/
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
.
*
*
* @return 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
.
*/
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
.
*
*
* @param 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
.
* @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
.
*
*
* @return 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
.
*/
public java.util.List getLaunchSpecifications() {
if (launchSpecifications == null) {
launchSpecifications = new com.amazonaws.internal.SdkInternalList();
}
return launchSpecifications;
}
/**
*
* The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
, you can't
* specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request, you must use
* LaunchTemplateConfigs
.
*
*
* @param launchSpecifications
* The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
,
* you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
* you must use LaunchTemplateConfigs
.
*/
public void setLaunchSpecifications(java.util.Collection launchSpecifications) {
if (launchSpecifications == null) {
this.launchSpecifications = null;
return;
}
this.launchSpecifications = new com.amazonaws.internal.SdkInternalList(launchSpecifications);
}
/**
*
* The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
, you can't
* specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request, you must use
* LaunchTemplateConfigs
.
*
*
* 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 specify 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(SpotFleetLaunchSpecification... launchSpecifications) {
if (this.launchSpecifications == null) {
setLaunchSpecifications(new com.amazonaws.internal.SdkInternalList(launchSpecifications.length));
}
for (SpotFleetLaunchSpecification ele : launchSpecifications) {
this.launchSpecifications.add(ele);
}
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
.
*
*
* @param launchSpecifications
* The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
,
* you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request,
* you must use LaunchTemplateConfigs
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withLaunchSpecifications(java.util.Collection launchSpecifications) {
setLaunchSpecifications(launchSpecifications);
return this;
}
/**
*
* 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
.
*
*
* @return 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
.
*/
public java.util.List getLaunchTemplateConfigs() {
if (launchTemplateConfigs == null) {
launchTemplateConfigs = new com.amazonaws.internal.SdkInternalList();
}
return 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
.
*
*
* @param 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
.
*/
public void setLaunchTemplateConfigs(java.util.Collection launchTemplateConfigs) {
if (launchTemplateConfigs == null) {
this.launchTemplateConfigs = null;
return;
}
this.launchTemplateConfigs = new com.amazonaws.internal.SdkInternalList(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
.
*
*
* 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 specify 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(LaunchTemplateConfig... launchTemplateConfigs) {
if (this.launchTemplateConfigs == null) {
setLaunchTemplateConfigs(new com.amazonaws.internal.SdkInternalList(launchTemplateConfigs.length));
}
for (LaunchTemplateConfig ele : launchTemplateConfigs) {
this.launchTemplateConfigs.add(ele);
}
return this;
}
/**
*
* 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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withLaunchTemplateConfigs(java.util.Collection launchTemplateConfigs) {
setLaunchTemplateConfigs(launchTemplateConfigs);
return this;
}
/**
*
* 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.
*
*
*
* @param 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.
*
*/
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.
*
*
*
* @return 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.
*
*/
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.
*
*
*
* @param 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.
*
* @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.
*
*
* @param 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.
*/
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.
*
*
* @return 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.
*/
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.
*
*
* @param 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.
* @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.
*
*
* @param 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.
*/
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.
*
*
* @return 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.
*/
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.
*
*
* @param 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.
* @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.
*
*
* @param 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.
*/
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.
*
*
* @return 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.
*/
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.
*
*
* @param 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.
* @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.
*
*
* @param 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.
*/
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.
*
*
* @return 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.
*/
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.
*
*
* @param 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.
* @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.
*
*
* @param 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.
* @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.
*
*
* @return 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.
* @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.
*
*
* @param 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.
* @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.
*
*
* @param 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.
* @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.
*
*
* @param 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.
* @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
.
*
*
* @param instanceInterruptionBehavior
* The behavior when a Spot Instance is interrupted. The default is terminate
.
* @see InstanceInterruptionBehavior
*/
public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior) {
this.instanceInterruptionBehavior = instanceInterruptionBehavior;
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
*
* @return The behavior when a Spot Instance is interrupted. The default is terminate
.
* @see InstanceInterruptionBehavior
*/
public String getInstanceInterruptionBehavior() {
return this.instanceInterruptionBehavior;
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
*
* @param instanceInterruptionBehavior
* The behavior when a Spot Instance is interrupted. The default is 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
.
*
*
* @param instanceInterruptionBehavior
* The behavior when a Spot Instance is interrupted. The default is terminate
.
* @see InstanceInterruptionBehavior
*/
public void setInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior) {
withInstanceInterruptionBehavior(instanceInterruptionBehavior);
}
/**
*
* The behavior when a Spot Instance is interrupted. The default is terminate
.
*
*
* @param instanceInterruptionBehavior
* The behavior when a Spot Instance is interrupted. The default is 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 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.
*/
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 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.
*/
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 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 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)
*
*
* @param targetCapacityUnitType
* The unit for the target capacity. 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)
*
*
* @return The unit for the target capacity. 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)
*
*
* @param targetCapacityUnitType
* The unit for the target capacity. 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)
*
*
* @param targetCapacityUnitType
* The unit for the target capacity. 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)
*
*
* @param targetCapacityUnitType
* The unit for the target capacity. 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.
*
*
* @return 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.
*/
public java.util.List getTagSpecifications() {
if (tagSpecifications == null) {
tagSpecifications = new com.amazonaws.internal.SdkInternalList();
}
return tagSpecifications;
}
/**
*
* The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
must
* be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at launch, specify
* the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the
* SpotFleetTagSpecification
* (valid only if you use LaunchSpecifications
). For information about tagging after launch, see Tagging Your
* Resources.
*
*
* @param tagSpecifications
* The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
* must be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at
* launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the
* SpotFleetTagSpecification
* (valid only if you use LaunchSpecifications
). For information about tagging after launch, see
* Tagging Your
* Resources.
*/
public void setTagSpecifications(java.util.Collection tagSpecifications) {
if (tagSpecifications == null) {
this.tagSpecifications = null;
return;
}
this.tagSpecifications = new com.amazonaws.internal.SdkInternalList(tagSpecifications);
}
/**
*
* The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
must
* be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at launch, specify
* the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the
* SpotFleetTagSpecification
* (valid only if you use LaunchSpecifications
). For information about tagging after launch, see Tagging Your
* Resources.
*
*
* 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 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.
* @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(tagSpecifications.length));
}
for (TagSpecification ele : tagSpecifications) {
this.tagSpecifications.add(ele);
}
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.
*
*
* @param tagSpecifications
* The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
* must be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at
* launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the
* SpotFleetTagSpecification
* (valid only if you use LaunchSpecifications
). For information about tagging after launch, see
* Tagging Your
* Resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SpotFleetRequestConfigData withTagSpecifications(java.util.Collection tagSpecifications) {
setTagSpecifications(tagSpecifications);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAllocationStrategy() != null)
sb.append("AllocationStrategy: ").append(getAllocationStrategy()).append(",");
if (getOnDemandAllocationStrategy() != null)
sb.append("OnDemandAllocationStrategy: ").append(getOnDemandAllocationStrategy()).append(",");
if (getSpotMaintenanceStrategies() != null)
sb.append("SpotMaintenanceStrategies: ").append(getSpotMaintenanceStrategies()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getExcessCapacityTerminationPolicy() != null)
sb.append("ExcessCapacityTerminationPolicy: ").append(getExcessCapacityTerminationPolicy()).append(",");
if (getFulfilledCapacity() != null)
sb.append("FulfilledCapacity: ").append(getFulfilledCapacity()).append(",");
if (getOnDemandFulfilledCapacity() != null)
sb.append("OnDemandFulfilledCapacity: ").append(getOnDemandFulfilledCapacity()).append(",");
if (getIamFleetRole() != null)
sb.append("IamFleetRole: ").append(getIamFleetRole()).append(",");
if (getLaunchSpecifications() != null)
sb.append("LaunchSpecifications: ").append(getLaunchSpecifications()).append(",");
if (getLaunchTemplateConfigs() != null)
sb.append("LaunchTemplateConfigs: ").append(getLaunchTemplateConfigs()).append(",");
if (getSpotPrice() != null)
sb.append("SpotPrice: ").append(getSpotPrice()).append(",");
if (getTargetCapacity() != null)
sb.append("TargetCapacity: ").append(getTargetCapacity()).append(",");
if (getOnDemandTargetCapacity() != null)
sb.append("OnDemandTargetCapacity: ").append(getOnDemandTargetCapacity()).append(",");
if (getOnDemandMaxTotalPrice() != null)
sb.append("OnDemandMaxTotalPrice: ").append(getOnDemandMaxTotalPrice()).append(",");
if (getSpotMaxTotalPrice() != null)
sb.append("SpotMaxTotalPrice: ").append(getSpotMaxTotalPrice()).append(",");
if (getTerminateInstancesWithExpiration() != null)
sb.append("TerminateInstancesWithExpiration: ").append(getTerminateInstancesWithExpiration()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getValidFrom() != null)
sb.append("ValidFrom: ").append(getValidFrom()).append(",");
if (getValidUntil() != null)
sb.append("ValidUntil: ").append(getValidUntil()).append(",");
if (getReplaceUnhealthyInstances() != null)
sb.append("ReplaceUnhealthyInstances: ").append(getReplaceUnhealthyInstances()).append(",");
if (getInstanceInterruptionBehavior() != null)
sb.append("InstanceInterruptionBehavior: ").append(getInstanceInterruptionBehavior()).append(",");
if (getLoadBalancersConfig() != null)
sb.append("LoadBalancersConfig: ").append(getLoadBalancersConfig()).append(",");
if (getInstancePoolsToUseCount() != null)
sb.append("InstancePoolsToUseCount: ").append(getInstancePoolsToUseCount()).append(",");
if (getContext() != null)
sb.append("Context: ").append(getContext()).append(",");
if (getTargetCapacityUnitType() != null)
sb.append("TargetCapacityUnitType: ").append(getTargetCapacityUnitType()).append(",");
if (getTagSpecifications() != null)
sb.append("TagSpecifications: ").append(getTagSpecifications());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SpotFleetRequestConfigData == false)
return false;
SpotFleetRequestConfigData other = (SpotFleetRequestConfigData) obj;
if (other.getAllocationStrategy() == null ^ this.getAllocationStrategy() == null)
return false;
if (other.getAllocationStrategy() != null && other.getAllocationStrategy().equals(this.getAllocationStrategy()) == false)
return false;
if (other.getOnDemandAllocationStrategy() == null ^ this.getOnDemandAllocationStrategy() == null)
return false;
if (other.getOnDemandAllocationStrategy() != null && other.getOnDemandAllocationStrategy().equals(this.getOnDemandAllocationStrategy()) == false)
return false;
if (other.getSpotMaintenanceStrategies() == null ^ this.getSpotMaintenanceStrategies() == null)
return false;
if (other.getSpotMaintenanceStrategies() != null && other.getSpotMaintenanceStrategies().equals(this.getSpotMaintenanceStrategies()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getExcessCapacityTerminationPolicy() == null ^ this.getExcessCapacityTerminationPolicy() == null)
return false;
if (other.getExcessCapacityTerminationPolicy() != null
&& other.getExcessCapacityTerminationPolicy().equals(this.getExcessCapacityTerminationPolicy()) == false)
return false;
if (other.getFulfilledCapacity() == null ^ this.getFulfilledCapacity() == null)
return false;
if (other.getFulfilledCapacity() != null && other.getFulfilledCapacity().equals(this.getFulfilledCapacity()) == false)
return false;
if (other.getOnDemandFulfilledCapacity() == null ^ this.getOnDemandFulfilledCapacity() == null)
return false;
if (other.getOnDemandFulfilledCapacity() != null && other.getOnDemandFulfilledCapacity().equals(this.getOnDemandFulfilledCapacity()) == false)
return false;
if (other.getIamFleetRole() == null ^ this.getIamFleetRole() == null)
return false;
if (other.getIamFleetRole() != null && other.getIamFleetRole().equals(this.getIamFleetRole()) == false)
return false;
if (other.getLaunchSpecifications() == null ^ this.getLaunchSpecifications() == null)
return false;
if (other.getLaunchSpecifications() != null && other.getLaunchSpecifications().equals(this.getLaunchSpecifications()) == false)
return false;
if (other.getLaunchTemplateConfigs() == null ^ this.getLaunchTemplateConfigs() == null)
return false;
if (other.getLaunchTemplateConfigs() != null && other.getLaunchTemplateConfigs().equals(this.getLaunchTemplateConfigs()) == false)
return false;
if (other.getSpotPrice() == null ^ this.getSpotPrice() == null)
return false;
if (other.getSpotPrice() != null && other.getSpotPrice().equals(this.getSpotPrice()) == false)
return false;
if (other.getTargetCapacity() == null ^ this.getTargetCapacity() == null)
return false;
if (other.getTargetCapacity() != null && other.getTargetCapacity().equals(this.getTargetCapacity()) == false)
return false;
if (other.getOnDemandTargetCapacity() == null ^ this.getOnDemandTargetCapacity() == null)
return false;
if (other.getOnDemandTargetCapacity() != null && other.getOnDemandTargetCapacity().equals(this.getOnDemandTargetCapacity()) == false)
return false;
if (other.getOnDemandMaxTotalPrice() == null ^ this.getOnDemandMaxTotalPrice() == null)
return false;
if (other.getOnDemandMaxTotalPrice() != null && other.getOnDemandMaxTotalPrice().equals(this.getOnDemandMaxTotalPrice()) == false)
return false;
if (other.getSpotMaxTotalPrice() == null ^ this.getSpotMaxTotalPrice() == null)
return false;
if (other.getSpotMaxTotalPrice() != null && other.getSpotMaxTotalPrice().equals(this.getSpotMaxTotalPrice()) == false)
return false;
if (other.getTerminateInstancesWithExpiration() == null ^ this.getTerminateInstancesWithExpiration() == null)
return false;
if (other.getTerminateInstancesWithExpiration() != null
&& other.getTerminateInstancesWithExpiration().equals(this.getTerminateInstancesWithExpiration()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getValidFrom() == null ^ this.getValidFrom() == null)
return false;
if (other.getValidFrom() != null && other.getValidFrom().equals(this.getValidFrom()) == false)
return false;
if (other.getValidUntil() == null ^ this.getValidUntil() == null)
return false;
if (other.getValidUntil() != null && other.getValidUntil().equals(this.getValidUntil()) == false)
return false;
if (other.getReplaceUnhealthyInstances() == null ^ this.getReplaceUnhealthyInstances() == null)
return false;
if (other.getReplaceUnhealthyInstances() != null && other.getReplaceUnhealthyInstances().equals(this.getReplaceUnhealthyInstances()) == false)
return false;
if (other.getInstanceInterruptionBehavior() == null ^ this.getInstanceInterruptionBehavior() == null)
return false;
if (other.getInstanceInterruptionBehavior() != null && other.getInstanceInterruptionBehavior().equals(this.getInstanceInterruptionBehavior()) == false)
return false;
if (other.getLoadBalancersConfig() == null ^ this.getLoadBalancersConfig() == null)
return false;
if (other.getLoadBalancersConfig() != null && other.getLoadBalancersConfig().equals(this.getLoadBalancersConfig()) == false)
return false;
if (other.getInstancePoolsToUseCount() == null ^ this.getInstancePoolsToUseCount() == null)
return false;
if (other.getInstancePoolsToUseCount() != null && other.getInstancePoolsToUseCount().equals(this.getInstancePoolsToUseCount()) == false)
return false;
if (other.getContext() == null ^ this.getContext() == null)
return false;
if (other.getContext() != null && other.getContext().equals(this.getContext()) == false)
return false;
if (other.getTargetCapacityUnitType() == null ^ this.getTargetCapacityUnitType() == null)
return false;
if (other.getTargetCapacityUnitType() != null && other.getTargetCapacityUnitType().equals(this.getTargetCapacityUnitType()) == false)
return false;
if (other.getTagSpecifications() == null ^ this.getTagSpecifications() == null)
return false;
if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAllocationStrategy() == null) ? 0 : getAllocationStrategy().hashCode());
hashCode = prime * hashCode + ((getOnDemandAllocationStrategy() == null) ? 0 : getOnDemandAllocationStrategy().hashCode());
hashCode = prime * hashCode + ((getSpotMaintenanceStrategies() == null) ? 0 : getSpotMaintenanceStrategies().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getExcessCapacityTerminationPolicy() == null) ? 0 : getExcessCapacityTerminationPolicy().hashCode());
hashCode = prime * hashCode + ((getFulfilledCapacity() == null) ? 0 : getFulfilledCapacity().hashCode());
hashCode = prime * hashCode + ((getOnDemandFulfilledCapacity() == null) ? 0 : getOnDemandFulfilledCapacity().hashCode());
hashCode = prime * hashCode + ((getIamFleetRole() == null) ? 0 : getIamFleetRole().hashCode());
hashCode = prime * hashCode + ((getLaunchSpecifications() == null) ? 0 : getLaunchSpecifications().hashCode());
hashCode = prime * hashCode + ((getLaunchTemplateConfigs() == null) ? 0 : getLaunchTemplateConfigs().hashCode());
hashCode = prime * hashCode + ((getSpotPrice() == null) ? 0 : getSpotPrice().hashCode());
hashCode = prime * hashCode + ((getTargetCapacity() == null) ? 0 : getTargetCapacity().hashCode());
hashCode = prime * hashCode + ((getOnDemandTargetCapacity() == null) ? 0 : getOnDemandTargetCapacity().hashCode());
hashCode = prime * hashCode + ((getOnDemandMaxTotalPrice() == null) ? 0 : getOnDemandMaxTotalPrice().hashCode());
hashCode = prime * hashCode + ((getSpotMaxTotalPrice() == null) ? 0 : getSpotMaxTotalPrice().hashCode());
hashCode = prime * hashCode + ((getTerminateInstancesWithExpiration() == null) ? 0 : getTerminateInstancesWithExpiration().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getValidFrom() == null) ? 0 : getValidFrom().hashCode());
hashCode = prime * hashCode + ((getValidUntil() == null) ? 0 : getValidUntil().hashCode());
hashCode = prime * hashCode + ((getReplaceUnhealthyInstances() == null) ? 0 : getReplaceUnhealthyInstances().hashCode());
hashCode = prime * hashCode + ((getInstanceInterruptionBehavior() == null) ? 0 : getInstanceInterruptionBehavior().hashCode());
hashCode = prime * hashCode + ((getLoadBalancersConfig() == null) ? 0 : getLoadBalancersConfig().hashCode());
hashCode = prime * hashCode + ((getInstancePoolsToUseCount() == null) ? 0 : getInstancePoolsToUseCount().hashCode());
hashCode = prime * hashCode + ((getContext() == null) ? 0 : getContext().hashCode());
hashCode = prime * hashCode + ((getTargetCapacityUnitType() == null) ? 0 : getTargetCapacityUnitType().hashCode());
hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode());
return hashCode;
}
@Override
public SpotFleetRequestConfigData clone() {
try {
return (SpotFleetRequestConfigData) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}