Class LicenseClient

java.lang.Object
org.elasticsearch.client.LicenseClient

public final class LicenseClient
extends java.lang.Object
A wrapper for the RestHighLevelClient that provides methods for accessing the Elastic License-related methods

See the X-Pack Licensing APIs on elastic.co for more information.

  • Method Summary

    Modifier and Type Method Description
    org.elasticsearch.action.support.master.AcknowledgedResponse deleteLicense​(DeleteLicenseRequest request, org.elasticsearch.client.RequestOptions options)
    Deletes license from the cluster.
    org.elasticsearch.client.Cancellable deleteLicenseAsync​(DeleteLicenseRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
    Asynchronously deletes license from the cluster.
    GetBasicStatusResponse getBasicStatus​(org.elasticsearch.client.RequestOptions options)
    Retrieve the license basic status
    GetLicenseResponse getLicense​(GetLicenseRequest request, org.elasticsearch.client.RequestOptions options)
    Returns the current license for the cluster.
    org.elasticsearch.client.Cancellable getLicenseAsync​(GetLicenseRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetLicenseResponse> listener)
    Asynchronously returns the current license for the cluster cluster.
    GetTrialStatusResponse getTrialStatus​(org.elasticsearch.client.RequestOptions options)
    Retrieve the license trial status
    PutLicenseResponse putLicense​(PutLicenseRequest request, org.elasticsearch.client.RequestOptions options)
    Updates license for the cluster.
    org.elasticsearch.client.Cancellable putLicenseAsync​(PutLicenseRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<PutLicenseResponse> listener)
    Asynchronously updates license for the cluster.
    StartBasicResponse startBasic​(StartBasicRequest request, org.elasticsearch.client.RequestOptions options)
    Initiates an indefinite basic license.
    org.elasticsearch.client.Cancellable startBasicAsync​(StartBasicRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<StartBasicResponse> listener)
    Asynchronously initiates an indefinite basic license.
    StartTrialResponse startTrial​(StartTrialRequest request, org.elasticsearch.client.RequestOptions options)
    Starts a trial license on the cluster.
    org.elasticsearch.client.Cancellable startTrialAsync​(StartTrialRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<StartTrialResponse> listener)
    Asynchronously starts a trial license on the cluster.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • putLicense

      public PutLicenseResponse putLicense​(PutLicenseRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Updates license for the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • putLicenseAsync

      public org.elasticsearch.client.Cancellable putLicenseAsync​(PutLicenseRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<PutLicenseResponse> listener)
      Asynchronously updates license for the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • getLicense

      public GetLicenseResponse getLicense​(GetLicenseRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Returns the current license for the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • getLicenseAsync

      public org.elasticsearch.client.Cancellable getLicenseAsync​(GetLicenseRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<GetLicenseResponse> listener)
      Asynchronously returns the current license for the cluster cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • deleteLicense

      public org.elasticsearch.action.support.master.AcknowledgedResponse deleteLicense​(DeleteLicenseRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Deletes license from the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • deleteLicenseAsync

      public org.elasticsearch.client.Cancellable deleteLicenseAsync​(DeleteLicenseRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
      Asynchronously deletes license from the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • startTrial

      public StartTrialResponse startTrial​(StartTrialRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Starts a trial license on the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • startTrialAsync

      public org.elasticsearch.client.Cancellable startTrialAsync​(StartTrialRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<StartTrialResponse> listener)
      Asynchronously starts a trial license on the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • startBasic

      public StartBasicResponse startBasic​(StartBasicRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Initiates an indefinite basic license.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • startBasicAsync

      public org.elasticsearch.client.Cancellable startBasicAsync​(StartBasicRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<StartBasicResponse> listener)
      Asynchronously initiates an indefinite basic license.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • getTrialStatus

      public GetTrialStatusResponse getTrialStatus​(org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Retrieve the license trial status
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • getBasicStatus

      public GetBasicStatusResponse getBasicStatus​(org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Retrieve the license basic status
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response