createRole()

Creates a role with an optional description.

public void createRole(CreateRoleReq request)

Request Syntax

CreateRoleReq.builder()
    .roleName(roleName)
    .description(description)
    .build();

BUILDER METHODS:

  • roleName(String roleName)

    The name of the role.

  • description(String description)

    The human-readable description of the role.

EXCEPTIONS:

  • MilvusClientExceptions

    Raised when any error occurs during this operation. Inspect the exception message for the exact failure reason.

Example

Creates a role with an optional description.

client.createRole(CreateRoleReq.builder()
    .roleName("analyst")
    .description("Read-only analytics role")
    .build());

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?