private Resource createBlueprintResource(TreeNode<Resource> clusterNode) {
    Resource blueprintResource = new ResourceImpl(Resource.Type.Cluster);

    ClusterTopology topology;
    try {
      topology = createClusterTopology(clusterNode);
    } catch (InvalidTopologyTemplateException | InvalidTopologyException e) {
      throw new RuntimeException("Unable to process blueprint export request: " + e, e);
    }

    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
    configProcessor.doUpdateForBlueprintExport(exportType);

    Stack stack = topology.getBlueprint().getStack();
    blueprintResource.setProperty("Blueprints/stack_name", stack.getName());
    blueprintResource.setProperty("Blueprints/stack_version", stack.getVersion());

    if (topology.isClusterKerberosEnabled()) {
      Map<String, Object> securityConfigMap = new LinkedHashMap<>();
      securityConfigMap.put(SecurityConfigurationFactory.TYPE_PROPERTY_ID, SecurityType.KERBEROS.name());

      try {
        String clusterName = topology.getAmbariContext().getClusterName(topology.getClusterId());
        Map<String, Object> kerberosDescriptor = getKerberosDescriptor(AmbariContext.getClusterController(), clusterName);
        if (kerberosDescriptor != null) {
          securityConfigMap.put(SecurityConfigurationFactory.KERBEROS_DESCRIPTOR_PROPERTY_ID, kerberosDescriptor);
        }
      } catch (AmbariException e) {
        LOG.info("Unable to retrieve kerberos_descriptor: ", e.getMessage());
      }
      blueprintResource.setProperty(BlueprintResourceProvider.BLUEPRINT_SECURITY_PROPERTY_ID, securityConfigMap);
    }

    List<Map<String, Object>> groupList = formatGroupsAsList(topology);
    blueprintResource.setProperty("host_groups", groupList);

    List<Map<String, Map<String, Map<String, ?>>>> configurations = processConfigurations(topology);
    if (exportType.include(configurations)) {
      blueprintResource.setProperty("configurations", configurations);
    }

    //Fetch settings section for blueprint
    Collection<Map<String, Object>> settings = getSettings(clusterNode, stack);
    if (exportType.include(settings)) {
      blueprintResource.setProperty("settings", settings);
    }

    return blueprintResource;
  }
Create a blueprint resource.

@param clusterNode  cluster tree node
@return a new blueprint resource
ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java