@Generated(value="software.amazon.awssdk:codegen") public final class CapacityReservationSpecification extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CapacityReservationSpecification.Builder,CapacityReservationSpecification>
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.
| Modifier and Type | Class and Description |
|---|---|
static interface |
CapacityReservationSpecification.Builder |
| Modifier and Type | Method and Description |
|---|---|
static CapacityReservationSpecification.Builder |
builder() |
CapacityReservationPreference |
capacityReservationPreference()
Indicates the instance's Capacity Reservation preferences.
|
String |
capacityReservationPreferenceAsString()
Indicates the instance's Capacity Reservation preferences.
|
CapacityReservationTarget |
capacityReservationTarget()
Information about the target Capacity Reservation.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends CapacityReservationSpecification.Builder> |
serializableBuilderClass() |
CapacityReservationSpecification.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic 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.
If the service returns an enum value that is not available in the current SDK version,
capacityReservationPreference will return CapacityReservationPreference.UNKNOWN_TO_SDK_VERSION.
The raw value returned by the service is available from capacityReservationPreferenceAsString().
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.
CapacityReservationPreferencepublic String capacityReservationPreferenceAsString()
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.
If the service returns an enum value that is not available in the current SDK version,
capacityReservationPreference will return CapacityReservationPreference.UNKNOWN_TO_SDK_VERSION.
The raw value returned by the service is available from capacityReservationPreferenceAsString().
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.
CapacityReservationPreferencepublic CapacityReservationTarget capacityReservationTarget()
Information about the target Capacity Reservation.
public CapacityReservationSpecification.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CapacityReservationSpecification.Builder,CapacityReservationSpecification>public static CapacityReservationSpecification.Builder builder()
public static Class<? extends CapacityReservationSpecification.Builder> serializableBuilderClass()
public boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic String toString()
Copyright © 2020. All rights reserved.