UpdateUserAsync()

Updates a user’s remark.

public async Task UpdateUserAsync(UpdateUserReq request, CancellationToken cancellationToken = default)

Request Syntax

var request = new UpdateUserReq
{
    UserName = "alice",
    Description = "Alice's account"
};

await client.UpdateUserAsync(request);

REQUEST PARAMETERS:

  • UserName (string) -

    The name of the user to update.

  • Description (string?) -

    The new remark of the user. When left null, the server preserves the user’s existing remark (the field is optional on the wire); set a non-null value (including "") to change or clear it.

RETURN TYPE:

Task

RETURNS:

This method does not return a value.

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.Types;

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

await client.UpdateUserAsync(new UpdateUserReq
{
    UserName = "alice",
    Description = "Alice's account"
});

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?