ListPrivilegeGroupsAsync()

Lists all privilege groups.

public async Task<ListPrivilegeGroupsResp> ListPrivilegeGroupsAsync(ListPrivilegeGroupsReq request, CancellationToken cancellationToken = default)

Request Syntax

var request = new ListPrivilegeGroupsReq();

ListPrivilegeGroupsResp resp = await client.ListPrivilegeGroupsAsync(request);

RETURN TYPE:

Task

RETURNS:

A ListPrivilegeGroupsResp object that contains the privilege groups and the privileges they contain.

ListPrivilegeGroupsResp
    Groups             // -> IReadOnlyList<PrivilegeGroupInfo>
    GroupNames         // -> IReadOnlyList<string>

PARAMETERS:

  • Groups (IReadOnlyList) -

    The privilege groups and the privileges they contain. A PrivilegeGroupInfo that contains the following members:

    • GroupName (string) -

      The name of the privilege group.

    • Privileges (IReadOnlyList) -

      The privileges contained in the group.

  • GroupNames (IReadOnlyList) -

    The names of the privilege 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.Rbac;
using Milvus.Client.V2.Responses.Rbac;
using Milvus.Client.V2.Types;

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

ListPrivilegeGroupsResp resp = await client.ListPrivilegeGroupsAsync(new ListPrivilegeGroupsReq());

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?