Skip to main content

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")
Minimum SDK versionv3.0.x
Ctrl I