milvus-logo
LFAI
< Docs
  • Python

remove_user()

This operation removes a user from the current role. Once removed, the user will lose the permissions allowed for the current role.

Request Syntax

remove_user(
    username: str
)

PARAMETERS:

  • username (str) -

    [REQUIRED]

    The name of the user to remove from a role.

RETURN TYPE:

NoneType

RETURNS:

None

EXCEPTIONS:

  • MilvusException

    This exception will be raised when any error occurs during this operation.

Examples

from pymilvus import Role

# Get an existing role
role = Role(name=role_name)

# Remove the specified user from the current role
role.remove_user(username)

# List all users of the current role
users = role.get_users()

Related operations

The following operations are related to add_user():

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?