Package org.elasticsearch.client
Class EnrichClient
- java.lang.Object
-
- org.elasticsearch.client.EnrichClient
-
public final class EnrichClient extends java.lang.ObjectA wrapper for theRestHighLevelClientthat provides methods for accessing the Elastic enrich related methodsSee the X-Pack Enrich Policy APIs on elastic.co for more information.
-
-
Method Summary
Modifier and Type Method Description AcknowledgedResponsedeletePolicy(DeletePolicyRequest request, RequestOptions options)Executes the delete policy api, which deletes an enrich policy.CancellabledeletePolicyAsync(DeletePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously executes the delete policy api, which deletes an enrich policy.ExecutePolicyResponseexecutePolicy(ExecutePolicyRequest request, RequestOptions options)Executes the execute policy api, which executes an enrich policy.CancellableexecutePolicyAsync(ExecutePolicyRequest request, RequestOptions options, ActionListener<ExecutePolicyResponse> listener)Asynchronously executes the execute policy api, which executes an enrich policy.GetPolicyResponsegetPolicy(GetPolicyRequest request, RequestOptions options)Executes the get policy api, which retrieves an enrich policy.CancellablegetPolicyAsync(GetPolicyRequest request, RequestOptions options, ActionListener<GetPolicyResponse> listener)Asynchronously executes the get policy api, which retrieves an enrich policy.AcknowledgedResponseputPolicy(PutPolicyRequest request, RequestOptions options)Executes the put policy api, which stores an enrich policy.CancellableputPolicyAsync(PutPolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously executes the put policy api, which stores an enrich policy.StatsResponsestats(StatsRequest request, RequestOptions options)Executes the enrich stats api, which retrieves enrich related stats.CancellablestatsAsync(StatsRequest request, RequestOptions options, ActionListener<StatsResponse> listener)Asynchronously executes the enrich stats api, which retrieves enrich related stats.
-
-
-
Method Detail
-
putPolicy
public AcknowledgedResponse putPolicy(PutPolicyRequest request, RequestOptions options) throws java.io.IOException
Executes the put policy api, which stores an enrich policy. See the docs for more.- Parameters:
request- thePutPolicyRequestoptions- 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
-
putPolicyAsync
public Cancellable putPolicyAsync(PutPolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously executes the put policy api, which stores an enrich policy. See the docs for more.- Parameters:
request- thePutPolicyRequestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deletePolicy
public AcknowledgedResponse deletePolicy(DeletePolicyRequest request, RequestOptions options) throws java.io.IOException
Executes the delete policy api, which deletes an enrich policy. See the docs for more.- Parameters:
request- theDeletePolicyRequestoptions- 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
-
deletePolicyAsync
public Cancellable deletePolicyAsync(DeletePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously executes the delete policy api, which deletes an enrich policy. See the docs for more.- Parameters:
request- theDeletePolicyRequestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getPolicy
public GetPolicyResponse getPolicy(GetPolicyRequest request, RequestOptions options) throws java.io.IOException
Executes the get policy api, which retrieves an enrich policy. See the docs for more.- Parameters:
request- thePutPolicyRequestoptions- 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
-
getPolicyAsync
public Cancellable getPolicyAsync(GetPolicyRequest request, RequestOptions options, ActionListener<GetPolicyResponse> listener)
Asynchronously executes the get policy api, which retrieves an enrich policy. See the docs for more.- Parameters:
request- thePutPolicyRequestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
stats
public StatsResponse stats(StatsRequest request, RequestOptions options) throws java.io.IOException
Executes the enrich stats api, which retrieves enrich related stats. See the docs for more.- Parameters:
request- theStatsRequestoptions- 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
-
statsAsync
public Cancellable statsAsync(StatsRequest request, RequestOptions options, ActionListener<StatsResponse> listener)
Asynchronously executes the enrich stats api, which retrieves enrich related stats. See the docs for more.- Parameters:
request- theStatsRequestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
executePolicy
public ExecutePolicyResponse executePolicy(ExecutePolicyRequest request, RequestOptions options) throws java.io.IOException
Executes the execute policy api, which executes an enrich policy. See the docs for more.- Parameters:
request- theExecutePolicyRequestoptions- 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
-
executePolicyAsync
public Cancellable executePolicyAsync(ExecutePolicyRequest request, RequestOptions options, ActionListener<ExecutePolicyResponse> listener)
Asynchronously executes the execute policy api, which executes an enrich policy. See the docs for more.- Parameters:
request- theExecutePolicyRequestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
-