Class CapacityReservationRequest

    • 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, reservationPreference will return CapacityReservationPreference.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from reservationPreferenceAsString().

        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, reservationPreference will return CapacityReservationPreference.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from reservationPreferenceAsString().

        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
      • 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)