类 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.
  • 方法详细资料

    • getAccount

      public GetAccountResponse getAccount() throws java.io.IOException
      抛出:
      java.io.IOException
    • getUsers

      public GetUsersResponse getUsers​(GetUsersRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOException
      Get a user, or list of users, in the native realm synchronously.
      参数:
      request - the request with the user's name
      options - the request options (e.g., headers), use RequestOptions.DEFAULT if 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.IOException
      Create/update a user in the native realm synchronously.
      参数:
      request - the request with the user's information
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Removes user from the native realm synchronously.
      参数:
      request - the request with the user to delete
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Create/Update a role mapping.
      参数:
      request - the request with the role mapping information
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Synchronously get role mapping(s).
      参数:
      request - GetRoleMappingsRequest with role mapping name(s). If no role mapping name is provided then retrieves all role mappings.
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Synchronously retrieve the X.509 certificates that are used to encrypt communications in an Easysearch cluster.
      参数:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Change the password of a user of a native realm or built-in user synchronously.
      参数:
      request - the request with the user's new password
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      返回:
      true if 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.IOException
      Delete a role mapping.
      参数:
      request - the request with the role mapping name to be deleted.
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Retrieves roles from the native roles store.
      参数:
      request - the request with the roles to get
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Create or update a role in the native roles store.
      参数:
      request - the request containing the role to create or update
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Removes role.
      参数:
      request - the request with the role to delete
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Synchronously get privilege(s).
      参数:
      request - GetPrivilegesRequest with the privilege name.
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Create or update privilege.
      参数:
      request - the request to create or update privileges
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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.IOException
      Removes privilege
      参数:
      request - the request with the privilege to delete
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if 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