Class ElasticsearchSnapshotClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchSnapshotClient>
co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ElasticsearchSnapshotClient
extends ApiClient<ElasticsearchTransport,ElasticsearchSnapshotClient>
Client for the snapshot namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchSnapshotClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionRemoves stale data from repository.cleanupRepository(Function<CleanupRepositoryRequest.Builder, ObjectBuilder<CleanupRepositoryRequest>> fn) Removes stale data from repository.clone(CloneSnapshotRequest request) Clones indices from one snapshot into another snapshot in the same repository.final CloneSnapshotResponseClones indices from one snapshot into another snapshot in the same repository.create(CreateSnapshotRequest request) Creates a snapshot in a repository.final CreateSnapshotResponseCreates a snapshot in a repository.createRepository(CreateRepositoryRequest request) Creates a repository.final CreateRepositoryResponsecreateRepository(Function<CreateRepositoryRequest.Builder, ObjectBuilder<CreateRepositoryRequest>> fn) Creates a repository.delete(DeleteSnapshotRequest request) Deletes a snapshot.final DeleteSnapshotResponseDeletes a snapshot.deleteRepository(DeleteRepositoryRequest request) Deletes a repository.final DeleteRepositoryResponsedeleteRepository(Function<DeleteRepositoryRequest.Builder, ObjectBuilder<DeleteRepositoryRequest>> fn) Deletes a repository.get(GetSnapshotRequest request) Returns information about a snapshot.final GetSnapshotResponseReturns information about a snapshot.Returns information about a repository.getRepository(GetRepositoryRequest request) Returns information about a repository.final GetRepositoryResponseReturns information about a repository.restore(RestoreRequest request) Restores a snapshot.final RestoreResponseRestores a snapshot.status()Returns information about the status of a snapshot.status(SnapshotStatusRequest request) Returns information about the status of a snapshot.final SnapshotStatusResponseReturns information about the status of a snapshot.verifyRepository(VerifyRepositoryRequest request) Verifies a repository.final VerifyRepositoryResponseverifyRepository(Function<VerifyRepositoryRequest.Builder, ObjectBuilder<VerifyRepositoryRequest>> fn) Verifies a repository.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
-
ElasticsearchSnapshotClient
-
ElasticsearchSnapshotClient
public ElasticsearchSnapshotClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchSnapshotClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchSnapshotClient>
-
cleanupRepository
public CleanupRepositoryResponse cleanupRepository(CleanupRepositoryRequest request) throws IOException, ElasticsearchException Removes stale data from repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
cleanupRepository
public final CleanupRepositoryResponse cleanupRepository(Function<CleanupRepositoryRequest.Builder, ObjectBuilder<CleanupRepositoryRequest>> fn) throws IOException, ElasticsearchExceptionRemoves stale data from repository.- Parameters:
fn- a function that initializes a builder to create theCleanupRepositoryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
clone
public CloneSnapshotResponse clone(CloneSnapshotRequest request) throws IOException, ElasticsearchException Clones indices from one snapshot into another snapshot in the same repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
clone
public final CloneSnapshotResponse clone(Function<CloneSnapshotRequest.Builder, ObjectBuilder<CloneSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionClones indices from one snapshot into another snapshot in the same repository.- Parameters:
fn- a function that initializes a builder to create theCloneSnapshotRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
create
public CreateSnapshotResponse create(CreateSnapshotRequest request) throws IOException, ElasticsearchException Creates a snapshot in a repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
create
public final CreateSnapshotResponse create(Function<CreateSnapshotRequest.Builder, ObjectBuilder<CreateSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionCreates a snapshot in a repository.- Parameters:
fn- a function that initializes a builder to create theCreateSnapshotRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
createRepository
public CreateRepositoryResponse createRepository(CreateRepositoryRequest request) throws IOException, ElasticsearchException Creates a repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
createRepository
public final CreateRepositoryResponse createRepository(Function<CreateRepositoryRequest.Builder, ObjectBuilder<CreateRepositoryRequest>> fn) throws IOException, ElasticsearchExceptionCreates a repository.- Parameters:
fn- a function that initializes a builder to create theCreateRepositoryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
delete
public DeleteSnapshotResponse delete(DeleteSnapshotRequest request) throws IOException, ElasticsearchException Deletes a snapshot.- Throws:
IOExceptionElasticsearchException- See Also:
-
delete
public final DeleteSnapshotResponse delete(Function<DeleteSnapshotRequest.Builder, ObjectBuilder<DeleteSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionDeletes a snapshot.- Parameters:
fn- a function that initializes a builder to create theDeleteSnapshotRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteRepository
public DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request) throws IOException, ElasticsearchException Deletes a repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteRepository
public final DeleteRepositoryResponse deleteRepository(Function<DeleteRepositoryRequest.Builder, ObjectBuilder<DeleteRepositoryRequest>> fn) throws IOException, ElasticsearchExceptionDeletes a repository.- Parameters:
fn- a function that initializes a builder to create theDeleteRepositoryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
get
public GetSnapshotResponse get(GetSnapshotRequest request) throws IOException, ElasticsearchException Returns information about a snapshot.- Throws:
IOExceptionElasticsearchException- See Also:
-
get
public final GetSnapshotResponse get(Function<GetSnapshotRequest.Builder, ObjectBuilder<GetSnapshotRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about a snapshot.- Parameters:
fn- a function that initializes a builder to create theGetSnapshotRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getRepository
public GetRepositoryResponse getRepository(GetRepositoryRequest request) throws IOException, ElasticsearchException Returns information about a repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
getRepository
public final GetRepositoryResponse getRepository(Function<GetRepositoryRequest.Builder, ObjectBuilder<GetRepositoryRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about a repository.- Parameters:
fn- a function that initializes a builder to create theGetRepositoryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getRepository
Returns information about a repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
restore
Restores a snapshot.- Throws:
IOExceptionElasticsearchException- See Also:
-
restore
public final RestoreResponse restore(Function<RestoreRequest.Builder, ObjectBuilder<RestoreRequest>> fn) throws IOException, ElasticsearchExceptionRestores a snapshot.- Parameters:
fn- a function that initializes a builder to create theRestoreRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
status
public SnapshotStatusResponse status(SnapshotStatusRequest request) throws IOException, ElasticsearchException Returns information about the status of a snapshot.- Throws:
IOExceptionElasticsearchException- See Also:
-
status
public final SnapshotStatusResponse status(Function<SnapshotStatusRequest.Builder, ObjectBuilder<SnapshotStatusRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about the status of a snapshot.- Parameters:
fn- a function that initializes a builder to create theSnapshotStatusRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
status
Returns information about the status of a snapshot.- Throws:
IOExceptionElasticsearchException- See Also:
-
verifyRepository
public VerifyRepositoryResponse verifyRepository(VerifyRepositoryRequest request) throws IOException, ElasticsearchException Verifies a repository.- Throws:
IOExceptionElasticsearchException- See Also:
-
verifyRepository
public final VerifyRepositoryResponse verifyRepository(Function<VerifyRepositoryRequest.Builder, ObjectBuilder<VerifyRepositoryRequest>> fn) throws IOException, ElasticsearchExceptionVerifies a repository.- Parameters:
fn- a function that initializes a builder to create theVerifyRepositoryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-