All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.elastic.clients.elasticsearch.cat.ElasticsearchCatClient Maven / Gradle / Ivy

/*
 * Licensed to Elasticsearch B.V. under one or more contributor
 * license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright
 * ownership. Elasticsearch B.V. licenses this file to you under
 * the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package co.elastic.clients.elasticsearch.cat;

import co.elastic.clients.ApiClient;
import co.elastic.clients.elasticsearch._types.ElasticsearchException;
import co.elastic.clients.elasticsearch._types.ErrorResponse;
import co.elastic.clients.transport.ElasticsearchTransport;
import co.elastic.clients.transport.Endpoint;
import co.elastic.clients.transport.JsonEndpoint;
import co.elastic.clients.transport.Transport;
import co.elastic.clients.transport.TransportOptions;
import co.elastic.clients.util.ObjectBuilder;
import java.io.IOException;
import java.util.function.Function;
import javax.annotation.Nullable;

//----------------------------------------------------------------
//       THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------------------
//
// This code is generated from the Elasticsearch API specification
// at https://github.com/elastic/elasticsearch-specification
//
// Manual updates to this file will be lost when the code is
// re-generated.
//
// If you find a property that is missing or wrongly typed, please
// open an issue or a PR on the API specification repository.
//
//----------------------------------------------------------------

/**
 * Client for the cat namespace.
 */
public class ElasticsearchCatClient extends ApiClient {

	public ElasticsearchCatClient(ElasticsearchTransport transport) {
		super(transport, null);
	}

	public ElasticsearchCatClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) {
		super(transport, transportOptions);
	}

	@Override
	public ElasticsearchCatClient withTransportOptions(@Nullable TransportOptions transportOptions) {
		return new ElasticsearchCatClient(this.transport, transportOptions);
	}

	// ----- Endpoint: cat.aliases

	/**
	 * Retrieves the cluster’s index aliases, including filter and routing
	 * information. The API does not return data stream aliases. IMPORTANT: cat APIs
	 * are only intended for human consumption using the command line or the Kibana
	 * console. They are not intended for use by applications. For application
	 * consumption, use the aliases API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public AliasesResponse aliases(AliasesRequest request) throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) AliasesRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Retrieves the cluster’s index aliases, including filter and routing
	 * information. The API does not return data stream aliases. IMPORTANT: cat APIs
	 * are only intended for human consumption using the command line or the Kibana
	 * console. They are not intended for use by applications. For application
	 * consumption, use the aliases API.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link AliasesRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final AliasesResponse aliases(Function> fn)
			throws IOException, ElasticsearchException {
		return aliases(fn.apply(new AliasesRequest.Builder()).build());
	}

	/**
	 * Retrieves the cluster’s index aliases, including filter and routing
	 * information. The API does not return data stream aliases. IMPORTANT: cat APIs
	 * are only intended for human consumption using the command line or the Kibana
	 * console. They are not intended for use by applications. For application
	 * consumption, use the aliases API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public AliasesResponse aliases() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new AliasesRequest.Builder().build(), AliasesRequest._ENDPOINT,
				this.transportOptions);
	}

	// ----- Endpoint: cat.allocation

	/**
	 * Provides a snapshot of the number of shards allocated to each data node and
	 * their disk space. IMPORTANT: cat APIs are only intended for human consumption
	 * using the command line or Kibana console. They are not intended for use by
	 * applications.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public AllocationResponse allocation(AllocationRequest request) throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) AllocationRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Provides a snapshot of the number of shards allocated to each data node and
	 * their disk space. IMPORTANT: cat APIs are only intended for human consumption
	 * using the command line or Kibana console. They are not intended for use by
	 * applications.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link AllocationRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final AllocationResponse allocation(Function> fn)
			throws IOException, ElasticsearchException {
		return allocation(fn.apply(new AllocationRequest.Builder()).build());
	}

	/**
	 * Provides a snapshot of the number of shards allocated to each data node and
	 * their disk space. IMPORTANT: cat APIs are only intended for human consumption
	 * using the command line or Kibana console. They are not intended for use by
	 * applications.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public AllocationResponse allocation() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new AllocationRequest.Builder().build(), AllocationRequest._ENDPOINT,
				this.transportOptions);
	}

	// ----- Endpoint: cat.component_templates

	/**
	 * Returns information about component templates in a cluster. Component
	 * templates are building blocks for constructing index templates that specify
	 * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended
	 * for human consumption using the command line or Kibana console. They are not
	 * intended for use by applications. For application consumption, use the get
	 * component template API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public ComponentTemplatesResponse componentTemplates(ComponentTemplatesRequest request)
			throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) ComponentTemplatesRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Returns information about component templates in a cluster. Component
	 * templates are building blocks for constructing index templates that specify
	 * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended
	 * for human consumption using the command line or Kibana console. They are not
	 * intended for use by applications. For application consumption, use the get
	 * component template API.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link ComponentTemplatesRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final ComponentTemplatesResponse componentTemplates(
			Function> fn)
			throws IOException, ElasticsearchException {
		return componentTemplates(fn.apply(new ComponentTemplatesRequest.Builder()).build());
	}

	/**
	 * Returns information about component templates in a cluster. Component
	 * templates are building blocks for constructing index templates that specify
	 * index mappings, settings, and aliases. IMPORTANT: cat APIs are only intended
	 * for human consumption using the command line or Kibana console. They are not
	 * intended for use by applications. For application consumption, use the get
	 * component template API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public ComponentTemplatesResponse componentTemplates() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new ComponentTemplatesRequest.Builder().build(),
				ComponentTemplatesRequest._ENDPOINT, this.transportOptions);
	}

	// ----- Endpoint: cat.count

	/**
	 * Provides quick access to a document count for a data stream, an index, or an
	 * entire cluster. NOTE: The document count only includes live documents, not
	 * deleted documents which have not yet been removed by the merge process.
	 * IMPORTANT: cat APIs are only intended for human consumption using the command
	 * line or Kibana console. They are not intended for use by applications. For
	 * application consumption, use the count API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public CountResponse count(CountRequest request) throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) CountRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Provides quick access to a document count for a data stream, an index, or an
	 * entire cluster. NOTE: The document count only includes live documents, not
	 * deleted documents which have not yet been removed by the merge process.
	 * IMPORTANT: cat APIs are only intended for human consumption using the command
	 * line or Kibana console. They are not intended for use by applications. For
	 * application consumption, use the count API.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link CountRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final CountResponse count(Function> fn)
			throws IOException, ElasticsearchException {
		return count(fn.apply(new CountRequest.Builder()).build());
	}

	/**
	 * Provides quick access to a document count for a data stream, an index, or an
	 * entire cluster. NOTE: The document count only includes live documents, not
	 * deleted documents which have not yet been removed by the merge process.
	 * IMPORTANT: cat APIs are only intended for human consumption using the command
	 * line or Kibana console. They are not intended for use by applications. For
	 * application consumption, use the count API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public CountResponse count() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new CountRequest.Builder().build(), CountRequest._ENDPOINT,
				this.transportOptions);
	}

	// ----- Endpoint: cat.fielddata

	/**
	 * Returns the amount of heap memory currently used by the field data cache on
	 * every data node in the cluster. IMPORTANT: cat APIs are only intended for
	 * human consumption using the command line or Kibana console. They are not
	 * intended for use by applications. For application consumption, use the nodes
	 * stats API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public FielddataResponse fielddata(FielddataRequest request) throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) FielddataRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Returns the amount of heap memory currently used by the field data cache on
	 * every data node in the cluster. IMPORTANT: cat APIs are only intended for
	 * human consumption using the command line or Kibana console. They are not
	 * intended for use by applications. For application consumption, use the nodes
	 * stats API.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link FielddataRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final FielddataResponse fielddata(Function> fn)
			throws IOException, ElasticsearchException {
		return fielddata(fn.apply(new FielddataRequest.Builder()).build());
	}

	/**
	 * Returns the amount of heap memory currently used by the field data cache on
	 * every data node in the cluster. IMPORTANT: cat APIs are only intended for
	 * human consumption using the command line or Kibana console. They are not
	 * intended for use by applications. For application consumption, use the nodes
	 * stats API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public FielddataResponse fielddata() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new FielddataRequest.Builder().build(), FielddataRequest._ENDPOINT,
				this.transportOptions);
	}

	// ----- Endpoint: cat.health

	/**
	 * Returns the health status of a cluster, similar to the cluster health API.
	 * IMPORTANT: cat APIs are only intended for human consumption using the command
	 * line or Kibana console. They are not intended for use by applications. For
	 * application consumption, use the cluster health API. This API is often used
	 * to check malfunctioning clusters. To help you track cluster health alongside
	 * log files and alerting systems, the API returns timestamps in two formats:
	 * HH:MM:SS, which is human-readable but includes no date
	 * information; Unix epoch time, which is machine-sortable and
	 * includes date information. The latter format is useful for cluster recoveries
	 * that take multiple days. You can use the cat health API to verify cluster
	 * health across multiple nodes. You also can use the API to track the recovery
	 * of a large cluster over a longer period of time.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public HealthResponse health(HealthRequest request) throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) HealthRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Returns the health status of a cluster, similar to the cluster health API.
	 * IMPORTANT: cat APIs are only intended for human consumption using the command
	 * line or Kibana console. They are not intended for use by applications. For
	 * application consumption, use the cluster health API. This API is often used
	 * to check malfunctioning clusters. To help you track cluster health alongside
	 * log files and alerting systems, the API returns timestamps in two formats:
	 * HH:MM:SS, which is human-readable but includes no date
	 * information; Unix epoch time, which is machine-sortable and
	 * includes date information. The latter format is useful for cluster recoveries
	 * that take multiple days. You can use the cat health API to verify cluster
	 * health across multiple nodes. You also can use the API to track the recovery
	 * of a large cluster over a longer period of time.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link HealthRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final HealthResponse health(Function> fn)
			throws IOException, ElasticsearchException {
		return health(fn.apply(new HealthRequest.Builder()).build());
	}

	/**
	 * Returns the health status of a cluster, similar to the cluster health API.
	 * IMPORTANT: cat APIs are only intended for human consumption using the command
	 * line or Kibana console. They are not intended for use by applications. For
	 * application consumption, use the cluster health API. This API is often used
	 * to check malfunctioning clusters. To help you track cluster health alongside
	 * log files and alerting systems, the API returns timestamps in two formats:
	 * HH:MM:SS, which is human-readable but includes no date
	 * information; Unix epoch time, which is machine-sortable and
	 * includes date information. The latter format is useful for cluster recoveries
	 * that take multiple days. You can use the cat health API to verify cluster
	 * health across multiple nodes. You also can use the API to track the recovery
	 * of a large cluster over a longer period of time.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public HealthResponse health() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new HealthRequest.Builder().build(), HealthRequest._ENDPOINT,
				this.transportOptions);
	}

	// ----- Endpoint: cat.help

	/**
	 * Returns help for the Cat APIs.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */
	public HelpResponse help() throws IOException, ElasticsearchException {
		return this.transport.performRequest(HelpRequest._INSTANCE, HelpRequest._ENDPOINT, this.transportOptions);
	}

	// ----- Endpoint: cat.indices

	/**
	 * Returns high-level information about indices in a cluster, including backing
	 * indices for data streams. IMPORTANT: cat APIs are only intended for human
	 * consumption using the command line or Kibana console. They are not intended
	 * for use by applications. For application consumption, use the get index API.
	 * Use the cat indices API to get the following information for each index in a
	 * cluster: shard count; document count; deleted document count; primary store
	 * size; total store size of all shards, including shard replicas. These metrics
	 * are retrieved directly from Lucene, which Elasticsearch uses internally to
	 * power indexing and search. As a result, all document counts include hidden
	 * nested documents. To get an accurate count of Elasticsearch documents, use
	 * the cat count or count APIs.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public IndicesResponse indices(IndicesRequest request) throws IOException, ElasticsearchException {
		@SuppressWarnings("unchecked")
		JsonEndpoint endpoint = (JsonEndpoint) IndicesRequest._ENDPOINT;

		return this.transport.performRequest(request, endpoint, this.transportOptions);
	}

	/**
	 * Returns high-level information about indices in a cluster, including backing
	 * indices for data streams. IMPORTANT: cat APIs are only intended for human
	 * consumption using the command line or Kibana console. They are not intended
	 * for use by applications. For application consumption, use the get index API.
	 * Use the cat indices API to get the following information for each index in a
	 * cluster: shard count; document count; deleted document count; primary store
	 * size; total store size of all shards, including shard replicas. These metrics
	 * are retrieved directly from Lucene, which Elasticsearch uses internally to
	 * power indexing and search. As a result, all document counts include hidden
	 * nested documents. To get an accurate count of Elasticsearch documents, use
	 * the cat count or count APIs.
	 * 
	 * @param fn
	 *            a function that initializes a builder to create the
	 *            {@link IndicesRequest}
	 * @see Documentation
	 *      on elastic.co
	 */

	public final IndicesResponse indices(Function> fn)
			throws IOException, ElasticsearchException {
		return indices(fn.apply(new IndicesRequest.Builder()).build());
	}

	/**
	 * Returns high-level information about indices in a cluster, including backing
	 * indices for data streams. IMPORTANT: cat APIs are only intended for human
	 * consumption using the command line or Kibana console. They are not intended
	 * for use by applications. For application consumption, use the get index API.
	 * Use the cat indices API to get the following information for each index in a
	 * cluster: shard count; document count; deleted document count; primary store
	 * size; total store size of all shards, including shard replicas. These metrics
	 * are retrieved directly from Lucene, which Elasticsearch uses internally to
	 * power indexing and search. As a result, all document counts include hidden
	 * nested documents. To get an accurate count of Elasticsearch documents, use
	 * the cat count or count APIs.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */

	public IndicesResponse indices() throws IOException, ElasticsearchException {
		return this.transport.performRequest(new IndicesRequest.Builder().build(), IndicesRequest._ENDPOINT,
				this.transportOptions);
	}

	// ----- Endpoint: cat.master

	/**
	 * Returns information about the master node, including the ID, bound IP
	 * address, and name. IMPORTANT: cat APIs are only intended for human
	 * consumption using the command line or Kibana console. They are not intended
	 * for use by applications. For application consumption, use the nodes info API.
	 * 
	 * @see Documentation
	 *      on elastic.co
	 */
	public MasterResponse master() throws IOException, ElasticsearchException {
		return this.transport.performRequest(MasterRequest._INSTANCE, MasterRequest._ENDPOINT, this.transportOptions);
	}

	// ----- Endpoint: cat.ml_data_frame_analytics

	/**
	 * Returns configuration and usage information about data frame analytics jobs.
	 * 

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get data frame analytics jobs statistics * API. * * @see Documentation * on elastic.co */ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics(MlDataFrameAnalyticsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) MlDataFrameAnalyticsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns configuration and usage information about data frame analytics jobs. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get data frame analytics jobs statistics * API. * * @param fn * a function that initializes a builder to create the * {@link MlDataFrameAnalyticsRequest} * @see Documentation * on elastic.co */ public final MlDataFrameAnalyticsResponse mlDataFrameAnalytics( Function> fn) throws IOException, ElasticsearchException { return mlDataFrameAnalytics(fn.apply(new MlDataFrameAnalyticsRequest.Builder()).build()); } /** * Returns configuration and usage information about data frame analytics jobs. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get data frame analytics jobs statistics * API. * * @see Documentation * on elastic.co */ public MlDataFrameAnalyticsResponse mlDataFrameAnalytics() throws IOException, ElasticsearchException { return this.transport.performRequest(new MlDataFrameAnalyticsRequest.Builder().build(), MlDataFrameAnalyticsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.ml_datafeeds /** * Returns configuration and usage information about datafeeds. This API returns * a maximum of 10,000 datafeeds. If the Elasticsearch security features are * enabled, you must have monitor_ml, monitor, * manage_ml, or manage cluster privileges to use this * API. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get datafeed statistics API. * * @see Documentation * on elastic.co */ public MlDatafeedsResponse mlDatafeeds(MlDatafeedsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) MlDatafeedsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns configuration and usage information about datafeeds. This API returns * a maximum of 10,000 datafeeds. If the Elasticsearch security features are * enabled, you must have monitor_ml, monitor, * manage_ml, or manage cluster privileges to use this * API. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get datafeed statistics API. * * @param fn * a function that initializes a builder to create the * {@link MlDatafeedsRequest} * @see Documentation * on elastic.co */ public final MlDatafeedsResponse mlDatafeeds( Function> fn) throws IOException, ElasticsearchException { return mlDatafeeds(fn.apply(new MlDatafeedsRequest.Builder()).build()); } /** * Returns configuration and usage information about datafeeds. This API returns * a maximum of 10,000 datafeeds. If the Elasticsearch security features are * enabled, you must have monitor_ml, monitor, * manage_ml, or manage cluster privileges to use this * API. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get datafeed statistics API. * * @see Documentation * on elastic.co */ public MlDatafeedsResponse mlDatafeeds() throws IOException, ElasticsearchException { return this.transport.performRequest(new MlDatafeedsRequest.Builder().build(), MlDatafeedsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.ml_jobs /** * Returns configuration and usage information for anomaly detection jobs. This * API returns a maximum of 10,000 jobs. If the Elasticsearch security features * are enabled, you must have monitor_ml, monitor, * manage_ml, or manage cluster privileges to use this * API. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get anomaly detection job statistics API. * * @see Documentation * on elastic.co */ public MlJobsResponse mlJobs(MlJobsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) MlJobsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns configuration and usage information for anomaly detection jobs. This * API returns a maximum of 10,000 jobs. If the Elasticsearch security features * are enabled, you must have monitor_ml, monitor, * manage_ml, or manage cluster privileges to use this * API. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get anomaly detection job statistics API. * * @param fn * a function that initializes a builder to create the * {@link MlJobsRequest} * @see Documentation * on elastic.co */ public final MlJobsResponse mlJobs(Function> fn) throws IOException, ElasticsearchException { return mlJobs(fn.apply(new MlJobsRequest.Builder()).build()); } /** * Returns configuration and usage information for anomaly detection jobs. This * API returns a maximum of 10,000 jobs. If the Elasticsearch security features * are enabled, you must have monitor_ml, monitor, * manage_ml, or manage cluster privileges to use this * API. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get anomaly detection job statistics API. * * @see Documentation * on elastic.co */ public MlJobsResponse mlJobs() throws IOException, ElasticsearchException { return this.transport.performRequest(new MlJobsRequest.Builder().build(), MlJobsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.ml_trained_models /** * Returns configuration and usage information about inference trained models. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get trained models statistics API. * * @see Documentation * on elastic.co */ public MlTrainedModelsResponse mlTrainedModels(MlTrainedModelsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) MlTrainedModelsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns configuration and usage information about inference trained models. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get trained models statistics API. * * @param fn * a function that initializes a builder to create the * {@link MlTrainedModelsRequest} * @see Documentation * on elastic.co */ public final MlTrainedModelsResponse mlTrainedModels( Function> fn) throws IOException, ElasticsearchException { return mlTrainedModels(fn.apply(new MlTrainedModelsRequest.Builder()).build()); } /** * Returns configuration and usage information about inference trained models. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get trained models statistics API. * * @see Documentation * on elastic.co */ public MlTrainedModelsResponse mlTrainedModels() throws IOException, ElasticsearchException { return this.transport.performRequest(new MlTrainedModelsRequest.Builder().build(), MlTrainedModelsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.nodeattrs /** * Returns information about custom node attributes. IMPORTANT: cat APIs are * only intended for human consumption using the command line or Kibana console. * They are not intended for use by applications. For application consumption, * use the nodes info API. * * @see Documentation * on elastic.co */ public NodeattrsResponse nodeattrs() throws IOException, ElasticsearchException { return this.transport.performRequest(NodeattrsRequest._INSTANCE, NodeattrsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.nodes /** * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are * only intended for human consumption using the command line or Kibana console. * They are not intended for use by applications. For application consumption, * use the nodes info API. * * @see Documentation * on elastic.co */ public NodesResponse nodes(NodesRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) NodesRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are * only intended for human consumption using the command line or Kibana console. * They are not intended for use by applications. For application consumption, * use the nodes info API. * * @param fn * a function that initializes a builder to create the * {@link NodesRequest} * @see Documentation * on elastic.co */ public final NodesResponse nodes(Function> fn) throws IOException, ElasticsearchException { return nodes(fn.apply(new NodesRequest.Builder()).build()); } /** * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are * only intended for human consumption using the command line or Kibana console. * They are not intended for use by applications. For application consumption, * use the nodes info API. * * @see Documentation * on elastic.co */ public NodesResponse nodes() throws IOException, ElasticsearchException { return this.transport.performRequest(new NodesRequest.Builder().build(), NodesRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.pending_tasks /** * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat * APIs are only intended for human consumption using the command line or Kibana * console. They are not intended for use by applications. For application * consumption, use the pending cluster tasks API. * * @see Documentation * on elastic.co */ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchException { return this.transport.performRequest(PendingTasksRequest._INSTANCE, PendingTasksRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.plugins /** * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat * APIs are only intended for human consumption using the command line or Kibana * console. They are not intended for use by applications. For application * consumption, use the nodes info API. * * @see Documentation * on elastic.co */ public PluginsResponse plugins() throws IOException, ElasticsearchException { return this.transport.performRequest(PluginsRequest._INSTANCE, PluginsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.recovery /** * Returns information about ongoing and completed shard recoveries. Shard * recovery is the process of initializing a shard copy, such as restoring a * primary shard from a snapshot or syncing a replica shard from a primary * shard. When a shard recovery completes, the recovered shard is available for * search and indexing. For data streams, the API returns information about the * stream’s backing indices. IMPORTANT: cat APIs are only intended for human * consumption using the command line or Kibana console. They are not intended * for use by applications. For application consumption, use the index recovery * API. * * @see Documentation * on elastic.co */ public RecoveryResponse recovery(RecoveryRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) RecoveryRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns information about ongoing and completed shard recoveries. Shard * recovery is the process of initializing a shard copy, such as restoring a * primary shard from a snapshot or syncing a replica shard from a primary * shard. When a shard recovery completes, the recovered shard is available for * search and indexing. For data streams, the API returns information about the * stream’s backing indices. IMPORTANT: cat APIs are only intended for human * consumption using the command line or Kibana console. They are not intended * for use by applications. For application consumption, use the index recovery * API. * * @param fn * a function that initializes a builder to create the * {@link RecoveryRequest} * @see Documentation * on elastic.co */ public final RecoveryResponse recovery(Function> fn) throws IOException, ElasticsearchException { return recovery(fn.apply(new RecoveryRequest.Builder()).build()); } /** * Returns information about ongoing and completed shard recoveries. Shard * recovery is the process of initializing a shard copy, such as restoring a * primary shard from a snapshot or syncing a replica shard from a primary * shard. When a shard recovery completes, the recovered shard is available for * search and indexing. For data streams, the API returns information about the * stream’s backing indices. IMPORTANT: cat APIs are only intended for human * consumption using the command line or Kibana console. They are not intended * for use by applications. For application consumption, use the index recovery * API. * * @see Documentation * on elastic.co */ public RecoveryResponse recovery() throws IOException, ElasticsearchException { return this.transport.performRequest(new RecoveryRequest.Builder().build(), RecoveryRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.repositories /** * Returns the snapshot repositories for a cluster. IMPORTANT: cat APIs are only * intended for human consumption using the command line or Kibana console. They * are not intended for use by applications. For application consumption, use * the get snapshot repository API. * * @see Documentation * on elastic.co */ public RepositoriesResponse repositories() throws IOException, ElasticsearchException { return this.transport.performRequest(RepositoriesRequest._INSTANCE, RepositoriesRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.segments /** * Returns low-level information about the Lucene segments in index shards. For * data streams, the API returns information about the backing indices. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the index segments API. * * @see Documentation * on elastic.co */ public SegmentsResponse segments(SegmentsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) SegmentsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns low-level information about the Lucene segments in index shards. For * data streams, the API returns information about the backing indices. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the index segments API. * * @param fn * a function that initializes a builder to create the * {@link SegmentsRequest} * @see Documentation * on elastic.co */ public final SegmentsResponse segments(Function> fn) throws IOException, ElasticsearchException { return segments(fn.apply(new SegmentsRequest.Builder()).build()); } /** * Returns low-level information about the Lucene segments in index shards. For * data streams, the API returns information about the backing indices. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the index segments API. * * @see Documentation * on elastic.co */ public SegmentsResponse segments() throws IOException, ElasticsearchException { return this.transport.performRequest(new SegmentsRequest.Builder().build(), SegmentsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.shards /** * Returns information about the shards in a cluster. For data streams, the API * returns information about the backing indices. IMPORTANT: cat APIs are only * intended for human consumption using the command line or Kibana console. They * are not intended for use by applications. * * @see Documentation * on elastic.co */ public ShardsResponse shards(ShardsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) ShardsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns information about the shards in a cluster. For data streams, the API * returns information about the backing indices. IMPORTANT: cat APIs are only * intended for human consumption using the command line or Kibana console. They * are not intended for use by applications. * * @param fn * a function that initializes a builder to create the * {@link ShardsRequest} * @see Documentation * on elastic.co */ public final ShardsResponse shards(Function> fn) throws IOException, ElasticsearchException { return shards(fn.apply(new ShardsRequest.Builder()).build()); } /** * Returns information about the shards in a cluster. For data streams, the API * returns information about the backing indices. IMPORTANT: cat APIs are only * intended for human consumption using the command line or Kibana console. They * are not intended for use by applications. * * @see Documentation * on elastic.co */ public ShardsResponse shards() throws IOException, ElasticsearchException { return this.transport.performRequest(new ShardsRequest.Builder().build(), ShardsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.snapshots /** * Returns information about the snapshots stored in one or more repositories. A * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: * cat APIs are only intended for human consumption using the command line or * Kibana console. They are not intended for use by applications. For * application consumption, use the get snapshot API. * * @see Documentation * on elastic.co */ public SnapshotsResponse snapshots(SnapshotsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) SnapshotsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns information about the snapshots stored in one or more repositories. A * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: * cat APIs are only intended for human consumption using the command line or * Kibana console. They are not intended for use by applications. For * application consumption, use the get snapshot API. * * @param fn * a function that initializes a builder to create the * {@link SnapshotsRequest} * @see Documentation * on elastic.co */ public final SnapshotsResponse snapshots(Function> fn) throws IOException, ElasticsearchException { return snapshots(fn.apply(new SnapshotsRequest.Builder()).build()); } /** * Returns information about the snapshots stored in one or more repositories. A * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: * cat APIs are only intended for human consumption using the command line or * Kibana console. They are not intended for use by applications. For * application consumption, use the get snapshot API. * * @see Documentation * on elastic.co */ public SnapshotsResponse snapshots() throws IOException, ElasticsearchException { return this.transport.performRequest(new SnapshotsRequest.Builder().build(), SnapshotsRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.tasks /** * Returns information about tasks currently executing in the cluster. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the task management API. * * @see Documentation * on elastic.co */ public TasksResponse tasks(TasksRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) TasksRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns information about tasks currently executing in the cluster. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the task management API. * * @param fn * a function that initializes a builder to create the * {@link TasksRequest} * @see Documentation * on elastic.co */ public final TasksResponse tasks(Function> fn) throws IOException, ElasticsearchException { return tasks(fn.apply(new TasksRequest.Builder()).build()); } /** * Returns information about tasks currently executing in the cluster. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the task management API. * * @see Documentation * on elastic.co */ public TasksResponse tasks() throws IOException, ElasticsearchException { return this.transport.performRequest(new TasksRequest.Builder().build(), TasksRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.templates /** * Returns information about index templates in a cluster. You can use index * templates to apply index settings and field mappings to new indices at * creation. IMPORTANT: cat APIs are only intended for human consumption using * the command line or Kibana console. They are not intended for use by * applications. For application consumption, use the get index template API. * * @see Documentation * on elastic.co */ public TemplatesResponse templates(TemplatesRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) TemplatesRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns information about index templates in a cluster. You can use index * templates to apply index settings and field mappings to new indices at * creation. IMPORTANT: cat APIs are only intended for human consumption using * the command line or Kibana console. They are not intended for use by * applications. For application consumption, use the get index template API. * * @param fn * a function that initializes a builder to create the * {@link TemplatesRequest} * @see Documentation * on elastic.co */ public final TemplatesResponse templates(Function> fn) throws IOException, ElasticsearchException { return templates(fn.apply(new TemplatesRequest.Builder()).build()); } /** * Returns information about index templates in a cluster. You can use index * templates to apply index settings and field mappings to new indices at * creation. IMPORTANT: cat APIs are only intended for human consumption using * the command line or Kibana console. They are not intended for use by * applications. For application consumption, use the get index template API. * * @see Documentation * on elastic.co */ public TemplatesResponse templates() throws IOException, ElasticsearchException { return this.transport.performRequest(new TemplatesRequest.Builder().build(), TemplatesRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.thread_pool /** * Returns thread pool statistics for each node in a cluster. Returned * information includes all built-in thread pools and custom thread pools. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the nodes info API. * * @see Documentation * on elastic.co */ public ThreadPoolResponse threadPool(ThreadPoolRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) ThreadPoolRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns thread pool statistics for each node in a cluster. Returned * information includes all built-in thread pools and custom thread pools. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the * {@link ThreadPoolRequest} * @see Documentation * on elastic.co */ public final ThreadPoolResponse threadPool(Function> fn) throws IOException, ElasticsearchException { return threadPool(fn.apply(new ThreadPoolRequest.Builder()).build()); } /** * Returns thread pool statistics for each node in a cluster. Returned * information includes all built-in thread pools and custom thread pools. * IMPORTANT: cat APIs are only intended for human consumption using the command * line or Kibana console. They are not intended for use by applications. For * application consumption, use the nodes info API. * * @see Documentation * on elastic.co */ public ThreadPoolResponse threadPool() throws IOException, ElasticsearchException { return this.transport.performRequest(new ThreadPoolRequest.Builder().build(), ThreadPoolRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.transforms /** * Returns configuration and usage information about transforms. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get transform statistics API. * * @see Documentation * on elastic.co */ public TransformsResponse transforms(TransformsRequest request) throws IOException, ElasticsearchException { @SuppressWarnings("unchecked") JsonEndpoint endpoint = (JsonEndpoint) TransformsRequest._ENDPOINT; return this.transport.performRequest(request, endpoint, this.transportOptions); } /** * Returns configuration and usage information about transforms. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get transform statistics API. * * @param fn * a function that initializes a builder to create the * {@link TransformsRequest} * @see Documentation * on elastic.co */ public final TransformsResponse transforms(Function> fn) throws IOException, ElasticsearchException { return transforms(fn.apply(new TransformsRequest.Builder()).build()); } /** * Returns configuration and usage information about transforms. *

* IMPORTANT: cat APIs are only intended for human consumption using the Kibana * console or command line. They are not intended for use by applications. For * application consumption, use the get transform statistics API. * * @see Documentation * on elastic.co */ public TransformsResponse transforms() throws IOException, ElasticsearchException { return this.transport.performRequest(new TransformsRequest.Builder().build(), TransformsRequest._ENDPOINT, this.transportOptions); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy