Class ElasticsearchLicenseClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchLicenseClient
(ElasticsearchTransport transport) ElasticsearchLicenseClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondelete()
Delete the license.delete
(DeleteLicenseRequest request) Delete the license.final DeleteLicenseResponse
Delete the license.get()
Get license information.get
(GetLicenseRequest request) Get license information.final GetLicenseResponse
Get license information.Get the basic license status.Get the trial status.post()
Update the license.post
(PostRequest request) Update the license.final PostResponse
Update the license.Start a basic license.postStartBasic
(PostStartBasicRequest request) Start a basic license.final PostStartBasicResponse
Start a basic license.Start a trial.postStartTrial
(PostStartTrialRequest request) Start a trial.final PostStartTrialResponse
Start a trial.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchLicenseClient
-
ElasticsearchLicenseClient
public ElasticsearchLicenseClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchLicenseClient>
-
delete
public DeleteLicenseResponse delete(DeleteLicenseRequest request) throws IOException, ElasticsearchException Delete the license.When the license expires, your subscription level reverts to Basic.
If the operator privileges feature is enabled, only operator users can use this API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
public final DeleteLicenseResponse delete(Function<DeleteLicenseRequest.Builder, ObjectBuilder<DeleteLicenseRequest>> fn) throws IOException, ElasticsearchExceptionDelete the license.When the license expires, your subscription level reverts to Basic.
If the operator privileges feature is enabled, only operator users can use this API.
- Parameters:
fn
- a function that initializes a builder to create theDeleteLicenseRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
Delete the license.When the license expires, your subscription level reverts to Basic.
If the operator privileges feature is enabled, only operator users can use this API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
Get license information.Get information about your Elastic license including its type, its status, when it was issued, and when it expires.
info If the master node is generating a new cluster state, the get license API may return a
404 Not Found
response. If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final GetLicenseResponse get(Function<GetLicenseRequest.Builder, ObjectBuilder<GetLicenseRequest>> fn) throws IOException, ElasticsearchExceptionGet license information.Get information about your Elastic license including its type, its status, when it was issued, and when it expires.
info If the master node is generating a new cluster state, the get license API may return a
404 Not Found
response. If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.- Parameters:
fn
- a function that initializes a builder to create theGetLicenseRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
Get license information.Get information about your Elastic license including its type, its status, when it was issued, and when it expires.
info If the master node is generating a new cluster state, the get license API may return a
404 Not Found
response. If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.- Throws:
IOException
ElasticsearchException
- See Also:
-
getBasicStatus
Get the basic license status.- Throws:
IOException
ElasticsearchException
- See Also:
-
getTrialStatus
Get the trial status.- Throws:
IOException
ElasticsearchException
- See Also:
-
post
Update the license.You can update your license at runtime without shutting down your nodes. License updates take effect immediately. If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true.
NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. If the operator privileges feature is enabled, only operator users can use this API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
post
public final PostResponse post(Function<PostRequest.Builder, ObjectBuilder<PostRequest>> fn) throws IOException, ElasticsearchExceptionUpdate the license.You can update your license at runtime without shutting down your nodes. License updates take effect immediately. If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true.
NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. If the operator privileges feature is enabled, only operator users can use this API.
- Parameters:
fn
- a function that initializes a builder to create thePostRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
post
Update the license.You can update your license at runtime without shutting down your nodes. License updates take effect immediately. If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true.
NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. If the operator privileges feature is enabled, only operator users can use this API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
postStartBasic
public PostStartBasicResponse postStartBasic(PostStartBasicRequest request) throws IOException, ElasticsearchException Start a basic license.Start an indefinite basic license, which gives access to all the basic features.
NOTE: In order to start a basic license, you must not currently have a basic license.
If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the
acknowledge
parameter set totrue
.To check the status of your basic license, use the get basic license API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
postStartBasic
public final PostStartBasicResponse postStartBasic(Function<PostStartBasicRequest.Builder, ObjectBuilder<PostStartBasicRequest>> fn) throws IOException, ElasticsearchExceptionStart a basic license.Start an indefinite basic license, which gives access to all the basic features.
NOTE: In order to start a basic license, you must not currently have a basic license.
If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the
acknowledge
parameter set totrue
.To check the status of your basic license, use the get basic license API.
- Parameters:
fn
- a function that initializes a builder to create thePostStartBasicRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
postStartBasic
Start a basic license.Start an indefinite basic license, which gives access to all the basic features.
NOTE: In order to start a basic license, you must not currently have a basic license.
If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the
acknowledge
parameter set totrue
.To check the status of your basic license, use the get basic license API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
postStartTrial
public PostStartTrialResponse postStartTrial(PostStartTrialRequest request) throws IOException, ElasticsearchException Start a trial. Start a 30-day trial, which gives access to all subscription features.NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension.
To check the status of your trial, use the get trial status API.
- Throws:
IOException
ElasticsearchException
- See Also:
-
postStartTrial
public final PostStartTrialResponse postStartTrial(Function<PostStartTrialRequest.Builder, ObjectBuilder<PostStartTrialRequest>> fn) throws IOException, ElasticsearchExceptionStart a trial. Start a 30-day trial, which gives access to all subscription features.NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension.
To check the status of your trial, use the get trial status API.
- Parameters:
fn
- a function that initializes a builder to create thePostStartTrialRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
postStartTrial
Start a trial. Start a 30-day trial, which gives access to all subscription features.NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension.
To check the status of your trial, use the get trial status API.
- Throws:
IOException
ElasticsearchException
- See Also:
-