@Path("{stackVersionId}/repository_versions")
  public RepositoryVersionService getRepositoryVersionService(@Context jakarta.ws.rs.core.Request request,
                                                                  @PathParam("stackVersionId") String stackVersion) {
    final Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Cluster, clusterName);
    mapIds.put(Resource.Type.ClusterStackVersion, stackVersion);
    return new RepositoryVersionService(mapIds);
  }
Gets the cluster stack versions service.

@param request
         the request
@param stackVersion
         the stack name

@return the repository stack version service
ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java