public class TerminateInstancesRequest extends AmazonWebServiceRequest implements java.io.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 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, any attached EBS
volumes with the DeleteOnTermination
block device mapping
parameter set to true
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 .
Constructor and Description |
---|
TerminateInstancesRequest()
Default constructor for a new TerminateInstancesRequest object.
|
TerminateInstancesRequest(java.util.List<java.lang.String> instanceIds)
Constructs a new TerminateInstancesRequest object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public TerminateInstancesRequest()
public TerminateInstancesRequest(java.util.List<java.lang.String> instanceIds)
instanceIds
- One or more instance IDs.public java.util.List<java.lang.String> getInstanceIds()
public void setInstanceIds(java.util.Collection<java.lang.String> instanceIds)
instanceIds
- One or more instance IDs.public TerminateInstancesRequest withInstanceIds(java.lang.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(java.util.Collection<java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.