com.amazonaws.services.ec2.model
Class RequestSpotInstancesRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.RequestSpotInstancesRequest

public class RequestSpotInstancesRequest
extends AmazonWebServiceRequest

Container for the parameters to the RequestSpotInstances operation.

Creates a Spot Instance request.

Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current spot instance requests.

For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.

See Also:
AmazonEC2.requestSpotInstances(RequestSpotInstancesRequest)

Constructor Summary
RequestSpotInstancesRequest()
          Default constructor for a new RequestSpotInstancesRequest object.
RequestSpotInstancesRequest(String spotPrice)
          Constructs a new RequestSpotInstancesRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAvailabilityZoneGroup()
          Specifies the Availability Zone group.
 Integer getInstanceCount()
          Specifies the maximum number of Spot Instances to launch.
 String getLaunchGroup()
          Specifies the instance launch group.
 LaunchSpecification getLaunchSpecification()
          Specifies additional launch instance information.
 String getSpotPrice()
          Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
 String getType()
          Specifies the Spot Instance type.
 Date getValidFrom()
          Defines the start date of the request.
 Date getValidUntil()
          End date of the request.
 int hashCode()
           
 void setAvailabilityZoneGroup(String availabilityZoneGroup)
          Specifies the Availability Zone group.
 void setInstanceCount(Integer instanceCount)
          Specifies the maximum number of Spot Instances to launch.
 void setLaunchGroup(String launchGroup)
          Specifies the instance launch group.
 void setLaunchSpecification(LaunchSpecification launchSpecification)
          Specifies additional launch instance information.
 void setSpotPrice(String spotPrice)
          Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
 void setType(SpotInstanceType type)
          Specifies the Spot Instance type.
 void setType(String type)
          Specifies the Spot Instance type.
 void setValidFrom(Date validFrom)
          Defines the start date of the request.
 void setValidUntil(Date validUntil)
          End date of the request.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 RequestSpotInstancesRequest withAvailabilityZoneGroup(String availabilityZoneGroup)
          Specifies the Availability Zone group.
 RequestSpotInstancesRequest withInstanceCount(Integer instanceCount)
          Specifies the maximum number of Spot Instances to launch.
 RequestSpotInstancesRequest withLaunchGroup(String launchGroup)
          Specifies the instance launch group.
 RequestSpotInstancesRequest withLaunchSpecification(LaunchSpecification launchSpecification)
          Specifies additional launch instance information.
 RequestSpotInstancesRequest withSpotPrice(String spotPrice)
          Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
 RequestSpotInstancesRequest withType(SpotInstanceType type)
          Specifies the Spot Instance type.
 RequestSpotInstancesRequest withType(String type)
          Specifies the Spot Instance type.
 RequestSpotInstancesRequest withValidFrom(Date validFrom)
          Defines the start date of the request.
 RequestSpotInstancesRequest withValidUntil(Date validUntil)
          End date of the request.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestSpotInstancesRequest

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


RequestSpotInstancesRequest

public RequestSpotInstancesRequest(String spotPrice)
Constructs a new RequestSpotInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
spotPrice - Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
Method Detail

getSpotPrice

public String getSpotPrice()
Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

Returns:
Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

setSpotPrice

public void setSpotPrice(String spotPrice)
Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

Parameters:
spotPrice - Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

withSpotPrice

public RequestSpotInstancesRequest withSpotPrice(String spotPrice)
Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

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

Parameters:
spotPrice - Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceCount

public Integer getInstanceCount()
Specifies the maximum number of Spot Instances to launch.

Returns:
Specifies the maximum number of Spot Instances to launch.

setInstanceCount

public void setInstanceCount(Integer instanceCount)
Specifies the maximum number of Spot Instances to launch.

Parameters:
instanceCount - Specifies the maximum number of Spot Instances to launch.

withInstanceCount

public RequestSpotInstancesRequest withInstanceCount(Integer instanceCount)
Specifies the maximum number of Spot Instances to launch.

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

Parameters:
instanceCount - Specifies the maximum number of Spot Instances to launch.
Returns:
A reference to this updated object so that method calls can be chained together.

getType

public String getType()
Specifies the Spot Instance type.

Constraints:
Allowed Values: one-time, persistent

Returns:
Specifies the Spot Instance type.
See Also:
SpotInstanceType

setType

public void setType(String type)
Specifies the Spot Instance type.

Constraints:
Allowed Values: one-time, persistent

Parameters:
type - Specifies the Spot Instance type.
See Also:
SpotInstanceType

withType

public RequestSpotInstancesRequest withType(String type)
Specifies the Spot Instance type.

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

Constraints:
Allowed Values: one-time, persistent

Parameters:
type - Specifies the Spot Instance type.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
SpotInstanceType

setType

public void setType(SpotInstanceType type)
Specifies the Spot Instance type.

Constraints:
Allowed Values: one-time, persistent

Parameters:
type - Specifies the Spot Instance type.
See Also:
SpotInstanceType

withType

public RequestSpotInstancesRequest withType(SpotInstanceType type)
Specifies the Spot Instance type.

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

Constraints:
Allowed Values: one-time, persistent

Parameters:
type - Specifies the Spot Instance type.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
SpotInstanceType

getValidFrom

public Date getValidFrom()
Defines the start date of the request.

If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Returns:
Defines the start date of the request.

If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.


setValidFrom

public void setValidFrom(Date validFrom)
Defines the start date of the request.

If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Parameters:
validFrom - Defines the start date of the request.

If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.


withValidFrom

public RequestSpotInstancesRequest withValidFrom(Date validFrom)
Defines the start date of the request.

If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

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

Parameters:
validFrom - Defines the start date of the request.

If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Returns:
A reference to this updated object so that method calls can be chained together.

getValidUntil

public Date getValidUntil()
End date of the request.

If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

Returns:
End date of the request.

If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.


setValidUntil

public void setValidUntil(Date validUntil)
End date of the request.

If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

Parameters:
validUntil - End date of the request.

If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.


withValidUntil

public RequestSpotInstancesRequest withValidUntil(Date validUntil)
End date of the request.

If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

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

Parameters:
validUntil - End date of the request.

If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

Returns:
A reference to this updated object so that method calls can be chained together.

getLaunchGroup

public String getLaunchGroup()
Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

Returns:
Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

setLaunchGroup

public void setLaunchGroup(String launchGroup)
Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

Parameters:
launchGroup - Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

withLaunchGroup

public RequestSpotInstancesRequest withLaunchGroup(String launchGroup)
Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

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

Parameters:
launchGroup - Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.
Returns:
A reference to this updated object so that method calls can be chained together.

getAvailabilityZoneGroup

public String getAvailabilityZoneGroup()
Specifies the Availability Zone group.

When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

Returns:
Specifies the Availability Zone group.

When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.


setAvailabilityZoneGroup

public void setAvailabilityZoneGroup(String availabilityZoneGroup)
Specifies the Availability Zone group.

When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

Parameters:
availabilityZoneGroup - Specifies the Availability Zone group.

When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.


withAvailabilityZoneGroup

public RequestSpotInstancesRequest withAvailabilityZoneGroup(String availabilityZoneGroup)
Specifies the Availability Zone group.

When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

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

Parameters:
availabilityZoneGroup - Specifies the Availability Zone group.

When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

Returns:
A reference to this updated object so that method calls can be chained together.

getLaunchSpecification

public LaunchSpecification getLaunchSpecification()
Specifies additional launch instance information.

Returns:
Specifies additional launch instance information.

setLaunchSpecification

public void setLaunchSpecification(LaunchSpecification launchSpecification)
Specifies additional launch instance information.

Parameters:
launchSpecification - Specifies additional launch instance information.

withLaunchSpecification

public RequestSpotInstancesRequest withLaunchSpecification(LaunchSpecification launchSpecification)
Specifies additional launch instance information.

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

Parameters:
launchSpecification - Specifies additional launch instance information.
Returns:
A reference to this updated 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 class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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