原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/security-api-delete-role-mapping.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/security-api-delete-role-mapping.html
本地英文版地址: ../en/security-api-delete-role-mapping.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Delete role mappings APIedit
Removes role mappings.
Requestedit
DELETE /_security/role_mapping/<name>
Prerequisitesedit
-
To use this API, you must have at least the
manage_security
cluster privilege.
Descriptionedit
Role mappings define which roles are assigned to each user. For more information, see Mapping users and groups to roles.
The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The delete role mappings API cannot remove role mappings that are defined in role mapping files.
Path parametersedit
-
name
- (string) The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way.
Examplesedit
The following example delete a role mapping:
DELETE /_security/role_mapping/mapping1
If the mapping is successfully deleted, the request returns {"found": true}
.
Otherwise, found
is set to false.
{ "found" : true }