原文地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/security-api-delete-role.html, 原文档版权归 www.elastic.co 所有
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Delete roles APIedit
Removes roles in the native realm.
Requestedit
DELETE /_security/role/<name>
Prerequisitesedit
-
To use this API, you must have at least the
manage_security
cluster privilege.
Descriptionedit
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The delete roles API cannot remove roles that are defined in roles files.
Path parametersedit
-
name
- (string) The name of the role.
Examplesedit
The following example deletes a my_admin_role
role:
DELETE /_security/role/my_admin_role
If the role is successfully deleted, the request returns {"found": true}
.
Otherwise, found
is set to false.
{ "found" : true }