com.amazonaws.services.ec2.model
Class StopInstancesRequest

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

public class StopInstancesRequest
extends AmazonWebServiceRequest

Container for the parameters to the StopInstances operation.

Stops an instance that uses an Amazon EBS volume as its root device. 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.

NOTE: 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.

See Also:
AmazonEC2.stopInstances(StopInstancesRequest)

Constructor Summary
StopInstancesRequest()
          Default constructor for a new StopInstancesRequest object.
StopInstancesRequest(List<String> instanceIds)
          Constructs a new StopInstancesRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 Boolean getForce()
          Forces the instance to stop.
 List<String> getInstanceIds()
          The list of Amazon EC2 instances to stop.
 int hashCode()
           
 Boolean isForce()
          Forces the instance to stop.
 void setForce(Boolean force)
          Forces the instance to stop.
 void setInstanceIds(Collection<String> instanceIds)
          The list of Amazon EC2 instances to stop.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 StopInstancesRequest withForce(Boolean force)
          Forces the instance to stop.
 StopInstancesRequest withInstanceIds(Collection<String> instanceIds)
          The list of Amazon EC2 instances to stop.
 StopInstancesRequest withInstanceIds(String... instanceIds)
          The list of Amazon EC2 instances to stop.
 
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

StopInstancesRequest

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


StopInstancesRequest

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

Parameters:
instanceIds - The list of Amazon EC2 instances to stop.
Method Detail

getInstanceIds

public List<String> getInstanceIds()
The list of Amazon EC2 instances to stop.

Returns:
The list of Amazon EC2 instances to stop.

setInstanceIds

public void setInstanceIds(Collection<String> instanceIds)
The list of Amazon EC2 instances to stop.

Parameters:
instanceIds - The list of Amazon EC2 instances to stop.

withInstanceIds

public StopInstancesRequest withInstanceIds(String... instanceIds)
The list of Amazon EC2 instances to stop.

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

Parameters:
instanceIds - The list of Amazon EC2 instances to stop.
Returns:
A reference to this updated object so that method calls can be chained together.

withInstanceIds

public StopInstancesRequest withInstanceIds(Collection<String> instanceIds)
The list of Amazon EC2 instances to stop.

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

Parameters:
instanceIds - The list of Amazon EC2 instances to stop.
Returns:
A reference to this updated object so that method calls can be chained together.

isForce

public Boolean isForce()
Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

Returns:
Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

setForce

public void setForce(Boolean force)
Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

Parameters:
force - Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

withForce

public StopInstancesRequest withForce(Boolean force)
Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

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

Parameters:
force - Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.
Returns:
A reference to this updated object so that method calls can be chained together.

getForce

public Boolean getForce()
Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

Returns:
Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

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.