private void verifyConfigs(Map<String, Config> configs, String clusterName) throws AmbariException {
    if (configs == null) {
      return;
    }
    Clusters clusters = getManagementController().getClusters();
    for (String key : configs.keySet()) {
      if(!clusters.getCluster(clusterName).isConfigTypeExists(key)){
        throw new AmbariException("Trying to add not existent config type to config group:"+
        " configType = "+ key +
        " cluster = " + clusterName);
      }
    }
  }
Create configuration group resources based on set of config group requests.

@param requests  set of config group requests

@return a request status

@throws SystemException                an internal system exception occurred
@throws UnsupportedPropertyException   the request contains unsupported property ids
@throws ResourceAlreadyExistsException attempted to create a resource which already exists
@throws NoSuchParentResourceException  a parent resource of the resource to create doesn't exist
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java