|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.DetachVolumeRequest
public class DetachVolumeRequest
Container for the parameters to the DetachVolume operation
.
Detaches an Amazon EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so results in the volume being stuck in a busy state while detaching.
If an Amazon EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.
If the root volume is detached from an instance with an AWS Marketplace product code, then the AWS Marketplace product codes from that volume are no longer associated with the instance.
For more information, see Detaching an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide .
AmazonEC2.detachVolume(DetachVolumeRequest)
,
Serialized FormConstructor Summary | |
---|---|
DetachVolumeRequest()
Default constructor for a new DetachVolumeRequest object. |
|
DetachVolumeRequest(java.lang.String volumeId)
Constructs a new DetachVolumeRequest object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDevice()
The device name. |
Request<DetachVolumeRequest> |
getDryRunRequest()
This method is intended for internal use only. |
java.lang.Boolean |
getForce()
Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). |
java.lang.String |
getInstanceId()
The ID of the instance. |
java.lang.String |
getVolumeId()
The ID of the volume. |
int |
hashCode()
|
java.lang.Boolean |
isForce()
Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). |
void |
setDevice(java.lang.String device)
The device name. |
void |
setForce(java.lang.Boolean force)
Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). |
void |
setInstanceId(java.lang.String instanceId)
The ID of the instance. |
void |
setVolumeId(java.lang.String volumeId)
The ID of the volume. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
DetachVolumeRequest |
withDevice(java.lang.String device)
The device name. |
DetachVolumeRequest |
withForce(java.lang.Boolean force)
Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). |
DetachVolumeRequest |
withInstanceId(java.lang.String instanceId)
The ID of the instance. |
DetachVolumeRequest |
withVolumeId(java.lang.String volumeId)
The ID of the volume. |
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 |
---|
public DetachVolumeRequest()
public DetachVolumeRequest(java.lang.String volumeId)
volumeId
- The ID of the volume.Method Detail |
---|
public java.lang.String getVolumeId()
public void setVolumeId(java.lang.String volumeId)
volumeId
- The ID of the volume.public DetachVolumeRequest withVolumeId(java.lang.String volumeId)
Returns a reference to this object so that method calls can be chained together.
volumeId
- The ID of the volume.
public java.lang.String getInstanceId()
public void setInstanceId(java.lang.String instanceId)
instanceId
- The ID of the instance.public DetachVolumeRequest withInstanceId(java.lang.String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The ID of the instance.
public java.lang.String getDevice()
public void setDevice(java.lang.String device)
device
- The device name.public DetachVolumeRequest withDevice(java.lang.String device)
Returns a reference to this object so that method calls can be chained together.
device
- The device name.
public java.lang.Boolean isForce()
public void setForce(java.lang.Boolean force)
force
- Forces detachment if the previous detachment attempt did not occur
cleanly (for example, logging into an instance, unmounting the volume,
and detaching normally). This option can lead to data loss or a
corrupted file system. Use this option only as a last resort to detach
a volume from a failed instance. The instance won't have an
opportunity to flush file system caches or file system metadata. If
you use this option, you must perform file system check and repair
procedures.public DetachVolumeRequest withForce(java.lang.Boolean force)
Returns a reference to this object so that method calls can be chained together.
force
- Forces detachment if the previous detachment attempt did not occur
cleanly (for example, logging into an instance, unmounting the volume,
and detaching normally). This option can lead to data loss or a
corrupted file system. Use this option only as a last resort to detach
a volume from a failed instance. The instance won't have an
opportunity to flush file system caches or file system metadata. If
you use this option, you must perform file system check and repair
procedures.
public java.lang.Boolean getForce()
public Request<DetachVolumeRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<DetachVolumeRequest>
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
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |