Package org.elasticsearch.client
Class LicenseClient
- java.lang.Object
-
- org.elasticsearch.client.LicenseClient
-
public final class LicenseClient extends java.lang.Object
A wrapper for theRestHighLevelClient
that provides methods for accessing the Elastic License-related methodsSee the X-Pack Licensing APIs on elastic.co for more information.
-
-
Method Summary
Modifier and Type Method Description AcknowledgedResponse
deleteLicense(DeleteLicenseRequest request, RequestOptions options)
Deletes license from the cluster.void
deleteLicenseAsync(DeleteLicenseRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously deletes license from the cluster.GetBasicStatusResponse
getBasicStatus(RequestOptions options)
Retrieve the license basic statusGetLicenseResponse
getLicense(GetLicenseRequest request, RequestOptions options)
Returns the current license for the cluster.void
getLicenseAsync(GetLicenseRequest request, RequestOptions options, ActionListener<GetLicenseResponse> listener)
Asynchronously returns the current license for the cluster cluster.GetTrialStatusResponse
getTrialStatus(RequestOptions options)
Retrieve the license trial statusPutLicenseResponse
putLicense(PutLicenseRequest request, RequestOptions options)
Updates license for the cluster.void
putLicenseAsync(PutLicenseRequest request, RequestOptions options, ActionListener<PutLicenseResponse> listener)
Asynchronously updates license for the cluster.StartBasicResponse
startBasic(StartBasicRequest request, RequestOptions options)
Initiates an indefinite basic license.void
startBasicAsync(StartBasicRequest request, RequestOptions options, ActionListener<StartBasicResponse> listener)
Asynchronously initiates an indefinite basic license.StartTrialResponse
startTrial(StartTrialRequest request, RequestOptions options)
Starts a trial license on the cluster.void
startTrialAsync(StartTrialRequest request, RequestOptions options, ActionListener<StartTrialResponse> listener)
Asynchronously starts a trial license on the cluster.
-
-
-
Method Detail
-
putLicense
public PutLicenseResponse putLicense(PutLicenseRequest request, RequestOptions options) throws java.io.IOException
Updates license for the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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 void putLicenseAsync(PutLicenseRequest request, RequestOptions options, ActionListener<PutLicenseResponse> listener)
Asynchronously updates license for the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getLicense
public GetLicenseResponse getLicense(GetLicenseRequest request, RequestOptions options) throws java.io.IOException
Returns the current license for the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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 void getLicenseAsync(GetLicenseRequest request, RequestOptions options, ActionListener<GetLicenseResponse> listener)
Asynchronously returns the current license for the cluster cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
deleteLicense
public AcknowledgedResponse deleteLicense(DeleteLicenseRequest request, RequestOptions options) throws java.io.IOException
Deletes license from the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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 void deleteLicenseAsync(DeleteLicenseRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously deletes license from the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
startTrial
public StartTrialResponse startTrial(StartTrialRequest request, RequestOptions options) throws java.io.IOException
Starts a trial license on the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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 void startTrialAsync(StartTrialRequest request, RequestOptions options, ActionListener<StartTrialResponse> listener)
Asynchronously starts a trial license on the cluster.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
startBasic
public StartBasicResponse startBasic(StartBasicRequest request, RequestOptions options) throws java.io.IOException
Initiates an indefinite basic license.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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 void startBasicAsync(StartBasicRequest request, RequestOptions options, ActionListener<StartBasicResponse> listener)
Asynchronously initiates an indefinite basic license.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getTrialStatus
public GetTrialStatusResponse getTrialStatus(RequestOptions options) throws java.io.IOException
Retrieve the license trial status- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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(RequestOptions options) throws java.io.IOException
Retrieve the license basic status- Parameters:
options
- the request options (e.g. headers), useRequestOptions.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
-
-