DescribeUser()

Retrieves a user and its role assignments.

pub async fn describe_user(&self, request: DescribeUserRequest) -> Result<DescribeUserResponse>

Request Syntax

let request = DescribeUserRequest::builder()
    .username("alice")
    .build()?;

REQUEST FIELDS:

  • username: String

    Name of the user to describe. Required.

  • include_roles: bool

    Whether the response includes the roles assigned to the user. Defaults to true.

RETURNS:

Result

DescribeUserResponse exposes users() returning a slice of UserDescription, each carrying the username, description, and the assigned roles. Returns an Error on failure.

Example

let request = DescribeUserRequest::builder()
    .username("alice")
    .build()?;
let resp = client.describe_user(request).await?;
for user in resp.users() {
    println!("{}: {:?}", user.get_username(), user.get_roles());
}

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?