Class ElasticsearchSecurityAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSecurityAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionCreates or updates a user profile on behalf of another user.activateUserProfile
(Function<ActivateUserProfileRequest.Builder, ObjectBuilder<ActivateUserProfileRequest>> fn) Creates or updates a user profile on behalf of another user.Authenticate a user.bulkDeleteRole
(BulkDeleteRoleRequest request) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.bulkPutRole
(BulkPutRoleRequest request) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.Changes the passwords of users in the native realm and built-in users.changePassword
(ChangePasswordRequest request) Changes the passwords of users in the native realm and built-in users.Changes the passwords of users in the native realm and built-in users.clearApiKeyCache
(ClearApiKeyCacheRequest request) Evicts a subset of all entries from the API key cache.clearApiKeyCache
(Function<ClearApiKeyCacheRequest.Builder, ObjectBuilder<ClearApiKeyCacheRequest>> fn) Evicts a subset of all entries from the API key cache.Evicts application privileges from the native application privileges cache.clearCachedPrivileges
(Function<ClearCachedPrivilegesRequest.Builder, ObjectBuilder<ClearCachedPrivilegesRequest>> fn) Evicts application privileges from the native application privileges cache.Evicts users from the user cache.clearCachedRealms
(Function<ClearCachedRealmsRequest.Builder, ObjectBuilder<ClearCachedRealmsRequest>> fn) Evicts users from the user cache.clearCachedRoles
(ClearCachedRolesRequest request) Evicts roles from the native role cache.clearCachedRoles
(Function<ClearCachedRolesRequest.Builder, ObjectBuilder<ClearCachedRolesRequest>> fn) Evicts roles from the native role cache.Evicts tokens from the service account token caches.clearCachedServiceTokens
(Function<ClearCachedServiceTokensRequest.Builder, ObjectBuilder<ClearCachedServiceTokensRequest>> fn) Evicts tokens from the service account token caches.Create an API key.createApiKey
(CreateApiKeyRequest request) Create an API key.Create an API key.Creates a service accounts token for access without requiring basic authentication.createServiceToken
(Function<CreateServiceTokenRequest.Builder, ObjectBuilder<CreateServiceTokenRequest>> fn) Creates a service accounts token for access without requiring basic authentication.deletePrivileges
(DeletePrivilegesRequest request) Removes application privileges.deletePrivileges
(Function<DeletePrivilegesRequest.Builder, ObjectBuilder<DeletePrivilegesRequest>> fn) Removes application privileges.deleteRole
(DeleteRoleRequest request) Removes roles in the native realm.Removes roles in the native realm.Removes role mappings.deleteRoleMapping
(Function<DeleteRoleMappingRequest.Builder, ObjectBuilder<DeleteRoleMappingRequest>> fn) Removes role mappings.Deletes a service account token.deleteServiceToken
(Function<DeleteServiceTokenRequest.Builder, ObjectBuilder<DeleteServiceTokenRequest>> fn) Deletes a service account token.deleteUser
(DeleteUserRequest request) Deletes users from the native realm.Deletes users from the native realm.disableUser
(DisableUserRequest request) Disables users in the native realm.Disables users in the native realm.Disables a user profile so it's not visible in user profile searches.disableUserProfile
(Function<DisableUserProfileRequest.Builder, ObjectBuilder<DisableUserProfileRequest>> fn) Disables a user profile so it's not visible in user profile searches.enableUser
(EnableUserRequest request) Enables users in the native realm.Enables users in the native realm.Enables a user profile so it's visible in user profile searches.enableUserProfile
(Function<EnableUserProfileRequest.Builder, ObjectBuilder<EnableUserProfileRequest>> fn) Enables a user profile so it's visible in user profile searches.Enables a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.Allows a new node to join an existing cluster with security features enabled.Get API key information.getApiKey
(GetApiKeyRequest request) Get API key information.Get API key information.Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.Retrieves application privileges.getPrivileges
(GetPrivilegesRequest request) Retrieves application privileges.Retrieves application privileges.getRole()
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.getRole
(GetRoleRequest request) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.final CompletableFuture<GetRoleResponse>
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.Retrieves role mappings.getRoleMapping
(GetRoleMappingRequest request) Retrieves role mappings.Retrieves role mappings.This API returns a list of service accounts that match the provided path parameter(s).This API returns a list of service accounts that match the provided path parameter(s).getServiceAccounts
(Function<GetServiceAccountsRequest.Builder, ObjectBuilder<GetServiceAccountsRequest>> fn) This API returns a list of service accounts that match the provided path parameter(s).Retrieves information of all service credentials for a service account.getServiceCredentials
(Function<GetServiceCredentialsRequest.Builder, ObjectBuilder<GetServiceCredentialsRequest>> fn) Retrieves information of all service credentials for a service account.getToken()
Creates a bearer token for access without requiring basic authentication.getToken
(GetTokenRequest request) Creates a bearer token for access without requiring basic authentication.Creates a bearer token for access without requiring basic authentication.getUser()
Retrieves information about users in the native realm and built-in users.getUser
(GetUserRequest request) Retrieves information about users in the native realm and built-in users.final CompletableFuture<GetUserResponse>
Retrieves information about users in the native realm and built-in users.Retrieves security privileges for the logged in user.Retrieves security privileges for the logged in user.getUserPrivileges
(Function<GetUserPrivilegesRequest.Builder, ObjectBuilder<GetUserPrivilegesRequest>> fn) Retrieves security privileges for the logged in user.getUserProfile
(GetUserProfileRequest request) Retrieves a user's profile using the unique profile ID.Retrieves a user's profile using the unique profile ID.grantApiKey
(GrantApiKeyRequest request) Creates an API key on behalf of another user.Creates an API key on behalf of another user.Check user privileges.hasPrivileges
(HasPrivilegesRequest request) Check user privileges.Check user privileges.Determines whether the users associated with the specified profile IDs have all the requested privileges.hasPrivilegesUserProfile
(Function<HasPrivilegesUserProfileRequest.Builder, ObjectBuilder<HasPrivilegesUserProfileRequest>> fn) Determines whether the users associated with the specified profile IDs have all the requested privileges.Invalidate API keys.invalidateApiKey
(InvalidateApiKeyRequest request) Invalidate API keys.invalidateApiKey
(Function<InvalidateApiKeyRequest.Builder, ObjectBuilder<InvalidateApiKeyRequest>> fn) Invalidate API keys.Invalidates one or more access tokens or refresh tokens.invalidateToken
(InvalidateTokenRequest request) Invalidates one or more access tokens or refresh tokens.Invalidates one or more access tokens or refresh tokens.Adds or updates application privileges.putPrivileges
(PutPrivilegesRequest request) Adds or updates application privileges.Adds or updates application privileges.putRole
(PutRoleRequest request) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.final CompletableFuture<PutRoleResponse>
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.putRoleMapping
(PutRoleMappingRequest request) Creates and updates role mappings.Creates and updates role mappings.putUser
(PutUserRequest request) Adds and updates users in the native realm.final CompletableFuture<PutUserResponse>
Adds and updates users in the native realm.Query API keys.queryApiKeys
(QueryApiKeysRequest request) Query API keys.Query API keys.Retrieves roles in a paginated manner.queryRole
(QueryRoleRequest request) Retrieves roles in a paginated manner.Retrieves roles in a paginated manner.Retrieves information for Users in a paginated manner.queryUser
(QueryUserRequest request) Retrieves information for Users in a paginated manner.Retrieves information for Users in a paginated manner.samlAuthenticate
(SamlAuthenticateRequest request) Submits a SAML Response message to Elasticsearch for consumption.samlAuthenticate
(Function<SamlAuthenticateRequest.Builder, ObjectBuilder<SamlAuthenticateRequest>> fn) Submits a SAML Response message to Elasticsearch for consumption.Verifies the logout response sent from the SAML IdP.final CompletableFuture<BooleanResponse>
samlCompleteLogout
(Function<SamlCompleteLogoutRequest.Builder, ObjectBuilder<SamlCompleteLogoutRequest>> fn) Verifies the logout response sent from the SAML IdP.samlInvalidate
(SamlInvalidateRequest request) Submits a SAML LogoutRequest message to Elasticsearch for consumption.Submits a SAML LogoutRequest message to Elasticsearch for consumption.samlLogout
(SamlLogoutRequest request) Submits a request to invalidate an access token and refresh token.Submits a request to invalidate an access token and refresh token.Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.samlPrepareAuthentication
(Function<SamlPrepareAuthenticationRequest.Builder, ObjectBuilder<SamlPrepareAuthenticationRequest>> fn) Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.Generate SAML metadata for a SAML 2.0 Service Provider.samlServiceProviderMetadata
(Function<SamlServiceProviderMetadataRequest.Builder, ObjectBuilder<SamlServiceProviderMetadataRequest>> fn) Generate SAML metadata for a SAML 2.0 Service Provider.Get suggestions for user profiles that match specified search criteria.Get suggestions for user profiles that match specified search criteria.suggestUserProfiles
(Function<SuggestUserProfilesRequest.Builder, ObjectBuilder<SuggestUserProfilesRequest>> fn) Get suggestions for user profiles that match specified search criteria.updateApiKey
(UpdateApiKeyRequest request) Update an API key.Update an API key.Updates specific data for the user profile that's associated with the specified unique ID.updateUserProfileData
(Function<UpdateUserProfileDataRequest.Builder, ObjectBuilder<UpdateUserProfileDataRequest>> fn) Updates specific data for the user profile that's associated with the specified unique ID.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchSecurityAsyncClient
-
ElasticsearchSecurityAsyncClient
public ElasticsearchSecurityAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchSecurityAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchSecurityAsyncClient>
-
activateUserProfile
public CompletableFuture<ActivateUserProfileResponse> activateUserProfile(ActivateUserProfileRequest request) Creates or updates a user profile on behalf of another user.- See Also:
-
activateUserProfile
public final CompletableFuture<ActivateUserProfileResponse> activateUserProfile(Function<ActivateUserProfileRequest.Builder, ObjectBuilder<ActivateUserProfileRequest>> fn) Creates or updates a user profile on behalf of another user.- Parameters:
fn
- a function that initializes a builder to create theActivateUserProfileRequest
- See Also:
-
authenticate
Authenticate a user. Authenticates a user and returns information about the authenticated user. Include the user information in a basic auth header. A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user. If the user cannot be authenticated, this API returns a 401 status code.- See Also:
-
bulkDeleteRole
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files.- See Also:
-
bulkDeleteRole
public final CompletableFuture<BulkDeleteRoleResponse> bulkDeleteRole(Function<BulkDeleteRoleRequest.Builder, ObjectBuilder<BulkDeleteRoleRequest>> fn) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files.- Parameters:
fn
- a function that initializes a builder to create theBulkDeleteRoleRequest
- See Also:
-
bulkPutRole
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk create or update roles API cannot update roles that are defined in roles files.- See Also:
-
bulkPutRole
public final CompletableFuture<BulkPutRoleResponse> bulkPutRole(Function<BulkPutRoleRequest.Builder, ObjectBuilder<BulkPutRoleRequest>> fn) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk create or update roles API cannot update roles that are defined in roles files.- Parameters:
fn
- a function that initializes a builder to create theBulkPutRoleRequest
- See Also:
-
changePassword
Changes the passwords of users in the native realm and built-in users.- See Also:
-
changePassword
public final CompletableFuture<ChangePasswordResponse> changePassword(Function<ChangePasswordRequest.Builder, ObjectBuilder<ChangePasswordRequest>> fn) Changes the passwords of users in the native realm and built-in users.- Parameters:
fn
- a function that initializes a builder to create theChangePasswordRequest
- See Also:
-
changePassword
Changes the passwords of users in the native realm and built-in users.- See Also:
-
clearApiKeyCache
public CompletableFuture<ClearApiKeyCacheResponse> clearApiKeyCache(ClearApiKeyCacheRequest request) Evicts a subset of all entries from the API key cache. The cache is also automatically cleared on state changes of the security index.- See Also:
-
clearApiKeyCache
public final CompletableFuture<ClearApiKeyCacheResponse> clearApiKeyCache(Function<ClearApiKeyCacheRequest.Builder, ObjectBuilder<ClearApiKeyCacheRequest>> fn) Evicts a subset of all entries from the API key cache. The cache is also automatically cleared on state changes of the security index.- Parameters:
fn
- a function that initializes a builder to create theClearApiKeyCacheRequest
- See Also:
-
clearCachedPrivileges
public CompletableFuture<ClearCachedPrivilegesResponse> clearCachedPrivileges(ClearCachedPrivilegesRequest request) Evicts application privileges from the native application privileges cache.- See Also:
-
clearCachedPrivileges
public final CompletableFuture<ClearCachedPrivilegesResponse> clearCachedPrivileges(Function<ClearCachedPrivilegesRequest.Builder, ObjectBuilder<ClearCachedPrivilegesRequest>> fn) Evicts application privileges from the native application privileges cache.- Parameters:
fn
- a function that initializes a builder to create theClearCachedPrivilegesRequest
- See Also:
-
clearCachedRealms
public CompletableFuture<ClearCachedRealmsResponse> clearCachedRealms(ClearCachedRealmsRequest request) Evicts users from the user cache. Can completely clear the cache or evict specific users.- See Also:
-
clearCachedRealms
public final CompletableFuture<ClearCachedRealmsResponse> clearCachedRealms(Function<ClearCachedRealmsRequest.Builder, ObjectBuilder<ClearCachedRealmsRequest>> fn) Evicts users from the user cache. Can completely clear the cache or evict specific users.- Parameters:
fn
- a function that initializes a builder to create theClearCachedRealmsRequest
- See Also:
-
clearCachedRoles
public CompletableFuture<ClearCachedRolesResponse> clearCachedRoles(ClearCachedRolesRequest request) Evicts roles from the native role cache.- See Also:
-
clearCachedRoles
public final CompletableFuture<ClearCachedRolesResponse> clearCachedRoles(Function<ClearCachedRolesRequest.Builder, ObjectBuilder<ClearCachedRolesRequest>> fn) Evicts roles from the native role cache.- Parameters:
fn
- a function that initializes a builder to create theClearCachedRolesRequest
- See Also:
-
clearCachedServiceTokens
public CompletableFuture<ClearCachedServiceTokensResponse> clearCachedServiceTokens(ClearCachedServiceTokensRequest request) Evicts tokens from the service account token caches.- See Also:
-
clearCachedServiceTokens
public final CompletableFuture<ClearCachedServiceTokensResponse> clearCachedServiceTokens(Function<ClearCachedServiceTokensRequest.Builder, ObjectBuilder<ClearCachedServiceTokensRequest>> fn) Evicts tokens from the service account token caches.- Parameters:
fn
- a function that initializes a builder to create theClearCachedServiceTokensRequest
- See Also:
-
createApiKey
Create an API key. Creates an API key for access without requiring basic authentication. A successful request returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.- See Also:
-
createApiKey
public final CompletableFuture<CreateApiKeyResponse> createApiKey(Function<CreateApiKeyRequest.Builder, ObjectBuilder<CreateApiKeyRequest>> fn) Create an API key. Creates an API key for access without requiring basic authentication. A successful request returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.- Parameters:
fn
- a function that initializes a builder to create theCreateApiKeyRequest
- See Also:
-
createApiKey
Create an API key. Creates an API key for access without requiring basic authentication. A successful request returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.- See Also:
-
createServiceToken
public CompletableFuture<CreateServiceTokenResponse> createServiceToken(CreateServiceTokenRequest request) Creates a service accounts token for access without requiring basic authentication.- See Also:
-
createServiceToken
public final CompletableFuture<CreateServiceTokenResponse> createServiceToken(Function<CreateServiceTokenRequest.Builder, ObjectBuilder<CreateServiceTokenRequest>> fn) Creates a service accounts token for access without requiring basic authentication.- Parameters:
fn
- a function that initializes a builder to create theCreateServiceTokenRequest
- See Also:
-
deletePrivileges
public CompletableFuture<DeletePrivilegesResponse> deletePrivileges(DeletePrivilegesRequest request) Removes application privileges.- See Also:
-
deletePrivileges
public final CompletableFuture<DeletePrivilegesResponse> deletePrivileges(Function<DeletePrivilegesRequest.Builder, ObjectBuilder<DeletePrivilegesRequest>> fn) Removes application privileges.- Parameters:
fn
- a function that initializes a builder to create theDeletePrivilegesRequest
- See Also:
-
deleteRole
Removes roles in the native realm.- See Also:
-
deleteRole
public final CompletableFuture<DeleteRoleResponse> deleteRole(Function<DeleteRoleRequest.Builder, ObjectBuilder<DeleteRoleRequest>> fn) Removes roles in the native realm.- Parameters:
fn
- a function that initializes a builder to create theDeleteRoleRequest
- See Also:
-
deleteRoleMapping
public CompletableFuture<DeleteRoleMappingResponse> deleteRoleMapping(DeleteRoleMappingRequest request) Removes role mappings.- See Also:
-
deleteRoleMapping
public final CompletableFuture<DeleteRoleMappingResponse> deleteRoleMapping(Function<DeleteRoleMappingRequest.Builder, ObjectBuilder<DeleteRoleMappingRequest>> fn) Removes role mappings.- Parameters:
fn
- a function that initializes a builder to create theDeleteRoleMappingRequest
- See Also:
-
deleteServiceToken
public CompletableFuture<DeleteServiceTokenResponse> deleteServiceToken(DeleteServiceTokenRequest request) Deletes a service account token.- See Also:
-
deleteServiceToken
public final CompletableFuture<DeleteServiceTokenResponse> deleteServiceToken(Function<DeleteServiceTokenRequest.Builder, ObjectBuilder<DeleteServiceTokenRequest>> fn) Deletes a service account token.- Parameters:
fn
- a function that initializes a builder to create theDeleteServiceTokenRequest
- See Also:
-
deleteUser
Deletes users from the native realm.- See Also:
-
deleteUser
public final CompletableFuture<DeleteUserResponse> deleteUser(Function<DeleteUserRequest.Builder, ObjectBuilder<DeleteUserRequest>> fn) Deletes users from the native realm.- Parameters:
fn
- a function that initializes a builder to create theDeleteUserRequest
- See Also:
-
disableUser
Disables users in the native realm.- See Also:
-
disableUser
public final CompletableFuture<DisableUserResponse> disableUser(Function<DisableUserRequest.Builder, ObjectBuilder<DisableUserRequest>> fn) Disables users in the native realm.- Parameters:
fn
- a function that initializes a builder to create theDisableUserRequest
- See Also:
-
disableUserProfile
public CompletableFuture<DisableUserProfileResponse> disableUserProfile(DisableUserProfileRequest request) Disables a user profile so it's not visible in user profile searches.- See Also:
-
disableUserProfile
public final CompletableFuture<DisableUserProfileResponse> disableUserProfile(Function<DisableUserProfileRequest.Builder, ObjectBuilder<DisableUserProfileRequest>> fn) Disables a user profile so it's not visible in user profile searches.- Parameters:
fn
- a function that initializes a builder to create theDisableUserProfileRequest
- See Also:
-
enableUser
Enables users in the native realm.- See Also:
-
enableUser
public final CompletableFuture<EnableUserResponse> enableUser(Function<EnableUserRequest.Builder, ObjectBuilder<EnableUserRequest>> fn) Enables users in the native realm.- Parameters:
fn
- a function that initializes a builder to create theEnableUserRequest
- See Also:
-
enableUserProfile
public CompletableFuture<EnableUserProfileResponse> enableUserProfile(EnableUserProfileRequest request) Enables a user profile so it's visible in user profile searches.- See Also:
-
enableUserProfile
public final CompletableFuture<EnableUserProfileResponse> enableUserProfile(Function<EnableUserProfileRequest.Builder, ObjectBuilder<EnableUserProfileRequest>> fn) Enables a user profile so it's visible in user profile searches.- Parameters:
fn
- a function that initializes a builder to create theEnableUserProfileRequest
- See Also:
-
enrollKibana
Enables a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.- See Also:
-
enrollNode
Allows a new node to join an existing cluster with security features enabled.- See Also:
-
getApiKey
Get API key information. Retrieves information for one or more API keys. NOTE: If you have only themanage_own_api_key
privilege, this API returns only the API keys that you own. If you haveread_security
,manage_api_key
or greater privileges (includingmanage_security
), this API returns all API keys regardless of ownership.- See Also:
-
getApiKey
public final CompletableFuture<GetApiKeyResponse> getApiKey(Function<GetApiKeyRequest.Builder, ObjectBuilder<GetApiKeyRequest>> fn) Get API key information. Retrieves information for one or more API keys. NOTE: If you have only themanage_own_api_key
privilege, this API returns only the API keys that you own. If you haveread_security
,manage_api_key
or greater privileges (includingmanage_security
), this API returns all API keys regardless of ownership.- Parameters:
fn
- a function that initializes a builder to create theGetApiKeyRequest
- See Also:
-
getApiKey
Get API key information. Retrieves information for one or more API keys. NOTE: If you have only themanage_own_api_key
privilege, this API returns only the API keys that you own. If you haveread_security
,manage_api_key
or greater privileges (includingmanage_security
), this API returns all API keys regardless of ownership.- See Also:
-
getBuiltinPrivileges
Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch.- See Also:
-
getPrivileges
Retrieves application privileges.- See Also:
-
getPrivileges
public final CompletableFuture<GetPrivilegesResponse> getPrivileges(Function<GetPrivilegesRequest.Builder, ObjectBuilder<GetPrivilegesRequest>> fn) Retrieves application privileges.- Parameters:
fn
- a function that initializes a builder to create theGetPrivilegesRequest
- See Also:
-
getPrivileges
Retrieves application privileges.- See Also:
-
getRole
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The get roles API cannot retrieve roles that are defined in roles files.- See Also:
-
getRole
public final CompletableFuture<GetRoleResponse> getRole(Function<GetRoleRequest.Builder, ObjectBuilder<GetRoleRequest>> fn) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The get roles API cannot retrieve roles that are defined in roles files.- Parameters:
fn
- a function that initializes a builder to create theGetRoleRequest
- See Also:
-
getRole
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The get roles API cannot retrieve roles that are defined in roles files.- See Also:
-
getRoleMapping
Retrieves role mappings.- See Also:
-
getRoleMapping
public final CompletableFuture<GetRoleMappingResponse> getRoleMapping(Function<GetRoleMappingRequest.Builder, ObjectBuilder<GetRoleMappingRequest>> fn) Retrieves role mappings.- Parameters:
fn
- a function that initializes a builder to create theGetRoleMappingRequest
- See Also:
-
getRoleMapping
Retrieves role mappings.- See Also:
-
getServiceAccounts
public CompletableFuture<GetServiceAccountsResponse> getServiceAccounts(GetServiceAccountsRequest request) This API returns a list of service accounts that match the provided path parameter(s).- See Also:
-
getServiceAccounts
public final CompletableFuture<GetServiceAccountsResponse> getServiceAccounts(Function<GetServiceAccountsRequest.Builder, ObjectBuilder<GetServiceAccountsRequest>> fn) This API returns a list of service accounts that match the provided path parameter(s).- Parameters:
fn
- a function that initializes a builder to create theGetServiceAccountsRequest
- See Also:
-
getServiceAccounts
This API returns a list of service accounts that match the provided path parameter(s).- See Also:
-
getServiceCredentials
public CompletableFuture<GetServiceCredentialsResponse> getServiceCredentials(GetServiceCredentialsRequest request) Retrieves information of all service credentials for a service account.- See Also:
-
getServiceCredentials
public final CompletableFuture<GetServiceCredentialsResponse> getServiceCredentials(Function<GetServiceCredentialsRequest.Builder, ObjectBuilder<GetServiceCredentialsRequest>> fn) Retrieves information of all service credentials for a service account.- Parameters:
fn
- a function that initializes a builder to create theGetServiceCredentialsRequest
- See Also:
-
getToken
Creates a bearer token for access without requiring basic authentication.- See Also:
-
getToken
public final CompletableFuture<GetTokenResponse> getToken(Function<GetTokenRequest.Builder, ObjectBuilder<GetTokenRequest>> fn) Creates a bearer token for access without requiring basic authentication.- Parameters:
fn
- a function that initializes a builder to create theGetTokenRequest
- See Also:
-
getToken
Creates a bearer token for access without requiring basic authentication.- See Also:
-
getUser
Retrieves information about users in the native realm and built-in users.- See Also:
-
getUser
public final CompletableFuture<GetUserResponse> getUser(Function<GetUserRequest.Builder, ObjectBuilder<GetUserRequest>> fn) Retrieves information about users in the native realm and built-in users.- Parameters:
fn
- a function that initializes a builder to create theGetUserRequest
- See Also:
-
getUser
Retrieves information about users in the native realm and built-in users.- See Also:
-
getUserPrivileges
public CompletableFuture<GetUserPrivilegesResponse> getUserPrivileges(GetUserPrivilegesRequest request) Retrieves security privileges for the logged in user.- See Also:
-
getUserPrivileges
public final CompletableFuture<GetUserPrivilegesResponse> getUserPrivileges(Function<GetUserPrivilegesRequest.Builder, ObjectBuilder<GetUserPrivilegesRequest>> fn) Retrieves security privileges for the logged in user.- Parameters:
fn
- a function that initializes a builder to create theGetUserPrivilegesRequest
- See Also:
-
getUserPrivileges
Retrieves security privileges for the logged in user.- See Also:
-
getUserProfile
Retrieves a user's profile using the unique profile ID.- See Also:
-
getUserProfile
public final CompletableFuture<GetUserProfileResponse> getUserProfile(Function<GetUserProfileRequest.Builder, ObjectBuilder<GetUserProfileRequest>> fn) Retrieves a user's profile using the unique profile ID.- Parameters:
fn
- a function that initializes a builder to create theGetUserProfileRequest
- See Also:
-
grantApiKey
Creates an API key on behalf of another user. This API is similar to Create API keys, however it creates the API key for a user that is different than the user that runs the API. The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. It is not possible to use this API to create an API key without that user’s credentials. The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. In this case, the API key will be created on behalf of the impersonated user.This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds.
By default, API keys never expire. You can specify expiration information when you create the API keys.
- See Also:
-
grantApiKey
public final CompletableFuture<GrantApiKeyResponse> grantApiKey(Function<GrantApiKeyRequest.Builder, ObjectBuilder<GrantApiKeyRequest>> fn) Creates an API key on behalf of another user. This API is similar to Create API keys, however it creates the API key for a user that is different than the user that runs the API. The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. It is not possible to use this API to create an API key without that user’s credentials. The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. In this case, the API key will be created on behalf of the impersonated user.This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds.
By default, API keys never expire. You can specify expiration information when you create the API keys.
- Parameters:
fn
- a function that initializes a builder to create theGrantApiKeyRequest
- See Also:
-
hasPrivileges
Check user privileges. Determines whether the specified user has a specified list of privileges.- See Also:
-
hasPrivileges
public final CompletableFuture<HasPrivilegesResponse> hasPrivileges(Function<HasPrivilegesRequest.Builder, ObjectBuilder<HasPrivilegesRequest>> fn) Check user privileges. Determines whether the specified user has a specified list of privileges.- Parameters:
fn
- a function that initializes a builder to create theHasPrivilegesRequest
- See Also:
-
hasPrivileges
Check user privileges. Determines whether the specified user has a specified list of privileges.- See Also:
-
hasPrivilegesUserProfile
public CompletableFuture<HasPrivilegesUserProfileResponse> hasPrivilegesUserProfile(HasPrivilegesUserProfileRequest request) Determines whether the users associated with the specified profile IDs have all the requested privileges.- See Also:
-
hasPrivilegesUserProfile
public final CompletableFuture<HasPrivilegesUserProfileResponse> hasPrivilegesUserProfile(Function<HasPrivilegesUserProfileRequest.Builder, ObjectBuilder<HasPrivilegesUserProfileRequest>> fn) Determines whether the users associated with the specified profile IDs have all the requested privileges.- Parameters:
fn
- a function that initializes a builder to create theHasPrivilegesUserProfileRequest
- See Also:
-
invalidateApiKey
public CompletableFuture<InvalidateApiKeyResponse> invalidateApiKey(InvalidateApiKeyRequest request) Invalidate API keys. Invalidates one or more API keys. Themanage_api_key
privilege allows deleting any API keys. Themanage_own_api_key
only allows deleting API keys that are owned by the user. In addition, with themanage_own_api_key
privilege, an invalidation request must be issued in one of the three formats:- Set the parameter
owner=true
. - Or, set both
username
andrealm_name
to match the user’s identity. - Or, if the request is issued by an API key, i.e. an API key invalidates
itself, specify its ID in the
ids
field.
- See Also:
- Set the parameter
-
invalidateApiKey
public final CompletableFuture<InvalidateApiKeyResponse> invalidateApiKey(Function<InvalidateApiKeyRequest.Builder, ObjectBuilder<InvalidateApiKeyRequest>> fn) Invalidate API keys. Invalidates one or more API keys. Themanage_api_key
privilege allows deleting any API keys. Themanage_own_api_key
only allows deleting API keys that are owned by the user. In addition, with themanage_own_api_key
privilege, an invalidation request must be issued in one of the three formats:- Set the parameter
owner=true
. - Or, set both
username
andrealm_name
to match the user’s identity. - Or, if the request is issued by an API key, i.e. an API key invalidates
itself, specify its ID in the
ids
field.
- Parameters:
fn
- a function that initializes a builder to create theInvalidateApiKeyRequest
- See Also:
- Set the parameter
-
invalidateApiKey
Invalidate API keys. Invalidates one or more API keys. Themanage_api_key
privilege allows deleting any API keys. Themanage_own_api_key
only allows deleting API keys that are owned by the user. In addition, with themanage_own_api_key
privilege, an invalidation request must be issued in one of the three formats:- Set the parameter
owner=true
. - Or, set both
username
andrealm_name
to match the user’s identity. - Or, if the request is issued by an API key, i.e. an API key invalidates
itself, specify its ID in the
ids
field.
- See Also:
- Set the parameter
-
invalidateToken
Invalidates one or more access tokens or refresh tokens.- See Also:
-
invalidateToken
public final CompletableFuture<InvalidateTokenResponse> invalidateToken(Function<InvalidateTokenRequest.Builder, ObjectBuilder<InvalidateTokenRequest>> fn) Invalidates one or more access tokens or refresh tokens.- Parameters:
fn
- a function that initializes a builder to create theInvalidateTokenRequest
- See Also:
-
invalidateToken
Invalidates one or more access tokens or refresh tokens.- See Also:
-
putPrivileges
Adds or updates application privileges.- See Also:
-
putPrivileges
public final CompletableFuture<PutPrivilegesResponse> putPrivileges(Function<PutPrivilegesRequest.Builder, ObjectBuilder<PutPrivilegesRequest>> fn) Adds or updates application privileges.- Parameters:
fn
- a function that initializes a builder to create thePutPrivilegesRequest
- See Also:
-
putPrivileges
Adds or updates application privileges.- See Also:
-
putRole
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The create or update roles API cannot update roles that are defined in roles files.- See Also:
-
putRole
public final CompletableFuture<PutRoleResponse> putRole(Function<PutRoleRequest.Builder, ObjectBuilder<PutRoleRequest>> fn) The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The create or update roles API cannot update roles that are defined in roles files.- Parameters:
fn
- a function that initializes a builder to create thePutRoleRequest
- See Also:
-
putRoleMapping
Creates and updates role mappings.- See Also:
-
putRoleMapping
public final CompletableFuture<PutRoleMappingResponse> putRoleMapping(Function<PutRoleMappingRequest.Builder, ObjectBuilder<PutRoleMappingRequest>> fn) Creates and updates role mappings.- Parameters:
fn
- a function that initializes a builder to create thePutRoleMappingRequest
- See Also:
-
putUser
Adds and updates users in the native realm. These users are commonly referred to as native users.- See Also:
-
putUser
public final CompletableFuture<PutUserResponse> putUser(Function<PutUserRequest.Builder, ObjectBuilder<PutUserRequest>> fn) Adds and updates users in the native realm. These users are commonly referred to as native users.- Parameters:
fn
- a function that initializes a builder to create thePutUserRequest
- See Also:
-
queryApiKeys
Query API keys. Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.- See Also:
-
queryApiKeys
public final CompletableFuture<QueryApiKeysResponse> queryApiKeys(Function<QueryApiKeysRequest.Builder, ObjectBuilder<QueryApiKeysRequest>> fn) Query API keys. Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.- Parameters:
fn
- a function that initializes a builder to create theQueryApiKeysRequest
- See Also:
-
queryApiKeys
Query API keys. Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.- See Also:
-
queryRole
Retrieves roles in a paginated manner. You can optionally filter the results with a query.- See Also:
-
queryRole
public final CompletableFuture<QueryRoleResponse> queryRole(Function<QueryRoleRequest.Builder, ObjectBuilder<QueryRoleRequest>> fn) Retrieves roles in a paginated manner. You can optionally filter the results with a query.- Parameters:
fn
- a function that initializes a builder to create theQueryRoleRequest
- See Also:
-
queryRole
Retrieves roles in a paginated manner. You can optionally filter the results with a query.- See Also:
-
queryUser
Retrieves information for Users in a paginated manner. You can optionally filter the results with a query.- See Also:
-
queryUser
public final CompletableFuture<QueryUserResponse> queryUser(Function<QueryUserRequest.Builder, ObjectBuilder<QueryUserRequest>> fn) Retrieves information for Users in a paginated manner. You can optionally filter the results with a query.- Parameters:
fn
- a function that initializes a builder to create theQueryUserRequest
- See Also:
-
queryUser
Retrieves information for Users in a paginated manner. You can optionally filter the results with a query.- See Also:
-
samlAuthenticate
public CompletableFuture<SamlAuthenticateResponse> samlAuthenticate(SamlAuthenticateRequest request) Submits a SAML Response message to Elasticsearch for consumption.- See Also:
-
samlAuthenticate
public final CompletableFuture<SamlAuthenticateResponse> samlAuthenticate(Function<SamlAuthenticateRequest.Builder, ObjectBuilder<SamlAuthenticateRequest>> fn) Submits a SAML Response message to Elasticsearch for consumption.- Parameters:
fn
- a function that initializes a builder to create theSamlAuthenticateRequest
- See Also:
-
samlCompleteLogout
Verifies the logout response sent from the SAML IdP.- See Also:
-
samlCompleteLogout
public final CompletableFuture<BooleanResponse> samlCompleteLogout(Function<SamlCompleteLogoutRequest.Builder, ObjectBuilder<SamlCompleteLogoutRequest>> fn) Verifies the logout response sent from the SAML IdP.- Parameters:
fn
- a function that initializes a builder to create theSamlCompleteLogoutRequest
- See Also:
-
samlInvalidate
Submits a SAML LogoutRequest message to Elasticsearch for consumption.- See Also:
-
samlInvalidate
public final CompletableFuture<SamlInvalidateResponse> samlInvalidate(Function<SamlInvalidateRequest.Builder, ObjectBuilder<SamlInvalidateRequest>> fn) Submits a SAML LogoutRequest message to Elasticsearch for consumption.- Parameters:
fn
- a function that initializes a builder to create theSamlInvalidateRequest
- See Also:
-
samlLogout
Submits a request to invalidate an access token and refresh token.- See Also:
-
samlLogout
public final CompletableFuture<SamlLogoutResponse> samlLogout(Function<SamlLogoutRequest.Builder, ObjectBuilder<SamlLogoutRequest>> fn) Submits a request to invalidate an access token and refresh token.- Parameters:
fn
- a function that initializes a builder to create theSamlLogoutRequest
- See Also:
-
samlPrepareAuthentication
public CompletableFuture<SamlPrepareAuthenticationResponse> samlPrepareAuthentication(SamlPrepareAuthenticationRequest request) Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.- See Also:
-
samlPrepareAuthentication
public final CompletableFuture<SamlPrepareAuthenticationResponse> samlPrepareAuthentication(Function<SamlPrepareAuthenticationRequest.Builder, ObjectBuilder<SamlPrepareAuthenticationRequest>> fn) Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.- Parameters:
fn
- a function that initializes a builder to create theSamlPrepareAuthenticationRequest
- See Also:
-
samlPrepareAuthentication
Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.- See Also:
-
samlServiceProviderMetadata
public CompletableFuture<SamlServiceProviderMetadataResponse> samlServiceProviderMetadata(SamlServiceProviderMetadataRequest request) Generate SAML metadata for a SAML 2.0 Service Provider.- See Also:
-
samlServiceProviderMetadata
public final CompletableFuture<SamlServiceProviderMetadataResponse> samlServiceProviderMetadata(Function<SamlServiceProviderMetadataRequest.Builder, ObjectBuilder<SamlServiceProviderMetadataRequest>> fn) Generate SAML metadata for a SAML 2.0 Service Provider.- Parameters:
fn
- a function that initializes a builder to create theSamlServiceProviderMetadataRequest
- See Also:
-
suggestUserProfiles
public CompletableFuture<SuggestUserProfilesResponse> suggestUserProfiles(SuggestUserProfilesRequest request) Get suggestions for user profiles that match specified search criteria.- See Also:
-
suggestUserProfiles
public final CompletableFuture<SuggestUserProfilesResponse> suggestUserProfiles(Function<SuggestUserProfilesRequest.Builder, ObjectBuilder<SuggestUserProfilesRequest>> fn) Get suggestions for user profiles that match specified search criteria.- Parameters:
fn
- a function that initializes a builder to create theSuggestUserProfilesRequest
- See Also:
-
suggestUserProfiles
Get suggestions for user profiles that match specified search criteria.- See Also:
-
updateApiKey
Update an API key. Updates attributes of an existing API key. Users can only update API keys that they created or that were granted to them. Use this API to update API keys created by the create API Key or grant API Key APIs. If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. This API supports updates to an API key’s access scope and metadata. The access scope of an API key is derived from therole_descriptors
you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. The snapshot of the owner’s permissions is updated automatically on every call. If you don’t specifyrole_descriptors
in the request, a call to this API might still change the API key’s access scope. This change can occur if the owner user’s permissions have changed since the API key was created or last modified. To update another user’s API key, use therun_as
feature to submit a request on behalf of another user. IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. To update an API key, the owner user’s credentials are required.- See Also:
-
updateApiKey
public final CompletableFuture<UpdateApiKeyResponse> updateApiKey(Function<UpdateApiKeyRequest.Builder, ObjectBuilder<UpdateApiKeyRequest>> fn) Update an API key. Updates attributes of an existing API key. Users can only update API keys that they created or that were granted to them. Use this API to update API keys created by the create API Key or grant API Key APIs. If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. It’s not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. This API supports updates to an API key’s access scope and metadata. The access scope of an API key is derived from therole_descriptors
you specify in the request, and a snapshot of the owner user’s permissions at the time of the request. The snapshot of the owner’s permissions is updated automatically on every call. If you don’t specifyrole_descriptors
in the request, a call to this API might still change the API key’s access scope. This change can occur if the owner user’s permissions have changed since the API key was created or last modified. To update another user’s API key, use therun_as
feature to submit a request on behalf of another user. IMPORTANT: It’s not possible to use an API key as the authentication credential for this API. To update an API key, the owner user’s credentials are required.- Parameters:
fn
- a function that initializes a builder to create theUpdateApiKeyRequest
- See Also:
-
updateUserProfileData
public CompletableFuture<UpdateUserProfileDataResponse> updateUserProfileData(UpdateUserProfileDataRequest request) Updates specific data for the user profile that's associated with the specified unique ID.- See Also:
-
updateUserProfileData
public final CompletableFuture<UpdateUserProfileDataResponse> updateUserProfileData(Function<UpdateUserProfileDataRequest.Builder, ObjectBuilder<UpdateUserProfileDataRequest>> fn) Updates specific data for the user profile that's associated with the specified unique ID.- Parameters:
fn
- a function that initializes a builder to create theUpdateUserProfileDataRequest
- See Also:
-