Class CapacityReservationSpecification

    • Method Detail

      • capacityReservationPreference

        public final CapacityReservationPreference capacityReservationPreference()

        The capacity reservation preference. The following options are available:

        • capacity-reservations-only - Auto Scaling will only launch instances into a Capacity Reservation or Capacity Reservation resource group. If capacity isn't available, instances will fail to launch.

        • capacity-reservations-first - Auto Scaling will try to launch instances into a Capacity Reservation or Capacity Reservation resource group first. If capacity isn't available, instances will run in On-Demand capacity.

        • none - Auto Scaling will not launch instances into a Capacity Reservation. Instances will run in On-Demand capacity.

        • default - Auto Scaling uses the Capacity Reservation preference from your launch template or an open Capacity Reservation.

        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().

        Returns:
        The capacity reservation preference. The following options are available:

        • capacity-reservations-only - Auto Scaling will only launch instances into a Capacity Reservation or Capacity Reservation resource group. If capacity isn't available, instances will fail to launch.

        • capacity-reservations-first - Auto Scaling will try to launch instances into a Capacity Reservation or Capacity Reservation resource group first. If capacity isn't available, instances will run in On-Demand capacity.

        • none - Auto Scaling will not launch instances into a Capacity Reservation. Instances will run in On-Demand capacity.

        • default - Auto Scaling uses the Capacity Reservation preference from your launch template or an open Capacity Reservation.

        See Also:
        CapacityReservationPreference
      • capacityReservationPreferenceAsString

        public final String capacityReservationPreferenceAsString()

        The capacity reservation preference. The following options are available:

        • capacity-reservations-only - Auto Scaling will only launch instances into a Capacity Reservation or Capacity Reservation resource group. If capacity isn't available, instances will fail to launch.

        • capacity-reservations-first - Auto Scaling will try to launch instances into a Capacity Reservation or Capacity Reservation resource group first. If capacity isn't available, instances will run in On-Demand capacity.

        • none - Auto Scaling will not launch instances into a Capacity Reservation. Instances will run in On-Demand capacity.

        • default - Auto Scaling uses the Capacity Reservation preference from your launch template or an open Capacity Reservation.

        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().

        Returns:
        The capacity reservation preference. The following options are available:

        • capacity-reservations-only - Auto Scaling will only launch instances into a Capacity Reservation or Capacity Reservation resource group. If capacity isn't available, instances will fail to launch.

        • capacity-reservations-first - Auto Scaling will try to launch instances into a Capacity Reservation or Capacity Reservation resource group first. If capacity isn't available, instances will run in On-Demand capacity.

        • none - Auto Scaling will not launch instances into a Capacity Reservation. Instances will run in On-Demand capacity.

        • default - Auto Scaling uses the Capacity Reservation preference from your launch template or an open Capacity Reservation.

        See Also:
        CapacityReservationPreference
      • capacityReservationTarget

        public final CapacityReservationTarget capacityReservationTarget()

        Describes a target Capacity Reservation or Capacity Reservation resource group.

        Returns:
        Describes a target Capacity Reservation or Capacity Reservation resource group.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)