Class ElasticsearchIlmClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchIlmClient>
co.elastic.clients.elasticsearch.ilm.ElasticsearchIlmClient
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ElasticsearchIlmClient
extends ApiClient<ElasticsearchTransport,ElasticsearchIlmClient>
Client for the ilm namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchIlmClient(ElasticsearchTransport transport) ElasticsearchIlmClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteLifecycle(DeleteLifecycleRequest request) Deletes the specified lifecycle policy definition.final DeleteLifecycleResponseDeletes the specified lifecycle policy definition.explainLifecycle(ExplainLifecycleRequest request) Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.final ExplainLifecycleResponseexplainLifecycle(Function<ExplainLifecycleRequest.Builder, ObjectBuilder<ExplainLifecycleRequest>> fn) Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.Returns the specified policy definition.getLifecycle(GetLifecycleRequest request) Returns the specified policy definition.final GetLifecycleResponseReturns the specified policy definition.Retrieves the current index lifecycle management (ILM) status.Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routingMigrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routingmigrateToDataTiers(Function<MigrateToDataTiersRequest.Builder, ObjectBuilder<MigrateToDataTiersRequest>> fn) Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routingmoveToStep(MoveToStepRequest request) Manually moves an index into the specified step and executes that step.final MoveToStepResponseManually moves an index into the specified step and executes that step.putLifecycle(PutLifecycleRequest request) Creates a lifecycle policyfinal PutLifecycleResponseCreates a lifecycle policyremovePolicy(RemovePolicyRequest request) Removes the assigned lifecycle policy and stops managing the specified indexfinal RemovePolicyResponseRemoves the assigned lifecycle policy and stops managing the specified indexretry(RetryRequest request) Retries executing the policy for an index that is in the ERROR step.final RetryResponseRetries executing the policy for an index that is in the ERROR step.start()Start the index lifecycle management (ILM) plugin.start(StartIlmRequest request) Start the index lifecycle management (ILM) plugin.final StartIlmResponseStart the index lifecycle management (ILM) plugin.stop()Halts all lifecycle management operations and stops the index lifecycle management (ILM) pluginstop(StopIlmRequest request) Halts all lifecycle management operations and stops the index lifecycle management (ILM) pluginfinal StopIlmResponseHalts all lifecycle management operations and stops the index lifecycle management (ILM) pluginwithTransportOptions(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
-
ElasticsearchIlmClient
-
ElasticsearchIlmClient
public ElasticsearchIlmClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchIlmClient>
-
deleteLifecycle
public DeleteLifecycleResponse deleteLifecycle(DeleteLifecycleRequest request) throws IOException, ElasticsearchException Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteLifecycle
public final DeleteLifecycleResponse deleteLifecycle(Function<DeleteLifecycleRequest.Builder, ObjectBuilder<DeleteLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionDeletes the specified lifecycle policy definition. A currently used policy cannot be deleted.- Parameters:
fn- a function that initializes a builder to create theDeleteLifecycleRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
explainLifecycle
public ExplainLifecycleResponse explainLifecycle(ExplainLifecycleRequest request) throws IOException, ElasticsearchException Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.- Throws:
IOExceptionElasticsearchException- See Also:
-
explainLifecycle
public final ExplainLifecycleResponse explainLifecycle(Function<ExplainLifecycleRequest.Builder, ObjectBuilder<ExplainLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionRetrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.- Parameters:
fn- a function that initializes a builder to create theExplainLifecycleRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getLifecycle
public GetLifecycleResponse getLifecycle(GetLifecycleRequest request) throws IOException, ElasticsearchException Returns the specified policy definition. Includes the policy version and last modified date.- Throws:
IOExceptionElasticsearchException- See Also:
-
getLifecycle
public final GetLifecycleResponse getLifecycle(Function<GetLifecycleRequest.Builder, ObjectBuilder<GetLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionReturns the specified policy definition. Includes the policy version and last modified date.- Parameters:
fn- a function that initializes a builder to create theGetLifecycleRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getLifecycle
Returns the specified policy definition. Includes the policy version and last modified date.- Throws:
IOExceptionElasticsearchException- See Also:
-
getStatus
Retrieves the current index lifecycle management (ILM) status.- Throws:
IOExceptionElasticsearchException- See Also:
-
migrateToDataTiers
public MigrateToDataTiersResponse migrateToDataTiers(MigrateToDataTiersRequest request) throws IOException, ElasticsearchException Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing- Throws:
IOExceptionElasticsearchException- See Also:
-
migrateToDataTiers
public final MigrateToDataTiersResponse migrateToDataTiers(Function<MigrateToDataTiersRequest.Builder, ObjectBuilder<MigrateToDataTiersRequest>> fn) throws IOException, ElasticsearchExceptionMigrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing- Parameters:
fn- a function that initializes a builder to create theMigrateToDataTiersRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
migrateToDataTiers
Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing- Throws:
IOExceptionElasticsearchException- See Also:
-
moveToStep
public MoveToStepResponse moveToStep(MoveToStepRequest request) throws IOException, ElasticsearchException Manually moves an index into the specified step and executes that step.- Throws:
IOExceptionElasticsearchException- See Also:
-
moveToStep
public final MoveToStepResponse moveToStep(Function<MoveToStepRequest.Builder, ObjectBuilder<MoveToStepRequest>> fn) throws IOException, ElasticsearchExceptionManually moves an index into the specified step and executes that step.- Parameters:
fn- a function that initializes a builder to create theMoveToStepRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putLifecycle
public PutLifecycleResponse putLifecycle(PutLifecycleRequest request) throws IOException, ElasticsearchException Creates a lifecycle policy- Throws:
IOExceptionElasticsearchException- See Also:
-
putLifecycle
public final PutLifecycleResponse putLifecycle(Function<PutLifecycleRequest.Builder, ObjectBuilder<PutLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionCreates a lifecycle policy- Parameters:
fn- a function that initializes a builder to create thePutLifecycleRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
removePolicy
public RemovePolicyResponse removePolicy(RemovePolicyRequest request) throws IOException, ElasticsearchException Removes the assigned lifecycle policy and stops managing the specified index- Throws:
IOExceptionElasticsearchException- See Also:
-
removePolicy
public final RemovePolicyResponse removePolicy(Function<RemovePolicyRequest.Builder, ObjectBuilder<RemovePolicyRequest>> fn) throws IOException, ElasticsearchExceptionRemoves the assigned lifecycle policy and stops managing the specified index- Parameters:
fn- a function that initializes a builder to create theRemovePolicyRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
retry
Retries executing the policy for an index that is in the ERROR step.- Throws:
IOExceptionElasticsearchException- See Also:
-
retry
public final RetryResponse retry(Function<RetryRequest.Builder, ObjectBuilder<RetryRequest>> fn) throws IOException, ElasticsearchExceptionRetries executing the policy for an index that is in the ERROR step.- Parameters:
fn- a function that initializes a builder to create theRetryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
start
Start the index lifecycle management (ILM) plugin.- Throws:
IOExceptionElasticsearchException- See Also:
-
start
public final StartIlmResponse start(Function<StartIlmRequest.Builder, ObjectBuilder<StartIlmRequest>> fn) throws IOException, ElasticsearchExceptionStart the index lifecycle management (ILM) plugin.- Parameters:
fn- a function that initializes a builder to create theStartIlmRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
start
Start the index lifecycle management (ILM) plugin.- Throws:
IOExceptionElasticsearchException- See Also:
-
stop
Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin- Throws:
IOExceptionElasticsearchException- See Also:
-
stop
public final StopIlmResponse stop(Function<StopIlmRequest.Builder, ObjectBuilder<StopIlmRequest>> fn) throws IOException, ElasticsearchExceptionHalts all lifecycle management operations and stops the index lifecycle management (ILM) plugin- Parameters:
fn- a function that initializes a builder to create theStopIlmRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
stop
Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin- Throws:
IOExceptionElasticsearchException- See Also:
-