Package org.elasticsearch.client
Class LicenseClient
- java.lang.Object
-
- org.elasticsearch.client.LicenseClient
-
public final class LicenseClient extends java.lang.ObjectA wrapper for theRestHighLevelClientthat 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 AcknowledgedResponsedeleteLicense(DeleteLicenseRequest request, RequestOptions options)Deletes license from the cluster.voiddeleteLicenseAsync(DeleteLicenseRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously deletes license from the cluster.GetBasicStatusResponsegetBasicStatus(RequestOptions options)Retrieve the license basic statusGetLicenseResponsegetLicense(GetLicenseRequest request, RequestOptions options)Returns the current license for the cluster.voidgetLicenseAsync(GetLicenseRequest request, RequestOptions options, ActionListener<GetLicenseResponse> listener)Asynchronously returns the current license for the cluster cluster.GetTrialStatusResponsegetTrialStatus(RequestOptions options)Retrieve the license trial statusPutLicenseResponseputLicense(PutLicenseRequest request, RequestOptions options)Updates license for the cluster.voidputLicenseAsync(PutLicenseRequest request, RequestOptions options, ActionListener<PutLicenseResponse> listener)Asynchronously updates license for the cluster.StartBasicResponsestartBasic(StartBasicRequest request, RequestOptions options)Initiates an indefinite basic license.voidstartBasicAsync(StartBasicRequest request, RequestOptions options, ActionListener<StartBasicResponse> listener)Asynchronously initiates an indefinite basic license.StartTrialResponsestartTrial(StartTrialRequest request, RequestOptions options)Starts a trial license on the cluster.voidstartTrialAsync(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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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
-
-