alter_role()

This operation updates the description of an existing role.

Request syntax

client.alter_role(
    role_name: str,
    description: str,
    timeout: Optional[float] = None
) -> None

PARAMETERS:

  • role_name (str) -

    [REQUIRED]

    The name of the role to alter.

  • description (str) -

    [REQUIRED]

    The new description of the role.

  • timeout (float | None) -

    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:

NoneType

RETURNS:

None

EXCEPTIONS:

  • MilvusException

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

Example

from pymilvus import MilvusClient

client = MilvusClient(
    uri="http://localhost:19530",
    token="root:Milvus"
)

# Create a role
client.create_role(role_name="analytics_reader")

client.alter_role(
    role_name="analytics_reader",
    description="Read-only access for the analytics team",
)

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?