protected ResourceInstance createPrivilegeResource(String userName, String privilegeId) {
    final Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
    mapIds.put(Resource.Type.UserPrivilege, privilegeId);
    return createResource(Resource.Type.UserPrivilege, mapIds);
  }
Handles: GET /users/{userName}/privileges/{privilegeID}
Get a specific privilege.

@param headers        http headers
@param ui             uri info
@param userName       user name
@param privilegeId   privilege id

@return privilege instance representation
ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java