@Override
  public Set<Resource> getResourcesAuthorized(Request request, Predicate predicate) throws
       SystemException, UnsupportedPropertyException, NoSuchResourceException,
       NoSuchParentResourceException {

    final Set<ConfigGroupRequest> requests = new HashSet<>();
    for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
      requests.add(getConfigGroupRequest(propertyMap));
    }

    Set<ConfigGroupResponse> responses = getResources(new Command<Set<ConfigGroupResponse>>() {
      @Override
      public Set<ConfigGroupResponse> invoke() throws AmbariException {
        return getConfigGroups(requests);
      }
    });

    Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
    Set<Resource> resources    = new HashSet<>();

    if (requestedIds.contains(HOSTS_HOST_NAME)) {
      requestedIds.add(HOSTS);
    }

    for (ConfigGroupResponse response : responses) {
      Resource resource = new ResourceImpl(Resource.Type.ConfigGroup);

      setResourceProperty(resource, ID,
        response.getId(), requestedIds);
      setResourceProperty(resource, CLUSTER_NAME,
        response.getClusterName(), requestedIds);
      setResourceProperty(resource, GROUP_NAME,
        response.getGroupName(), requestedIds);
      setResourceProperty(resource, TAG,
        response.getTag(), requestedIds);
      setResourceProperty(resource, DESCRIPTION,
        response.getDescription(), requestedIds);
      setResourceProperty(resource, HOSTS,
        response.getHosts(), requestedIds);
      setResourceProperty(resource, DESIRED_CONFIGS,
        response.getConfigurations(), requestedIds);

      resources.add(resource);
    }

    return resources;
  }
Create a  new resource provider for the given management controller.

@param managementController the management controller
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java