Class ElasticsearchSlmClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchSlmClient>
co.elastic.clients.elasticsearch.slm.ElasticsearchSlmClient
public class ElasticsearchSlmClient extends ApiClient<ElasticsearchTransport,ElasticsearchSlmClient>
Client for the slm namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
Constructors Constructor Description ElasticsearchSlmClient(ElasticsearchTransport transport)ElasticsearchSlmClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and Type Method Description DeleteLifecycleResponsedeleteLifecycle(DeleteLifecycleRequest request)Deletes an existing snapshot lifecycle policy.DeleteLifecycleResponsedeleteLifecycle(java.util.function.Function<DeleteLifecycleRequest.Builder,ObjectBuilder<DeleteLifecycleRequest>> fn)Deletes an existing snapshot lifecycle policy.ExecuteLifecycleResponseexecuteLifecycle(ExecuteLifecycleRequest request)Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.ExecuteLifecycleResponseexecuteLifecycle(java.util.function.Function<ExecuteLifecycleRequest.Builder,ObjectBuilder<ExecuteLifecycleRequest>> fn)Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.ExecuteRetentionResponseexecuteRetention()Deletes any snapshots that are expired according to the policy's retention rules.GetLifecycleResponsegetLifecycle()Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.GetLifecycleResponsegetLifecycle(GetLifecycleRequest request)Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.GetLifecycleResponsegetLifecycle(java.util.function.Function<GetLifecycleRequest.Builder,ObjectBuilder<GetLifecycleRequest>> fn)Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.GetStatsResponsegetStats()Returns global and policy-level statistics about actions taken by snapshot lifecycle management.GetSlmStatusResponsegetStatus()Retrieves the status of snapshot lifecycle management (SLM).PutLifecycleResponseputLifecycle(PutLifecycleRequest request)Creates or updates a snapshot lifecycle policy.PutLifecycleResponseputLifecycle(java.util.function.Function<PutLifecycleRequest.Builder,ObjectBuilder<PutLifecycleRequest>> fn)Creates or updates a snapshot lifecycle policy.StartSlmResponsestart()Turns on snapshot lifecycle management (SLM).StopSlmResponsestop()Turns off snapshot lifecycle management (SLM).ElasticsearchSlmClientwithTransportOptions(TransportOptions transportOptions)Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, getDeserializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ElasticsearchSlmClient
-
ElasticsearchSlmClient
public ElasticsearchSlmClient(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,ElasticsearchSlmClient>
-
deleteLifecycle
public DeleteLifecycleResponse deleteLifecycle(DeleteLifecycleRequest request) throws java.io.IOException, ElasticsearchExceptionDeletes an existing snapshot lifecycle policy.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
deleteLifecycle
public final DeleteLifecycleResponse deleteLifecycle(java.util.function.Function<DeleteLifecycleRequest.Builder,ObjectBuilder<DeleteLifecycleRequest>> fn) throws java.io.IOException, ElasticsearchExceptionDeletes an existing snapshot lifecycle policy.- Parameters:
fn- a function that initializes a builder to create theDeleteLifecycleRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
executeLifecycle
public ExecuteLifecycleResponse executeLifecycle(ExecuteLifecycleRequest request) throws java.io.IOException, ElasticsearchExceptionImmediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
executeLifecycle
public final ExecuteLifecycleResponse executeLifecycle(java.util.function.Function<ExecuteLifecycleRequest.Builder,ObjectBuilder<ExecuteLifecycleRequest>> fn) throws java.io.IOException, ElasticsearchExceptionImmediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.- Parameters:
fn- a function that initializes a builder to create theExecuteLifecycleRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
executeRetention
public ExecuteRetentionResponse executeRetention() throws java.io.IOException, ElasticsearchExceptionDeletes any snapshots that are expired according to the policy's retention rules.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getLifecycle
public GetLifecycleResponse getLifecycle(GetLifecycleRequest request) throws java.io.IOException, ElasticsearchExceptionRetrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getLifecycle
public final GetLifecycleResponse getLifecycle(java.util.function.Function<GetLifecycleRequest.Builder,ObjectBuilder<GetLifecycleRequest>> fn) throws java.io.IOException, ElasticsearchExceptionRetrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.- Parameters:
fn- a function that initializes a builder to create theGetLifecycleRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getLifecycle
Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getStats
Returns global and policy-level statistics about actions taken by snapshot lifecycle management.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
getStatus
Retrieves the status of snapshot lifecycle management (SLM).- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
putLifecycle
public PutLifecycleResponse putLifecycle(PutLifecycleRequest request) throws java.io.IOException, ElasticsearchExceptionCreates or updates a snapshot lifecycle policy.- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
putLifecycle
public final PutLifecycleResponse putLifecycle(java.util.function.Function<PutLifecycleRequest.Builder,ObjectBuilder<PutLifecycleRequest>> fn) throws java.io.IOException, ElasticsearchExceptionCreates or updates a snapshot lifecycle policy.- Parameters:
fn- a function that initializes a builder to create thePutLifecycleRequest- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
start
Turns on snapshot lifecycle management (SLM).- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-
stop
Turns off snapshot lifecycle management (SLM).- Throws:
java.io.IOExceptionElasticsearchException- See Also:
- Documentation on elastic.co
-