ResourceInstance createRecommendationResource(String stackName, String stackVersion) {
    Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Stack, stackName);
    mapIds.put(Resource.Type.StackVersion, stackVersion);

    return createResource(Resource.Type.Recommendation, mapIds);
  }
Returns host-layout recommendations for list of hosts and services.

@param body http body
@param headers http headers
@param ui uri info
@param stackName stack name
@param stackVersion stack version
@return recommendations for host-layout
ambari-server/src/main/java/org/apache/ambari/server/api/services/RecommendationService.java