async createOrReplaceRole(request) {
    const id = request.getId();
    const body = request.getBody();
    const userId = request.getKuid();

    const role = await this.ask(
      "core:security:role:createOrReplace",
      id,
      body,
      {
        force: request.getBoolean("force"),
        refresh: request.getRefresh("wait_for"),
        userId,
      },
    );

    global.kuzzle.log.info(
      `[SECURITY] ${SecurityController.userOrSdk(userId)} applied action "${
        request.input.action
      }" on role "${role._id}."`,
    );
    return formatProcessing.serializeRole(role);
  }
Create or replace a Role

@param {Request} request
@returns {Promise<Object>}