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:
-
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 var client = new MilvusClientV2(new ConnectConfig
{
Uri = "localhost:19530",
Username = "root",
Password = "Milvus"
});
await client.ConnectAsync();
ListPrivilegeGroupsResp resp = await client.ListPrivilegeGroupsAsync(new ListPrivilegeGroupsReq());