public boolean createConfigType(Cluster cluster, StackId stackId,
      AmbariManagementController controller, String configType, Map<String, String> properties,
      Map<String, Map<String, String>> propertyAttributes, String authenticatedUserName,
      String serviceVersionNote) throws AmbariException {

    // create the configuration history entry
    Config baseConfig = createConfig(cluster, stackId, controller, configType, FIRST_VERSION_TAG,
        properties, propertyAttributes);

    if (baseConfig != null) {
      cluster.addDesiredConfig(authenticatedUserName,
          Collections.singleton(baseConfig), serviceVersionNote);
      return true;
    }
    return false;
  }
A helper method to create a new {@link Config} for a given configuration
type and updates to the current values, if any. This method will perform the following tasks:
<ul>
<li>Merge the specified updates with the properties of the current version of the
configuration</li>
<li>Create a {@link Config} in the cluster for the specified type. This
will have the proper versions and tags set automatically.</li>
<li>Set the cluster's {@link DesiredConfig} to the new configuration</li>
<li>Create an entry in the configuration history with a note and username.</li>
<ul>

@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java