list_privilege_groups()
This operation lists all existing privilege groups.
Request Syntax
list_privilege_groups(
self,
timeout: Optional[float] = None,
**kwargs,
) -> List[Dict[str, str]]
PARAMETERS:
timeout (Optional[float]) -
The timeout duration for this operation.
Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.
RETURN TYPE:
List[Dict[str, str]]
RETURNS:
A list of privilege group names.
EXCEPTIONS:
MilvusException
This exception will be raised when any error occurs during this operation, especially when the specified alias does not exist.
Example
from pymilvus import MilvusClient
# 1. Create a milvus client
client = MilvusClient(
uri="http://localhost:19530",
token="root:Milvus"
)
res = client.list_privilege_groups()
# ['my_privilege_group']