DetachVolume
The DetachVolume
operation detaches an Amazon EBS volume from an instance.
For more information about Amazon EBS, see Amazon Elastic Block Store.
Request Parameters
The following table describes the request parameters for
DetachVolume
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
The ID of the Amazon EBS volume Type: xsd:string Default: none Valid Values: ID of a volume that you own Constraints: none |
Yes |
|
The ID of the instance from which the volume will detach Type: xsd:string Default: none Valid Values: ID of the instance attached to the volume Constraints: none |
No |
|
The device name Type: xsd:string Default: none Valid Values: Valid device ID Constraints: none |
No |
|
Forces detachment if the previous detachment attempt did not occur cleanly (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 an instance from a failed instance. 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. Default: none Valid Values: none Constraints: none |
No |
Response Elements
The following table describes the default response tags included
in DetachVolume
responses.
Name | Description |
---|---|
|
The ID of the volume Type: xsd:string |
|
The ID of the instance Type: xsd:string |
|
The device as it is exposed to the instance Type: xsd:string |
|
Volume state (e.g., Type: xsd:string |
|
Time stamp when detaching was initiated Type: xsd:dateTime |
Sample Request
<DetachVolume xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> </DetachVolume>
Sample Response
<DetachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> <device>/dev/sdh</device> <status>detaching</status> <attachTime>2008-05-08T11:51:50.000Z</attachTime> </DetachVolumeResponse>