# File lib/ec2/ec2.rb, line 1274
    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