IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Delete Role Mapping API
editDelete Role Mapping API
editExecution
editDeletion of a role mapping can be performed using the security().deleteRoleMapping()
method:
final DeleteRoleMappingRequest request = new DeleteRoleMappingRequest("mapping-example", RefreshPolicy.NONE); final DeleteRoleMappingResponse response = client.security().deleteRoleMapping(request, RequestOptions.DEFAULT);
Response
editThe returned 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.
Asynchronous Execution
editThis request can be executed asynchronously using the security().deleteRoleMappingAsync()
method:
The asynchronous method does not block and returns immediately. Once the request
has completed the ActionListener
is called back using the onResponse
method
if the execution successfully completed or using the onFailure
method if
it failed.
A typical listener for a DeleteRoleMappingResponse
looks like: