Class ReservedInstances
- java.lang.Object
-
- com.amazonaws.services.ec2.model.ReservedInstances
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ReservedInstances extends Object implements Serializable, Cloneable
Describes a Reserved Instance.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReservedInstances()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReservedInstances
clone()
boolean
equals(Object obj)
String
getAvailabilityZone()
The Availability Zone in which the Reserved Instance can be used.String
getCurrencyCode()
The currency of the Reserved Instance.Long
getDuration()
The duration of the Reserved Instance, in seconds.Date
getEnd()
The time when the Reserved Instance expires.Float
getFixedPrice()
The purchase price of the Reserved Instance.Integer
getInstanceCount()
The number of reservations purchased.String
getInstanceTenancy()
The tenancy of the instance.String
getInstanceType()
The instance type on which the Reserved Instance can be used.String
getOfferingType()
The Reserved Instance offering type.String
getProductDescription()
The Reserved Instance product platform description.List<RecurringCharge>
getRecurringCharges()
The recurring charge tag assigned to the resource.String
getReservedInstancesId()
The ID of the Reserved Instance.Date
getStart()
The date and time the Reserved Instance started.String
getState()
The state of the Reserved Instance purchase.List<Tag>
getTags()
Any tags assigned to the resource.Float
getUsagePrice()
The usage price of the Reserved Instance, per hour.int
hashCode()
void
setAvailabilityZone(String availabilityZone)
The Availability Zone in which the Reserved Instance can be used.void
setCurrencyCode(CurrencyCodeValues currencyCode)
The currency of the Reserved Instance.void
setCurrencyCode(String currencyCode)
The currency of the Reserved Instance.void
setDuration(Long duration)
The duration of the Reserved Instance, in seconds.void
setEnd(Date end)
The time when the Reserved Instance expires.void
setFixedPrice(Float fixedPrice)
The purchase price of the Reserved Instance.void
setInstanceCount(Integer instanceCount)
The number of reservations purchased.void
setInstanceTenancy(Tenancy instanceTenancy)
The tenancy of the instance.void
setInstanceTenancy(String instanceTenancy)
The tenancy of the instance.void
setInstanceType(InstanceType instanceType)
The instance type on which the Reserved Instance can be used.void
setInstanceType(String instanceType)
The instance type on which the Reserved Instance can be used.void
setOfferingType(OfferingTypeValues offeringType)
The Reserved Instance offering type.void
setOfferingType(String offeringType)
The Reserved Instance offering type.void
setProductDescription(RIProductDescription productDescription)
The Reserved Instance product platform description.void
setProductDescription(String productDescription)
The Reserved Instance product platform description.void
setRecurringCharges(Collection<RecurringCharge> recurringCharges)
The recurring charge tag assigned to the resource.void
setReservedInstancesId(String reservedInstancesId)
The ID of the Reserved Instance.void
setStart(Date start)
The date and time the Reserved Instance started.void
setState(ReservedInstanceState state)
The state of the Reserved Instance purchase.void
setState(String state)
The state of the Reserved Instance purchase.void
setTags(Collection<Tag> tags)
Any tags assigned to the resource.void
setUsagePrice(Float usagePrice)
The usage price of the Reserved Instance, per hour.String
toString()
Returns a string representation of this object; useful for testing and debugging.ReservedInstances
withAvailabilityZone(String availabilityZone)
The Availability Zone in which the Reserved Instance can be used.ReservedInstances
withCurrencyCode(CurrencyCodeValues currencyCode)
The currency of the Reserved Instance.ReservedInstances
withCurrencyCode(String currencyCode)
The currency of the Reserved Instance.ReservedInstances
withDuration(Long duration)
The duration of the Reserved Instance, in seconds.ReservedInstances
withEnd(Date end)
The time when the Reserved Instance expires.ReservedInstances
withFixedPrice(Float fixedPrice)
The purchase price of the Reserved Instance.ReservedInstances
withInstanceCount(Integer instanceCount)
The number of reservations purchased.ReservedInstances
withInstanceTenancy(Tenancy instanceTenancy)
The tenancy of the instance.ReservedInstances
withInstanceTenancy(String instanceTenancy)
The tenancy of the instance.ReservedInstances
withInstanceType(InstanceType instanceType)
The instance type on which the Reserved Instance can be used.ReservedInstances
withInstanceType(String instanceType)
The instance type on which the Reserved Instance can be used.ReservedInstances
withOfferingType(OfferingTypeValues offeringType)
The Reserved Instance offering type.ReservedInstances
withOfferingType(String offeringType)
The Reserved Instance offering type.ReservedInstances
withProductDescription(RIProductDescription productDescription)
The Reserved Instance product platform description.ReservedInstances
withProductDescription(String productDescription)
The Reserved Instance product platform description.ReservedInstances
withRecurringCharges(RecurringCharge... recurringCharges)
The recurring charge tag assigned to the resource.ReservedInstances
withRecurringCharges(Collection<RecurringCharge> recurringCharges)
The recurring charge tag assigned to the resource.ReservedInstances
withReservedInstancesId(String reservedInstancesId)
The ID of the Reserved Instance.ReservedInstances
withStart(Date start)
The date and time the Reserved Instance started.ReservedInstances
withState(ReservedInstanceState state)
The state of the Reserved Instance purchase.ReservedInstances
withState(String state)
The state of the Reserved Instance purchase.ReservedInstances
withTags(Tag... tags)
Any tags assigned to the resource.ReservedInstances
withTags(Collection<Tag> tags)
Any tags assigned to the resource.ReservedInstances
withUsagePrice(Float usagePrice)
The usage price of the Reserved Instance, per hour.
-
-
-
Method Detail
-
setReservedInstancesId
public void setReservedInstancesId(String reservedInstancesId)
The ID of the Reserved Instance.
- Parameters:
reservedInstancesId
- The ID of the Reserved Instance.
-
getReservedInstancesId
public String getReservedInstancesId()
The ID of the Reserved Instance.
- Returns:
- The ID of the Reserved Instance.
-
withReservedInstancesId
public ReservedInstances withReservedInstancesId(String reservedInstancesId)
The ID of the Reserved Instance.
- Parameters:
reservedInstancesId
- The ID of the Reserved Instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceType
public void setInstanceType(String instanceType)
The instance type on which the Reserved Instance can be used.
- Parameters:
instanceType
- The instance type on which the Reserved Instance can be used.- See Also:
InstanceType
-
getInstanceType
public String getInstanceType()
The instance type on which the Reserved Instance can be used.
- Returns:
- The instance type on which the Reserved Instance can be used.
- See Also:
InstanceType
-
withInstanceType
public ReservedInstances withInstanceType(String instanceType)
The instance type on which the Reserved Instance can be used.
- Parameters:
instanceType
- The instance type on which the Reserved Instance can be used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceType
-
setInstanceType
public void setInstanceType(InstanceType instanceType)
The instance type on which the Reserved Instance can be used.
- Parameters:
instanceType
- The instance type on which the Reserved Instance can be used.- See Also:
InstanceType
-
withInstanceType
public ReservedInstances withInstanceType(InstanceType instanceType)
The instance type on which the Reserved Instance can be used.
- Parameters:
instanceType
- The instance type on which the Reserved Instance can be used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceType
-
setAvailabilityZone
public void setAvailabilityZone(String availabilityZone)
The Availability Zone in which the Reserved Instance can be used.
- Parameters:
availabilityZone
- The Availability Zone in which the Reserved Instance can be used.
-
getAvailabilityZone
public String getAvailabilityZone()
The Availability Zone in which the Reserved Instance can be used.
- Returns:
- The Availability Zone in which the Reserved Instance can be used.
-
withAvailabilityZone
public ReservedInstances withAvailabilityZone(String availabilityZone)
The Availability Zone in which the Reserved Instance can be used.
- Parameters:
availabilityZone
- The Availability Zone in which the Reserved Instance can be used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStart
public void setStart(Date start)
The date and time the Reserved Instance started.
- Parameters:
start
- The date and time the Reserved Instance started.
-
getStart
public Date getStart()
The date and time the Reserved Instance started.
- Returns:
- The date and time the Reserved Instance started.
-
withStart
public ReservedInstances withStart(Date start)
The date and time the Reserved Instance started.
- Parameters:
start
- The date and time the Reserved Instance started.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEnd
public void setEnd(Date end)
The time when the Reserved Instance expires.
- Parameters:
end
- The time when the Reserved Instance expires.
-
getEnd
public Date getEnd()
The time when the Reserved Instance expires.
- Returns:
- The time when the Reserved Instance expires.
-
withEnd
public ReservedInstances withEnd(Date end)
The time when the Reserved Instance expires.
- Parameters:
end
- The time when the Reserved Instance expires.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDuration
public void setDuration(Long duration)
The duration of the Reserved Instance, in seconds.
- Parameters:
duration
- The duration of the Reserved Instance, in seconds.
-
getDuration
public Long getDuration()
The duration of the Reserved Instance, in seconds.
- Returns:
- The duration of the Reserved Instance, in seconds.
-
withDuration
public ReservedInstances withDuration(Long duration)
The duration of the Reserved Instance, in seconds.
- Parameters:
duration
- The duration of the Reserved Instance, in seconds.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUsagePrice
public void setUsagePrice(Float usagePrice)
The usage price of the Reserved Instance, per hour.
- Parameters:
usagePrice
- The usage price of the Reserved Instance, per hour.
-
getUsagePrice
public Float getUsagePrice()
The usage price of the Reserved Instance, per hour.
- Returns:
- The usage price of the Reserved Instance, per hour.
-
withUsagePrice
public ReservedInstances withUsagePrice(Float usagePrice)
The usage price of the Reserved Instance, per hour.
- Parameters:
usagePrice
- The usage price of the Reserved Instance, per hour.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setFixedPrice
public void setFixedPrice(Float fixedPrice)
The purchase price of the Reserved Instance.
- Parameters:
fixedPrice
- The purchase price of the Reserved Instance.
-
getFixedPrice
public Float getFixedPrice()
The purchase price of the Reserved Instance.
- Returns:
- The purchase price of the Reserved Instance.
-
withFixedPrice
public ReservedInstances withFixedPrice(Float fixedPrice)
The purchase price of the Reserved Instance.
- Parameters:
fixedPrice
- The purchase price of the Reserved Instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceCount
public void setInstanceCount(Integer instanceCount)
The number of reservations purchased.
- Parameters:
instanceCount
- The number of reservations purchased.
-
getInstanceCount
public Integer getInstanceCount()
The number of reservations purchased.
- Returns:
- The number of reservations purchased.
-
withInstanceCount
public ReservedInstances withInstanceCount(Integer instanceCount)
The number of reservations purchased.
- Parameters:
instanceCount
- The number of reservations purchased.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setProductDescription
public void setProductDescription(String productDescription)
The Reserved Instance product platform description.
- Parameters:
productDescription
- The Reserved Instance product platform description.- See Also:
RIProductDescription
-
getProductDescription
public String getProductDescription()
The Reserved Instance product platform description.
- Returns:
- The Reserved Instance product platform description.
- See Also:
RIProductDescription
-
withProductDescription
public ReservedInstances withProductDescription(String productDescription)
The Reserved Instance product platform description.
- Parameters:
productDescription
- The Reserved Instance product platform description.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RIProductDescription
-
setProductDescription
public void setProductDescription(RIProductDescription productDescription)
The Reserved Instance product platform description.
- Parameters:
productDescription
- The Reserved Instance product platform description.- See Also:
RIProductDescription
-
withProductDescription
public ReservedInstances withProductDescription(RIProductDescription productDescription)
The Reserved Instance product platform description.
- Parameters:
productDescription
- The Reserved Instance product platform description.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RIProductDescription
-
setState
public void setState(String state)
The state of the Reserved Instance purchase.
- Parameters:
state
- The state of the Reserved Instance purchase.- See Also:
ReservedInstanceState
-
getState
public String getState()
The state of the Reserved Instance purchase.
- Returns:
- The state of the Reserved Instance purchase.
- See Also:
ReservedInstanceState
-
withState
public ReservedInstances withState(String state)
The state of the Reserved Instance purchase.
- Parameters:
state
- The state of the Reserved Instance purchase.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ReservedInstanceState
-
setState
public void setState(ReservedInstanceState state)
The state of the Reserved Instance purchase.
- Parameters:
state
- The state of the Reserved Instance purchase.- See Also:
ReservedInstanceState
-
withState
public ReservedInstances withState(ReservedInstanceState state)
The state of the Reserved Instance purchase.
- Parameters:
state
- The state of the Reserved Instance purchase.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ReservedInstanceState
-
getTags
public List<Tag> getTags()
Any tags assigned to the resource.
- Returns:
- Any tags assigned to the resource.
-
setTags
public void setTags(Collection<Tag> tags)
Any tags assigned to the resource.
- Parameters:
tags
- Any tags assigned to the resource.
-
withTags
public ReservedInstances withTags(Tag... tags)
Any tags assigned to the resource.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
orwithTags(java.util.Collection)
if you want to override the existing values.- Parameters:
tags
- Any tags assigned to the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTags
public ReservedInstances withTags(Collection<Tag> tags)
Any tags assigned to the resource.
- Parameters:
tags
- Any tags assigned to the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceTenancy
public void setInstanceTenancy(String instanceTenancy)
The tenancy of the instance.
- Parameters:
instanceTenancy
- The tenancy of the instance.- See Also:
Tenancy
-
getInstanceTenancy
public String getInstanceTenancy()
The tenancy of the instance.
- Returns:
- The tenancy of the instance.
- See Also:
Tenancy
-
withInstanceTenancy
public ReservedInstances withInstanceTenancy(String instanceTenancy)
The tenancy of the instance.
- Parameters:
instanceTenancy
- The tenancy of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Tenancy
-
setInstanceTenancy
public void setInstanceTenancy(Tenancy instanceTenancy)
The tenancy of the instance.
- Parameters:
instanceTenancy
- The tenancy of the instance.- See Also:
Tenancy
-
withInstanceTenancy
public ReservedInstances withInstanceTenancy(Tenancy instanceTenancy)
The tenancy of the instance.
- Parameters:
instanceTenancy
- The tenancy of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Tenancy
-
setCurrencyCode
public void setCurrencyCode(String 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
.- Parameters:
currencyCode
- The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency isUSD
.- See Also:
CurrencyCodeValues
-
getCurrencyCode
public String getCurrencyCode()
The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is
USD
.- 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
-
withCurrencyCode
public ReservedInstances withCurrencyCode(String 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
.- Parameters:
currencyCode
- The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency isUSD
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CurrencyCodeValues
-
setCurrencyCode
public void setCurrencyCode(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
.- Parameters:
currencyCode
- The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency isUSD
.- See Also:
CurrencyCodeValues
-
withCurrencyCode
public ReservedInstances withCurrencyCode(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
.- Parameters:
currencyCode
- The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency isUSD
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CurrencyCodeValues
-
setOfferingType
public void setOfferingType(String offeringType)
The Reserved Instance offering type.
- Parameters:
offeringType
- The Reserved Instance offering type.- See Also:
OfferingTypeValues
-
getOfferingType
public String getOfferingType()
The Reserved Instance offering type.
- Returns:
- The Reserved Instance offering type.
- See Also:
OfferingTypeValues
-
withOfferingType
public ReservedInstances withOfferingType(String offeringType)
The Reserved Instance offering type.
- Parameters:
offeringType
- The Reserved Instance offering type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OfferingTypeValues
-
setOfferingType
public void setOfferingType(OfferingTypeValues offeringType)
The Reserved Instance offering type.
- Parameters:
offeringType
- The Reserved Instance offering type.- See Also:
OfferingTypeValues
-
withOfferingType
public ReservedInstances withOfferingType(OfferingTypeValues offeringType)
The Reserved Instance offering type.
- Parameters:
offeringType
- The Reserved Instance offering type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
OfferingTypeValues
-
getRecurringCharges
public List<RecurringCharge> getRecurringCharges()
The recurring charge tag assigned to the resource.
- Returns:
- The recurring charge tag assigned to the resource.
-
setRecurringCharges
public void setRecurringCharges(Collection<RecurringCharge> recurringCharges)
The recurring charge tag assigned to the resource.
- Parameters:
recurringCharges
- The recurring charge tag assigned to the resource.
-
withRecurringCharges
public ReservedInstances withRecurringCharges(RecurringCharge... recurringCharges)
The recurring charge tag assigned to the resource.
NOTE: This method appends the values to the existing list (if any). Use
setRecurringCharges(java.util.Collection)
orwithRecurringCharges(java.util.Collection)
if you want to override the existing values.- Parameters:
recurringCharges
- The recurring charge tag assigned to the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withRecurringCharges
public ReservedInstances withRecurringCharges(Collection<RecurringCharge> recurringCharges)
The recurring charge tag assigned to the resource.
- Parameters:
recurringCharges
- The recurring charge tag assigned to the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ReservedInstances clone()
-
-