Class ElasticsearchEsqlAsyncClient
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchEsqlAsyncClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteDataset(DeleteDatasetRequest request) Delete ES|QL datasets.Delete ES|QL datasets.deleteDataSource(DeleteDataSourceRequest request) Delete ES|QL data sources.deleteDataSource(Function<DeleteDataSourceRequest.Builder, ObjectBuilder<DeleteDataSourceRequest>> fn) Delete ES|QL data sources.deleteView(DeleteViewRequest request) Delete an ES|QL view.Delete an ES|QL view.Get ES|QL datasets.getDataset(GetDatasetRequest request) Get ES|QL datasets.Get ES|QL datasets.Get ES|QL data sources.getDataSource(GetDataSourceRequest request) Get ES|QL data sources.Get ES|QL data sources.getQuery(GetQueryRequest request) Get a specific running ES|QL query information.Get a specific running ES|QL query information.getView()Get an ES|QL view.getView(GetViewRequest request) Get an ES|QL view.final CompletableFuture<GetViewResponse>Get an ES|QL view.Get running ES|QL queries information.putDataset(PutDatasetRequest request) Create or update an ES|QL dataset.Create or update an ES|QL dataset.putDataSource(PutDataSourceRequest request) Create or update an ES|QL data source.Create or update an ES|QL data source.putView(PutViewRequest request) Create or update an ES|QL view.final CompletableFuture<PutViewResponse>Create or update an ES|QL view.final <T> CompletableFuture<T>query(EsqlAdapter<T> adapter, QueryRequest request) Executes an ES|QL request and adapts its result to a target type.final <T> CompletableFuture<T>query(EsqlAdapter<T> adapter, String query, Object... parameters) Executes an ES|QL request and adapts its result to a target type.final <T> CompletableFuture<T>query(EsqlAdapter<T> adapter, Function<QueryRequest.Builder, ObjectBuilder<QueryRequest>> fn) Executes an ES|QL request and adapts its result to a target type.query(QueryRequest request) Run an ES|QL query.final CompletableFuture<BinaryResponse>Run an ES|QL query.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
-
ElasticsearchEsqlAsyncClient
-
ElasticsearchEsqlAsyncClient
public ElasticsearchEsqlAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchEsqlAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchEsqlAsyncClient>
-
deleteDataSource
public CompletableFuture<DeleteDataSourceResponse> deleteDataSource(DeleteDataSourceRequest request) Delete ES|QL data sources.Deletes one or more data sources used in ES|QL data federation. Fails with
409if any dataset references one of the named data sources; delete the dependent datasets first.- See Also:
-
deleteDataSource
public final CompletableFuture<DeleteDataSourceResponse> deleteDataSource(Function<DeleteDataSourceRequest.Builder, ObjectBuilder<DeleteDataSourceRequest>> fn) Delete ES|QL data sources.Deletes one or more data sources used in ES|QL data federation. Fails with
409if any dataset references one of the named data sources; delete the dependent datasets first.- Parameters:
fn- a function that initializes a builder to create theDeleteDataSourceRequest- See Also:
-
deleteDataset
Delete ES|QL datasets.Deletes one or more datasets used in ES|QL data federation. If any specified dataset does not exist, the request fails and no datasets are deleted.
- See Also:
-
deleteDataset
public final CompletableFuture<DeleteDatasetResponse> deleteDataset(Function<DeleteDatasetRequest.Builder, ObjectBuilder<DeleteDatasetRequest>> fn) Delete ES|QL datasets.Deletes one or more datasets used in ES|QL data federation. If any specified dataset does not exist, the request fails and no datasets are deleted.
- Parameters:
fn- a function that initializes a builder to create theDeleteDatasetRequest- See Also:
-
deleteView
Delete an ES|QL view.Deletes a stored ES|QL view.
- See Also:
-
deleteView
public final CompletableFuture<DeleteViewResponse> deleteView(Function<DeleteViewRequest.Builder, ObjectBuilder<DeleteViewRequest>> fn) Delete an ES|QL view.Deletes a stored ES|QL view.
- Parameters:
fn- a function that initializes a builder to create theDeleteViewRequest- See Also:
-
getDataSource
Get ES|QL data sources.Returns one or more data sources used in ES|QL data federation. A concrete-name miss returns
404; a wildcard pattern or list-all request with no match returns200with an empty array.- See Also:
-
getDataSource
public final CompletableFuture<GetDataSourceResponse> getDataSource(Function<GetDataSourceRequest.Builder, ObjectBuilder<GetDataSourceRequest>> fn) Get ES|QL data sources.Returns one or more data sources used in ES|QL data federation. A concrete-name miss returns
404; a wildcard pattern or list-all request with no match returns200with an empty array.- Parameters:
fn- a function that initializes a builder to create theGetDataSourceRequest- See Also:
-
getDataSource
Get ES|QL data sources.Returns one or more data sources used in ES|QL data federation. A concrete-name miss returns
404; a wildcard pattern or list-all request with no match returns200with an empty array.- See Also:
-
getDataset
Get ES|QL datasets.Returns one or more datasets used in ES|QL data federation. A concrete-name miss returns
404; a wildcard pattern or list-all request with no match returns200with an empty array.- See Also:
-
getDataset
public final CompletableFuture<GetDatasetResponse> getDataset(Function<GetDatasetRequest.Builder, ObjectBuilder<GetDatasetRequest>> fn) Get ES|QL datasets.Returns one or more datasets used in ES|QL data federation. A concrete-name miss returns
404; a wildcard pattern or list-all request with no match returns200with an empty array.- Parameters:
fn- a function that initializes a builder to create theGetDatasetRequest- See Also:
-
getDataset
Get ES|QL datasets.Returns one or more datasets used in ES|QL data federation. A concrete-name miss returns
404; a wildcard pattern or list-all request with no match returns200with an empty array.- See Also:
-
getQuery
Get a specific running ES|QL query information.Returns an object extended information about a running ES|QL query.
- See Also:
-
getQuery
public final CompletableFuture<GetQueryResponse> getQuery(Function<GetQueryRequest.Builder, ObjectBuilder<GetQueryRequest>> fn) Get a specific running ES|QL query information.Returns an object extended information about a running ES|QL query.
- Parameters:
fn- a function that initializes a builder to create theGetQueryRequest- See Also:
-
getView
Get an ES|QL view.Returns a stored ES|QL view.
- See Also:
-
getView
public final CompletableFuture<GetViewResponse> getView(Function<GetViewRequest.Builder, ObjectBuilder<GetViewRequest>> fn) Get an ES|QL view.Returns a stored ES|QL view.
- Parameters:
fn- a function that initializes a builder to create theGetViewRequest- See Also:
-
getView
Get an ES|QL view.Returns a stored ES|QL view.
- See Also:
-
listQueries
Get running ES|QL queries information.Returns an object containing IDs and other information about the running ES|QL queries.
- See Also:
-
putDataSource
Create or update an ES|QL data source.Creates or replaces a named, type-specific data source configuration for ES|QL data federation. Datasets reference data source configurations to access external data. Names must be lowercase and follow index or alias naming rules.
- See Also:
-
putDataSource
public final CompletableFuture<PutDataSourceResponse> putDataSource(Function<PutDataSourceRequest.Builder, ObjectBuilder<PutDataSourceRequest>> fn) Create or update an ES|QL data source.Creates or replaces a named, type-specific data source configuration for ES|QL data federation. Datasets reference data source configurations to access external data. Names must be lowercase and follow index or alias naming rules.
- Parameters:
fn- a function that initializes a builder to create thePutDataSourceRequest- See Also:
-
putDataset
Create or update an ES|QL dataset.Creates or replaces a dataset that references a data source in ES|QL data federation. Dataset names participate in the index namespace and must follow index or alias naming rules. Returns
404if the referenced data source does not exist.- See Also:
-
putDataset
public final CompletableFuture<PutDatasetResponse> putDataset(Function<PutDatasetRequest.Builder, ObjectBuilder<PutDatasetRequest>> fn) Create or update an ES|QL dataset.Creates or replaces a dataset that references a data source in ES|QL data federation. Dataset names participate in the index namespace and must follow index or alias naming rules. Returns
404if the referenced data source does not exist.- Parameters:
fn- a function that initializes a builder to create thePutDatasetRequest- See Also:
-
putView
Create or update an ES|QL view.- See Also:
-
putView
public final CompletableFuture<PutViewResponse> putView(Function<PutViewRequest.Builder, ObjectBuilder<PutViewRequest>> fn) Create or update an ES|QL view.- Parameters:
fn- a function that initializes a builder to create thePutViewRequest- See Also:
-
query
Run an ES|QL query.Get search results for an ES|QL (Elasticsearch query language) query.
- See Also:
-
query
public final CompletableFuture<BinaryResponse> query(Function<QueryRequest.Builder, ObjectBuilder<QueryRequest>> fn) Run an ES|QL query.Get search results for an ES|QL (Elasticsearch query language) query.
- Parameters:
fn- a function that initializes a builder to create theQueryRequest- See Also:
-
query
public final <T> CompletableFuture<T> query(EsqlAdapter<T> adapter, String query, Object... parameters) Executes an ES|QL request and adapts its result to a target type.- Parameters:
adapter- the ES|QL response adapterquery- the ES|QL queryparameters- values for query parameters, if any
-
query
Executes an ES|QL request and adapts its result to a target type.- Parameters:
adapter- the ES|QL response adapterrequest- the ES|QL request
-
query
public final <T> CompletableFuture<T> query(EsqlAdapter<T> adapter, Function<QueryRequest.Builder, ObjectBuilder<QueryRequest>> fn) Executes an ES|QL request and adapts its result to a target type.- Parameters:
adapter- the ES|QL response adapterfn- the ES|QL request builder
-