WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Deletion of a role mapping can be performed using the
final DeleteRoleMappingRequest request = new DeleteRoleMappingRequest("mapping-example", RefreshPolicy.NONE); final DeleteRoleMappingResponse response = client.security().deleteRoleMapping(request, RequestOptions.DEFAULT);
DeleteRoleMappingResponse contains a single field,
found. If the mapping
is successfully found and deleted, found is set to true. Otherwise, found is set to false.
This request can be executed asynchronously using the
The asynchronous method does not block and returns immediately. Once the request
has completed the
ActionListener is called back using the
if the execution successfully completed or using the
onFailure method if
A typical listener for a
DeleteRoleMappingResponse looks like: