lib/ec2/right_ec2_ebs.rb
# Detach the specified EBS volume from the instance to which it is attached.
#
#   ec2.detach_volume('vol-898a6fe0') #=>
#     { :aws_instance_id => "i-7c905415",
#       :aws_device      => "/dev/sdh",
#       :aws_status      => "detaching",
#       :aws_attached_at => "2008-03-28T14:38:34.000Z",
#       :aws_id          => "vol-898a6fe0"}
#
Detach the specified EBS volume from the instance to which it is attached.
Detach the specified EBS volume from the instance to which it is attached .
def detach_volume(volume_id, instance_id=nil, device=nil, force=nil)
      hash = { "VolumeId" => volume_id.to_s }
      hash["InstanceId"] = instance_id.to_s unless instance_id.right_blank?
      hash["Device"]     = device.to_s      unless device.right_blank?
      hash["Force"]      = 'true'           if     force
      link = generate_request("DetachVolume", hash)
      request_info(link, QEc2AttachAndDetachVolumeParser.new(:logger => @logger))
    rescue Exception
      on_exception
    end
def detach_volume ( volume_id , instance_id = nil , device = nil , force = nil ) hash = { "VolumeId" => volume_id . to_s } hash [ "InstanceId" ] = instance_id . to_s unless instance_id . right_blank? hash [ "Device" ] = device . to_s unless device . right_blank? hash [ "Force" ] = 'true' if force link = generate_request ( "DetachVolume" , hash ) request_info ( link , QEc2AttachAndDetachVolumeParser . new ( :logger => @logger ) ) rescue Exception on_exception end
Detach the specified EBS volume from the instance to which it is attached.
Detach the specified EBS volume from the instance to which it is attached .
#
volume_id
<not_specific>
instance_id
<not_specific>
device
<not_specific>
force
<not_specific>