public class PurchaseReservedInstancesOfferingRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<PurchaseReservedInstancesOfferingRequest>
PurchaseReservedInstancesOffering operation
.
Purchases a Reserved Instance for use with your account. With Reserved Instances, you obtain a capacity reservation for a certain instance configuration over a specified period of time and pay a lower hourly rate compared to On-Demand instance pricing.
Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.
For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .
Constructor and Description |
---|
PurchaseReservedInstancesOfferingRequest()
Default constructor for a new PurchaseReservedInstancesOfferingRequest object.
|
PurchaseReservedInstancesOfferingRequest(java.lang.String reservedInstancesOfferingId,
java.lang.Integer instanceCount)
Constructs a new PurchaseReservedInstancesOfferingRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Request<PurchaseReservedInstancesOfferingRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.Integer |
getInstanceCount()
The number of Reserved Instances to purchase.
|
ReservedInstanceLimitPrice |
getLimitPrice()
Specified for Reserved Instance Marketplace offerings to limit the
total order and ensure that the Reserved Instances are not purchased
at unexpected prices.
|
java.lang.String |
getReservedInstancesOfferingId()
The ID of the Reserved Instance offering to purchase.
|
int |
hashCode() |
void |
setInstanceCount(java.lang.Integer instanceCount)
The number of Reserved Instances to purchase.
|
void |
setLimitPrice(ReservedInstanceLimitPrice limitPrice)
Specified for Reserved Instance Marketplace offerings to limit the
total order and ensure that the Reserved Instances are not purchased
at unexpected prices.
|
void |
setReservedInstancesOfferingId(java.lang.String reservedInstancesOfferingId)
The ID of the Reserved Instance offering to purchase.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PurchaseReservedInstancesOfferingRequest |
withInstanceCount(java.lang.Integer instanceCount)
The number of Reserved Instances to purchase.
|
PurchaseReservedInstancesOfferingRequest |
withLimitPrice(ReservedInstanceLimitPrice limitPrice)
Specified for Reserved Instance Marketplace offerings to limit the
total order and ensure that the Reserved Instances are not purchased
at unexpected prices.
|
PurchaseReservedInstancesOfferingRequest |
withReservedInstancesOfferingId(java.lang.String reservedInstancesOfferingId)
The ID of the Reserved Instance offering to purchase.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public PurchaseReservedInstancesOfferingRequest()
public PurchaseReservedInstancesOfferingRequest(java.lang.String reservedInstancesOfferingId, java.lang.Integer instanceCount)
reservedInstancesOfferingId
- The ID of the Reserved Instance
offering to purchase.instanceCount
- The number of Reserved Instances to purchase.public java.lang.String getReservedInstancesOfferingId()
public void setReservedInstancesOfferingId(java.lang.String reservedInstancesOfferingId)
reservedInstancesOfferingId
- The ID of the Reserved Instance offering to purchase.public PurchaseReservedInstancesOfferingRequest withReservedInstancesOfferingId(java.lang.String reservedInstancesOfferingId)
Returns a reference to this object so that method calls can be chained together.
reservedInstancesOfferingId
- The ID of the Reserved Instance offering to purchase.public java.lang.Integer getInstanceCount()
public void setInstanceCount(java.lang.Integer instanceCount)
instanceCount
- The number of Reserved Instances to purchase.public PurchaseReservedInstancesOfferingRequest withInstanceCount(java.lang.Integer instanceCount)
Returns a reference to this object so that method calls can be chained together.
instanceCount
- The number of Reserved Instances to purchase.public ReservedInstanceLimitPrice getLimitPrice()
public void setLimitPrice(ReservedInstanceLimitPrice limitPrice)
limitPrice
- Specified for Reserved Instance Marketplace offerings to limit the
total order and ensure that the Reserved Instances are not purchased
at unexpected prices.public PurchaseReservedInstancesOfferingRequest withLimitPrice(ReservedInstanceLimitPrice limitPrice)
Returns a reference to this object so that method calls can be chained together.
limitPrice
- Specified for Reserved Instance Marketplace offerings to limit the
total order and ensure that the Reserved Instances are not purchased
at unexpected prices.public Request<PurchaseReservedInstancesOfferingRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<PurchaseReservedInstancesOfferingRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.