2009-07-26 22:22:27 -04:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class EC2
|
|
|
|
|
|
|
|
# Detach an Amazon EBS volume from a running instance
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * volume_id<~String> - Id of amazon EBS volume to associate with instance
|
|
|
|
# * options<~Hash>:
|
2009-08-01 04:15:44 -04:00
|
|
|
# * 'Device'<~String> - Specifies how the device is exposed to the instance (e.g. "/dev/sdh")
|
|
|
|
# * 'Force'<~Boolean> - If true forces detach, can cause data loss/corruption
|
|
|
|
# * 'InstanceId'<~String> - Id of instance to associate volume with
|
2009-07-26 22:22:27 -04:00
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Fog::AWS::Response>:
|
|
|
|
# * body<~Hash>:
|
2009-08-01 04:15:44 -04:00
|
|
|
# * 'attachTime'<~Time> - Time of attachment was initiated at
|
|
|
|
# * 'device'<~String> - Device as it is exposed to the instance
|
|
|
|
# * 'instanceId'<~String> - Id of instance for volume
|
|
|
|
# * 'requestId'<~String> - Id of request
|
|
|
|
# * 'status'<~String> - Status of volume
|
|
|
|
# * 'volumeId'<~String> - Reference to volume
|
2009-07-26 22:22:27 -04:00
|
|
|
def detach_volume(volume_id, options = {})
|
|
|
|
request({
|
|
|
|
'Action' => 'DetachVolume',
|
2009-08-01 04:15:44 -04:00
|
|
|
'VolumeId' => volume_id
|
|
|
|
}.merge!(options), Fog::Parsers::AWS::EC2::DetachVolume.new)
|
2009-07-26 22:22:27 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|