private ResourceInstance createResource(UriInfo ui, String clusterName, String hostName, String stackVersionId) {
    final Map<Resource.Type, String> mapIds = new HashMap<>();
    if (clusterName != null) {
      mapIds.put(Resource.Type.Cluster, clusterName);
    }
    mapIds.put(Resource.Type.Host, hostName);
    mapIds.put(Resource.Type.HostStackVersion, stackVersionId);
    return createResource(Resource.Type.HostStackVersion, mapIds);
  }
Create a host stack version resource instance.

@param clusterName
@param hostName host name
@param stackVersionId host stack version id
@return a host host version resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java