private ResourceInstance createResourceInstance(Long groupId) {
    Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.put(Resource.Type.Cluster, m_clusterName);
    mapIds.put(Resource.Type.Upgrade, m_upgradeId);
    mapIds.put(Resource.Type.Request, m_upgradeId);

    if (null != groupId) {
      mapIds.put(Resource.Type.UpgradeGroup, groupId.toString());
    }

    return createResource(Resource.Type.UpgradeGroup, mapIds);
  }
@param groupId the specific group id
@return the resource instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/UpgradeGroupService.java