@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class SpotCapacityRebalance extends Object implements Serializable, Cloneable
The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see Capacity rebalancing in the Amazon EC2 User Guide for Linux Instances.
Constructor and Description |
---|
SpotCapacityRebalance() |
Modifier and Type | Method and Description |
---|---|
SpotCapacityRebalance |
clone() |
boolean |
equals(Object obj) |
String |
getReplacementStrategy()
The replacement strategy to use.
|
int |
hashCode() |
void |
setReplacementStrategy(String replacementStrategy)
The replacement strategy to use.
|
String |
toString()
Returns a string representation of this object.
|
SpotCapacityRebalance |
withReplacementStrategy(ReplacementStrategy replacementStrategy)
The replacement strategy to use.
|
SpotCapacityRebalance |
withReplacementStrategy(String replacementStrategy)
The replacement strategy to use.
|
public void setReplacementStrategy(String replacementStrategy)
The replacement strategy to use. Only available for fleets of type maintain
. You must specify a
value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is emitted for
a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
replacementStrategy
- The replacement strategy to use. Only available for fleets of type maintain
. You must specify
a value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is
emitted for a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
ReplacementStrategy
public String getReplacementStrategy()
The replacement strategy to use. Only available for fleets of type maintain
. You must specify a
value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is emitted for
a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
maintain
. You must
specify a value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is
emitted for a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
ReplacementStrategy
public SpotCapacityRebalance withReplacementStrategy(String replacementStrategy)
The replacement strategy to use. Only available for fleets of type maintain
. You must specify a
value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is emitted for
a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
replacementStrategy
- The replacement strategy to use. Only available for fleets of type maintain
. You must specify
a value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is
emitted for a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
ReplacementStrategy
public SpotCapacityRebalance withReplacementStrategy(ReplacementStrategy replacementStrategy)
The replacement strategy to use. Only available for fleets of type maintain
. You must specify a
value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is emitted for
a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
replacementStrategy
- The replacement strategy to use. Only available for fleets of type maintain
. You must specify
a value, otherwise you get an error.
To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance notification is
emitted for a Spot Instance in the fleet, specify launch
.
When a replacement instance is launched, the instance marked for rebalance is not automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.
ReplacementStrategy
public String toString()
toString
in class Object
Object.toString()
public SpotCapacityRebalance clone()