update(id, updatedConnection) {
    let _this = this;
    let connections;

    return new Promise((resolve, reject) => {
      if (!id) return reject(new errors.InvalidArugmentError('id is required'));
      if (!updatedConnection) return reject(new errors.InvalidArugmentError('updatedConnection is required'));

      return _this.list()
        .then((_connections) => {
          connections = _connections;
          return findConnectionById(id, connections);
        })
        .then((connection) => {
          return updateConnection(connection, updatedConnection, connections);
        })
        .then(convertConnectionInstancesIntoConfig)
        .then(writeConfigFile)
        .then(() => {
          return resolve(updatedConnection);
        })
        .catch(reject);
    });
  }
Update a connection by id
@param {string} id - id of the connection to update
@param {object} updates - hash of updates to apply to the connection
@param {string} [updates.name] - connection name
@param {string} [updates.host] - Connection host
@param {string} [updates.port ]- Connection port
@param {string} [updates.databaseName] - Database name
@param {object} [updates.replicaSet] - Replica set config
@param {string} [updates.replicaSet.name] - Replica set name
@param {array<object>} [updates.replicaSet.servers] - Replica set servers
@param {object} [updates.auth]