public static ResourceType fromString(String str) throws IllegalArgumentException {
        try {
            return ResourceType.valueOf(str.toUpperCase(Locale.ROOT));
        } catch (IllegalArgumentException e) {
            return UNKNOWN;
        }
    }
Parse the given string as an ACL resource type.

@param str    The string to parse.

@return       The ResourceType, or UNKNOWN if the string could not be matched.
clients/src/main/java/org/apache/kafka/common/resource/ResourceType.java