com.amazonaws.services.ec2.model
Class TerminateInstancesRequest

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

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

Container for the parameters to the TerminateInstances operation.

Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all Amazon EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide .

For more information about troubleshooting, see Troubleshooting Terminating Your Instance in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.terminateInstances(TerminateInstancesRequest), Serialized Form

Constructor Summary
TerminateInstancesRequest()
          Default constructor for a new TerminateInstancesRequest object.
TerminateInstancesRequest(java.util.List<java.lang.String> instanceIds)
          Constructs a new TerminateInstancesRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Request<TerminateInstancesRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.util.List<java.lang.String> getInstanceIds()
          One or more instance IDs.
 int hashCode()
           
 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.
 TerminateInstancesRequest withInstanceIds(java.util.Collection<java.lang.String> instanceIds)
          One or more instance IDs.
 TerminateInstancesRequest 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

TerminateInstancesRequest

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


TerminateInstancesRequest

public TerminateInstancesRequest(java.util.List<java.lang.String> instanceIds)
Constructs a new TerminateInstancesRequest 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 TerminateInstancesRequest 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 TerminateInstancesRequest 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.

getDryRunRequest

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

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.