public class TerminateInstancesRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<TerminateInstancesRequest>
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 .
NOOP
Constructor and Description |
---|
TerminateInstancesRequest()
Default constructor for a new TerminateInstancesRequest object.
|
TerminateInstancesRequest(List<String> instanceIds)
Constructs a new TerminateInstancesRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Request<TerminateInstancesRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
List<String> |
getInstanceIds()
One or more instance IDs.
|
int |
hashCode() |
void |
setInstanceIds(Collection<String> instanceIds)
One or more instance IDs.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
TerminateInstancesRequest |
withInstanceIds(Collection<String> instanceIds)
One or more instance IDs.
|
TerminateInstancesRequest |
withInstanceIds(String... instanceIds)
One or more instance IDs.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public TerminateInstancesRequest()
public List<String> getInstanceIds()
public void setInstanceIds(Collection<String> instanceIds)
instanceIds
- One or more instance IDs.public TerminateInstancesRequest withInstanceIds(String... instanceIds)
Returns a reference to this object so that method calls can be chained together.
instanceIds
- One or more instance IDs.public TerminateInstancesRequest withInstanceIds(Collection<String> instanceIds)
Returns a reference to this object so that method calls can be chained together.
instanceIds
- One or more instance IDs.public Request<TerminateInstancesRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<TerminateInstancesRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.