Class ElasticsearchSlmClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSlmClient
(ElasticsearchTransport transport) ElasticsearchSlmClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteLifecycle
(DeleteLifecycleRequest request) Delete a policy.final DeleteLifecycleResponse
Delete a policy.executeLifecycle
(ExecuteLifecycleRequest request) Run a policy.final ExecuteLifecycleResponse
executeLifecycle
(Function<ExecuteLifecycleRequest.Builder, ObjectBuilder<ExecuteLifecycleRequest>> fn) Run a policy.Run a retention policy.executeRetention
(ExecuteRetentionRequest request) Run a retention policy.final ExecuteRetentionResponse
executeRetention
(Function<ExecuteRetentionRequest.Builder, ObjectBuilder<ExecuteRetentionRequest>> fn) Run a retention policy.Get policy information.getLifecycle
(GetLifecycleRequest request) Get policy information.final GetLifecycleResponse
Get policy information.getStats()
Get snapshot lifecycle management statistics.getStats
(GetStatsRequest request) Get snapshot lifecycle management statistics.final GetStatsResponse
Get snapshot lifecycle management statistics.Get the snapshot lifecycle management status.getStatus
(GetSlmStatusRequest request) Get the snapshot lifecycle management status.final GetSlmStatusResponse
Get the snapshot lifecycle management status.putLifecycle
(PutLifecycleRequest request) Create or update a policy.final PutLifecycleResponse
Create or update a policy.start()
Start snapshot lifecycle management.start
(StartSlmRequest request) Start snapshot lifecycle management.final StartSlmResponse
Start snapshot lifecycle management.stop()
Stop snapshot lifecycle management.stop
(StopSlmRequest request) Stop snapshot lifecycle management.final StopSlmResponse
Stop snapshot lifecycle management.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
-
ElasticsearchSlmClient
-
ElasticsearchSlmClient
public ElasticsearchSlmClient(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,
ElasticsearchSlmClient>
-
deleteLifecycle
public DeleteLifecycleResponse deleteLifecycle(DeleteLifecycleRequest request) throws IOException, ElasticsearchException Delete a policy. Delete a snapshot lifecycle policy definition. This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteLifecycle
public final DeleteLifecycleResponse deleteLifecycle(Function<DeleteLifecycleRequest.Builder, ObjectBuilder<DeleteLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionDelete a policy. Delete a snapshot lifecycle policy definition. This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.- Parameters:
fn
- a function that initializes a builder to create theDeleteLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
executeLifecycle
public ExecuteLifecycleResponse executeLifecycle(ExecuteLifecycleRequest request) throws IOException, ElasticsearchException Run a policy. Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.- Throws:
IOException
ElasticsearchException
- See Also:
-
executeLifecycle
public final ExecuteLifecycleResponse executeLifecycle(Function<ExecuteLifecycleRequest.Builder, ObjectBuilder<ExecuteLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionRun a policy. Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time. The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.- Parameters:
fn
- a function that initializes a builder to create theExecuteLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
executeRetention
public ExecuteRetentionResponse executeRetention(ExecuteRetentionRequest request) throws IOException, ElasticsearchException Run a retention policy. Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. The retention policy is normally applied according to its schedule.- Throws:
IOException
ElasticsearchException
- See Also:
-
executeRetention
public final ExecuteRetentionResponse executeRetention(Function<ExecuteRetentionRequest.Builder, ObjectBuilder<ExecuteRetentionRequest>> fn) throws IOException, ElasticsearchExceptionRun a retention policy. Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. The retention policy is normally applied according to its schedule.- Parameters:
fn
- a function that initializes a builder to create theExecuteRetentionRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
executeRetention
Run a retention policy. Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules. The retention policy is normally applied according to its schedule.- Throws:
IOException
ElasticsearchException
- See Also:
-
getLifecycle
public GetLifecycleResponse getLifecycle(GetLifecycleRequest request) throws IOException, ElasticsearchException Get policy information. Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.- Throws:
IOException
ElasticsearchException
- See Also:
-
getLifecycle
public final GetLifecycleResponse getLifecycle(Function<GetLifecycleRequest.Builder, ObjectBuilder<GetLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionGet policy information. Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.- Parameters:
fn
- a function that initializes a builder to create theGetLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getLifecycle
Get policy information. Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.- Throws:
IOException
ElasticsearchException
- See Also:
-
getStats
public GetStatsResponse getStats(GetStatsRequest request) throws IOException, ElasticsearchException Get snapshot lifecycle management statistics. Get global and policy-level statistics about actions taken by snapshot lifecycle management.- Throws:
IOException
ElasticsearchException
- See Also:
-
getStats
public final GetStatsResponse getStats(Function<GetStatsRequest.Builder, ObjectBuilder<GetStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet snapshot lifecycle management statistics. Get global and policy-level statistics about actions taken by snapshot lifecycle management.- Parameters:
fn
- a function that initializes a builder to create theGetStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getStats
Get snapshot lifecycle management statistics. Get global and policy-level statistics about actions taken by snapshot lifecycle management.- Throws:
IOException
ElasticsearchException
- See Also:
-
getStatus
public GetSlmStatusResponse getStatus(GetSlmStatusRequest request) throws IOException, ElasticsearchException Get the snapshot lifecycle management status.- Throws:
IOException
ElasticsearchException
- See Also:
-
getStatus
public final GetSlmStatusResponse getStatus(Function<GetSlmStatusRequest.Builder, ObjectBuilder<GetSlmStatusRequest>> fn) throws IOException, ElasticsearchExceptionGet the snapshot lifecycle management status.- Parameters:
fn
- a function that initializes a builder to create theGetSlmStatusRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getStatus
Get the snapshot lifecycle management status.- Throws:
IOException
ElasticsearchException
- See Also:
-
putLifecycle
public PutLifecycleResponse putLifecycle(PutLifecycleRequest request) throws IOException, ElasticsearchException Create or update a policy. Create or update a snapshot lifecycle policy. If the policy already exists, this request increments the policy version. Only the latest version of a policy is stored.- Throws:
IOException
ElasticsearchException
- See Also:
-
putLifecycle
public final PutLifecycleResponse putLifecycle(Function<PutLifecycleRequest.Builder, ObjectBuilder<PutLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update a policy. Create or update a snapshot lifecycle policy. If the policy already exists, this request increments the policy version. Only the latest version of a policy is stored.- Parameters:
fn
- a function that initializes a builder to create thePutLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
start
Start snapshot lifecycle management. Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. Manually starting SLM is necessary only if it has been stopped using the stop SLM API.- Throws:
IOException
ElasticsearchException
- See Also:
-
start
public final StartSlmResponse start(Function<StartSlmRequest.Builder, ObjectBuilder<StartSlmRequest>> fn) throws IOException, ElasticsearchExceptionStart snapshot lifecycle management. Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. Manually starting SLM is necessary only if it has been stopped using the stop SLM API.- Parameters:
fn
- a function that initializes a builder to create theStartSlmRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
start
Start snapshot lifecycle management. Snapshot lifecycle management (SLM) starts automatically when a cluster is formed. Manually starting SLM is necessary only if it has been stopped using the stop SLM API.- Throws:
IOException
ElasticsearchException
- See Also:
-
stop
Stop snapshot lifecycle management. Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. Stopping SLM does not stop any snapshots that are in progress. You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. Use the get snapshot lifecycle management status API to see if SLM is running.
- Throws:
IOException
ElasticsearchException
- See Also:
-
stop
public final StopSlmResponse stop(Function<StopSlmRequest.Builder, ObjectBuilder<StopSlmRequest>> fn) throws IOException, ElasticsearchExceptionStop snapshot lifecycle management. Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. Stopping SLM does not stop any snapshots that are in progress. You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. Use the get snapshot lifecycle management status API to see if SLM is running.
- Parameters:
fn
- a function that initializes a builder to create theStopSlmRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
stop
Stop snapshot lifecycle management. Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices. Stopping SLM does not stop any snapshots that are in progress. You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.The API returns a response as soon as the request is acknowledged, but the plugin might continue to run until in-progress operations complete and it can be safely stopped. Use the get snapshot lifecycle management status API to see if SLM is running.
- Throws:
IOException
ElasticsearchException
- See Also:
-