com.amazonaws.services.ec2.model
Class StartInstancesRequest

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

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

Container for the parameters to the StartInstances operation.

Starts an Amazon EBS-backed AMI that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

For more information, see Stopping Instances in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.startInstances(StartInstancesRequest), Serialized Form

Constructor Summary
StartInstancesRequest()
          Default constructor for a new StartInstancesRequest object.
StartInstancesRequest(java.util.List<java.lang.String> instanceIds)
          Constructs a new StartInstancesRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAdditionalInfo()
           
 Request<StartInstancesRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.util.List<java.lang.String> getInstanceIds()
          One or more instance IDs.
 int hashCode()
           
 void setAdditionalInfo(java.lang.String additionalInfo)
           
 void setInstanceIds(java.util.Collection<java.lang.String> instanceIds)
          One or more instance IDs.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 StartInstancesRequest withAdditionalInfo(java.lang.String additionalInfo)
           Returns a reference to this object so that method calls can be chained together.
 StartInstancesRequest withInstanceIds(java.util.Collection<java.lang.String> instanceIds)
          One or more instance IDs.
 StartInstancesRequest withInstanceIds(java.lang.String... instanceIds)
          One or more instance IDs.
 
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

StartInstancesRequest

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


StartInstancesRequest

public StartInstancesRequest(java.util.List<java.lang.String> instanceIds)
Constructs a new StartInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceIds - One or more instance IDs.
Method Detail

getInstanceIds

public java.util.List<java.lang.String> getInstanceIds()
One or more instance IDs.

Returns:
One or more instance IDs.

setInstanceIds

public void setInstanceIds(java.util.Collection<java.lang.String> instanceIds)
One or more instance IDs.

Parameters:
instanceIds - One or more instance IDs.

withInstanceIds

public StartInstancesRequest withInstanceIds(java.lang.String... instanceIds)
One or more instance IDs.

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

Parameters:
instanceIds - One or more instance IDs.
Returns:
A reference to this updated object so that method calls can be chained together.

withInstanceIds

public StartInstancesRequest withInstanceIds(java.util.Collection<java.lang.String> instanceIds)
One or more instance IDs.

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

Parameters:
instanceIds - One or more instance IDs.
Returns:
A reference to this updated object so that method calls can be chained together.

getAdditionalInfo

public java.lang.String getAdditionalInfo()
Returns:

setAdditionalInfo

public void setAdditionalInfo(java.lang.String additionalInfo)
Parameters:
additionalInfo -

withAdditionalInfo

public StartInstancesRequest withAdditionalInfo(java.lang.String additionalInfo)

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

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

getDryRunRequest

public Request<StartInstancesRequest> 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<StartInstancesRequest>

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.