ListResourceGroupsAsync()

Lists all resource groups.

public async Task<ListResourceGroupsResp> ListResourceGroupsAsync(ListResourceGroupsReq request, CancellationToken cancellationToken = default)

Request Syntax

var request = new ListResourceGroupsReq();

ListResourceGroupsResp response = await client.ListResourceGroupsAsync(request);

REQUEST PARAMETERS:

This request takes no fields.

RETURN TYPE:

Task

RETURNS:

A ListResourceGroupsResp object that contains the names of the resource groups.

ListResourceGroupsResp
    ResourceGroups  // -> IReadOnlyList<string>

PARAMETERS:

  • ResourceGroups (IReadOnlyList) -

    The names of the resource groups.

EXCEPTIONS:

  • MilvusException

    Thrown when the RPC fails or the server returns an error. Inspect the exception message for details.

Example

using Milvus.Client.V2;
using Milvus.Client.V2.Requests.ResourceGroup;
using Milvus.Client.V2.Responses.ResourceGroup;
using Milvus.Client.V2.Types;

using var client = new MilvusClientV2(new ConnectConfig
{
    Uri = "localhost:19530",
    Username = "root",
    Password = "Milvus"
});
await client.ConnectAsync();

ListResourceGroupsResp response = await client.ListResourceGroupsAsync(new ListResourceGroupsReq());
foreach (string name in response.ResourceGroups)
{
    Console.WriteLine(name);
}

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?