Class SnapshotClient
java.lang.Object
org.opensearch.client.base.ApiClient<SnapshotClient>
org.opensearch.client.opensearch.api.snapshot.SnapshotClient
public class SnapshotClient extends ApiClient<SnapshotClient>
Client for the snapshot namespace.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SnapshotClient(Transport transport)SnapshotClient(Transport transport, org.opensearch.client.RequestOptions options) -
Method Summary
Modifier and Type Method Description CleanupRepositoryResponsecleanupRepository(java.util.function.Function<CleanupRepositoryRequest.Builder,ObjectBuilder<CleanupRepositoryRequest>> fn)Removes stale data from repository.CleanupRepositoryResponsecleanupRepository(CleanupRepositoryRequest request)Removes stale data from repository.CloneResponseclone(java.util.function.Function<CloneRequest.Builder,ObjectBuilder<CloneRequest>> fn)Clones indices from one snapshot into another snapshot in the same repository.CloneResponseclone(CloneRequest request)Clones indices from one snapshot into another snapshot in the same repository.CreateResponsecreate(java.util.function.Function<CreateRequest.Builder,ObjectBuilder<CreateRequest>> fn)Creates a snapshot in a repository.CreateResponsecreate(CreateRequest request)Creates a snapshot in a repository.CreateRepositoryResponsecreateRepository(java.util.function.Function<CreateRepositoryRequest.Builder,ObjectBuilder<CreateRepositoryRequest>> fn)Creates a repository.CreateRepositoryResponsecreateRepository(CreateRepositoryRequest request)Creates a repository.DeleteResponsedelete(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn)Deletes a snapshot.DeleteResponsedelete(DeleteRequest request)Deletes a snapshot.DeleteRepositoryResponsedeleteRepository(java.util.function.Function<DeleteRepositoryRequest.Builder,ObjectBuilder<DeleteRepositoryRequest>> fn)Deletes a repository.DeleteRepositoryResponsedeleteRepository(DeleteRepositoryRequest request)Deletes a repository.GetResponseget(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn)Returns information about a snapshot.GetResponseget(GetRequest request)Returns information about a snapshot.GetRepositoryResponsegetRepository(java.util.function.Function<GetRepositoryRequest.Builder,ObjectBuilder<GetRepositoryRequest>> fn)Returns information about a repository.GetRepositoryResponsegetRepository(GetRepositoryRequest request)Returns information about a repository.RestoreResponserestore(java.util.function.Function<RestoreRequest.Builder,ObjectBuilder<RestoreRequest>> fn)Restores a snapshot.RestoreResponserestore(RestoreRequest request)Restores a snapshot.StatusResponsestatus(java.util.function.Function<StatusRequest.Builder,ObjectBuilder<StatusRequest>> fn)Returns information about the status of a snapshot.StatusResponsestatus(StatusRequest request)Returns information about the status of a snapshot.VerifyRepositoryResponseverifyRepository(java.util.function.Function<VerifyRepositoryRequest.Builder,ObjectBuilder<VerifyRepositoryRequest>> fn)Verifies a repository.VerifyRepositoryResponseverifyRepository(VerifyRepositoryRequest request)Verifies a repository.SnapshotClientwithRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newSnapshotClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.SnapshotClientwithRequestOptions(org.opensearch.client.RequestOptions options)Creates a newSnapshotClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.
-
Constructor Details
-
Method Details
-
cleanupRepository
public CleanupRepositoryResponse cleanupRepository(CleanupRepositoryRequest request) throws java.io.IOExceptionRemoves stale data from repository.- Throws:
java.io.IOException
-
cleanupRepository
public final CleanupRepositoryResponse cleanupRepository(java.util.function.Function<CleanupRepositoryRequest.Builder,ObjectBuilder<CleanupRepositoryRequest>> fn) throws java.io.IOExceptionRemoves stale data from repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
clone
Clones indices from one snapshot into another snapshot in the same repository.- Throws:
java.io.IOException
-
clone
public final CloneResponse clone(java.util.function.Function<CloneRequest.Builder,ObjectBuilder<CloneRequest>> fn) throws java.io.IOExceptionClones indices from one snapshot into another snapshot in the same repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
create
Creates a snapshot in a repository.- Throws:
java.io.IOException
-
create
public final CreateResponse create(java.util.function.Function<CreateRequest.Builder,ObjectBuilder<CreateRequest>> fn) throws java.io.IOExceptionCreates a snapshot in a repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
createRepository
public CreateRepositoryResponse createRepository(CreateRepositoryRequest request) throws java.io.IOExceptionCreates a repository.- Throws:
java.io.IOException
-
createRepository
public final CreateRepositoryResponse createRepository(java.util.function.Function<CreateRepositoryRequest.Builder,ObjectBuilder<CreateRepositoryRequest>> fn) throws java.io.IOExceptionCreates a repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
delete
Deletes a snapshot.- Throws:
java.io.IOException
-
delete
public final DeleteResponse delete(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn) throws java.io.IOExceptionDeletes a snapshot.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
deleteRepository
public DeleteRepositoryResponse deleteRepository(DeleteRepositoryRequest request) throws java.io.IOExceptionDeletes a repository.- Throws:
java.io.IOException
-
deleteRepository
public final DeleteRepositoryResponse deleteRepository(java.util.function.Function<DeleteRepositoryRequest.Builder,ObjectBuilder<DeleteRepositoryRequest>> fn) throws java.io.IOExceptionDeletes a repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
get
Returns information about a snapshot.- Throws:
java.io.IOException
-
get
public final GetResponse get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn) throws java.io.IOExceptionReturns information about a snapshot.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getRepository
public GetRepositoryResponse getRepository(GetRepositoryRequest request) throws java.io.IOExceptionReturns information about a repository.- Throws:
java.io.IOException
-
getRepository
public final GetRepositoryResponse getRepository(java.util.function.Function<GetRepositoryRequest.Builder,ObjectBuilder<GetRepositoryRequest>> fn) throws java.io.IOExceptionReturns information about a repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
restore
Restores a snapshot.- Throws:
java.io.IOException
-
restore
public final RestoreResponse restore(java.util.function.Function<RestoreRequest.Builder,ObjectBuilder<RestoreRequest>> fn) throws java.io.IOExceptionRestores a snapshot.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
status
Returns information about the status of a snapshot.- Throws:
java.io.IOException
-
status
public final StatusResponse status(java.util.function.Function<StatusRequest.Builder,ObjectBuilder<StatusRequest>> fn) throws java.io.IOExceptionReturns information about the status of a snapshot.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
verifyRepository
public VerifyRepositoryResponse verifyRepository(VerifyRepositoryRequest request) throws java.io.IOExceptionVerifies a repository.- Throws:
java.io.IOException
-
verifyRepository
public final VerifyRepositoryResponse verifyRepository(java.util.function.Function<VerifyRepositoryRequest.Builder,ObjectBuilder<VerifyRepositoryRequest>> fn) throws java.io.IOExceptionVerifies a repository.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
withRequestOptions
Creates a newSnapshotClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.- Specified by:
withRequestOptionsin classApiClient<SnapshotClient>
-
withRequestOptions
public SnapshotClient withRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newSnapshotClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.- Parameters:
fn- a function taking an options builder initialized with the current request options, or initialized with default values.
-