Class ElasticsearchIlmAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchIlmAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteLifecycle
(DeleteLifecycleRequest request) Delete a lifecycle policy.Delete a lifecycle policy.explainLifecycle
(ExplainLifecycleRequest request) Explain the lifecycle state.explainLifecycle
(Function<ExplainLifecycleRequest.Builder, ObjectBuilder<ExplainLifecycleRequest>> fn) Explain the lifecycle state.Get lifecycle policies.getLifecycle
(GetLifecycleRequest request) Get lifecycle policies.Get lifecycle policies.Get the ILM status.Migrate to data tiers routing.Migrate to data tiers routing.migrateToDataTiers
(Function<MigrateToDataTiersRequest.Builder, ObjectBuilder<MigrateToDataTiersRequest>> fn) Migrate to data tiers routing.moveToStep
(MoveToStepRequest request) Move to a lifecycle step.Move to a lifecycle step.putLifecycle
(PutLifecycleRequest request) Create or update a lifecycle policy.Create or update a lifecycle policy.removePolicy
(RemovePolicyRequest request) Remove policies from an index.Remove policies from an index.retry
(RetryRequest request) Retry a policy.final CompletableFuture<RetryResponse>
Retry a policy.start()
Start the ILM plugin.start
(StartIlmRequest request) Start the ILM plugin.Start the ILM plugin.stop()
Stop the ILM plugin.stop
(StopIlmRequest request) Stop the ILM plugin.final CompletableFuture<StopIlmResponse>
Stop the ILM plugin.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
-
ElasticsearchIlmAsyncClient
-
ElasticsearchIlmAsyncClient
public ElasticsearchIlmAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchIlmAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchIlmAsyncClient>
-
deleteLifecycle
Delete a lifecycle policy. You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.- See Also:
-
deleteLifecycle
public final CompletableFuture<DeleteLifecycleResponse> deleteLifecycle(Function<DeleteLifecycleRequest.Builder, ObjectBuilder<DeleteLifecycleRequest>> fn) Delete a lifecycle policy. You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.- Parameters:
fn
- a function that initializes a builder to create theDeleteLifecycleRequest
- See Also:
-
explainLifecycle
public CompletableFuture<ExplainLifecycleResponse> explainLifecycle(ExplainLifecycleRequest request) Explain the lifecycle state. Get the current lifecycle status for one or more indices. For data streams, the API retrieves the current lifecycle status for the stream's backing indices.The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.
- See Also:
-
explainLifecycle
public final CompletableFuture<ExplainLifecycleResponse> explainLifecycle(Function<ExplainLifecycleRequest.Builder, ObjectBuilder<ExplainLifecycleRequest>> fn) Explain the lifecycle state. Get the current lifecycle status for one or more indices. For data streams, the API retrieves the current lifecycle status for the stream's backing indices.The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.
- Parameters:
fn
- a function that initializes a builder to create theExplainLifecycleRequest
- See Also:
-
getLifecycle
Get lifecycle policies.- See Also:
-
getLifecycle
public final CompletableFuture<GetLifecycleResponse> getLifecycle(Function<GetLifecycleRequest.Builder, ObjectBuilder<GetLifecycleRequest>> fn) Get lifecycle policies.- Parameters:
fn
- a function that initializes a builder to create theGetLifecycleRequest
- See Also:
-
getLifecycle
Get lifecycle policies.- See Also:
-
getStatus
Get the ILM status.Get the current index lifecycle management status.
- See Also:
-
migrateToDataTiers
public CompletableFuture<MigrateToDataTiersResponse> migrateToDataTiers(MigrateToDataTiersRequest request) Migrate to data tiers routing. Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers.Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide:
- Stop setting the custom hot attribute on new indices.
- Remove custom allocation settings from existing ILM policies.
- Replace custom allocation settings from existing indices with the corresponding tier preference.
ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is
STOPPED
.- See Also:
-
migrateToDataTiers
public final CompletableFuture<MigrateToDataTiersResponse> migrateToDataTiers(Function<MigrateToDataTiersRequest.Builder, ObjectBuilder<MigrateToDataTiersRequest>> fn) Migrate to data tiers routing. Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers.Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide:
- Stop setting the custom hot attribute on new indices.
- Remove custom allocation settings from existing ILM policies.
- Replace custom allocation settings from existing indices with the corresponding tier preference.
ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is
STOPPED
.- Parameters:
fn
- a function that initializes a builder to create theMigrateToDataTiersRequest
- See Also:
-
migrateToDataTiers
Migrate to data tiers routing. Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers.Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide:
- Stop setting the custom hot attribute on new indices.
- Remove custom allocation settings from existing ILM policies.
- Replace custom allocation settings from existing indices with the corresponding tier preference.
ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is
STOPPED
.- See Also:
-
moveToStep
Move to a lifecycle step. Manually move an index into a specific step in the lifecycle policy and run that step.WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.
You must specify both the current step and the step to be executed in the body of the request. The request will fail if the current step does not match the step currently running for the index This is to prevent the index from being moved from an unexpected step into the next step.
When specifying the target (
next_step
) to which the index will be moved, either the name or both the action and name fields are optional. If only the phase is specified, the index will move to the first step of the first action in the target phase. If the phase and action are specified, the index will move to the first step of the specified action in the specified phase. Only actions specified in the ILM policy are considered valid. An index cannot move to a step that is not part of its policy.- See Also:
-
moveToStep
public final CompletableFuture<MoveToStepResponse> moveToStep(Function<MoveToStepRequest.Builder, ObjectBuilder<MoveToStepRequest>> fn) Move to a lifecycle step. Manually move an index into a specific step in the lifecycle policy and run that step.WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API.
You must specify both the current step and the step to be executed in the body of the request. The request will fail if the current step does not match the step currently running for the index This is to prevent the index from being moved from an unexpected step into the next step.
When specifying the target (
next_step
) to which the index will be moved, either the name or both the action and name fields are optional. If only the phase is specified, the index will move to the first step of the first action in the target phase. If the phase and action are specified, the index will move to the first step of the specified action in the specified phase. Only actions specified in the ILM policy are considered valid. An index cannot move to a step that is not part of its policy.- Parameters:
fn
- a function that initializes a builder to create theMoveToStepRequest
- See Also:
-
putLifecycle
Create or update a lifecycle policy. If the specified policy exists, it is replaced and the policy version is incremented.NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.
- See Also:
-
putLifecycle
public final CompletableFuture<PutLifecycleResponse> putLifecycle(Function<PutLifecycleRequest.Builder, ObjectBuilder<PutLifecycleRequest>> fn) Create or update a lifecycle policy. If the specified policy exists, it is replaced and the policy version is incremented.NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.
- Parameters:
fn
- a function that initializes a builder to create thePutLifecycleRequest
- See Also:
-
removePolicy
Remove policies from an index. Remove the assigned lifecycle policies from an index or a data stream's backing indices. It also stops managing the indices.- See Also:
-
removePolicy
public final CompletableFuture<RemovePolicyResponse> removePolicy(Function<RemovePolicyRequest.Builder, ObjectBuilder<RemovePolicyRequest>> fn) Remove policies from an index. Remove the assigned lifecycle policies from an index or a data stream's backing indices. It also stops managing the indices.- Parameters:
fn
- a function that initializes a builder to create theRemovePolicyRequest
- See Also:
-
retry
Retry a policy. Retry running the lifecycle policy for an index that is in the ERROR step. The API sets the policy back to the step where the error occurred and runs the step. Use the explain lifecycle state API to determine whether an index is in the ERROR step.- See Also:
-
retry
public final CompletableFuture<RetryResponse> retry(Function<RetryRequest.Builder, ObjectBuilder<RetryRequest>> fn) Retry a policy. Retry running the lifecycle policy for an index that is in the ERROR step. The API sets the policy back to the step where the error occurred and runs the step. Use the explain lifecycle state API to determine whether an index is in the ERROR step.- Parameters:
fn
- a function that initializes a builder to create theRetryRequest
- See Also:
-
start
Start the ILM plugin. Start the index lifecycle management plugin if it is currently stopped. ILM is started automatically when the cluster is formed. Restarting ILM is necessary only when it has been stopped using the stop ILM API.- See Also:
-
start
public final CompletableFuture<StartIlmResponse> start(Function<StartIlmRequest.Builder, ObjectBuilder<StartIlmRequest>> fn) Start the ILM plugin. Start the index lifecycle management plugin if it is currently stopped. ILM is started automatically when the cluster is formed. Restarting ILM is necessary only when it has been stopped using the stop ILM API.- Parameters:
fn
- a function that initializes a builder to create theStartIlmRequest
- See Also:
-
start
Start the ILM plugin. Start the index lifecycle management plugin if it is currently stopped. ILM is started automatically when the cluster is formed. Restarting ILM is necessary only when it has been stopped using the stop ILM API.- See Also:
-
stop
Stop the ILM plugin. Halt all lifecycle management operations and stop the index lifecycle management plugin. This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices.The API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped. Use the get ILM status API to check whether ILM is running.
- See Also:
-
stop
public final CompletableFuture<StopIlmResponse> stop(Function<StopIlmRequest.Builder, ObjectBuilder<StopIlmRequest>> fn) Stop the ILM plugin. Halt all lifecycle management operations and stop the index lifecycle management plugin. This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices.The API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped. Use the get ILM status API to check whether ILM is running.
- Parameters:
fn
- a function that initializes a builder to create theStopIlmRequest
- See Also:
-
stop
Stop the ILM plugin. Halt all lifecycle management operations and stop the index lifecycle management plugin. This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices.The API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped. Use the get ILM status API to check whether ILM is running.
- See Also:
-