Class CapacityReservationRequest
- java.lang.Object
-
- software.amazon.awssdk.services.ecs.model.CapacityReservationRequest
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<CapacityReservationRequest.Builder,CapacityReservationRequest>
@Generated("software.amazon.awssdk:codegen") public final class CapacityReservationRequest extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CapacityReservationRequest.Builder,CapacityReservationRequest>
The Capacity Reservation configurations to be used when using the
RESERVEDcapacity option type.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCapacityReservationRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CapacityReservationRequest.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()StringreservationGroupArn()The ARN of the Capacity Reservation resource group in which to run the instance.CapacityReservationPreferencereservationPreference()The preference on when capacity reservations should be used.StringreservationPreferenceAsString()The preference on when capacity reservations should be used.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends CapacityReservationRequest.Builder>serializableBuilderClass()CapacityReservationRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
reservationGroupArn
public final String reservationGroupArn()
The ARN of the Capacity Reservation resource group in which to run the instance.
- Returns:
- The ARN of the Capacity Reservation resource group in which to run the instance.
-
reservationPreference
public final CapacityReservationPreference reservationPreference()
The preference on when capacity reservations should be used.
Valid values are:
-
RESERVATIONS_ONLY- Exclusively launch instances into capacity reservations that match the instance requirements configured for the capacity provider. If none exist, instances will fail to provision. -
RESERVATIONS_FIRST- Prefer to launch instances into a capacity reservation if any exist that match the instance requirements configured for the capacity provider. If none exist, fall back to launching instances On-Demand. -
RESERVATIONS_EXCLUDED- Avoid using capacity reservations and launch exclusively On-Demand.
If the service returns an enum value that is not available in the current SDK version,
reservationPreferencewill returnCapacityReservationPreference.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromreservationPreferenceAsString().- Returns:
- The preference on when capacity reservations should be used.
Valid values are:
-
RESERVATIONS_ONLY- Exclusively launch instances into capacity reservations that match the instance requirements configured for the capacity provider. If none exist, instances will fail to provision. -
RESERVATIONS_FIRST- Prefer to launch instances into a capacity reservation if any exist that match the instance requirements configured for the capacity provider. If none exist, fall back to launching instances On-Demand. -
RESERVATIONS_EXCLUDED- Avoid using capacity reservations and launch exclusively On-Demand.
-
- See Also:
CapacityReservationPreference
-
-
reservationPreferenceAsString
public final String reservationPreferenceAsString()
The preference on when capacity reservations should be used.
Valid values are:
-
RESERVATIONS_ONLY- Exclusively launch instances into capacity reservations that match the instance requirements configured for the capacity provider. If none exist, instances will fail to provision. -
RESERVATIONS_FIRST- Prefer to launch instances into a capacity reservation if any exist that match the instance requirements configured for the capacity provider. If none exist, fall back to launching instances On-Demand. -
RESERVATIONS_EXCLUDED- Avoid using capacity reservations and launch exclusively On-Demand.
If the service returns an enum value that is not available in the current SDK version,
reservationPreferencewill returnCapacityReservationPreference.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromreservationPreferenceAsString().- Returns:
- The preference on when capacity reservations should be used.
Valid values are:
-
RESERVATIONS_ONLY- Exclusively launch instances into capacity reservations that match the instance requirements configured for the capacity provider. If none exist, instances will fail to provision. -
RESERVATIONS_FIRST- Prefer to launch instances into a capacity reservation if any exist that match the instance requirements configured for the capacity provider. If none exist, fall back to launching instances On-Demand. -
RESERVATIONS_EXCLUDED- Avoid using capacity reservations and launch exclusively On-Demand.
-
- See Also:
CapacityReservationPreference
-
-
toBuilder
public CapacityReservationRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CapacityReservationRequest.Builder,CapacityReservationRequest>
-
builder
public static CapacityReservationRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends CapacityReservationRequest.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-