Class ElasticsearchSecurityClient
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSecurityClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionActivate a user profile.activateUserProfile(Function<ActivateUserProfileRequest.Builder, ObjectBuilder<ActivateUserProfileRequest>> fn) Activate a user profile.Authenticate a user.bulkDeleteRole(BulkDeleteRoleRequest request) Bulk delete roles.final BulkDeleteRoleResponseBulk delete roles.bulkPutRole(BulkPutRoleRequest request) Bulk create or update roles.final BulkPutRoleResponseBulk create or update roles.Change passwords.changePassword(ChangePasswordRequest request) Change passwords.final ChangePasswordResponseChange passwords.clearApiKeyCache(ClearApiKeyCacheRequest request) Clear the API key cache.final ClearApiKeyCacheResponseclearApiKeyCache(Function<ClearApiKeyCacheRequest.Builder, ObjectBuilder<ClearApiKeyCacheRequest>> fn) Clear the API key cache.Clear the privileges cache.clearCachedPrivileges(Function<ClearCachedPrivilegesRequest.Builder, ObjectBuilder<ClearCachedPrivilegesRequest>> fn) Clear the privileges cache.Clear the user cache.clearCachedRealms(Function<ClearCachedRealmsRequest.Builder, ObjectBuilder<ClearCachedRealmsRequest>> fn) Clear the user cache.clearCachedRoles(ClearCachedRolesRequest request) Clear the roles cache.final ClearCachedRolesResponseclearCachedRoles(Function<ClearCachedRolesRequest.Builder, ObjectBuilder<ClearCachedRolesRequest>> fn) Clear the roles cache.Clear service account token caches.clearCachedServiceTokens(Function<ClearCachedServiceTokensRequest.Builder, ObjectBuilder<ClearCachedServiceTokensRequest>> fn) Clear service account token caches.Create an API key.createApiKey(CreateApiKeyRequest request) Create an API key.final CreateApiKeyResponseCreate an API key.Create a cross-cluster API key.createCrossClusterApiKey(Function<CreateCrossClusterApiKeyRequest.Builder, ObjectBuilder<CreateCrossClusterApiKeyRequest>> fn) Create a cross-cluster API key.Create a service account token.createServiceToken(Function<CreateServiceTokenRequest.Builder, ObjectBuilder<CreateServiceTokenRequest>> fn) Create a service account token.deletePrivileges(DeletePrivilegesRequest request) Delete application privileges.final DeletePrivilegesResponsedeletePrivileges(Function<DeletePrivilegesRequest.Builder, ObjectBuilder<DeletePrivilegesRequest>> fn) Delete application privileges.deleteRole(DeleteRoleRequest request) Delete roles.final DeleteRoleResponseDelete roles.Delete role mappings.deleteRoleMapping(Function<DeleteRoleMappingRequest.Builder, ObjectBuilder<DeleteRoleMappingRequest>> fn) Delete role mappings.Delete service account tokens.deleteServiceToken(Function<DeleteServiceTokenRequest.Builder, ObjectBuilder<DeleteServiceTokenRequest>> fn) Delete service account tokens.deleteUser(DeleteUserRequest request) Delete users.final DeleteUserResponseDelete users.disableUser(DisableUserRequest request) Disable users.final DisableUserResponseDisable users.Disable a user profile.disableUserProfile(Function<DisableUserProfileRequest.Builder, ObjectBuilder<DisableUserProfileRequest>> fn) Disable a user profile.enableUser(EnableUserRequest request) Enable users.final EnableUserResponseEnable users.Enable a user profile.enableUserProfile(Function<EnableUserProfileRequest.Builder, ObjectBuilder<EnableUserProfileRequest>> fn) Enable a user profile.Enroll Kibana.Enroll a node.Get API key information.getApiKey(GetApiKeyRequest request) Get API key information.final GetApiKeyResponseGet API key information.Get builtin privileges.Get application privileges.getPrivileges(GetPrivilegesRequest request) Get application privileges.final GetPrivilegesResponseGet application privileges.getRole()Get roles.getRole(GetRoleRequest request) Get roles.final GetRoleResponseGet roles.Get role mappings.getRoleMapping(GetRoleMappingRequest request) Get role mappings.final GetRoleMappingResponseGet role mappings.Get service accounts.Get service accounts.getServiceAccounts(Function<GetServiceAccountsRequest.Builder, ObjectBuilder<GetServiceAccountsRequest>> fn) Get service accounts.Get service account credentials.getServiceCredentials(Function<GetServiceCredentialsRequest.Builder, ObjectBuilder<GetServiceCredentialsRequest>> fn) Get service account credentials.getToken()Get a token.getToken(GetTokenRequest request) Get a token.final GetTokenResponseGet a token.getUser()Get users.getUser(GetUserRequest request) Get users.final GetUserResponseGet users.Get user privileges.Get user privileges.getUserPrivileges(Function<GetUserPrivilegesRequest.Builder, ObjectBuilder<GetUserPrivilegesRequest>> fn) Get user privileges.getUserProfile(GetUserProfileRequest request) Get a user profile.final GetUserProfileResponseGet a user profile.grantApiKey(GrantApiKeyRequest request) Grant an API key.final GrantApiKeyResponseGrant an API key.Check user privileges.hasPrivileges(HasPrivilegesRequest request) Check user privileges.final HasPrivilegesResponseCheck user privileges.Check user profile privileges.hasPrivilegesUserProfile(Function<HasPrivilegesUserProfileRequest.Builder, ObjectBuilder<HasPrivilegesUserProfileRequest>> fn) Check user profile privileges.Invalidate API keys.invalidateApiKey(InvalidateApiKeyRequest request) Invalidate API keys.final InvalidateApiKeyResponseinvalidateApiKey(Function<InvalidateApiKeyRequest.Builder, ObjectBuilder<InvalidateApiKeyRequest>> fn) Invalidate API keys.Invalidate a token.invalidateToken(InvalidateTokenRequest request) Invalidate a token.final InvalidateTokenResponseInvalidate a token.Create or update application privileges.putPrivileges(PutPrivilegesRequest request) Create or update application privileges.final PutPrivilegesResponseCreate or update application privileges.putRole(PutRoleRequest request) Create or update roles.final PutRoleResponseCreate or update roles.putRoleMapping(PutRoleMappingRequest request) Create or update role mappings.final PutRoleMappingResponseCreate or update role mappings.putUser(PutUserRequest request) Create or update users.final PutUserResponseCreate or update users.Find API keys with a query.queryApiKeys(QueryApiKeysRequest request) Find API keys with a query.final QueryApiKeysResponseFind API keys with a query.Find roles with a query.queryRole(QueryRoleRequest request) Find roles with a query.final QueryRoleResponseFind roles with a query.Find users with a query.queryUser(QueryUserRequest request) Find users with a query.final QueryUserResponseFind users with a query.samlAuthenticate(SamlAuthenticateRequest request) Authenticate SAML.final SamlAuthenticateResponsesamlAuthenticate(Function<SamlAuthenticateRequest.Builder, ObjectBuilder<SamlAuthenticateRequest>> fn) Authenticate SAML.Logout of SAML completely.final BooleanResponsesamlCompleteLogout(Function<SamlCompleteLogoutRequest.Builder, ObjectBuilder<SamlCompleteLogoutRequest>> fn) Logout of SAML completely.samlInvalidate(SamlInvalidateRequest request) Invalidate SAML.final SamlInvalidateResponseInvalidate SAML.samlLogout(SamlLogoutRequest request) Logout of SAML.final SamlLogoutResponseLogout of SAML.Prepare SAML authentication.Prepare SAML authentication.samlPrepareAuthentication(Function<SamlPrepareAuthenticationRequest.Builder, ObjectBuilder<SamlPrepareAuthenticationRequest>> fn) Prepare SAML authentication.Create SAML service provider metadata.samlServiceProviderMetadata(Function<SamlServiceProviderMetadataRequest.Builder, ObjectBuilder<SamlServiceProviderMetadataRequest>> fn) Create SAML service provider metadata.Suggest a user profile.Suggest a user profile.suggestUserProfiles(Function<SuggestUserProfilesRequest.Builder, ObjectBuilder<SuggestUserProfilesRequest>> fn) Suggest a user profile.updateApiKey(UpdateApiKeyRequest request) Update an API key.final UpdateApiKeyResponseUpdate an API key.Update a cross-cluster API key.updateCrossClusterApiKey(Function<UpdateCrossClusterApiKeyRequest.Builder, ObjectBuilder<UpdateCrossClusterApiKeyRequest>> fn) Update a cross-cluster API key.Update user profile data.updateUserProfileData(Function<UpdateUserProfileDataRequest.Builder, ObjectBuilder<UpdateUserProfileDataRequest>> fn) Update user profile data.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
-
ElasticsearchSecurityClient
-
ElasticsearchSecurityClient
public ElasticsearchSecurityClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchSecurityClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchSecurityClient>
-
activateUserProfile
public ActivateUserProfileResponse activateUserProfile(ActivateUserProfileRequest request) throws IOException, ElasticsearchException Activate a user profile.Create or update a user profile on behalf of another user.
- Throws:
IOExceptionElasticsearchException- See Also:
-
activateUserProfile
public final ActivateUserProfileResponse activateUserProfile(Function<ActivateUserProfileRequest.Builder, ObjectBuilder<ActivateUserProfileRequest>> fn) throws IOException, ElasticsearchExceptionActivate a user profile.Create or update a user profile on behalf of another user.
- Parameters:
fn- a function that initializes a builder to create theActivateUserProfileRequest- Throws:
IOExceptionElasticsearchException- 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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
bulkDeleteRole
public BulkDeleteRoleResponse bulkDeleteRole(BulkDeleteRoleRequest request) throws IOException, ElasticsearchException Bulk delete roles.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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
bulkDeleteRole
public final BulkDeleteRoleResponse bulkDeleteRole(Function<BulkDeleteRoleRequest.Builder, ObjectBuilder<BulkDeleteRoleRequest>> fn) throws IOException, ElasticsearchExceptionBulk delete roles.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- Throws:
IOExceptionElasticsearchException- See Also:
-
bulkPutRole
public BulkPutRoleResponse bulkPutRole(BulkPutRoleRequest request) throws IOException, ElasticsearchException Bulk create or update roles.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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
bulkPutRole
public final BulkPutRoleResponse bulkPutRole(Function<BulkPutRoleRequest.Builder, ObjectBuilder<BulkPutRoleRequest>> fn) throws IOException, ElasticsearchExceptionBulk create or update roles.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- Throws:
IOExceptionElasticsearchException- See Also:
-
changePassword
public ChangePasswordResponse changePassword(ChangePasswordRequest request) throws IOException, ElasticsearchException Change passwords.Change the passwords of users in the native realm and built-in users.
- Throws:
IOExceptionElasticsearchException- See Also:
-
changePassword
public final ChangePasswordResponse changePassword(Function<ChangePasswordRequest.Builder, ObjectBuilder<ChangePasswordRequest>> fn) throws IOException, ElasticsearchExceptionChange passwords.Change the passwords of users in the native realm and built-in users.
- Parameters:
fn- a function that initializes a builder to create theChangePasswordRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
changePassword
Change passwords.Change the passwords of users in the native realm and built-in users.
- Throws:
IOExceptionElasticsearchException- See Also:
-
clearApiKeyCache
public ClearApiKeyCacheResponse clearApiKeyCache(ClearApiKeyCacheRequest request) throws IOException, ElasticsearchException Clear the API key cache.Evict a subset of all entries from the API key cache. The cache is also automatically cleared on state changes of the security index.
- Throws:
IOExceptionElasticsearchException- See Also:
-
clearApiKeyCache
public final ClearApiKeyCacheResponse clearApiKeyCache(Function<ClearApiKeyCacheRequest.Builder, ObjectBuilder<ClearApiKeyCacheRequest>> fn) throws IOException, ElasticsearchExceptionClear the API key cache.Evict 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- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedPrivileges
public ClearCachedPrivilegesResponse clearCachedPrivileges(ClearCachedPrivilegesRequest request) throws IOException, ElasticsearchException Clear the privileges cache.Evict privileges from the native application privilege cache. The cache is also automatically cleared for applications that have their privileges updated.
- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedPrivileges
public final ClearCachedPrivilegesResponse clearCachedPrivileges(Function<ClearCachedPrivilegesRequest.Builder, ObjectBuilder<ClearCachedPrivilegesRequest>> fn) throws IOException, ElasticsearchExceptionClear the privileges cache.Evict privileges from the native application privilege cache. The cache is also automatically cleared for applications that have their privileges updated.
- Parameters:
fn- a function that initializes a builder to create theClearCachedPrivilegesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedRealms
public ClearCachedRealmsResponse clearCachedRealms(ClearCachedRealmsRequest request) throws IOException, ElasticsearchException Clear the user cache.Evict users from the user cache. You can completely clear the cache or evict specific users.
- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedRealms
public final ClearCachedRealmsResponse clearCachedRealms(Function<ClearCachedRealmsRequest.Builder, ObjectBuilder<ClearCachedRealmsRequest>> fn) throws IOException, ElasticsearchExceptionClear the user cache.Evict users from the user cache. You can completely clear the cache or evict specific users.
- Parameters:
fn- a function that initializes a builder to create theClearCachedRealmsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedRoles
public ClearCachedRolesResponse clearCachedRoles(ClearCachedRolesRequest request) throws IOException, ElasticsearchException Clear the roles cache.Evict roles from the native role cache.
- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedRoles
public final ClearCachedRolesResponse clearCachedRoles(Function<ClearCachedRolesRequest.Builder, ObjectBuilder<ClearCachedRolesRequest>> fn) throws IOException, ElasticsearchExceptionClear the roles cache.Evict roles from the native role cache.
- Parameters:
fn- a function that initializes a builder to create theClearCachedRolesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedServiceTokens
public ClearCachedServiceTokensResponse clearCachedServiceTokens(ClearCachedServiceTokensRequest request) throws IOException, ElasticsearchException Clear service account token caches.Evict a subset of all entries from the service account token caches.
- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCachedServiceTokens
public final ClearCachedServiceTokensResponse clearCachedServiceTokens(Function<ClearCachedServiceTokensRequest.Builder, ObjectBuilder<ClearCachedServiceTokensRequest>> fn) throws IOException, ElasticsearchExceptionClear service account token caches.Evict a subset of all entries from the service account token caches.
- Parameters:
fn- a function that initializes a builder to create theClearCachedServiceTokensRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
createApiKey
public CreateApiKeyResponse createApiKey(CreateApiKeyRequest request) throws IOException, ElasticsearchException Create an API key.Create 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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
createApiKey
public final CreateApiKeyResponse createApiKey(Function<CreateApiKeyRequest.Builder, ObjectBuilder<CreateApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionCreate an API key.Create 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- Throws:
IOExceptionElasticsearchException- See Also:
-
createApiKey
Create an API key.Create 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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
createCrossClusterApiKey
public CreateCrossClusterApiKeyResponse createCrossClusterApiKey(CreateCrossClusterApiKeyRequest request) throws IOException, ElasticsearchException Create a cross-cluster API key.Create an API key of the
cross_clustertype for the API key based remote cluster access. Across_clusterAPI key cannot be used to authenticate through the REST interface.IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.
Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.
NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the
accessproperty.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.
By default, API keys never expire. You can specify expiration information when you create the API keys.
Cross-cluster API keys can only be updated with the update cross-cluster API key API. Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.
- Throws:
IOExceptionElasticsearchException- See Also:
-
createCrossClusterApiKey
public final CreateCrossClusterApiKeyResponse createCrossClusterApiKey(Function<CreateCrossClusterApiKeyRequest.Builder, ObjectBuilder<CreateCrossClusterApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionCreate a cross-cluster API key.Create an API key of the
cross_clustertype for the API key based remote cluster access. Across_clusterAPI key cannot be used to authenticate through the REST interface.IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.
Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.
NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the
accessproperty.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.
By default, API keys never expire. You can specify expiration information when you create the API keys.
Cross-cluster API keys can only be updated with the update cross-cluster API key API. Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.
- Parameters:
fn- a function that initializes a builder to create theCreateCrossClusterApiKeyRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
createServiceToken
public CreateServiceTokenResponse createServiceToken(CreateServiceTokenRequest request) throws IOException, ElasticsearchException Create a service account token.Create a service accounts token for access without requiring basic authentication.
- Throws:
IOExceptionElasticsearchException- See Also:
-
createServiceToken
public final CreateServiceTokenResponse createServiceToken(Function<CreateServiceTokenRequest.Builder, ObjectBuilder<CreateServiceTokenRequest>> fn) throws IOException, ElasticsearchExceptionCreate a service account token.Create a service accounts token for access without requiring basic authentication.
- Parameters:
fn- a function that initializes a builder to create theCreateServiceTokenRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deletePrivileges
public DeletePrivilegesResponse deletePrivileges(DeletePrivilegesRequest request) throws IOException, ElasticsearchException Delete application privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
deletePrivileges
public final DeletePrivilegesResponse deletePrivileges(Function<DeletePrivilegesRequest.Builder, ObjectBuilder<DeletePrivilegesRequest>> fn) throws IOException, ElasticsearchExceptionDelete application privileges.- Parameters:
fn- a function that initializes a builder to create theDeletePrivilegesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteRole
public DeleteRoleResponse deleteRole(DeleteRoleRequest request) throws IOException, ElasticsearchException Delete roles.Delete roles in the native realm.
- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteRole
public final DeleteRoleResponse deleteRole(Function<DeleteRoleRequest.Builder, ObjectBuilder<DeleteRoleRequest>> fn) throws IOException, ElasticsearchExceptionDelete roles.Delete roles in the native realm.
- Parameters:
fn- a function that initializes a builder to create theDeleteRoleRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteRoleMapping
public DeleteRoleMappingResponse deleteRoleMapping(DeleteRoleMappingRequest request) throws IOException, ElasticsearchException Delete role mappings.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteRoleMapping
public final DeleteRoleMappingResponse deleteRoleMapping(Function<DeleteRoleMappingRequest.Builder, ObjectBuilder<DeleteRoleMappingRequest>> fn) throws IOException, ElasticsearchExceptionDelete role mappings.- Parameters:
fn- a function that initializes a builder to create theDeleteRoleMappingRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteServiceToken
public DeleteServiceTokenResponse deleteServiceToken(DeleteServiceTokenRequest request) throws IOException, ElasticsearchException Delete service account tokens.Delete service account tokens for a service in a specified namespace.
- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteServiceToken
public final DeleteServiceTokenResponse deleteServiceToken(Function<DeleteServiceTokenRequest.Builder, ObjectBuilder<DeleteServiceTokenRequest>> fn) throws IOException, ElasticsearchExceptionDelete service account tokens.Delete service account tokens for a service in a specified namespace.
- Parameters:
fn- a function that initializes a builder to create theDeleteServiceTokenRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteUser
public DeleteUserResponse deleteUser(DeleteUserRequest request) throws IOException, ElasticsearchException Delete users.Delete users from the native realm.
- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteUser
public final DeleteUserResponse deleteUser(Function<DeleteUserRequest.Builder, ObjectBuilder<DeleteUserRequest>> fn) throws IOException, ElasticsearchExceptionDelete users.Delete users from the native realm.
- Parameters:
fn- a function that initializes a builder to create theDeleteUserRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
disableUser
public DisableUserResponse disableUser(DisableUserRequest request) throws IOException, ElasticsearchException Disable users.Disable users in the native realm.
- Throws:
IOExceptionElasticsearchException- See Also:
-
disableUser
public final DisableUserResponse disableUser(Function<DisableUserRequest.Builder, ObjectBuilder<DisableUserRequest>> fn) throws IOException, ElasticsearchExceptionDisable users.Disable users in the native realm.
- Parameters:
fn- a function that initializes a builder to create theDisableUserRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
disableUserProfile
public DisableUserProfileResponse disableUserProfile(DisableUserProfileRequest request) throws IOException, ElasticsearchException Disable a user profile.Disable user profiles so that they are not visible in user profile searches.
- Throws:
IOExceptionElasticsearchException- See Also:
-
disableUserProfile
public final DisableUserProfileResponse disableUserProfile(Function<DisableUserProfileRequest.Builder, ObjectBuilder<DisableUserProfileRequest>> fn) throws IOException, ElasticsearchExceptionDisable a user profile.Disable user profiles so that they are not visible in user profile searches.
- Parameters:
fn- a function that initializes a builder to create theDisableUserProfileRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
enableUser
public EnableUserResponse enableUser(EnableUserRequest request) throws IOException, ElasticsearchException Enable users.Enable users in the native realm.
- Throws:
IOExceptionElasticsearchException- See Also:
-
enableUser
public final EnableUserResponse enableUser(Function<EnableUserRequest.Builder, ObjectBuilder<EnableUserRequest>> fn) throws IOException, ElasticsearchExceptionEnable users.Enable users in the native realm.
- Parameters:
fn- a function that initializes a builder to create theEnableUserRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
enableUserProfile
public EnableUserProfileResponse enableUserProfile(EnableUserProfileRequest request) throws IOException, ElasticsearchException Enable a user profile.Enable user profiles to make them visible in user profile searches.
- Throws:
IOExceptionElasticsearchException- See Also:
-
enableUserProfile
public final EnableUserProfileResponse enableUserProfile(Function<EnableUserProfileRequest.Builder, ObjectBuilder<EnableUserProfileRequest>> fn) throws IOException, ElasticsearchExceptionEnable a user profile.Enable user profiles to make them visible in user profile searches.
- Parameters:
fn- a function that initializes a builder to create theEnableUserProfileRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
enrollKibana
Enroll Kibana.Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.
- Throws:
IOExceptionElasticsearchException- See Also:
-
enrollNode
Enroll a node.Enroll a new node to allow it to join an existing cluster with security features enabled.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getApiKey
public GetApiKeyResponse getApiKey(GetApiKeyRequest request) throws IOException, ElasticsearchException Get API key information.Retrieves information for one or more API keys. NOTE: If you have only the
manage_own_api_keyprivilege, this API returns only the API keys that you own. If you haveread_security,manage_api_keyor greater privileges (includingmanage_security), this API returns all API keys regardless of ownership.- Throws:
IOExceptionElasticsearchException- See Also:
-
getApiKey
public final GetApiKeyResponse getApiKey(Function<GetApiKeyRequest.Builder, ObjectBuilder<GetApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionGet API key information.Retrieves information for one or more API keys. NOTE: If you have only the
manage_own_api_keyprivilege, this API returns only the API keys that you own. If you haveread_security,manage_api_keyor greater privileges (includingmanage_security), this API returns all API keys regardless of ownership.- Parameters:
fn- a function that initializes a builder to create theGetApiKeyRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getApiKey
Get API key information.Retrieves information for one or more API keys. NOTE: If you have only the
manage_own_api_keyprivilege, this API returns only the API keys that you own. If you haveread_security,manage_api_keyor greater privileges (includingmanage_security), this API returns all API keys regardless of ownership.- Throws:
IOExceptionElasticsearchException- See Also:
-
getBuiltinPrivileges
public GetBuiltinPrivilegesResponse getBuiltinPrivileges() throws IOException, ElasticsearchExceptionGet builtin privileges.Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getPrivileges
public GetPrivilegesResponse getPrivileges(GetPrivilegesRequest request) throws IOException, ElasticsearchException Get application privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
getPrivileges
public final GetPrivilegesResponse getPrivileges(Function<GetPrivilegesRequest.Builder, ObjectBuilder<GetPrivilegesRequest>> fn) throws IOException, ElasticsearchExceptionGet application privileges.- Parameters:
fn- a function that initializes a builder to create theGetPrivilegesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getPrivileges
Get application privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
getRole
Get roles.Get roles in the native realm. 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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getRole
public final GetRoleResponse getRole(Function<GetRoleRequest.Builder, ObjectBuilder<GetRoleRequest>> fn) throws IOException, ElasticsearchExceptionGet roles.Get roles in the native realm. 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- Throws:
IOExceptionElasticsearchException- See Also:
-
getRole
Get roles.Get roles in the native realm. 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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getRoleMapping
public GetRoleMappingResponse getRoleMapping(GetRoleMappingRequest request) throws IOException, ElasticsearchException Get role mappings.Role mappings define which roles are assigned to each user. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The get role mappings API cannot retrieve role mappings that are defined in role mapping files.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getRoleMapping
public final GetRoleMappingResponse getRoleMapping(Function<GetRoleMappingRequest.Builder, ObjectBuilder<GetRoleMappingRequest>> fn) throws IOException, ElasticsearchExceptionGet role mappings.Role mappings define which roles are assigned to each user. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The get role mappings API cannot retrieve role mappings that are defined in role mapping files.
- Parameters:
fn- a function that initializes a builder to create theGetRoleMappingRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getRoleMapping
Get role mappings.Role mappings define which roles are assigned to each user. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The get role mappings API cannot retrieve role mappings that are defined in role mapping files.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getServiceAccounts
public GetServiceAccountsResponse getServiceAccounts(GetServiceAccountsRequest request) throws IOException, ElasticsearchException Get service accounts.Get a list of service accounts that match the provided path parameters.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getServiceAccounts
public final GetServiceAccountsResponse getServiceAccounts(Function<GetServiceAccountsRequest.Builder, ObjectBuilder<GetServiceAccountsRequest>> fn) throws IOException, ElasticsearchExceptionGet service accounts.Get a list of service accounts that match the provided path parameters.
- Parameters:
fn- a function that initializes a builder to create theGetServiceAccountsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getServiceAccounts
Get service accounts.Get a list of service accounts that match the provided path parameters.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getServiceCredentials
public GetServiceCredentialsResponse getServiceCredentials(GetServiceCredentialsRequest request) throws IOException, ElasticsearchException Get service account credentials.- Throws:
IOExceptionElasticsearchException- See Also:
-
getServiceCredentials
public final GetServiceCredentialsResponse getServiceCredentials(Function<GetServiceCredentialsRequest.Builder, ObjectBuilder<GetServiceCredentialsRequest>> fn) throws IOException, ElasticsearchExceptionGet service account credentials.- Parameters:
fn- a function that initializes a builder to create theGetServiceCredentialsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getToken
public GetTokenResponse getToken(GetTokenRequest request) throws IOException, ElasticsearchException Get a token.Create a bearer token for access without requiring basic authentication.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getToken
public final GetTokenResponse getToken(Function<GetTokenRequest.Builder, ObjectBuilder<GetTokenRequest>> fn) throws IOException, ElasticsearchExceptionGet a token.Create a bearer token for access without requiring basic authentication.
- Parameters:
fn- a function that initializes a builder to create theGetTokenRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getToken
Get a token.Create a bearer token for access without requiring basic authentication.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getUser
Get users.Get information about users in the native realm and built-in users.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getUser
public final GetUserResponse getUser(Function<GetUserRequest.Builder, ObjectBuilder<GetUserRequest>> fn) throws IOException, ElasticsearchExceptionGet users.Get information about users in the native realm and built-in users.
- Parameters:
fn- a function that initializes a builder to create theGetUserRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getUser
Get users.Get information about users in the native realm and built-in users.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getUserPrivileges
public GetUserPrivilegesResponse getUserPrivileges(GetUserPrivilegesRequest request) throws IOException, ElasticsearchException Get user privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
getUserPrivileges
public final GetUserPrivilegesResponse getUserPrivileges(Function<GetUserPrivilegesRequest.Builder, ObjectBuilder<GetUserPrivilegesRequest>> fn) throws IOException, ElasticsearchExceptionGet user privileges.- Parameters:
fn- a function that initializes a builder to create theGetUserPrivilegesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getUserPrivileges
Get user privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
getUserProfile
public GetUserProfileResponse getUserProfile(GetUserProfileRequest request) throws IOException, ElasticsearchException Get a user profile.Get a user's profile using the unique profile ID.
- Throws:
IOExceptionElasticsearchException- See Also:
-
getUserProfile
public final GetUserProfileResponse getUserProfile(Function<GetUserProfileRequest.Builder, ObjectBuilder<GetUserProfileRequest>> fn) throws IOException, ElasticsearchExceptionGet a user profile.Get a user's profile using the unique profile ID.
- Parameters:
fn- a function that initializes a builder to create theGetUserProfileRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
grantApiKey
public GrantApiKeyResponse grantApiKey(GrantApiKeyRequest request) throws IOException, ElasticsearchException Grant an API key.Create an API key on behalf of another user. This API is similar to the create API keys API, 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.
- Throws:
IOExceptionElasticsearchException- See Also:
-
grantApiKey
public final GrantApiKeyResponse grantApiKey(Function<GrantApiKeyRequest.Builder, ObjectBuilder<GrantApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionGrant an API key.Create an API key on behalf of another user. This API is similar to the create API keys API, 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- Throws:
IOExceptionElasticsearchException- See Also:
-
hasPrivileges
public HasPrivilegesResponse hasPrivileges(HasPrivilegesRequest request) throws IOException, ElasticsearchException Check user privileges.Determine whether the specified user has a specified list of privileges.
- Throws:
IOExceptionElasticsearchException- See Also:
-
hasPrivileges
public final HasPrivilegesResponse hasPrivileges(Function<HasPrivilegesRequest.Builder, ObjectBuilder<HasPrivilegesRequest>> fn) throws IOException, ElasticsearchExceptionCheck user privileges.Determine whether the specified user has a specified list of privileges.
- Parameters:
fn- a function that initializes a builder to create theHasPrivilegesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
hasPrivileges
Check user privileges.Determine whether the specified user has a specified list of privileges.
- Throws:
IOExceptionElasticsearchException- See Also:
-
hasPrivilegesUserProfile
public HasPrivilegesUserProfileResponse hasPrivilegesUserProfile(HasPrivilegesUserProfileRequest request) throws IOException, ElasticsearchException Check user profile privileges.Determine whether the users associated with the specified user profile IDs have all the requested privileges.
- Throws:
IOExceptionElasticsearchException- See Also:
-
hasPrivilegesUserProfile
public final HasPrivilegesUserProfileResponse hasPrivilegesUserProfile(Function<HasPrivilegesUserProfileRequest.Builder, ObjectBuilder<HasPrivilegesUserProfileRequest>> fn) throws IOException, ElasticsearchExceptionCheck user profile privileges.Determine whether the users associated with the specified user profile IDs have all the requested privileges.
- Parameters:
fn- a function that initializes a builder to create theHasPrivilegesUserProfileRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
invalidateApiKey
public InvalidateApiKeyResponse invalidateApiKey(InvalidateApiKeyRequest request) throws IOException, ElasticsearchException Invalidate API keys.This API invalidates API keys created by the create API key or grant API key APIs. Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. The
manage_api_keyprivilege allows deleting any API keys. Themanage_own_api_keyonly allows deleting API keys that are owned by the user. In addition, with themanage_own_api_keyprivilege, an invalidation request must be issued in one of the three formats:- Set the parameter
owner=true. - Or, set both
usernameandrealm_nameto match the user’s identity. - Or, if the request is issued by an API key, that is to say an API key
invalidates itself, specify its ID in the
idsfield.
- Throws:
IOExceptionElasticsearchException- See Also:
- Set the parameter
-
invalidateApiKey
public final InvalidateApiKeyResponse invalidateApiKey(Function<InvalidateApiKeyRequest.Builder, ObjectBuilder<InvalidateApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionInvalidate API keys.This API invalidates API keys created by the create API key or grant API key APIs. Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. The
manage_api_keyprivilege allows deleting any API keys. Themanage_own_api_keyonly allows deleting API keys that are owned by the user. In addition, with themanage_own_api_keyprivilege, an invalidation request must be issued in one of the three formats:- Set the parameter
owner=true. - Or, set both
usernameandrealm_nameto match the user’s identity. - Or, if the request is issued by an API key, that is to say an API key
invalidates itself, specify its ID in the
idsfield.
- Parameters:
fn- a function that initializes a builder to create theInvalidateApiKeyRequest- Throws:
IOExceptionElasticsearchException- See Also:
- Set the parameter
-
invalidateApiKey
Invalidate API keys.This API invalidates API keys created by the create API key or grant API key APIs. Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. The
manage_api_keyprivilege allows deleting any API keys. Themanage_own_api_keyonly allows deleting API keys that are owned by the user. In addition, with themanage_own_api_keyprivilege, an invalidation request must be issued in one of the three formats:- Set the parameter
owner=true. - Or, set both
usernameandrealm_nameto match the user’s identity. - Or, if the request is issued by an API key, that is to say an API key
invalidates itself, specify its ID in the
idsfield.
- Throws:
IOExceptionElasticsearchException- See Also:
- Set the parameter
-
invalidateToken
public InvalidateTokenResponse invalidateToken(InvalidateTokenRequest request) throws IOException, ElasticsearchException Invalidate a token.The access tokens returned by the get token API have a finite period of time for which they are valid. After that time period, they can no longer be used. The time period is defined by the
xpack.security.authc.token.timeoutsetting.The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
- Throws:
IOExceptionElasticsearchException- See Also:
-
invalidateToken
public final InvalidateTokenResponse invalidateToken(Function<InvalidateTokenRequest.Builder, ObjectBuilder<InvalidateTokenRequest>> fn) throws IOException, ElasticsearchExceptionInvalidate a token.The access tokens returned by the get token API have a finite period of time for which they are valid. After that time period, they can no longer be used. The time period is defined by the
xpack.security.authc.token.timeoutsetting.The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
- Parameters:
fn- a function that initializes a builder to create theInvalidateTokenRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
invalidateToken
Invalidate a token.The access tokens returned by the get token API have a finite period of time for which they are valid. After that time period, they can no longer be used. The time period is defined by the
xpack.security.authc.token.timeoutsetting.The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
- Throws:
IOExceptionElasticsearchException- See Also:
-
putPrivileges
public PutPrivilegesResponse putPrivileges(PutPrivilegesRequest request) throws IOException, ElasticsearchException Create or update application privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
putPrivileges
public final PutPrivilegesResponse putPrivileges(Function<PutPrivilegesRequest.Builder, ObjectBuilder<PutPrivilegesRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update application privileges.- Parameters:
fn- a function that initializes a builder to create thePutPrivilegesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putPrivileges
Create or update application privileges.- Throws:
IOExceptionElasticsearchException- See Also:
-
putRole
Create or update roles.The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. The create or update roles API cannot update roles that are defined in roles files. File-based role management is not available in Elastic Serverless.
- Throws:
IOExceptionElasticsearchException- See Also:
-
putRole
public final PutRoleResponse putRole(Function<PutRoleRequest.Builder, ObjectBuilder<PutRoleRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update roles.The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management. The create or update roles API cannot update roles that are defined in roles files. File-based role management is not available in Elastic Serverless.
- Parameters:
fn- a function that initializes a builder to create thePutRoleRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putRoleMapping
public PutRoleMappingResponse putRoleMapping(PutRoleMappingRequest request) throws IOException, ElasticsearchException Create or update role mappings.Role mappings define which roles are assigned to each user. Each mapping has rules that identify users and a list of roles that are granted to those users. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.
This API does not create roles. Rather, it maps users to existing roles. Roles can be created by using the create or update roles API or roles files.
- Throws:
IOExceptionElasticsearchException- See Also:
-
putRoleMapping
public final PutRoleMappingResponse putRoleMapping(Function<PutRoleMappingRequest.Builder, ObjectBuilder<PutRoleMappingRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update role mappings.Role mappings define which roles are assigned to each user. Each mapping has rules that identify users and a list of roles that are granted to those users. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.
This API does not create roles. Rather, it maps users to existing roles. Roles can be created by using the create or update roles API or roles files.
- Parameters:
fn- a function that initializes a builder to create thePutRoleMappingRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putUser
Create or update users.A password is required for adding a new user but is optional when updating an existing user. To change a user’s password without updating any other fields, use the change password API.
- Throws:
IOExceptionElasticsearchException- See Also:
-
putUser
public final PutUserResponse putUser(Function<PutUserRequest.Builder, ObjectBuilder<PutUserRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update users.A password is required for adding a new user but is optional when updating an existing user. To change a user’s password without updating any other fields, use the change password API.
- Parameters:
fn- a function that initializes a builder to create thePutUserRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
queryApiKeys
public QueryApiKeysResponse queryApiKeys(QueryApiKeysRequest request) throws IOException, ElasticsearchException Find API keys with a query.Get a paginated list of API keys and their information. You can optionally filter the results with a query.
- Throws:
IOExceptionElasticsearchException- See Also:
-
queryApiKeys
public final QueryApiKeysResponse queryApiKeys(Function<QueryApiKeysRequest.Builder, ObjectBuilder<QueryApiKeysRequest>> fn) throws IOException, ElasticsearchExceptionFind API keys with a query.Get 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- Throws:
IOExceptionElasticsearchException- See Also:
-
queryApiKeys
Find API keys with a query.Get a paginated list of API keys and their information. You can optionally filter the results with a query.
- Throws:
IOExceptionElasticsearchException- See Also:
-
queryRole
public QueryRoleResponse queryRole(QueryRoleRequest request) throws IOException, ElasticsearchException Find roles with a query.Get roles in a paginated manner. You can optionally filter the results with a query.
- Throws:
IOExceptionElasticsearchException- See Also:
-
queryRole
public final QueryRoleResponse queryRole(Function<QueryRoleRequest.Builder, ObjectBuilder<QueryRoleRequest>> fn) throws IOException, ElasticsearchExceptionFind roles with a query.Get 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- Throws:
IOExceptionElasticsearchException- See Also:
-
queryRole
Find roles with a query.Get roles in a paginated manner. You can optionally filter the results with a query.
- Throws:
IOExceptionElasticsearchException- See Also:
-
queryUser
public QueryUserResponse queryUser(QueryUserRequest request) throws IOException, ElasticsearchException Find users with a query.Get information for users in a paginated manner. You can optionally filter the results with a query.
- Throws:
IOExceptionElasticsearchException- See Also:
-
queryUser
public final QueryUserResponse queryUser(Function<QueryUserRequest.Builder, ObjectBuilder<QueryUserRequest>> fn) throws IOException, ElasticsearchExceptionFind users with a query.Get 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- Throws:
IOExceptionElasticsearchException- See Also:
-
queryUser
Find users with a query.Get information for users in a paginated manner. You can optionally filter the results with a query.
- Throws:
IOExceptionElasticsearchException- See Also:
-
samlAuthenticate
public SamlAuthenticateResponse samlAuthenticate(SamlAuthenticateRequest request) throws IOException, ElasticsearchException Authenticate SAML.Submits a SAML response message to Elasticsearch for consumption.
- Throws:
IOExceptionElasticsearchException- See Also:
-
samlAuthenticate
public final SamlAuthenticateResponse samlAuthenticate(Function<SamlAuthenticateRequest.Builder, ObjectBuilder<SamlAuthenticateRequest>> fn) throws IOException, ElasticsearchExceptionAuthenticate SAML.Submits a SAML response message to Elasticsearch for consumption.
- Parameters:
fn- a function that initializes a builder to create theSamlAuthenticateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
samlCompleteLogout
public BooleanResponse samlCompleteLogout(SamlCompleteLogoutRequest request) throws IOException, ElasticsearchException Logout of SAML completely.Verifies the logout response sent from the SAML IdP.
- Throws:
IOExceptionElasticsearchException- See Also:
-
samlCompleteLogout
public final BooleanResponse samlCompleteLogout(Function<SamlCompleteLogoutRequest.Builder, ObjectBuilder<SamlCompleteLogoutRequest>> fn) throws IOException, ElasticsearchExceptionLogout of SAML completely.Verifies the logout response sent from the SAML IdP.
- Parameters:
fn- a function that initializes a builder to create theSamlCompleteLogoutRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
samlInvalidate
public SamlInvalidateResponse samlInvalidate(SamlInvalidateRequest request) throws IOException, ElasticsearchException Invalidate SAML.Submits a SAML LogoutRequest message to Elasticsearch for consumption.
- Throws:
IOExceptionElasticsearchException- See Also:
-
samlInvalidate
public final SamlInvalidateResponse samlInvalidate(Function<SamlInvalidateRequest.Builder, ObjectBuilder<SamlInvalidateRequest>> fn) throws IOException, ElasticsearchExceptionInvalidate SAML.Submits a SAML LogoutRequest message to Elasticsearch for consumption.
- Parameters:
fn- a function that initializes a builder to create theSamlInvalidateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
samlLogout
public SamlLogoutResponse samlLogout(SamlLogoutRequest request) throws IOException, ElasticsearchException Logout of SAML.Submits a request to invalidate an access token and refresh token.
- Throws:
IOExceptionElasticsearchException- See Also:
-
samlLogout
public final SamlLogoutResponse samlLogout(Function<SamlLogoutRequest.Builder, ObjectBuilder<SamlLogoutRequest>> fn) throws IOException, ElasticsearchExceptionLogout of SAML.Submits a request to invalidate an access token and refresh token.
- Parameters:
fn- a function that initializes a builder to create theSamlLogoutRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
samlPrepareAuthentication
public SamlPrepareAuthenticationResponse samlPrepareAuthentication(SamlPrepareAuthenticationRequest request) throws IOException, ElasticsearchException Prepare SAML authentication.Creates a SAML authentication request (
<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.- Throws:
IOExceptionElasticsearchException- See Also:
-
samlPrepareAuthentication
public final SamlPrepareAuthenticationResponse samlPrepareAuthentication(Function<SamlPrepareAuthenticationRequest.Builder, ObjectBuilder<SamlPrepareAuthenticationRequest>> fn) throws IOException, ElasticsearchExceptionPrepare SAML authentication.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- Throws:
IOExceptionElasticsearchException- See Also:
-
samlPrepareAuthentication
public SamlPrepareAuthenticationResponse samlPrepareAuthentication() throws IOException, ElasticsearchExceptionPrepare SAML authentication.Creates a SAML authentication request (
<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.- Throws:
IOExceptionElasticsearchException- See Also:
-
samlServiceProviderMetadata
public SamlServiceProviderMetadataResponse samlServiceProviderMetadata(SamlServiceProviderMetadataRequest request) throws IOException, ElasticsearchException Create SAML service provider metadata.Generate SAML metadata for a SAML 2.0 Service Provider.
- Throws:
IOExceptionElasticsearchException- See Also:
-
samlServiceProviderMetadata
public final SamlServiceProviderMetadataResponse samlServiceProviderMetadata(Function<SamlServiceProviderMetadataRequest.Builder, ObjectBuilder<SamlServiceProviderMetadataRequest>> fn) throws IOException, ElasticsearchExceptionCreate SAML service provider metadata.Generate SAML metadata for a SAML 2.0 Service Provider.
- Parameters:
fn- a function that initializes a builder to create theSamlServiceProviderMetadataRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
suggestUserProfiles
public SuggestUserProfilesResponse suggestUserProfiles(SuggestUserProfilesRequest request) throws IOException, ElasticsearchException Suggest a user profile.Get suggestions for user profiles that match specified search criteria.
- Throws:
IOExceptionElasticsearchException- See Also:
-
suggestUserProfiles
public final SuggestUserProfilesResponse suggestUserProfiles(Function<SuggestUserProfilesRequest.Builder, ObjectBuilder<SuggestUserProfilesRequest>> fn) throws IOException, ElasticsearchExceptionSuggest a user profile.Get suggestions for user profiles that match specified search criteria.
- Parameters:
fn- a function that initializes a builder to create theSuggestUserProfilesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
suggestUserProfiles
Suggest a user profile.Get suggestions for user profiles that match specified search criteria.
- Throws:
IOExceptionElasticsearchException- See Also:
-
updateApiKey
public UpdateApiKeyResponse updateApiKey(UpdateApiKeyRequest request) throws IOException, ElasticsearchException 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 the
role_descriptorsyou 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_descriptorsin 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_asfeature 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.- Throws:
IOExceptionElasticsearchException- See Also:
-
updateApiKey
public final UpdateApiKeyResponse updateApiKey(Function<UpdateApiKeyRequest.Builder, ObjectBuilder<UpdateApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionUpdate 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 the
role_descriptorsyou 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_descriptorsin 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_asfeature 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- Throws:
IOExceptionElasticsearchException- See Also:
-
updateCrossClusterApiKey
public UpdateCrossClusterApiKeyResponse updateCrossClusterApiKey(UpdateCrossClusterApiKeyRequest request) throws IOException, ElasticsearchException Update a cross-cluster API key.Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
- Throws:
IOExceptionElasticsearchException- See Also:
-
updateCrossClusterApiKey
public final UpdateCrossClusterApiKeyResponse updateCrossClusterApiKey(Function<UpdateCrossClusterApiKeyRequest.Builder, ObjectBuilder<UpdateCrossClusterApiKeyRequest>> fn) throws IOException, ElasticsearchExceptionUpdate a cross-cluster API key.Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
- Parameters:
fn- a function that initializes a builder to create theUpdateCrossClusterApiKeyRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
updateUserProfileData
public UpdateUserProfileDataResponse updateUserProfileData(UpdateUserProfileDataRequest request) throws IOException, ElasticsearchException Update user profile data.Update specific data for the user profile that is associated with a unique ID.
- Throws:
IOExceptionElasticsearchException- See Also:
-
updateUserProfileData
public final UpdateUserProfileDataResponse updateUserProfileData(Function<UpdateUserProfileDataRequest.Builder, ObjectBuilder<UpdateUserProfileDataRequest>> fn) throws IOException, ElasticsearchExceptionUpdate user profile data.Update specific data for the user profile that is associated with a unique ID.
- Parameters:
fn- a function that initializes a builder to create theUpdateUserProfileDataRequest- Throws:
IOExceptionElasticsearchException- See Also:
-