vendor/bundle/ruby/1.8/gems/aws-2.5.6/lib/ec2/ec2.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 Aws::Utils.blank?(instance_id)
      hash["Device"] = device.to_s unless Aws::Utils.blank?(device)
      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 Aws :: Utils . blank? ( instance_id ) hash [ "Device" ] = device . to_s unless Aws :: Utils . blank? ( device ) 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
instance_id
device
force