DescribeUserAsync()

Describes a user and its roles.

public async Task<DescribeUserResp> DescribeUserAsync(DescribeUserReq request, CancellationToken cancellationToken = default)

Request Syntax

var request = new DescribeUserReq
{
    UserName = "alice"
};

DescribeUserResp resp = await client.DescribeUserAsync(request);

REQUEST PARAMETERS:

  • UserName (string) -

    The name of the user to describe.

RETURN TYPE:

Task

RETURNS:

A DescribeUserResp object that contains the described user.

DescribeUserResp
    User               // -> UserResult?

PARAMETERS:

  • User (UserResult?) -

    The described user, or null when the user does not exist. A UserResult that contains the following members:

    • User (string) -

      The name of the user.

    • Roles (IReadOnlyList) -

      The names of the roles granted to the user.

    • Description (string) -

      The user description, as set via UpdateUserAsync.

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();

DescribeUserResp resp = await client.DescribeUserAsync(new DescribeUserReq
{
    UserName = "alice"
});

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?