Class PriceSchedule

    • Method Detail

      • active

        public final Boolean active()

        The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

        A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

        Returns:
        The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

        A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

      • currencyCodeAsString

        public final String currencyCodeAsString()

        The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

        If the service returns an enum value that is not available in the current SDK version, currencyCode will return CurrencyCodeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from currencyCodeAsString().

        Returns:
        The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.
        See Also:
        CurrencyCodeValues
      • price

        public final Double price()

        The fixed price for the term.

        Returns:
        The fixed price for the term.
      • term

        public final Long term()

        The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

        Returns:
        The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.
      • 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)