类 SecurityClient
java.lang.Object
org.easysearch.client.SecurityClient
public final class SecurityClient
extends java.lang.Object
A wrapper for the
RestHighLevelClient that provides methods for accessing the Security APIs.-
方法概要
修饰符和类型 方法 说明 booleanchangePassword(ChangePasswordRequest request, org.easysearch.client.RequestOptions options)Change the password of a user of a native realm or built-in user synchronously.DeletePrivilegeResponsedeletePrivilege(DeletePrivilegesRequest request, org.easysearch.client.RequestOptions options)Removes privilegeDeleteRoleResponsedeleteRole(DeleteRoleRequest request, org.easysearch.client.RequestOptions options)Removes role.DeleteRoleMappingResponsedeleteRoleMapping(DeleteRoleMappingRequest request, org.easysearch.client.RequestOptions options)Delete a role mapping.DeleteUserResponsedeleteUser(DeleteUserRequest request, org.easysearch.client.RequestOptions options)Removes user from the native realm synchronously.GetAccountResponsegetAccount()GetPrivilegesResponsegetPrivileges(GetPrivilegesRequest request, org.easysearch.client.RequestOptions options)Synchronously get privilege(s).GetRoleMappingsResponsegetRoleMappings(GetRoleMappingsRequest request, org.easysearch.client.RequestOptions options)Synchronously get role mapping(s).GetRolesResponsegetRoles(GetRolesRequest request, org.easysearch.client.RequestOptions options)Retrieves roles from the native roles store.GetSslCertificatesResponsegetSslCertificates(org.easysearch.client.RequestOptions options)Synchronously retrieve the X.509 certificates that are used to encrypt communications in an Easysearch cluster.GetUsersResponsegetUsers(GetUsersRequest request, org.easysearch.client.RequestOptions options)Get a user, or list of users, in the native realm synchronously.PutPrivilegeResponseputPrivileges(PutPrivilegeRequest request, org.easysearch.client.RequestOptions options)Create or update privilege.PutRoleResponseputRole(PutRoleRequest request, org.easysearch.client.RequestOptions options)Create or update a role in the native roles store.PutRoleMappingResponseputRoleMapping(PutRoleMappingRequest request, org.easysearch.client.RequestOptions options)Create/Update a role mapping.PutUserResponseputUser(PutUserRequest request, org.easysearch.client.RequestOptions options)Create/update a user in the native realm synchronously.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
方法详细资料
-
getAccount
- 抛出:
java.io.IOException
-
getUsers
public GetUsersResponse getUsers(GetUsersRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGet a user, or list of users, in the native realm synchronously.- 参数:
request- the request with the user's nameoptions- the request options (e.g., headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the get users call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putUser
public PutUserResponse putUser(PutUserRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionCreate/update a user in the native realm synchronously.- 参数:
request- the request with the user's informationoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the put user call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deleteUser
public DeleteUserResponse deleteUser(DeleteUserRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionRemoves user from the native realm synchronously.- 参数:
request- the request with the user to deleteoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the delete user call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putRoleMapping
public PutRoleMappingResponse putRoleMapping(PutRoleMappingRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionCreate/Update a role mapping.- 参数:
request- the request with the role mapping informationoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the put role mapping call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getRoleMappings
public GetRoleMappingsResponse getRoleMappings(GetRoleMappingsRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously get role mapping(s).- 参数:
request-GetRoleMappingsRequestwith role mapping name(s). If no role mapping name is provided then retrieves all role mappings.options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the get role mapping call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getSslCertificates
public GetSslCertificatesResponse getSslCertificates(org.easysearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously retrieve the X.509 certificates that are used to encrypt communications in an Easysearch cluster.- 参数:
options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the get certificates call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
changePassword
public boolean changePassword(ChangePasswordRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionChange the password of a user of a native realm or built-in user synchronously.- 参数:
request- the request with the user's new passwordoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
trueif the request succeeded (the new password was set)- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deleteRoleMapping
public DeleteRoleMappingResponse deleteRoleMapping(DeleteRoleMappingRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionDelete a role mapping.- 参数:
request- the request with the role mapping name to be deleted.options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the delete role mapping call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getRoles
public GetRolesResponse getRoles(GetRolesRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionRetrieves roles from the native roles store.- 参数:
request- the request with the roles to getoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the get roles call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putRole
public PutRoleResponse putRole(PutRoleRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionCreate or update a role in the native roles store.- 参数:
request- the request containing the role to create or updateoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the put role call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deleteRole
public DeleteRoleResponse deleteRole(DeleteRoleRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionRemoves role.- 参数:
request- the request with the role to deleteoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the delete role call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getPrivileges
public GetPrivilegesResponse getPrivileges(GetPrivilegesRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionSynchronously get privilege(s).- 参数:
request-GetPrivilegesRequestwith the privilege name.options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the get privileges call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putPrivileges
public PutPrivilegeResponse putPrivileges(PutPrivilegeRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionCreate or update privilege.- 参数:
request- the request to create or update privilegesoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the create or update privileges call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deletePrivilege
public DeletePrivilegeResponse deletePrivilege(DeletePrivilegesRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionRemoves privilege- 参数:
request- the request with the privilege to deleteoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response from the delete privilege call
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-