Class OpenSearchTasksClient
java.lang.Object
org.opensearch.client.ApiClient<OpenSearchTransport,OpenSearchTasksClient>
org.opensearch.client.opensearch.tasks.OpenSearchTasksClient
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class OpenSearchTasksClient
extends ApiClient<OpenSearchTransport,OpenSearchTasksClient>
Client for the tasks namespace.
-
Field Summary
Fields inherited from class org.opensearch.client.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchTasksClient(OpenSearchTransport transport) OpenSearchTasksClient(OpenSearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionfinal CancelResponsecancel()Cancels a task, if it can be cancelled through an API.final CancelResponseCancels a task, if it can be cancelled through an API.cancel(CancelRequest request) Cancels a task, if it can be cancelled through an API.final GetTasksResponseReturns information about a task.get(GetTasksRequest request) Returns information about a task.final ListResponselist()Returns a list of tasks.final ListResponseReturns a list of tasks.list(ListRequest request) Returns a list of tasks.withTransportOptions(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer
-
Constructor Details
-
OpenSearchTasksClient
-
OpenSearchTasksClient
public OpenSearchTasksClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<OpenSearchTransport,OpenSearchTasksClient>
-
cancel
Cancels a task, if it can be cancelled through an API.- Throws:
IOExceptionOpenSearchException
-
cancel
public final CancelResponse cancel(Function<CancelRequest.Builder, ObjectBuilder<CancelRequest>> fn) throws IOException, OpenSearchExceptionCancels a task, if it can be cancelled through an API.- Parameters:
fn- a function that initializes a builder to create theCancelRequest- Throws:
IOExceptionOpenSearchException
-
cancel
Cancels a task, if it can be cancelled through an API.- Throws:
IOExceptionOpenSearchException
-
get
Returns information about a task.- Throws:
IOExceptionOpenSearchException
-
get
public final GetTasksResponse get(Function<GetTasksRequest.Builder, ObjectBuilder<GetTasksRequest>> fn) throws IOException, OpenSearchExceptionReturns information about a task.- Parameters:
fn- a function that initializes a builder to create theGetTasksRequest- Throws:
IOExceptionOpenSearchException
-
list
Returns a list of tasks.- Throws:
IOExceptionOpenSearchException
-
list
public final ListResponse list(Function<ListRequest.Builder, ObjectBuilder<ListRequest>> fn) throws IOException, OpenSearchExceptionReturns a list of tasks.- Parameters:
fn- a function that initializes a builder to create theListRequest- Throws:
IOExceptionOpenSearchException
-
list
Returns a list of tasks.- Throws:
IOExceptionOpenSearchException
-