Class ReservedInstances
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.ReservedInstances
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ReservedInstances.Builder,ReservedInstances>
@Generated("software.amazon.awssdk:codegen") public final class ReservedInstances extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ReservedInstances.Builder,ReservedInstances>
Describes a Reserved Instance.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceReservedInstances.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringavailabilityZone()The Availability Zone in which the Reserved Instance can be used.static ReservedInstances.Builderbuilder()CurrencyCodeValuescurrencyCode()The currency of the Reserved Instance.StringcurrencyCodeAsString()The currency of the Reserved Instance.Longduration()The duration of the Reserved Instance, in seconds.Instantend()The time when the Reserved Instance expires.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)FloatfixedPrice()The purchase price of the Reserved Instance.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasRecurringCharges()For responses, this returns true if the service returned a value for the RecurringCharges property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.IntegerinstanceCount()The number of reservations purchased.TenancyinstanceTenancy()The tenancy of the instance.StringinstanceTenancyAsString()The tenancy of the instance.InstanceTypeinstanceType()The instance type on which the Reserved Instance can be used.StringinstanceTypeAsString()The instance type on which the Reserved Instance can be used.OfferingClassTypeofferingClass()The offering class of the Reserved Instance.StringofferingClassAsString()The offering class of the Reserved Instance.OfferingTypeValuesofferingType()The Reserved Instance offering type.StringofferingTypeAsString()The Reserved Instance offering type.RIProductDescriptionproductDescription()The Reserved Instance product platform description.StringproductDescriptionAsString()The Reserved Instance product platform description.List<RecurringCharge>recurringCharges()The recurring charge tag assigned to the resource.StringreservedInstancesId()The ID of the Reserved Instance.Scopescope()The scope of the Reserved Instance.StringscopeAsString()The scope of the Reserved Instance.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends ReservedInstances.Builder>serializableBuilderClass()Instantstart()The date and time the Reserved Instance started.ReservedInstanceStatestate()The state of the Reserved Instance purchase.StringstateAsString()The state of the Reserved Instance purchase.List<Tag>tags()Any tags assigned to the resource.ReservedInstances.BuildertoBuilder()StringtoString()Returns a string representation of this object.FloatusagePrice()The usage price of the Reserved Instance, per hour.-
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
-
currencyCode
public final CurrencyCodeValues currencyCode()
The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. 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,
currencyCodewill returnCurrencyCodeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcurrencyCodeAsString().- Returns:
- The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this
time, the only supported currency is
USD. - See Also:
CurrencyCodeValues
-
currencyCodeAsString
public final String currencyCodeAsString()
The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. 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,
currencyCodewill returnCurrencyCodeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcurrencyCodeAsString().- Returns:
- The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this
time, the only supported currency is
USD. - See Also:
CurrencyCodeValues
-
instanceTenancy
public final Tenancy instanceTenancy()
The tenancy of the instance.
If the service returns an enum value that is not available in the current SDK version,
instanceTenancywill returnTenancy.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceTenancyAsString().- Returns:
- The tenancy of the instance.
- See Also:
Tenancy
-
instanceTenancyAsString
public final String instanceTenancyAsString()
The tenancy of the instance.
If the service returns an enum value that is not available in the current SDK version,
instanceTenancywill returnTenancy.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceTenancyAsString().- Returns:
- The tenancy of the instance.
- See Also:
Tenancy
-
offeringClass
public final OfferingClassType offeringClass()
The offering class of the Reserved Instance.
If the service returns an enum value that is not available in the current SDK version,
offeringClasswill returnOfferingClassType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromofferingClassAsString().- Returns:
- The offering class of the Reserved Instance.
- See Also:
OfferingClassType
-
offeringClassAsString
public final String offeringClassAsString()
The offering class of the Reserved Instance.
If the service returns an enum value that is not available in the current SDK version,
offeringClasswill returnOfferingClassType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromofferingClassAsString().- Returns:
- The offering class of the Reserved Instance.
- See Also:
OfferingClassType
-
offeringType
public final OfferingTypeValues offeringType()
The Reserved Instance offering type.
If the service returns an enum value that is not available in the current SDK version,
offeringTypewill returnOfferingTypeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromofferingTypeAsString().- Returns:
- The Reserved Instance offering type.
- See Also:
OfferingTypeValues
-
offeringTypeAsString
public final String offeringTypeAsString()
The Reserved Instance offering type.
If the service returns an enum value that is not available in the current SDK version,
offeringTypewill returnOfferingTypeValues.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromofferingTypeAsString().- Returns:
- The Reserved Instance offering type.
- See Also:
OfferingTypeValues
-
hasRecurringCharges
public final boolean hasRecurringCharges()
For responses, this returns true if the service returned a value for the RecurringCharges property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
recurringCharges
public final List<RecurringCharge> recurringCharges()
The recurring charge tag assigned to the resource.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRecurringCharges()method.- Returns:
- The recurring charge tag assigned to the resource.
-
scope
public final Scope scope()
The scope of the Reserved Instance.
If the service returns an enum value that is not available in the current SDK version,
scopewill returnScope.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromscopeAsString().- Returns:
- The scope of the Reserved Instance.
- See Also:
Scope
-
scopeAsString
public final String scopeAsString()
The scope of the Reserved Instance.
If the service returns an enum value that is not available in the current SDK version,
scopewill returnScope.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromscopeAsString().- Returns:
- The scope of the Reserved Instance.
- See Also:
Scope
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<Tag> tags()
Any tags assigned to the resource.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- Any tags assigned to the resource.
-
reservedInstancesId
public final String reservedInstancesId()
The ID of the Reserved Instance.
- Returns:
- The ID of the Reserved Instance.
-
instanceType
public final InstanceType instanceType()
The instance type on which the Reserved Instance can be used.
If the service returns an enum value that is not available in the current SDK version,
instanceTypewill returnInstanceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceTypeAsString().- Returns:
- The instance type on which the Reserved Instance can be used.
- See Also:
InstanceType
-
instanceTypeAsString
public final String instanceTypeAsString()
The instance type on which the Reserved Instance can be used.
If the service returns an enum value that is not available in the current SDK version,
instanceTypewill returnInstanceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frominstanceTypeAsString().- Returns:
- The instance type on which the Reserved Instance can be used.
- See Also:
InstanceType
-
availabilityZone
public final String availabilityZone()
The Availability Zone in which the Reserved Instance can be used.
- Returns:
- The Availability Zone in which the Reserved Instance can be used.
-
start
public final Instant start()
The date and time the Reserved Instance started.
- Returns:
- The date and time the Reserved Instance started.
-
end
public final Instant end()
The time when the Reserved Instance expires.
- Returns:
- The time when the Reserved Instance expires.
-
duration
public final Long duration()
The duration of the Reserved Instance, in seconds.
- Returns:
- The duration of the Reserved Instance, in seconds.
-
usagePrice
public final Float usagePrice()
The usage price of the Reserved Instance, per hour.
- Returns:
- The usage price of the Reserved Instance, per hour.
-
fixedPrice
public final Float fixedPrice()
The purchase price of the Reserved Instance.
- Returns:
- The purchase price of the Reserved Instance.
-
instanceCount
public final Integer instanceCount()
The number of reservations purchased.
- Returns:
- The number of reservations purchased.
-
productDescription
public final RIProductDescription productDescription()
The Reserved Instance product platform description.
If the service returns an enum value that is not available in the current SDK version,
productDescriptionwill returnRIProductDescription.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromproductDescriptionAsString().- Returns:
- The Reserved Instance product platform description.
- See Also:
RIProductDescription
-
productDescriptionAsString
public final String productDescriptionAsString()
The Reserved Instance product platform description.
If the service returns an enum value that is not available in the current SDK version,
productDescriptionwill returnRIProductDescription.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromproductDescriptionAsString().- Returns:
- The Reserved Instance product platform description.
- See Also:
RIProductDescription
-
state
public final ReservedInstanceState state()
The state of the Reserved Instance purchase.
If the service returns an enum value that is not available in the current SDK version,
statewill returnReservedInstanceState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state of the Reserved Instance purchase.
- See Also:
ReservedInstanceState
-
stateAsString
public final String stateAsString()
The state of the Reserved Instance purchase.
If the service returns an enum value that is not available in the current SDK version,
statewill returnReservedInstanceState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state of the Reserved Instance purchase.
- See Also:
ReservedInstanceState
-
toBuilder
public ReservedInstances.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ReservedInstances.Builder,ReservedInstances>
-
builder
public static ReservedInstances.Builder builder()
-
serializableBuilderClass
public static Class<? extends ReservedInstances.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
-
-