private List<Map<String, Object>> convertToSubResources(final String clusterName, List<ConfigurationResponse> configs) {
    List<Map<String, Object>> result = new ArrayList<>();
    for (final ConfigurationResponse config : configs) {
      Map<String, Object> subResourceMap = new LinkedHashMap<>();
      Map<String,String> configMap = new HashMap<>();

      String stackId = config.getStackId().getStackId();

      configMap.put("cluster_name", clusterName);
      configMap.put("stack_id", stackId);

      subResourceMap.put("Config", configMap);
      subResourceMap.put("type", config.getType());
      subResourceMap.put("tag", config.getVersionTag());
      subResourceMap.put("version", config.getVersion());
      subResourceMap.put("properties", new TreeMap<>(config.getConfigs()));
      subResourceMap.put("properties_attributes", config.getConfigAttributes());
      result.add(subResourceMap);
    }

    return result;
  }
Constructor

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