com.amazonaws.services.ec2.model
Class PurchaseReservedInstancesOfferingRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.PurchaseReservedInstancesOfferingRequest
All Implemented Interfaces:
DryRunSupportedRequest<PurchaseReservedInstancesOfferingRequest>, java.io.Serializable

public class PurchaseReservedInstancesOfferingRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<PurchaseReservedInstancesOfferingRequest>

Container for the parameters to the PurchaseReservedInstancesOffering operation.

Purchases a Reserved Instance for use with your account. With Amazon EC2 Reserved Instances, you obtain a capacity reservation for a certain instance configuration over a specified period of time. You pay a lower usage rate than with On-Demand instances for the time that you actually use the capacity reservation.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.purchaseReservedInstancesOffering(PurchaseReservedInstancesOfferingRequest), Serialized Form

Constructor Summary
PurchaseReservedInstancesOfferingRequest()
          Default constructor for a new PurchaseReservedInstancesOfferingRequest object.
PurchaseReservedInstancesOfferingRequest(java.lang.String reservedInstancesOfferingId, java.lang.Integer instanceCount)
          Constructs a new PurchaseReservedInstancesOfferingRequest object.
 
Method Summary
 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.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PurchaseReservedInstancesOfferingRequest

public PurchaseReservedInstancesOfferingRequest()
Default constructor for a new PurchaseReservedInstancesOfferingRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


PurchaseReservedInstancesOfferingRequest

public PurchaseReservedInstancesOfferingRequest(java.lang.String reservedInstancesOfferingId,
                                                java.lang.Integer instanceCount)
Constructs a new PurchaseReservedInstancesOfferingRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
reservedInstancesOfferingId - The ID of the Reserved Instance offering to purchase.
instanceCount - The number of Reserved Instances to purchase.
Method Detail

getReservedInstancesOfferingId

public java.lang.String getReservedInstancesOfferingId()
The ID of the Reserved Instance offering to purchase.

Returns:
The ID of the Reserved Instance offering to purchase.

setReservedInstancesOfferingId

public void setReservedInstancesOfferingId(java.lang.String reservedInstancesOfferingId)
The ID of the Reserved Instance offering to purchase.

Parameters:
reservedInstancesOfferingId - The ID of the Reserved Instance offering to purchase.

withReservedInstancesOfferingId

public PurchaseReservedInstancesOfferingRequest withReservedInstancesOfferingId(java.lang.String reservedInstancesOfferingId)
The ID of the Reserved Instance offering to purchase.

Returns a reference to this object so that method calls can be chained together.

Parameters:
reservedInstancesOfferingId - The ID of the Reserved Instance offering to purchase.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceCount

public java.lang.Integer getInstanceCount()
The number of Reserved Instances to purchase.

Returns:
The number of Reserved Instances to purchase.

setInstanceCount

public void setInstanceCount(java.lang.Integer instanceCount)
The number of Reserved Instances to purchase.

Parameters:
instanceCount - The number of Reserved Instances to purchase.

withInstanceCount

public PurchaseReservedInstancesOfferingRequest withInstanceCount(java.lang.Integer instanceCount)
The number of Reserved Instances to purchase.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceCount - The number of Reserved Instances to purchase.
Returns:
A reference to this updated object so that method calls can be chained together.

getLimitPrice

public 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.

Returns:
Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

setLimitPrice

public 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.

Parameters:
limitPrice - Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

withLimitPrice

public 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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
limitPrice - Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<PurchaseReservedInstancesOfferingRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<PurchaseReservedInstancesOfferingRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.