跳到主要内容
版本:v3.0.x

create_role()

This operation creates a role for role-based access control.

Request Syntax

Python
create_role(
role_name: str,
timeout: Optional[float] = None
) -> None

PARAMETERS:

  • role_name (str) -

    [REQUIRED]

    The name of the role to create.

  • timeout (float) -

    The timeout duration for this operation.

RETURN TYPE:

None

This operation returns no value.

EXCEPTIONS:

  • MilvusException

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

  • ParamError

    This exception will be raised when a parameter value is invalid.

Examples

Python
client.create_role(role_name="analytics_reader")