< Docs
  • Java


MilvusClient interface. This method lists all the resource groups.

R<ListResourceGroupsResponse> listResourceGroups(ListResourceGroupsParam requestParam);


Use the ListResourceGroupsParam.Builder to construct a ListResourceGroupsParam object.

import io.milvus.param.ListResourceGroupsParam;
ListResourceGroupsParam.Builder builder = ListResourceGroupsParam.newBuilder();

Methods of ListResourceGroupsParam.Builder:

Method Description Parameters
build() Construct a DescribeResourceGroupParam object. N/A


This method catches all the exceptions and returns an R<ListResourceGroupsResponse> object.

  • If the API fails on the server side, it returns the error code and message from the server.

  • If the API fails by RPC exception, it returns R.Status.Unknown and error message of the exception.

  • If the API succeeds, it returns a valid ListResourceGroupsResponse held by the R template. You can use ListResourceGroupsResponse to get resource group information.


import io.milvus.param.ListResourceGroupsParam;

R<ListResourceGroupsResponse> response = client.listResourceGroups(ListResourceGroupsParam.newBuilder()

if (response.getStatus() != R.Status.Success.getCode()) {
    throw new RuntimeException(response.getMessage());