Class ElasticsearchSlmAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSlmAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteLifecycle
(DeleteLifecycleRequest request) Delete a policy.Delete a policy.executeLifecycle
(ExecuteLifecycleRequest request) Run a policy.executeLifecycle
(Function<ExecuteLifecycleRequest.Builder, ObjectBuilder<ExecuteLifecycleRequest>> fn) Run a policy.Run a retention policy.executeRetention
(ExecuteRetentionRequest request) Run a retention policy.executeRetention
(Function<ExecuteRetentionRequest.Builder, ObjectBuilder<ExecuteRetentionRequest>> fn) Run a retention policy.Get policy information.getLifecycle
(GetLifecycleRequest request) Get policy information.Get policy information.getStats()
Get snapshot lifecycle management statistics.getStats
(GetStatsRequest request) Get snapshot lifecycle management statistics.Get snapshot lifecycle management statistics.Get the snapshot lifecycle management status.getStatus
(GetSlmStatusRequest request) Get the snapshot lifecycle management status.Get the snapshot lifecycle management status.putLifecycle
(PutLifecycleRequest request) Create or update a policy.Create or update a policy.start()
Start snapshot lifecycle management.start
(StartSlmRequest request) Start snapshot lifecycle management.Start snapshot lifecycle management.stop()
Stop snapshot lifecycle management.stop
(StopSlmRequest request) Stop snapshot lifecycle management.final CompletableFuture<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
-
ElasticsearchSlmAsyncClient
-
ElasticsearchSlmAsyncClient
public ElasticsearchSlmAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchSlmAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchSlmAsyncClient>
-
deleteLifecycle
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.- See Also:
-
deleteLifecycle
public final CompletableFuture<DeleteLifecycleResponse> deleteLifecycle(Function<DeleteLifecycleRequest.Builder, ObjectBuilder<DeleteLifecycleRequest>> fn) 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.- Parameters:
fn
- a function that initializes a builder to create theDeleteLifecycleRequest
- See Also:
-
executeLifecycle
public CompletableFuture<ExecuteLifecycleResponse> executeLifecycle(ExecuteLifecycleRequest request) 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.- See Also:
-
executeLifecycle
public final CompletableFuture<ExecuteLifecycleResponse> executeLifecycle(Function<ExecuteLifecycleRequest.Builder, ObjectBuilder<ExecuteLifecycleRequest>> fn) 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.- Parameters:
fn
- a function that initializes a builder to create theExecuteLifecycleRequest
- See Also:
-
executeRetention
public CompletableFuture<ExecuteRetentionResponse> executeRetention(ExecuteRetentionRequest request) 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.- See Also:
-
executeRetention
public final CompletableFuture<ExecuteRetentionResponse> executeRetention(Function<ExecuteRetentionRequest.Builder, ObjectBuilder<ExecuteRetentionRequest>> fn) 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.- Parameters:
fn
- a function that initializes a builder to create theExecuteRetentionRequest
- 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.- See Also:
-
getLifecycle
Get policy information. Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.- See Also:
-
getLifecycle
public final CompletableFuture<GetLifecycleResponse> getLifecycle(Function<GetLifecycleRequest.Builder, ObjectBuilder<GetLifecycleRequest>> fn) Get 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
- See Also:
-
getLifecycle
Get policy information. Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.- See Also:
-
getStats
Get snapshot lifecycle management statistics. Get global and policy-level statistics about actions taken by snapshot lifecycle management.- See Also:
-
getStats
public final CompletableFuture<GetStatsResponse> getStats(Function<GetStatsRequest.Builder, ObjectBuilder<GetStatsRequest>> fn) Get 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
- See Also:
-
getStats
Get snapshot lifecycle management statistics. Get global and policy-level statistics about actions taken by snapshot lifecycle management.- See Also:
-
getStatus
Get the snapshot lifecycle management status.- See Also:
-
getStatus
public final CompletableFuture<GetSlmStatusResponse> getStatus(Function<GetSlmStatusRequest.Builder, ObjectBuilder<GetSlmStatusRequest>> fn) Get the snapshot lifecycle management status.- Parameters:
fn
- a function that initializes a builder to create theGetSlmStatusRequest
- See Also:
-
getStatus
Get the snapshot lifecycle management status.- See Also:
-
putLifecycle
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.- See Also:
-
putLifecycle
public final CompletableFuture<PutLifecycleResponse> putLifecycle(Function<PutLifecycleRequest.Builder, ObjectBuilder<PutLifecycleRequest>> fn) 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.- Parameters:
fn
- a function that initializes a builder to create thePutLifecycleRequest
- 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.- See Also:
-
start
public final CompletableFuture<StartSlmResponse> start(Function<StartSlmRequest.Builder, ObjectBuilder<StartSlmRequest>> fn) 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.- Parameters:
fn
- a function that initializes a builder to create theStartSlmRequest
- 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.- 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.
- See Also:
-
stop
public final CompletableFuture<StopSlmResponse> stop(Function<StopSlmRequest.Builder, ObjectBuilder<StopSlmRequest>> fn) 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.
- Parameters:
fn
- a function that initializes a builder to create theStopSlmRequest
- 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.
- See Also:
-