Package org.elasticsearch.client
Class SecurityClient
- java.lang.Object
-
- org.elasticsearch.client.SecurityClient
-
public final class SecurityClient extends java.lang.Object
A wrapper for theRestHighLevelClient
that provides methods for accessing the Security APIs.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticateResponse
authenticate(RequestOptions options)
Authenticate the current user and return all the information about the authenticated user.void
authenticateAsync(RequestOptions options, ActionListener<AuthenticateResponse> listener)
Authenticate the current user asynchronously and return all the information about the authenticated user.EmptyResponse
changePassword(ChangePasswordRequest request, RequestOptions options)
Change the password of a user of a native realm or built-in user synchronously.void
changePasswordAsync(ChangePasswordRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)
Change the password of a user of a native realm or built-in user asynchronously.ClearRealmCacheResponse
clearRealmCache(ClearRealmCacheRequest request, RequestOptions options)
Clears the cache in one or more realms.void
clearRealmCacheAsync(ClearRealmCacheRequest request, RequestOptions options, ActionListener<ClearRealmCacheResponse> listener)
Clears the cache in one or more realms asynchronously.ClearRolesCacheResponse
clearRolesCache(ClearRolesCacheRequest request, RequestOptions options)
Clears the roles cache for a set of roles.void
clearRolesCacheAsync(ClearRolesCacheRequest request, RequestOptions options, ActionListener<ClearRolesCacheResponse> listener)
Clears the roles cache for a set of roles asynchronously.CreateTokenResponse
createToken(CreateTokenRequest request, RequestOptions options)
Creates an OAuth2 token.void
createTokenAsync(CreateTokenRequest request, RequestOptions options, ActionListener<CreateTokenResponse> listener)
Asynchronously creates an OAuth2 token.DeletePrivilegesResponse
deletePrivileges(DeletePrivilegesRequest request, RequestOptions options)
Removes application privilege(s) See the docs for more.void
deletePrivilegesAsync(DeletePrivilegesRequest request, RequestOptions options, ActionListener<DeletePrivilegesResponse> listener)
Asynchronously removes an application privilege See the docs for more.DeleteRoleResponse
deleteRole(DeleteRoleRequest request, RequestOptions options)
Removes role from the native realm.void
deleteRoleAsync(DeleteRoleRequest request, RequestOptions options, ActionListener<DeleteRoleResponse> listener)
Removes role from the native realm.DeleteRoleMappingResponse
deleteRoleMapping(DeleteRoleMappingRequest request, RequestOptions options)
Delete a role mapping.void
deleteRoleMappingAsync(DeleteRoleMappingRequest request, RequestOptions options, ActionListener<DeleteRoleMappingResponse> listener)
Asynchronously delete a role mapping.DeleteUserResponse
deleteUser(DeleteUserRequest request, RequestOptions options)
Removes user from the native realm synchronously.void
deleteUserAsync(DeleteUserRequest request, RequestOptions options, ActionListener<DeleteUserResponse> listener)
Asynchronously deletes a user in the native realm.EmptyResponse
disableUser(DisableUserRequest request, RequestOptions options)
Disable a native realm or built-in user synchronously.void
disableUserAsync(DisableUserRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)
Disable a native realm or built-in user asynchronously.EmptyResponse
enableUser(EnableUserRequest request, RequestOptions options)
Enable a native realm or built-in user synchronously.void
enableUserAsync(EnableUserRequest request, RequestOptions options, ActionListener<EmptyResponse> listener)
Enable a native realm or built-in user asynchronously.GetPrivilegesResponse
getPrivileges(GetPrivilegesRequest request, RequestOptions options)
Synchronously get application privilege(s).void
getPrivilegesAsync(GetPrivilegesRequest request, RequestOptions options, ActionListener<GetPrivilegesResponse> listener)
Asynchronously get application privilege(s).GetRoleMappingsResponse
getRoleMappings(GetRoleMappingsRequest request, RequestOptions options)
Synchronously get role mapping(s).void
getRoleMappingsAsync(GetRoleMappingsRequest request, RequestOptions options, ActionListener<GetRoleMappingsResponse> listener)
Asynchronously get role mapping(s).GetRolesResponse
getRoles(GetRolesRequest request, RequestOptions options)
Retrieves roles from the native roles store.void
getRolesAsync(GetRolesRequest request, RequestOptions options, ActionListener<GetRolesResponse> listener)
Asynchronously retrieves roles from the native roles store.GetSslCertificatesResponse
getSslCertificates(RequestOptions options)
Synchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster.void
getSslCertificatesAsync(RequestOptions options, ActionListener<GetSslCertificatesResponse> listener)
Asynchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster.GetUserPrivilegesResponse
getUserPrivileges(RequestOptions options)
Retrieve the set of effective privileges held by the current user.void
getUserPrivilegesAsync(RequestOptions options, ActionListener<GetUserPrivilegesResponse> listener)
Asynchronously retrieve the set of effective privileges held by the current user.GetUsersResponse
getUsers(GetUsersRequest request, RequestOptions options)
Get a user, or list of users, in the native realm synchronously.void
getUsersAsync(GetUsersRequest request, RequestOptions options, ActionListener<GetUsersResponse> listener)
Get a user, or list of users, in the native realm asynchronously.HasPrivilegesResponse
hasPrivileges(HasPrivilegesRequest request, RequestOptions options)
Determine whether the current user has a specified list of privileges See the docs for more.void
hasPrivilegesAsync(HasPrivilegesRequest request, RequestOptions options, ActionListener<HasPrivilegesResponse> listener)
Asynchronously determine whether the current user has a specified list of privileges See the docs for more.InvalidateTokenResponse
invalidateToken(InvalidateTokenRequest request, RequestOptions options)
Invalidates an OAuth2 token.void
invalidateTokenAsync(InvalidateTokenRequest request, RequestOptions options, ActionListener<InvalidateTokenResponse> listener)
Asynchronously invalidates an OAuth2 token.PutPrivilegesResponse
putPrivileges(PutPrivilegesRequest request, RequestOptions options)
Create or update application privileges.void
putPrivilegesAsync(PutPrivilegesRequest request, RequestOptions options, ActionListener<PutPrivilegesResponse> listener)
Asynchronously create or update application privileges.
See the docs for more.PutRoleResponse
putRole(PutRoleRequest request, RequestOptions options)
Create or update a role in the native roles store.void
putRoleAsync(PutRoleRequest request, RequestOptions options, ActionListener<PutRoleResponse> listener)
Asynchronously creates or updates a role in the native roles store.PutRoleMappingResponse
putRoleMapping(PutRoleMappingRequest request, RequestOptions options)
Create/Update a role mapping.void
putRoleMappingAsync(PutRoleMappingRequest request, RequestOptions options, ActionListener<PutRoleMappingResponse> listener)
Asynchronously create/update a role mapping.PutUserResponse
putUser(PutUserRequest request, RequestOptions options)
Create/update a user in the native realm synchronously.void
putUserAsync(PutUserRequest request, RequestOptions options, ActionListener<PutUserResponse> listener)
Asynchronously create/update a user in the native realm.
-
-
-
Method Detail
-
getUsers
public GetUsersResponse getUsers(GetUsersRequest request, RequestOptions options) throws java.io.IOException
Get a user, or list of users, in the native realm synchronously. See the docs for more information.- Parameters:
request
- the request with the user's nameoptions
- the request options (e.g., headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the get users call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getUsersAsync
public void getUsersAsync(GetUsersRequest request, RequestOptions options, ActionListener<GetUsersResponse> listener)
Get a user, or list of users, in the native realm asynchronously. See the docs for more information.- Parameters:
request
- the request with the user's nameoptions
- the request options (e.g., headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
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.DEFAULT
if 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.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
deleteUser
public DeleteUserResponse deleteUser(DeleteUserRequest request, RequestOptions options) throws java.io.IOException
Removes user from the native realm synchronously. See the docs for more.- Parameters:
request
- the request with the user to deleteoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the delete user call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deleteUserAsync
public void deleteUserAsync(DeleteUserRequest request, RequestOptions options, ActionListener<DeleteUserResponse> listener)
Asynchronously deletes a user in the native realm. See the docs for more.- Parameters:
request
- the request with the user to deleteoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getRoleMappings
public GetRoleMappingsResponse getRoleMappings(GetRoleMappingsRequest request, RequestOptions options) throws java.io.IOException
Synchronously get role mapping(s). See the docs for more.- Parameters:
request
-GetRoleMappingsRequest
with role mapping name(s). If no role mapping name is provided then retrieves all role mappings.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the get role mapping call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getRoleMappingsAsync
public void getRoleMappingsAsync(GetRoleMappingsRequest request, RequestOptions options, ActionListener<GetRoleMappingsResponse> listener)
Asynchronously get role mapping(s). See the docs for more.- Parameters:
request
-GetRoleMappingsRequest
with role mapping name(s). If no role mapping name is provided then retrieves all role mappings.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
authenticate
public AuthenticateResponse authenticate(RequestOptions options) throws java.io.IOException
Authenticate the current user and return all the information about the authenticated user. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the responsee from the authenticate user call
- Throws:
java.io.IOException
-
authenticateAsync
public void authenticateAsync(RequestOptions options, ActionListener<AuthenticateResponse> listener)
Authenticate the current user asynchronously and return all the information about the authenticated user. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
hasPrivileges
public HasPrivilegesResponse hasPrivileges(HasPrivilegesRequest request, RequestOptions options) throws java.io.IOException
Determine whether the current user has a specified list of privileges See the docs for more.- Parameters:
request
- the request with the privileges to checkoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the has privileges call
- Throws:
java.io.IOException
-
hasPrivilegesAsync
public void hasPrivilegesAsync(HasPrivilegesRequest request, RequestOptions options, ActionListener<HasPrivilegesResponse> listener)
Asynchronously determine whether the current user has a specified list of privileges See the docs for more.- Parameters:
request
- the request with the privileges to checkoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getUserPrivileges
public GetUserPrivilegesResponse getUserPrivileges(RequestOptions options) throws java.io.IOException
Retrieve the set of effective privileges held by the current user.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
getUserPrivilegesAsync
public void getUserPrivilegesAsync(RequestOptions options, ActionListener<GetUserPrivilegesResponse> listener)
Asynchronously retrieve the set of effective privileges held by the current user.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
clearRealmCache
public ClearRealmCacheResponse clearRealmCache(ClearRealmCacheRequest request, RequestOptions options) throws java.io.IOException
Clears the cache in one or more realms. See the docs for more.- Parameters:
request
- the request with the realm names and usernames to clear the cache foroptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the clear realm cache call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
clearRealmCacheAsync
public void clearRealmCacheAsync(ClearRealmCacheRequest request, RequestOptions options, ActionListener<ClearRealmCacheResponse> listener)
Clears the cache in one or more realms asynchronously. See the docs for more.- Parameters:
request
- the request with the realm names and usernames to clear the cache foroptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
clearRolesCache
public ClearRolesCacheResponse clearRolesCache(ClearRolesCacheRequest request, RequestOptions options) throws java.io.IOException
Clears the roles cache for a set of roles. See the docs for more.- Parameters:
request
- the request with the roles for which the cache should be cleared.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the clear roles cache call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
clearRolesCacheAsync
public void clearRolesCacheAsync(ClearRolesCacheRequest request, RequestOptions options, ActionListener<ClearRolesCacheResponse> listener)
Clears the roles cache for a set of roles asynchronously. See the docs for more.- Parameters:
request
- the request with the roles for which the cache should be cleared.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if 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
-
getRolesAsync
public void getRolesAsync(GetRolesRequest request, RequestOptions options, ActionListener<GetRolesResponse> listener)
Asynchronously retrieves roles from the native roles store. See the docs for more.- Parameters:
request
- the request with the roles to getoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getRoles
public GetRolesResponse getRoles(GetRolesRequest request, RequestOptions options) throws java.io.IOException
Retrieves roles from the native roles store. See the docs for more.- Parameters:
request
- the request with the roles to getoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the get roles call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putRoleAsync
public void putRoleAsync(PutRoleRequest request, RequestOptions options, ActionListener<PutRoleResponse> listener)
Asynchronously creates or updates a role in the native roles store. See the docs for more.- Parameters:
request
- the request containing the role to create or updateoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
putRole
public PutRoleResponse putRole(PutRoleRequest request, RequestOptions options) throws java.io.IOException
Create or update a role in the native roles store. See the docs for more.- Parameters:
request
- the request containing the role to create or updateoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the put role 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.DEFAULT
if 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.DEFAULT
if 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.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
createToken
public CreateTokenResponse createToken(CreateTokenRequest request, RequestOptions options) throws java.io.IOException
Creates an OAuth2 token. See the docs for more.- Parameters:
request
- the request for the tokenoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the create token call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
createTokenAsync
public void createTokenAsync(CreateTokenRequest request, RequestOptions options, ActionListener<CreateTokenResponse> listener)
Asynchronously creates an OAuth2 token. See the docs for more.- Parameters:
request
- the request for the tokenoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
invalidateToken
public InvalidateTokenResponse invalidateToken(InvalidateTokenRequest request, RequestOptions options) throws java.io.IOException
Invalidates an OAuth2 token. See the docs for more.- Parameters:
request
- the request to invalidate the tokenoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the create token call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
invalidateTokenAsync
public void invalidateTokenAsync(InvalidateTokenRequest request, RequestOptions options, ActionListener<InvalidateTokenResponse> listener)
Asynchronously invalidates an OAuth2 token. See the docs for more.- Parameters:
request
- the request to invalidate the tokenoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getPrivileges
public GetPrivilegesResponse getPrivileges(GetPrivilegesRequest request, RequestOptions options) throws java.io.IOException
Synchronously get application privilege(s). See the docs for more.- Parameters:
request
-GetPrivilegesRequest
with the application name and the privilege name. If no application name is provided, information about all privileges for all applications is retrieved. If no privilege name is provided, information about all privileges of the specified application is retrieved.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the get privileges call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getPrivilegesAsync
public void getPrivilegesAsync(GetPrivilegesRequest request, RequestOptions options, ActionListener<GetPrivilegesResponse> listener)
Asynchronously get application privilege(s). See the docs for more.- Parameters:
request
-GetPrivilegesRequest
with the application name and the privilege name. If no application name is provided, information about all privileges for all applications is retrieved. If no privilege name is provided, information about all privileges of the specified application is retrieved.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
putPrivileges
public PutPrivilegesResponse putPrivileges(PutPrivilegesRequest request, RequestOptions options) throws java.io.IOException
Create or update application privileges. See the docs for more.- Parameters:
request
- the request to create or update application privilegesoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the create or update application privileges call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putPrivilegesAsync
public void putPrivilegesAsync(PutPrivilegesRequest request, RequestOptions options, ActionListener<PutPrivilegesResponse> listener)
Asynchronously create or update application privileges.
See the docs for more.- Parameters:
request
- the request to create or update application privilegesoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
deletePrivileges
public DeletePrivilegesResponse deletePrivileges(DeletePrivilegesRequest request, RequestOptions options) throws java.io.IOException
Removes application privilege(s) See the docs for more.- Parameters:
request
- the request with the application privilege to deleteoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the delete application privilege call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deletePrivilegesAsync
public void deletePrivilegesAsync(DeletePrivilegesRequest request, RequestOptions options, ActionListener<DeletePrivilegesResponse> listener)
Asynchronously removes an application privilege See the docs for more.- Parameters:
request
- the request with the application privilege to deleteoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
-