private static String getNameFromRequest(Request request) {
    if (request.getProperties() != null && !request.getProperties().isEmpty()) {
      Map<String, Object> properties = request.getProperties().iterator().next();
      Object name = properties.get(KERBEROS_DESCRIPTOR_NAME_PROPERTY_ID);
      if (name != null) {
        return String.valueOf(name);
      }
    }

    String msg = "No name provided for the Kerberos descriptor";
    LOGGER.error(msg);
    throw new IllegalArgumentException(msg);
  }
@throws IllegalArgumentException if name is not found or is empty
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/KerberosDescriptorResourceProvider.java