Class OpenSearchSnapshotClient
- java.lang.Object
-
- org.opensearch.client.ApiClient<OpenSearchTransport,OpenSearchSnapshotClient>
-
- org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotClient
-
public class OpenSearchSnapshotClient extends ApiClient<OpenSearchTransport,OpenSearchSnapshotClient>
Client for the snapshot namespace.
-
-
Field Summary
-
Fields inherited from class org.opensearch.client.ApiClient
transport, transportOptions
-
-
Constructor Summary
Constructors Constructor Description OpenSearchSnapshotClient(OpenSearchTransport transport)OpenSearchSnapshotClient(OpenSearchTransport transport, TransportOptions transportOptions)
-
Method Summary
-
Methods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer
-
-
-
-
Constructor Detail
-
OpenSearchSnapshotClient
public OpenSearchSnapshotClient(OpenSearchTransport transport)
-
OpenSearchSnapshotClient
public OpenSearchSnapshotClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Detail
-
withTransportOptions
public OpenSearchSnapshotClient withTransportOptions(@Nullable TransportOptions transportOptions)
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<OpenSearchTransport,OpenSearchSnapshotClient>
-
cleanupRepository
public CleanupRepositoryResponse cleanupRepository(CleanupRepositoryRequest request) throws java.io.IOException, OpenSearchException
Removes stale data from repository.- Throws:
java.io.IOExceptionOpenSearchException
-
cleanupRepository
public final CleanupRepositoryResponse cleanupRepository(java.util.function.Function<CleanupRepositoryRequest.Builder,ObjectBuilder<CleanupRepositoryRequest>> fn) throws java.io.IOException, OpenSearchException
Removes stale data from repository.- Parameters:
fn- a function that initializes a builder to create theCleanupRepositoryRequest- Throws:
java.io.IOExceptionOpenSearchException
-
clone
public CloneSnapshotResponse clone(CloneSnapshotRequest request) throws java.io.IOException, OpenSearchException
Clones indices from one snapshot into another snapshot in the same repository.- Throws:
java.io.IOExceptionOpenSearchException
-
clone
public final CloneSnapshotResponse clone(java.util.function.Function<CloneSnapshotRequest.Builder,ObjectBuilder<CloneSnapshotRequest>> fn) throws java.io.IOException, OpenSearchException
Clones indices from one snapshot into another snapshot in the same repository.- Parameters:
fn- a function that initializes a builder to create theCloneSnapshotRequest- Throws:
java.io.IOExceptionOpenSearchException
-
create
public CreateSnapshotResponse create(CreateSnapshotRequest request) throws java.io.IOException, OpenSearchException
Creates a snapshot in a repository.- Throws:
java.io.IOExceptionOpenSearchException
-
create
public final CreateSnapshotResponse create(java.util.function.Function<CreateSnapshotRequest.Builder,ObjectBuilder<CreateSnapshotRequest>> fn) throws java.io.IOException, OpenSearchException
Creates a snapshot in a repository.- Parameters:
fn- a function that initializes a builder to create theCreateSnapshotRequest- Throws:
java.io.IOExceptionOpenSearchException
-
createRepository
public CreateRepositoryResponse createRepository(CreateRepositoryRequest request) throws java.io.IOException, OpenSearchException
Creates a repository.- Throws:
java.io.IOExceptionOpenSearchException
-
createRepository
public final CreateRepositoryResponse createRepository(java.util.function.Function<CreateRepositoryRequest.Builder,ObjectBuilder<CreateRepositoryRequest>> fn) throws java.io.IOException, OpenSearchException
Creates a repository.- Parameters:
fn- a function that initializes a builder to create theCreateRepositoryRequest- Throws:
java.io.IOExceptionOpenSearchException
-
delete
public DeleteSnapshotResponse delete(DeleteSnapshotRequest request) throws java.io.IOException, OpenSearchException
Deletes a snapshot.- Throws:
java.io.IOExceptionOpenSearchException
-
delete
public final DeleteSnapshotResponse delete(java.util.function.Function<DeleteSnapshotRequest.Builder,ObjectBuilder<DeleteSnapshotRequest>> fn) throws java.io.IOException, OpenSearchException
Deletes a snapshot.- Parameters:
fn- a function that initializes a builder to create theDeleteSnapshotRequest- Throws:
java.io.IOExceptionOpenSearchException
-
deleteRepository
public DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request) throws java.io.IOException, OpenSearchException
Deletes a repository.- Throws:
java.io.IOExceptionOpenSearchException
-
deleteRepository
public final DeleteRepositoryResponse deleteRepository(java.util.function.Function<DeleteRepositoryRequest.Builder,ObjectBuilder<DeleteRepositoryRequest>> fn) throws java.io.IOException, OpenSearchException
Deletes a repository.- Parameters:
fn- a function that initializes a builder to create theDeleteRepositoryRequest- Throws:
java.io.IOExceptionOpenSearchException
-
get
public GetSnapshotResponse get(GetSnapshotRequest request) throws java.io.IOException, OpenSearchException
Returns information about a snapshot.- Throws:
java.io.IOExceptionOpenSearchException
-
get
public final GetSnapshotResponse get(java.util.function.Function<GetSnapshotRequest.Builder,ObjectBuilder<GetSnapshotRequest>> fn) throws java.io.IOException, OpenSearchException
Returns information about a snapshot.- Parameters:
fn- a function that initializes a builder to create theGetSnapshotRequest- Throws:
java.io.IOExceptionOpenSearchException
-
getRepository
public GetRepositoryResponse getRepository(GetRepositoryRequest request) throws java.io.IOException, OpenSearchException
Returns information about a repository.- Throws:
java.io.IOExceptionOpenSearchException
-
getRepository
public final GetRepositoryResponse getRepository(java.util.function.Function<GetRepositoryRequest.Builder,ObjectBuilder<GetRepositoryRequest>> fn) throws java.io.IOException, OpenSearchException
Returns information about a repository.- Parameters:
fn- a function that initializes a builder to create theGetRepositoryRequest- Throws:
java.io.IOExceptionOpenSearchException
-
getRepository
public GetRepositoryResponse getRepository() throws java.io.IOException, OpenSearchException
Returns information about a repository.- Throws:
java.io.IOExceptionOpenSearchException
-
restore
public RestoreResponse restore(RestoreRequest request) throws java.io.IOException, OpenSearchException
Restores a snapshot.- Throws:
java.io.IOExceptionOpenSearchException
-
restore
public final RestoreResponse restore(java.util.function.Function<RestoreRequest.Builder,ObjectBuilder<RestoreRequest>> fn) throws java.io.IOException, OpenSearchException
Restores a snapshot.- Parameters:
fn- a function that initializes a builder to create theRestoreRequest- Throws:
java.io.IOExceptionOpenSearchException
-
status
public SnapshotStatusResponse status(SnapshotStatusRequest request) throws java.io.IOException, OpenSearchException
Returns information about the status of a snapshot.- Throws:
java.io.IOExceptionOpenSearchException
-
status
public final SnapshotStatusResponse status(java.util.function.Function<SnapshotStatusRequest.Builder,ObjectBuilder<SnapshotStatusRequest>> fn) throws java.io.IOException, OpenSearchException
Returns information about the status of a snapshot.- Parameters:
fn- a function that initializes a builder to create theSnapshotStatusRequest- Throws:
java.io.IOExceptionOpenSearchException
-
status
public SnapshotStatusResponse status() throws java.io.IOException, OpenSearchException
Returns information about the status of a snapshot.- Throws:
java.io.IOExceptionOpenSearchException
-
verifyRepository
public VerifyRepositoryResponse verifyRepository(VerifyRepositoryRequest request) throws java.io.IOException, OpenSearchException
Verifies a repository.- Throws:
java.io.IOExceptionOpenSearchException
-
verifyRepository
public final VerifyRepositoryResponse verifyRepository(java.util.function.Function<VerifyRepositoryRequest.Builder,ObjectBuilder<VerifyRepositoryRequest>> fn) throws java.io.IOException, OpenSearchException
Verifies a repository.- Parameters:
fn- a function that initializes a builder to create theVerifyRepositoryRequest- Throws:
java.io.IOExceptionOpenSearchException
-
-