メインコンテンツまでスキップ

dropRole()

Addedv2.3.x

This operation drops a custom role.

public void dropRole(DropRoleReq request)

Request Syntax

dropRole(DropRoleReq.builder()
.roleName(String roleName)
.build()
)

BUILDER METHODS:

  • roleName(String roleName)

    The name of the role to drop.

RETURNS:

void

EXCEPTIONS:

  • MilvusClientExceptions

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

Example

import io.milvus.v2.client.ConnectConfig;
import io.milvus.v2.client.MilvusClientV2;
import io.milvus.v2.service.rbac.request.DropRoleReq;

// 1. Set up a client
ConnectConfig connectConfig = ConnectConfig.builder()
.uri("YOUR_CLUSTER_ENDPOINT")
.token("YOUR_CLUSTER_TOKEN")
.build();

MilvusClientV2 client = new MilvusClientV2(connectConfig);

// 2. Drop a role
DropRoleReq dropRoleReq = DropRoleReq.builder()
.roleName("test")
.build();
client.dropRole(dropRoleReq);