NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
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: