@Stability(value=Stable)
public static interface CfnEC2Fleet.SpotOptionsRequestProperty
extends software.amazon.jsii.JsiiSerializable
SpotOptionsRequest is a property of the AWS::EC2::EC2Fleet resource.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
SpotOptionsRequestProperty spotOptionsRequestProperty = SpotOptionsRequestProperty.builder()
.allocationStrategy("allocationStrategy")
.instanceInterruptionBehavior("instanceInterruptionBehavior")
.instancePoolsToUseCount(123)
.maintenanceStrategies(MaintenanceStrategiesProperty.builder()
.capacityRebalance(CapacityRebalanceProperty.builder()
.replacementStrategy("replacementStrategy")
.terminationDelay(123)
.build())
.build())
.maxTotalPrice("maxTotalPrice")
.minTargetCapacity(123)
.singleAvailabilityZone(false)
.singleInstanceType(false)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnEC2Fleet.SpotOptionsRequestProperty.Builder
A builder for
CfnEC2Fleet.SpotOptionsRequestProperty |
static class |
CfnEC2Fleet.SpotOptionsRequestProperty.Jsii$Proxy
An implementation for
CfnEC2Fleet.SpotOptionsRequestProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnEC2Fleet.SpotOptionsRequestProperty.Builder |
builder() |
default String |
getAllocationStrategy()
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
|
default String |
getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
|
default Number |
getInstancePoolsToUseCount()
The number of Spot pools across which to allocate your target Spot capacity.
|
default Object |
getMaintenanceStrategies()
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
|
default String |
getMaxTotalPrice()
The maximum amount per hour for Spot Instances that you're willing to pay.
|
default Number |
getMinTargetCapacity()
The minimum target capacity for Spot Instances in the fleet.
|
default Object |
getSingleAvailabilityZone()
Indicates that the fleet launches all Spot Instances into a single Availability Zone.
|
default Object |
getSingleInstanceType()
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.
|
@Stability(value=Stable) @Nullable default String getAllocationStrategy()
If the allocation strategy is lowestPrice , EC2 Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified , EC2 Fleet launches instances from all the Spot Instance pools that you specify.
If the allocation strategy is capacityOptimized , EC2 Fleet launches instances from Spot Instance pools that are optimally chosen based on the available Spot Instance capacity.
Allowed Values : lowestPrice | diversified | capacityOptimized | capacityOptimizedPrioritized
@Stability(value=Stable) @Nullable default String getInstanceInterruptionBehavior()
Default: terminate
@Stability(value=Stable) @Nullable default Number getInstancePoolsToUseCount()
Supported only when Spot AllocationStrategy is set to lowest-price . EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
Note that EC2 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, EC2 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.
@Stability(value=Stable) @Nullable default Object getMaintenanceStrategies()
@Stability(value=Stable) @Nullable default String getMaxTotalPrice()
@Stability(value=Stable) @Nullable default Number getMinTargetCapacity()
If the minimum target capacity is not reached, the fleet launches no instances.
Supported only for fleets of type instant .
At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType
@Stability(value=Stable) @Nullable default Object getSingleAvailabilityZone()
Supported only for fleets of type instant .
@Stability(value=Stable) @Nullable default Object getSingleInstanceType()
Supported only for fleets of type instant .
@Stability(value=Stable) static CfnEC2Fleet.SpotOptionsRequestProperty.Builder builder()
Copyright © 2022. All rights reserved.