# File lib/fog/softlayer/requests/compute/update_key_pair.rb, line 13
        def update_key_pair(id, opts)
          response = Excon::Response.new
          response.status = 200

          key_pair, index = @key_pairs.each_with_index.map { |kp, i| [kp, i] if kp['id'] == id }.compact.flatten

          if key_pair.nil?
            response.status = 404
            response.body = {
                "error" => "Unable to find object with id of '#{id}'.",
                "code" => "SoftLayer_Exception_ObjectNotFound"
            }
          else

            @key_pairs[index] = key_pair.merge(opts)
            response.body = true
          end
          response
        end