Package org.elasticsearch.client
Class IndexLifecycleClient
java.lang.Object
org.elasticsearch.client.IndexLifecycleClient
public class IndexLifecycleClient
extends java.lang.Object
-
Method Summary
-
Method Details
-
getLifecyclePolicy
public GetLifecyclePolicyResponse getLifecyclePolicy(GetLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionRetrieve one or more lifecycle policy definition. See the docs for more.- Parameters:
request
- the requestoptions
- 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
-
getLifecyclePolicyAsync
public Cancellable getLifecyclePolicyAsync(GetLifecyclePolicyRequest request, RequestOptions options, ActionListener<GetLifecyclePolicyResponse> listener)Asynchronously retrieve one or more lifecycle policy definition. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putLifecyclePolicy
public AcknowledgedResponse putLifecyclePolicy(PutLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionCreate or modify a lifecycle definition. See the docs for more.- Parameters:
request
- the requestoptions
- 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
-
putLifecyclePolicyAsync
public Cancellable putLifecyclePolicyAsync(PutLifecyclePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously create or modify a lifecycle definition. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteLifecyclePolicy
public AcknowledgedResponse deleteLifecyclePolicy(DeleteLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionDelete a lifecycle definition Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-delete-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- 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
-
deleteLifecyclePolicyAsync
public Cancellable deleteLifecyclePolicyAsync(DeleteLifecyclePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously delete a lifecycle definition Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-delete-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
removeIndexLifecyclePolicy
public RemoveIndexLifecyclePolicyResponse removeIndexLifecyclePolicy(RemoveIndexLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionRemove the index lifecycle policy for an index Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-remove-lifecycle-policy-from-index.html
for more.- Parameters:
request
- the requestoptions
- 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
-
removeIndexLifecyclePolicyAsync
public Cancellable removeIndexLifecyclePolicyAsync(RemoveIndexLifecyclePolicyRequest request, RequestOptions options, ActionListener<RemoveIndexLifecyclePolicyResponse> listener)Asynchronously remove the index lifecycle policy for an index Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-remove-lifecycle-policy-from-index.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
startILM
public AcknowledgedResponse startILM(StartILMRequest request, RequestOptions options) throws java.io.IOExceptionStart the Index Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-start-ilm.html
for more.- Parameters:
request
- the requestoptions
- 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
-
startILMAsync
public Cancellable startILMAsync(StartILMRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously start the Index Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-start-ilm.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
stopILM
public AcknowledgedResponse stopILM(StopILMRequest request, RequestOptions options) throws java.io.IOExceptionStop the Index Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-stop-ilm.html
for more.- Parameters:
request
- the requestoptions
- 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
-
stopILMAsync
public Cancellable stopILMAsync(StopILMRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously stop the Index Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-stop-ilm.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
lifecycleManagementStatus
public LifecycleManagementStatusResponse lifecycleManagementStatus(LifecycleManagementStatusRequest request, RequestOptions options) throws java.io.IOExceptionGet the status of index lifecycle management Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-status.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
lifecycleManagementStatusAsync
public Cancellable lifecycleManagementStatusAsync(LifecycleManagementStatusRequest request, RequestOptions options, ActionListener<LifecycleManagementStatusResponse> listener)Asynchronously get the status of index lifecycle management Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-status.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
explainLifecycle
public ExplainLifecycleResponse explainLifecycle(ExplainLifecycleRequest request, RequestOptions options) throws java.io.IOExceptionExplain the lifecycle state for an index Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-explain-lifecycle.html
for more.- Parameters:
request
- the requestoptions
- 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
-
explainLifecycleAsync
public Cancellable explainLifecycleAsync(ExplainLifecycleRequest request, RequestOptions options, ActionListener<ExplainLifecycleResponse> listener)Asynchronously explain the lifecycle state for an index Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-explain-lifecycle.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
retryLifecyclePolicy
public AcknowledgedResponse retryLifecyclePolicy(RetryLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionRetry lifecycle step for given indices Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-retry-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- 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
-
retryLifecyclePolicyAsync
public Cancellable retryLifecyclePolicyAsync(RetryLifecyclePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously retry the lifecycle step for given indices Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-ilm-retry-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getSnapshotLifecyclePolicy
public GetSnapshotLifecyclePolicyResponse getSnapshotLifecyclePolicy(GetSnapshotLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionRetrieve one or more snapshot lifecycle policy definitions. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-get-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- 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
-
getSnapshotLifecyclePolicyAsync
public Cancellable getSnapshotLifecyclePolicyAsync(GetSnapshotLifecyclePolicyRequest request, RequestOptions options, ActionListener<GetSnapshotLifecyclePolicyResponse> listener)Asynchronously retrieve one or more snapshot lifecycle policy definition. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-get-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putSnapshotLifecyclePolicy
public AcknowledgedResponse putSnapshotLifecyclePolicy(PutSnapshotLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionCreate or modify a snapshot lifecycle definition. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-put-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- 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
-
putSnapshotLifecyclePolicyAsync
public Cancellable putSnapshotLifecyclePolicyAsync(PutSnapshotLifecyclePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously create or modify a snapshot lifecycle definition. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-put-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteSnapshotLifecyclePolicy
public AcknowledgedResponse deleteSnapshotLifecyclePolicy(DeleteSnapshotLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionDelete a snapshot lifecycle definition Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-delete-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- 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
-
deleteSnapshotLifecyclePolicyAsync
public Cancellable deleteSnapshotLifecyclePolicyAsync(DeleteSnapshotLifecyclePolicyRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously delete a snapshot lifecycle definition Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-delete-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
executeSnapshotLifecyclePolicy
public ExecuteSnapshotLifecyclePolicyResponse executeSnapshotLifecyclePolicy(ExecuteSnapshotLifecyclePolicyRequest request, RequestOptions options) throws java.io.IOExceptionExecute a snapshot lifecycle definition Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-execute-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- 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
-
executeSnapshotLifecyclePolicyAsync
public Cancellable executeSnapshotLifecyclePolicyAsync(ExecuteSnapshotLifecyclePolicyRequest request, RequestOptions options, ActionListener<ExecuteSnapshotLifecyclePolicyResponse> listener)Asynchronously execute a snapshot lifecycle definition Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-execute-snapshot-lifecycle-policy.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
executeSnapshotLifecycleRetention
public AcknowledgedResponse executeSnapshotLifecycleRetention(ExecuteSnapshotLifecycleRetentionRequest request, RequestOptions options) throws java.io.IOExceptionExecute snapshot lifecycle retention Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-execute-snapshot-lifecycle-retention.html
for more.- Parameters:
request
- the requestoptions
- 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
-
executeSnapshotLifecycleRetentionAsync
public Cancellable executeSnapshotLifecycleRetentionAsync(ExecuteSnapshotLifecycleRetentionRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously execute snapshot lifecycle retention Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-execute-snapshot-lifecycle-retention.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getSnapshotLifecycleStats
public GetSnapshotLifecycleStatsResponse getSnapshotLifecycleStats(GetSnapshotLifecycleStatsRequest request, RequestOptions options) throws java.io.IOExceptionRetrieve snapshot lifecycle statistics. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-get-snapshot-lifecycle-stats.html
for more.- Parameters:
request
- the requestoptions
- 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
-
getSnapshotLifecycleStatsAsync
public Cancellable getSnapshotLifecycleStatsAsync(GetSnapshotLifecycleStatsRequest request, RequestOptions options, ActionListener<GetSnapshotLifecycleStatsResponse> listener)Asynchronously retrieve snapshot lifecycle statistics. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-get-snapshot-lifecycle-stats.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
startSLM
public AcknowledgedResponse startSLM(StartSLMRequest request, RequestOptions options) throws java.io.IOExceptionStart the Snapshot Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-start-slm.html
for more.- Parameters:
request
- the requestoptions
- 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
-
startSLMAsync
public Cancellable startSLMAsync(StartSLMRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously start the Snapshot Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-start-slm.html
for more.- Parameters:
request
- the requestlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
stopSLM
public AcknowledgedResponse stopSLM(StopSLMRequest request, RequestOptions options) throws java.io.IOExceptionStop the Snapshot Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-stop-slm.html
for more.- Parameters:
request
- the requestoptions
- 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
-
stopSLMAsync
public Cancellable stopSLMAsync(StopSLMRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously stop the Snapshot Lifecycle Management feature. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-stop-slm.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getSLMStatus
public LifecycleManagementStatusResponse getSLMStatus(SnapshotLifecycleManagementStatusRequest request, RequestOptions options) throws java.io.IOExceptionGet the status of Snapshot Lifecycle Management. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-status.html
for more.- Parameters:
request
- the requestoptions
- 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
-
getSLMStatusAsync
public Cancellable getSLMStatusAsync(SnapshotLifecycleManagementStatusRequest request, RequestOptions options, ActionListener<LifecycleManagementStatusResponse> listener)Asynchronously get the status of Snapshot Lifecycle Management. Seehttps://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/ java-rest-high-ilm-slm-status.html
for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-