Package org.opensearch.client
Class SnapshotClient
java.lang.Object
org.opensearch.client.SnapshotClient
A wrapper for the
RestHighLevelClient that provides methods for accessing the Snapshot API.-
Method Summary
Modifier and TypeMethodDescriptionorg.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponsecleanupRepository(org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.opensearch.client.RequestOptions options) Cleans up a snapshot repository.org.opensearch.client.CancellablecleanupRepositoryAsync(org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse> listener) Asynchronously cleans up a snapshot repository.org.opensearch.action.support.master.AcknowledgedResponseclone(org.opensearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.opensearch.client.RequestOptions options) Clones a snapshot.org.opensearch.client.CancellablecloneAsync(org.opensearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously clones a snapshot.org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponsecreate(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.opensearch.client.RequestOptions options) Creates a snapshot.org.opensearch.client.CancellablecreateAsync(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse> listener) Asynchronously creates a snapshot.org.opensearch.action.support.master.AcknowledgedResponsecreateRepository(org.opensearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.opensearch.client.RequestOptions options) Creates a snapshot repository.org.opensearch.client.CancellablecreateRepositoryAsync(org.opensearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously creates a snapshot repository.org.opensearch.action.support.master.AcknowledgedResponsedelete(org.opensearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.opensearch.client.RequestOptions options) Deletes a snapshot.org.opensearch.client.CancellabledeleteAsync(org.opensearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously deletes a snapshot.org.opensearch.action.support.master.AcknowledgedResponsedeleteRepository(org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.opensearch.client.RequestOptions options) Deletes a snapshot repository.org.opensearch.client.CancellabledeleteRepositoryAsync(org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously deletes a snapshot repository.org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponseget(org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.opensearch.client.RequestOptions options) Get snapshots.org.opensearch.client.CancellablegetAsync(org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse> listener) Asynchronously get snapshots.org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponsegetRepository(org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.opensearch.client.RequestOptions options) Gets a list of snapshot repositories.org.opensearch.client.CancellablegetRepositoryAsync(org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse> listener) Asynchronously gets a list of snapshot repositories.org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponserestore(org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.opensearch.client.RequestOptions options) Restores a snapshot.org.opensearch.client.CancellablerestoreAsync(org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse> listener) Asynchronously restores a snapshot.org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponsestatus(org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.opensearch.client.RequestOptions options) Gets the status of requested snapshots.org.opensearch.client.CancellablestatusAsync(org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse> listener) Asynchronously gets the status of requested snapshots.org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponseverifyRepository(org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.opensearch.client.RequestOptions options) Verifies a snapshot repository.org.opensearch.client.CancellableverifyRepositoryAsync(org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse> listener) Asynchronously verifies a snapshot repository.
-
Method Details
-
getRepository
public org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse getRepository(org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.opensearch.client.RequestOptions options) throws IOException Gets a list of snapshot repositories. If the list of repositories is empty or it contains a single element "_all", all registered repositories are returned.- Parameters:
getRepositoriesRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
getRepositoryAsync
public org.opensearch.client.Cancellable getRepositoryAsync(org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse> listener) Asynchronously gets a list of snapshot repositories. If the list of repositories is empty or it contains a single element "_all", all registered repositories are returned.- Parameters:
getRepositoriesRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
createRepository
public org.opensearch.action.support.master.AcknowledgedResponse createRepository(org.opensearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.opensearch.client.RequestOptions options) throws IOException Creates a snapshot repository.- Parameters:
putRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
createRepositoryAsync
public org.opensearch.client.Cancellable createRepositoryAsync(org.opensearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously creates a snapshot repository.- Parameters:
putRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteRepository
public org.opensearch.action.support.master.AcknowledgedResponse deleteRepository(org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.opensearch.client.RequestOptions options) throws IOException Deletes a snapshot repository.- Parameters:
deleteRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
deleteRepositoryAsync
public org.opensearch.client.Cancellable deleteRepositoryAsync(org.opensearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously deletes a snapshot repository.- Parameters:
deleteRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
verifyRepository
public org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse verifyRepository(org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.opensearch.client.RequestOptions options) throws IOException Verifies a snapshot repository.- Parameters:
verifyRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
verifyRepositoryAsync
public org.opensearch.client.Cancellable verifyRepositoryAsync(org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse> listener) Asynchronously verifies a snapshot repository.- Parameters:
verifyRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
cleanupRepository
public org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse cleanupRepository(org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.opensearch.client.RequestOptions options) throws IOException Cleans up a snapshot repository.- Parameters:
cleanupRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
cleanupRepositoryAsync
public org.opensearch.client.Cancellable cleanupRepositoryAsync(org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse> listener) Asynchronously cleans up a snapshot repository.- Parameters:
cleanupRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
create
public org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse create(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.opensearch.client.RequestOptions options) throws IOException Creates a snapshot.- Throws:
IOException
-
createAsync
public org.opensearch.client.Cancellable createAsync(org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse> listener) Asynchronously creates a snapshot.- Returns:
- cancellable that may be used to cancel the request
-
clone
public org.opensearch.action.support.master.AcknowledgedResponse clone(org.opensearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.opensearch.client.RequestOptions options) throws IOException Clones a snapshot.- Throws:
IOException
-
cloneAsync
public org.opensearch.client.Cancellable cloneAsync(org.opensearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously clones a snapshot.- Returns:
- cancellable that may be used to cancel the request
-
get
public org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse get(org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.opensearch.client.RequestOptions options) throws IOException Get snapshots.- Parameters:
getSnapshotsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
getAsync
public org.opensearch.client.Cancellable getAsync(org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse> listener) Asynchronously get snapshots.- Parameters:
getSnapshotsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
status
public org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse status(org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.opensearch.client.RequestOptions options) throws IOException Gets the status of requested snapshots.- Parameters:
snapshotsStatusRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
statusAsync
public org.opensearch.client.Cancellable statusAsync(org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse> listener) Asynchronously gets the status of requested snapshots.- Parameters:
snapshotsStatusRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
restore
public org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse restore(org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.opensearch.client.RequestOptions options) throws IOException Restores a snapshot.- Parameters:
restoreSnapshotRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
restoreAsync
public org.opensearch.client.Cancellable restoreAsync(org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse> listener) Asynchronously restores a snapshot.- Parameters:
restoreSnapshotRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
delete
public org.opensearch.action.support.master.AcknowledgedResponse delete(org.opensearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.opensearch.client.RequestOptions options) throws IOException Deletes a snapshot.- Parameters:
deleteSnapshotRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
IOException- in case there is a problem sending the request or parsing back the response
-
deleteAsync
public org.opensearch.client.Cancellable deleteAsync(org.opensearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.opensearch.client.RequestOptions options, org.opensearch.core.action.ActionListener<org.opensearch.action.support.master.AcknowledgedResponse> listener) Asynchronously deletes a snapshot.- Parameters:
deleteSnapshotRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-