listResourceGroups()
MilvusClient interface. This method lists all the resource groups.
R<ListResourceGroupsResponse> listResourceGroups(ListResourceGroupsParam requestParam);
ListResourceGroupsParam
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 |
Returns
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.Unknownand error message of the exception. -
If the API succeeds, it returns a valid
ListResourceGroupsResponseheld by theRtemplate. You can useListResourceGroupsResponseto get resource group information.
Example
import io.milvus.param.ListResourceGroupsParam;
R<ListResourceGroupsResponse> response = client.listResourceGroups(ListResourceGroupsParam.newBuilder()
.build());
if (response.getStatus() != R.Status.Success.getCode()) {
throw new RuntimeException(response.getMessage());
}