Package org.elasticsearch.client
Class SecurityClient
java.lang.Object
org.elasticsearch.client.SecurityClient
public final class SecurityClient
extends java.lang.Object
A wrapper for the
RestHighLevelClient
that provides methods for accessing the Security APIs.
-
Method Summary
Modifier and Type Method Description AuthenticateResponse
authenticate(org.elasticsearch.client.RequestOptions options)
Authenticate the current user and return all the information about the authenticated user.org.elasticsearch.client.Cancellable
authenticateAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<AuthenticateResponse> listener)
Authenticate the current user asynchronously and return all the information about the authenticated user.boolean
changePassword(org.elasticsearch.client.RequestOptions options, ChangePasswordRequest request)
Deprecated.boolean
changePassword(ChangePasswordRequest request, org.elasticsearch.client.RequestOptions options)
Change the password of a user of a native realm or built-in user synchronously.org.elasticsearch.client.Cancellable
changePasswordAsync(org.elasticsearch.client.RequestOptions options, ChangePasswordRequest request, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)
Deprecated.org.elasticsearch.client.Cancellable
changePasswordAsync(ChangePasswordRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)
Change the password of a user of a native realm or built-in user asynchronously.ClearSecurityCacheResponse
clearApiKeyCache(ClearApiKeyCacheRequest request, org.elasticsearch.client.RequestOptions options)
Clears the api key cache for a set of IDs.org.elasticsearch.client.Cancellable
clearApiKeyCacheAsync(ClearApiKeyCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<ClearSecurityCacheResponse> listener)
Clears the api key cache for a set of IDs asynchronously.ClearPrivilegesCacheResponse
clearPrivilegesCache(ClearPrivilegesCacheRequest request, org.elasticsearch.client.RequestOptions options)
Clears the privileges cache for a set of privileges.org.elasticsearch.client.Cancellable
clearPrivilegesCacheAsync(ClearPrivilegesCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<ClearPrivilegesCacheResponse> listener)
Clears the privileges cache for a set of privileges asynchronously.ClearRealmCacheResponse
clearRealmCache(ClearRealmCacheRequest request, org.elasticsearch.client.RequestOptions options)
Clears the cache in one or more realms.org.elasticsearch.client.Cancellable
clearRealmCacheAsync(ClearRealmCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<ClearRealmCacheResponse> listener)
Clears the cache in one or more realms asynchronously.ClearRolesCacheResponse
clearRolesCache(ClearRolesCacheRequest request, org.elasticsearch.client.RequestOptions options)
Clears the roles cache for a set of roles.org.elasticsearch.client.Cancellable
clearRolesCacheAsync(ClearRolesCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<ClearRolesCacheResponse> listener)
Clears the roles cache for a set of roles asynchronously.CreateApiKeyResponse
createApiKey(CreateApiKeyRequest request, org.elasticsearch.client.RequestOptions options)
Create an API Key.
See the docs for more.org.elasticsearch.client.Cancellable
createApiKeyAsync(CreateApiKeyRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<CreateApiKeyResponse> listener)
Asynchronously creates an API key.
See the docs for more.CreateTokenResponse
createToken(CreateTokenRequest request, org.elasticsearch.client.RequestOptions options)
Creates an OAuth2 token.org.elasticsearch.client.Cancellable
createTokenAsync(CreateTokenRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<CreateTokenResponse> listener)
Asynchronously creates an OAuth2 token.DelegatePkiAuthenticationResponse
delegatePkiAuthentication(DelegatePkiAuthenticationRequest request, org.elasticsearch.client.RequestOptions options)
Get an Elasticsearch access token from anX509Certificate
chain.org.elasticsearch.client.Cancellable
delegatePkiAuthenticationAsync(DelegatePkiAuthenticationRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<DelegatePkiAuthenticationResponse> listener)
Asynchronously get an Elasticsearch access token from anX509Certificate
chain.DeletePrivilegesResponse
deletePrivileges(DeletePrivilegesRequest request, org.elasticsearch.client.RequestOptions options)
Removes application privilege(s) See the docs for more.org.elasticsearch.client.Cancellable
deletePrivilegesAsync(DeletePrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<DeletePrivilegesResponse> listener)
Asynchronously removes an application privilege See the docs for more.DeleteRoleResponse
deleteRole(DeleteRoleRequest request, org.elasticsearch.client.RequestOptions options)
Removes role from the native realm.org.elasticsearch.client.Cancellable
deleteRoleAsync(DeleteRoleRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<DeleteRoleResponse> listener)
Removes role from the native realm.DeleteRoleMappingResponse
deleteRoleMapping(DeleteRoleMappingRequest request, org.elasticsearch.client.RequestOptions options)
Delete a role mapping.org.elasticsearch.client.Cancellable
deleteRoleMappingAsync(DeleteRoleMappingRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<DeleteRoleMappingResponse> listener)
Asynchronously delete a role mapping.DeleteUserResponse
deleteUser(DeleteUserRequest request, org.elasticsearch.client.RequestOptions options)
Removes user from the native realm synchronously.org.elasticsearch.client.Cancellable
deleteUserAsync(DeleteUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<DeleteUserResponse> listener)
Asynchronously deletes a user in the native realm.boolean
disableUser(org.elasticsearch.client.RequestOptions options, DisableUserRequest request)
Deprecated.usedisableUser(DisableUserRequest, RequestOptions)
insteadboolean
disableUser(DisableUserRequest request, org.elasticsearch.client.RequestOptions options)
Disable a native realm or built-in user synchronously.org.elasticsearch.client.Cancellable
disableUserAsync(org.elasticsearch.client.RequestOptions options, DisableUserRequest request, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)
Deprecated.org.elasticsearch.client.Cancellable
disableUserAsync(DisableUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)
Disable a native realm or built-in user asynchronously.boolean
enableUser(org.elasticsearch.client.RequestOptions options, EnableUserRequest request)
Deprecated.useenableUser(EnableUserRequest, RequestOptions)
insteadboolean
enableUser(EnableUserRequest request, org.elasticsearch.client.RequestOptions options)
Enable a native realm or built-in user synchronously.org.elasticsearch.client.Cancellable
enableUserAsync(org.elasticsearch.client.RequestOptions options, EnableUserRequest request, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)
Deprecated.org.elasticsearch.client.Cancellable
enableUserAsync(EnableUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)
Enable a native realm or built-in user asynchronously.GetApiKeyResponse
getApiKey(GetApiKeyRequest request, org.elasticsearch.client.RequestOptions options)
Retrieve API Key(s) information.
See the docs for more.org.elasticsearch.client.Cancellable
getApiKeyAsync(GetApiKeyRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetApiKeyResponse> listener)
Asynchronously retrieve API Key(s) information.
See the docs for more.GetBuiltinPrivilegesResponse
getBuiltinPrivileges(org.elasticsearch.client.RequestOptions options)
Synchronously get builtin (cluster & index) privilege(s).org.elasticsearch.client.Cancellable
getBuiltinPrivilegesAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetBuiltinPrivilegesResponse> listener)
Asynchronously get builtin (cluster & index) privilege(s).GetPrivilegesResponse
getPrivileges(GetPrivilegesRequest request, org.elasticsearch.client.RequestOptions options)
Synchronously get application privilege(s).org.elasticsearch.client.Cancellable
getPrivilegesAsync(GetPrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetPrivilegesResponse> listener)
Asynchronously get application privilege(s).GetRoleMappingsResponse
getRoleMappings(GetRoleMappingsRequest request, org.elasticsearch.client.RequestOptions options)
Synchronously get role mapping(s).org.elasticsearch.client.Cancellable
getRoleMappingsAsync(GetRoleMappingsRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetRoleMappingsResponse> listener)
Asynchronously get role mapping(s).GetRolesResponse
getRoles(GetRolesRequest request, org.elasticsearch.client.RequestOptions options)
Retrieves roles from the native roles store.org.elasticsearch.client.Cancellable
getRolesAsync(GetRolesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetRolesResponse> listener)
Asynchronously retrieves roles from the native roles store.GetSslCertificatesResponse
getSslCertificates(org.elasticsearch.client.RequestOptions options)
Synchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster.org.elasticsearch.client.Cancellable
getSslCertificatesAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetSslCertificatesResponse> listener)
Asynchronously retrieve the X.509 certificates that are used to encrypt communications in an Elasticsearch cluster.GetUserPrivilegesResponse
getUserPrivileges(org.elasticsearch.client.RequestOptions options)
Retrieve the set of effective privileges held by the current user.org.elasticsearch.client.Cancellable
getUserPrivilegesAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetUserPrivilegesResponse> listener)
Asynchronously retrieve the set of effective privileges held by the current user.GetUsersResponse
getUsers(GetUsersRequest request, org.elasticsearch.client.RequestOptions options)
Get a user, or list of users, in the native realm synchronously.org.elasticsearch.client.Cancellable
getUsersAsync(GetUsersRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetUsersResponse> listener)
Get a user, or list of users, in the native realm asynchronously.HasPrivilegesResponse
hasPrivileges(HasPrivilegesRequest request, org.elasticsearch.client.RequestOptions options)
Determine whether the current user has a specified list of privileges See the docs for more.org.elasticsearch.client.Cancellable
hasPrivilegesAsync(HasPrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<HasPrivilegesResponse> listener)
Asynchronously determine whether the current user has a specified list of privileges See the docs for more.InvalidateApiKeyResponse
invalidateApiKey(InvalidateApiKeyRequest request, org.elasticsearch.client.RequestOptions options)
Invalidate API Key(s).
See the docs for more.org.elasticsearch.client.Cancellable
invalidateApiKeyAsync(InvalidateApiKeyRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<InvalidateApiKeyResponse> listener)
Asynchronously invalidates API key(s).
See the docs for more.InvalidateTokenResponse
invalidateToken(InvalidateTokenRequest request, org.elasticsearch.client.RequestOptions options)
Invalidates an OAuth2 token.org.elasticsearch.client.Cancellable
invalidateTokenAsync(InvalidateTokenRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<InvalidateTokenResponse> listener)
Asynchronously invalidates an OAuth2 token.PutPrivilegesResponse
putPrivileges(PutPrivilegesRequest request, org.elasticsearch.client.RequestOptions options)
Create or update application privileges.org.elasticsearch.client.Cancellable
putPrivilegesAsync(PutPrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<PutPrivilegesResponse> listener)
Asynchronously create or update application privileges.
See the docs for more.PutRoleResponse
putRole(PutRoleRequest request, org.elasticsearch.client.RequestOptions options)
Create or update a role in the native roles store.org.elasticsearch.client.Cancellable
putRoleAsync(PutRoleRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<PutRoleResponse> listener)
Asynchronously creates or updates a role in the native roles store.PutRoleMappingResponse
putRoleMapping(PutRoleMappingRequest request, org.elasticsearch.client.RequestOptions options)
Create/Update a role mapping.org.elasticsearch.client.Cancellable
putRoleMappingAsync(PutRoleMappingRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<PutRoleMappingResponse> listener)
Asynchronously create/update a role mapping.PutUserResponse
putUser(PutUserRequest request, org.elasticsearch.client.RequestOptions options)
Create/update a user in the native realm synchronously.org.elasticsearch.client.Cancellable
putUserAsync(PutUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<PutUserResponse> listener)
Asynchronously create/update a user in the native realm.
-
Method Details
-
getUsers
public GetUsersResponse getUsers(GetUsersRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionGet 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 org.elasticsearch.client.Cancellable getUsersAsync(GetUsersRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
putUser
public PutUserResponse putUser(PutUserRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionCreate/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 org.elasticsearch.client.Cancellable putUserAsync(PutUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
deleteUser
public DeleteUserResponse deleteUser(DeleteUserRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionRemoves 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 org.elasticsearch.client.Cancellable deleteUserAsync(DeleteUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
putRoleMapping
public PutRoleMappingResponse putRoleMapping(PutRoleMappingRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionCreate/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 org.elasticsearch.client.Cancellable putRoleMappingAsync(PutRoleMappingRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
getRoleMappings
public GetRoleMappingsResponse getRoleMappings(GetRoleMappingsRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously 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 org.elasticsearch.client.Cancellable getRoleMappingsAsync(GetRoleMappingsRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
enableUser
public boolean enableUser(EnableUserRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionEnable 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:
true
if the request succeeded (the user is enabled)- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
enableUser
@Deprecated public boolean enableUser(org.elasticsearch.client.RequestOptions options, EnableUserRequest request) throws java.io.IOExceptionDeprecated.useenableUser(EnableUserRequest, RequestOptions)
insteadEnable a native realm or built-in user synchronously. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedrequest
- the request with the user to enable- Returns:
true
if the request succeeded (the user is enabled)- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
enableUserAsync
public org.elasticsearch.client.Cancellable enableUserAsync(EnableUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<java.lang.Boolean> 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- Returns:
- cancellable that may be used to cancel the request
-
enableUserAsync
@Deprecated public org.elasticsearch.client.Cancellable enableUserAsync(org.elasticsearch.client.RequestOptions options, EnableUserRequest request, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)Deprecated.Enable a native realm or built-in user asynchronously. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedrequest
- the request with the user to enablelistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
disableUser
public boolean disableUser(DisableUserRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionDisable 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:
true
if the request succeeded (the user is disabled)- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
disableUser
@Deprecated public boolean disableUser(org.elasticsearch.client.RequestOptions options, DisableUserRequest request) throws java.io.IOExceptionDeprecated.usedisableUser(DisableUserRequest, RequestOptions)
insteadDisable a native realm or built-in user synchronously. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedrequest
- the request with the user to disable- Returns:
true
if the request succeeded (the user is disabled)- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
disableUserAsync
public org.elasticsearch.client.Cancellable disableUserAsync(DisableUserRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<java.lang.Boolean> 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- Returns:
- cancellable that may be used to cancel the request
-
disableUserAsync
@Deprecated public org.elasticsearch.client.Cancellable disableUserAsync(org.elasticsearch.client.RequestOptions options, DisableUserRequest request, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)Deprecated.Disable a native realm or built-in user asynchronously. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedrequest
- the request with the user to disablelistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
authenticate
public AuthenticateResponse authenticate(org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionAuthenticate 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 org.elasticsearch.client.Cancellable authenticateAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
hasPrivileges
public HasPrivilegesResponse hasPrivileges(HasPrivilegesRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionDetermine 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 org.elasticsearch.client.Cancellable hasPrivilegesAsync(HasPrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
getUserPrivileges
public GetUserPrivilegesResponse getUserPrivileges(org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionRetrieve 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 org.elasticsearch.client.Cancellable getUserPrivilegesAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
clearRealmCache
public ClearRealmCacheResponse clearRealmCache(ClearRealmCacheRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionClears 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 org.elasticsearch.client.Cancellable clearRealmCacheAsync(ClearRealmCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
clearRolesCache
public ClearRolesCacheResponse clearRolesCache(ClearRolesCacheRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionClears 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 org.elasticsearch.client.Cancellable clearRolesCacheAsync(ClearRolesCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
clearPrivilegesCache
public ClearPrivilegesCacheResponse clearPrivilegesCache(ClearPrivilegesCacheRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionClears the privileges cache for a set of privileges. See the docs for more.- Parameters:
request
- the request with the privileges 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 privileges cache call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
clearPrivilegesCacheAsync
public org.elasticsearch.client.Cancellable clearPrivilegesCacheAsync(ClearPrivilegesCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<ClearPrivilegesCacheResponse> listener)Clears the privileges cache for a set of privileges asynchronously. See the docs for more.- Parameters:
request
- the request with the privileges 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- Returns:
- cancellable that may be used to cancel the request
-
clearApiKeyCache
public ClearSecurityCacheResponse clearApiKeyCache(ClearApiKeyCacheRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionClears the api key cache for a set of IDs. See the docs for more.- Parameters:
request
- the request with the security for which the cache should be cleared for the specified API key IDs.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the clear security cache call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
clearApiKeyCacheAsync
public org.elasticsearch.client.Cancellable clearApiKeyCacheAsync(ClearApiKeyCacheRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<ClearSecurityCacheResponse> listener)Clears the api key cache for a set of IDs asynchronously. See the docs for more.- Parameters:
request
- the request with the security for which the cache should be cleared for the specified API key IDs.options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getSslCertificates
public GetSslCertificatesResponse getSslCertificates(org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously 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 org.elasticsearch.client.Cancellable getSslCertificatesAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
changePassword
public boolean changePassword(ChangePasswordRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionChange 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:
true
if the request succeeded (the new password was set)- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
changePassword
@Deprecated public boolean changePassword(org.elasticsearch.client.RequestOptions options, ChangePasswordRequest request) throws java.io.IOExceptionDeprecated.Change the password of a user of a native realm or built-in user synchronously. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedrequest
- the request with the user's new password- Returns:
true
if the request succeeded (the new password was set)- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
changePasswordAsync
public org.elasticsearch.client.Cancellable changePasswordAsync(ChangePasswordRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<java.lang.Boolean> 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- Returns:
- cancellable that may be used to cancel the request
-
changePasswordAsync
@Deprecated public org.elasticsearch.client.Cancellable changePasswordAsync(org.elasticsearch.client.RequestOptions options, ChangePasswordRequest request, org.elasticsearch.action.ActionListener<java.lang.Boolean> listener)Deprecated.Change the password of a user of a native realm or built-in user asynchronously. See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedrequest
- the request with the user's new passwordlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteRoleMapping
public DeleteRoleMappingResponse deleteRoleMapping(DeleteRoleMappingRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionDelete 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 org.elasticsearch.client.Cancellable getRolesAsync(GetRolesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
getRoles
public GetRolesResponse getRoles(GetRolesRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionRetrieves 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 org.elasticsearch.client.Cancellable putRoleAsync(PutRoleRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
putRole
public PutRoleResponse putRole(PutRoleRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionCreate 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 org.elasticsearch.client.Cancellable deleteRoleMappingAsync(DeleteRoleMappingRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
deleteRole
public DeleteRoleResponse deleteRole(DeleteRoleRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionRemoves 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 org.elasticsearch.client.Cancellable deleteRoleAsync(DeleteRoleRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
createToken
public CreateTokenResponse createToken(CreateTokenRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionCreates 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 org.elasticsearch.client.Cancellable createTokenAsync(CreateTokenRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
invalidateToken
public InvalidateTokenResponse invalidateToken(InvalidateTokenRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionInvalidates 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 org.elasticsearch.client.Cancellable invalidateTokenAsync(InvalidateTokenRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
getBuiltinPrivileges
public GetBuiltinPrivilegesResponse getBuiltinPrivileges(org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously get builtin (cluster & index) privilege(s). 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 builtin privileges call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getBuiltinPrivilegesAsync
public org.elasticsearch.client.Cancellable getBuiltinPrivilegesAsync(org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetBuiltinPrivilegesResponse> listener)Asynchronously get builtin (cluster & index) privilege(s). 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- Returns:
- cancellable that may be used to cancel the request
-
getPrivileges
public GetPrivilegesResponse getPrivileges(GetPrivilegesRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously 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 org.elasticsearch.client.Cancellable getPrivilegesAsync(GetPrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
putPrivileges
public PutPrivilegesResponse putPrivileges(PutPrivilegesRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionCreate 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 org.elasticsearch.client.Cancellable putPrivilegesAsync(PutPrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
deletePrivileges
public DeletePrivilegesResponse deletePrivileges(DeletePrivilegesRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionRemoves 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 org.elasticsearch.client.Cancellable deletePrivilegesAsync(DeletePrivilegesRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.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- Returns:
- cancellable that may be used to cancel the request
-
createApiKey
public CreateApiKeyResponse createApiKey(CreateApiKeyRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionCreate an API Key.
See the docs for more.- Parameters:
request
- the request to create a API keyoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the create API key call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
createApiKeyAsync
public org.elasticsearch.client.Cancellable createApiKeyAsync(CreateApiKeyRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<CreateApiKeyResponse> listener)Asynchronously creates an API key.
See the docs for more.- Parameters:
request
- the request to create a API keyoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getApiKey
public GetApiKeyResponse getApiKey(GetApiKeyRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionRetrieve API Key(s) information.
See the docs for more.- Parameters:
request
- the request to retrieve API key(s)options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the create API key call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getApiKeyAsync
public org.elasticsearch.client.Cancellable getApiKeyAsync(GetApiKeyRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetApiKeyResponse> listener)Asynchronously retrieve API Key(s) information.
See the docs for more.- Parameters:
request
- the request to retrieve API key(s)options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
invalidateApiKey
public InvalidateApiKeyResponse invalidateApiKey(InvalidateApiKeyRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionInvalidate API Key(s).
See the docs for more.- Parameters:
request
- the request to invalidate API key(s)options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the invalidate API key call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
invalidateApiKeyAsync
public org.elasticsearch.client.Cancellable invalidateApiKeyAsync(InvalidateApiKeyRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<InvalidateApiKeyResponse> listener)Asynchronously invalidates API key(s).
See the docs for more.- Parameters:
request
- the request to invalidate API key(s)options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
delegatePkiAuthentication
public DelegatePkiAuthenticationResponse delegatePkiAuthentication(DelegatePkiAuthenticationRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOExceptionGet an Elasticsearch access token from anX509Certificate
chain. The certificate chain is that of the client from a mutually authenticated TLS session, and it is validated by the PKI realms withdelegation.enabled
toggled totrue
.
See the docs for more details.- Parameters:
request
- the request containing the certificate chainoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response from the delegate-pki-authentication API key call
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
delegatePkiAuthenticationAsync
public org.elasticsearch.client.Cancellable delegatePkiAuthenticationAsync(DelegatePkiAuthenticationRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<DelegatePkiAuthenticationResponse> listener)Asynchronously get an Elasticsearch access token from anX509Certificate
chain. The certificate chain is that of the client from a mutually authenticated TLS session, and it is validated by the PKI realms withdelegation.enabled
toggled totrue
.
See the docs for more details.- Parameters:
request
- the request containing the certificate chainoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-