@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CapacityReservationSpecification extends Object implements Serializable, Cloneable
Describes an instance's Capacity Reservation targeting option. You can specify only one parameter at a time. If you
specify CapacityReservationPreference
and CapacityReservationTarget
, the request fails.
Use the CapacityReservationPreference
parameter to configure the instance to run as an On-Demand
Instance or to run in any open
Capacity Reservation that has matching attributes (instance type,
platform, Availability Zone). Use the CapacityReservationTarget
parameter to explicitly target a
specific Capacity Reservation or a Capacity Reservation group.
Constructor and Description |
---|
CapacityReservationSpecification() |
Modifier and Type | Method and Description |
---|---|
CapacityReservationSpecification |
clone() |
boolean |
equals(Object obj) |
String |
getCapacityReservationPreference()
Indicates the instance's Capacity Reservation preferences.
|
CapacityReservationTarget |
getCapacityReservationTarget()
Information about the target Capacity Reservation or Capacity Reservation group.
|
int |
hashCode() |
void |
setCapacityReservationPreference(String capacityReservationPreference)
Indicates the instance's Capacity Reservation preferences.
|
void |
setCapacityReservationTarget(CapacityReservationTarget capacityReservationTarget)
Information about the target Capacity Reservation or Capacity Reservation group.
|
String |
toString()
Returns a string representation of this object.
|
CapacityReservationSpecification |
withCapacityReservationPreference(CapacityReservationPreference capacityReservationPreference)
Indicates the instance's Capacity Reservation preferences.
|
CapacityReservationSpecification |
withCapacityReservationPreference(String capacityReservationPreference)
Indicates the instance's Capacity Reservation preferences.
|
CapacityReservationSpecification |
withCapacityReservationTarget(CapacityReservationTarget capacityReservationTarget)
Information about the target Capacity Reservation or Capacity Reservation group.
|
public void setCapacityReservationPreference(String capacityReservationPreference)
Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The instance
runs as an On-Demand Instance.
capacityReservationPreference
- Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The
instance runs as an On-Demand Instance.
CapacityReservationPreference
public String getCapacityReservationPreference()
Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The instance
runs as an On-Demand Instance.
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The
instance runs as an On-Demand Instance.
CapacityReservationPreference
public CapacityReservationSpecification withCapacityReservationPreference(String capacityReservationPreference)
Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The instance
runs as an On-Demand Instance.
capacityReservationPreference
- Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The
instance runs as an On-Demand Instance.
CapacityReservationPreference
public CapacityReservationSpecification withCapacityReservationPreference(CapacityReservationPreference capacityReservationPreference)
Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The instance
runs as an On-Demand Instance.
capacityReservationPreference
- Indicates the instance's Capacity Reservation preferences. Possible preferences include:
open
- The instance can run in any open
Capacity Reservation that has matching
attributes (instance type, platform, Availability Zone).
none
- The instance avoids running in a Capacity Reservation even if one is available. The
instance runs as an On-Demand Instance.
CapacityReservationPreference
public void setCapacityReservationTarget(CapacityReservationTarget capacityReservationTarget)
Information about the target Capacity Reservation or Capacity Reservation group.
capacityReservationTarget
- Information about the target Capacity Reservation or Capacity Reservation group.public CapacityReservationTarget getCapacityReservationTarget()
Information about the target Capacity Reservation or Capacity Reservation group.
public CapacityReservationSpecification withCapacityReservationTarget(CapacityReservationTarget capacityReservationTarget)
Information about the target Capacity Reservation or Capacity Reservation group.
capacityReservationTarget
- Information about the target Capacity Reservation or Capacity Reservation group.public String toString()
toString
in class Object
Object.toString()
public CapacityReservationSpecification clone()