ResourceInstance createConfigGroupResource(String clusterName,
                                             String groupId) {
    Map<Resource.Type,String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Cluster, clusterName);
    mapIds.put(Resource.Type.ConfigGroup, groupId);

    return createResource(Resource.Type.ConfigGroup, mapIds);
  }
Create a request resource instance.

@param clusterName  cluster name
@param groupId    config group id

@return a request resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigGroupService.java