Package org.elasticsearch.client
Class SecurityClient
- java.lang.Object
-
- org.elasticsearch.client.SecurityClient
-
public final class SecurityClient extends java.lang.ObjectA wrapper for theRestHighLevelClientthat provides methods for accessing the Security APIs.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmptyResponsechangePassword(ChangePasswordRequest request, RequestOptions options)Change the password of a user of a native realm or built-in user synchronously.voidchangePasswordAsync(ChangePasswordRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)Change the password of a user of a native realm or built-in user asynchronously.DeleteRoleResponsedeleteRole(DeleteRoleRequest request, RequestOptions options)Removes role from the native realm.voiddeleteRoleAsync(DeleteRoleRequest request, RequestOptions options, ActionListener<DeleteRoleResponse> listener)Removes role from the native realm.DeleteRoleMappingResponsedeleteRoleMapping(DeleteRoleMappingRequest request, RequestOptions options)Delete a role mapping.voiddeleteRoleMappingAsync(DeleteRoleMappingRequest request, RequestOptions options, ActionListener<DeleteRoleMappingResponse> listener)Asynchronously delete a role mapping.EmptyResponsedisableUser(DisableUserRequest request, RequestOptions options)Disable a native realm or built-in user synchronously.voiddisableUserAsync(DisableUserRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)Disable a native realm or built-in user asynchronously.EmptyResponseenableUser(EnableUserRequest request, RequestOptions options)Enable a native realm or built-in user synchronously.voidenableUserAsync(EnableUserRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)Enable a native realm or built-in user asynchronously.GetSslCertificatesResponsegetSslCertificates(RequestOptions options)Synchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster.voidgetSslCertificatesAsync(RequestOptions options, ActionListener<GetSslCertificatesResponse> listener)Asynchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster.PutRoleMappingResponseputRoleMapping(PutRoleMappingRequest request, RequestOptions options)Create/Update a role mapping.voidputRoleMappingAsync(PutRoleMappingRequest request, RequestOptions options, ActionListener<PutRoleMappingResponse> listener)Asynchronously create/update a role mapping.PutUserResponseputUser(PutUserRequest request, RequestOptions options)Create/update a user in the native realm synchronously.voidputUserAsync(PutUserRequest request, RequestOptions options, ActionListener<PutUserResponse> listener)Asynchronously create/update a user in the native realm.
-
-
-
Method Detail
-
putUser
public PutUserResponse putUser(PutUserRequest request, RequestOptions options) throws java.io.IOException
Create/update a user in the native realm synchronously. See the docs for more.- Parameters:
request- the request with the user's informationoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the put user call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putUserAsync
public void putUserAsync(PutUserRequest request, RequestOptions options, ActionListener<PutUserResponse> listener)
Asynchronously create/update a user in the native realm. See the docs for more.- Parameters:
request- the request with the user's informationoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
putRoleMapping
public PutRoleMappingResponse putRoleMapping(PutRoleMappingRequest request, RequestOptions options) throws java.io.IOException
Create/Update a role mapping. See the docs for more.- Parameters:
request- the request with the role mapping informationoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the put role mapping call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putRoleMappingAsync
public void putRoleMappingAsync(PutRoleMappingRequest request, RequestOptions options, ActionListener<PutRoleMappingResponse> listener)
Asynchronously create/update a role mapping. See the docs for more.- Parameters:
request- the request with the role mapping informationoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
enableUser
public EmptyResponse enableUser(EnableUserRequest request, RequestOptions options) throws java.io.IOException
Enable a native realm or built-in user synchronously. See the docs for more.- Parameters:
request- the request with the user to enableoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the enable user call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
enableUserAsync
public void enableUserAsync(EnableUserRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)
Enable a native realm or built-in user asynchronously. See the docs for more.- Parameters:
request- the request with the user to enableoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
disableUser
public EmptyResponse disableUser(DisableUserRequest request, RequestOptions options) throws java.io.IOException
Disable a native realm or built-in user synchronously. See the docs for more.- Parameters:
request- the request with the user to disableoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the enable user call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
disableUserAsync
public void disableUserAsync(DisableUserRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)
Disable a native realm or built-in user asynchronously. See the docs for more.- Parameters:
request- the request with the user to disableoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
getSslCertificates
public GetSslCertificatesResponse getSslCertificates(RequestOptions options) throws java.io.IOException
Synchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster. See the docs for more.- Parameters:
options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the get certificates call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getSslCertificatesAsync
public void getSslCertificatesAsync(RequestOptions options, ActionListener<GetSslCertificatesResponse> listener)
Asynchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster. See the docs for more.- Parameters:
options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
changePassword
public EmptyResponse changePassword(ChangePasswordRequest request, RequestOptions options) throws java.io.IOException
Change the password of a user of a native realm or built-in user synchronously. See the docs for more.- Parameters:
request- the request with the user's new passwordoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the change user password call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
changePasswordAsync
public void changePasswordAsync(ChangePasswordRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)
Change the password of a user of a native realm or built-in user asynchronously. See the docs for more.- Parameters:
request- the request with the user's new passwordoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
deleteRoleMapping
public DeleteRoleMappingResponse deleteRoleMapping(DeleteRoleMappingRequest request, RequestOptions options) throws java.io.IOException
Delete a role mapping. See the docs for more.- Parameters:
request- the request with the role mapping name to be deleted.options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the delete role mapping call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deleteRoleMappingAsync
public void deleteRoleMappingAsync(DeleteRoleMappingRequest request, RequestOptions options, ActionListener<DeleteRoleMappingResponse> listener)
Asynchronously delete a role mapping. See the docs for more.- Parameters:
request- the request with the role mapping name to be deleted.options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
deleteRole
public DeleteRoleResponse deleteRole(DeleteRoleRequest request, RequestOptions options) throws java.io.IOException
Removes role from the native realm. See the docs for more.- Parameters:
request- the request with the role to deleteoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response from the delete role call
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deleteRoleAsync
public void deleteRoleAsync(DeleteRoleRequest request, RequestOptions options, ActionListener<DeleteRoleResponse> listener)
Removes role from the native realm. See the docs for more.- Parameters:
request- the request with the role to deleteoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
-