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

RevokePrivilegeV2()

This method revokes a privilege or a privilege group from a role. In Milvus, you can allocate multiple privileges or privilege groups to a role and grant the role to a user so that the user gains the privileges allocated to the role.

func (c *Client) RevokePrivilegeV2(ctx context.Context, option RevokePrivilegeV2Option, callOptions ...grpc.CallOption) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

RevokePrivilegeV2Option

callOptions

Optional parameters for calling the methods.

grpc.CallOption

RevokePrivilegeV2Option

This is an interface type. The revokePrivilegeV2Option struct type implements this interface type.

You can use the NewRemovePrivilegeV2Option() function to get the concrete implementation.

NewRemovePrivilegeV2Option

The signature of the NewRemovePrivilegeV2Option() is as follows:

func NewRevokePrivilegeV2Option(roleName, privilegeName, collectionName string) *revokePrivilegeV2Option

Parameter

Description

Type

roleName

Name of the target role of this operation.

string

privilegeName

Name of the privilege or privilege group to assign.

For details, refer to the Privilege name column in the table on page Users and Roles.

string

collectionName

Name of the target collection.

string

grpc.CallOption

This interface provided by the gRPC Go library allows you to specify additional options or configurations when making requests. For possible implementations of this interface, refer to this file.

Return

Null

Example