diff --git a/docs/sphinx/api.rst b/docs/sphinx/api.rst index a6678e085..3dbdc16d2 100644 --- a/docs/sphinx/api.rst +++ b/docs/sphinx/api.rst @@ -15,7 +15,7 @@ consistency and safety**. ``from`` and ``doc_type`` instead of ``type`` as parameter names. -Global options +Global Options -------------- Some parameters are added by the client itself and can be used in all API @@ -110,16 +110,16 @@ Elasticsearch .. py:module:: elasticsearch.client -Indices -------- +Async Search +------------ -.. autoclass:: IndicesClient +.. autoclass:: AsyncSearchClient :members: -Ingest ------- +Cat +--- -.. autoclass:: IngestClient +.. autoclass:: CatClient :members: Cluster @@ -128,16 +128,28 @@ Cluster .. autoclass:: ClusterClient :members: -Nodes ------ +Dangling Indices +---------------- -.. autoclass:: NodesClient +.. autoclass:: DanglingIndicesClient :members: -Cat ---- +Indices +------- -.. autoclass:: CatClient +.. autoclass:: IndicesClient + :members: + +Ingest +------ + +.. autoclass:: IngestClient + :members: + +Nodes +----- + +.. autoclass:: NodesClient :members: Snapshot @@ -151,9 +163,3 @@ Tasks .. autoclass:: TasksClient :members: - -Dangling Indices ----------------- - -.. autoclass:: DanglingIndicesClient - :members: diff --git a/docs/sphinx/xpack.rst b/docs/sphinx/xpack.rst index 087d1304c..865280907 100644 --- a/docs/sphinx/xpack.rst +++ b/docs/sphinx/xpack.rst @@ -8,209 +8,170 @@ reporting, and graph capabilities into one easy-to-install package. While the X-Pack components are designed to work together seamlessly, you can easily enable or disable the features you want to use. +.. py:module:: elasticsearch.client -Info ----- -`X-Pack info `_ -provides general info about the installed X-Pack. +X-Pack Info +----------- -.. py:module:: elasticsearch.client.xpack +`X-Pack Info API `_ +provides general info about the installed X-Pack. .. autoclass:: XPackClient :members: +Cross-Cluster Replication +------------------------- -Graph Explore APIs ------------------- - -`Graph Explore API `_ -enables you to extract and summarize information about the documents and terms in your Elasticsearch index. - -.. py:module:: elasticsearch.client.graph - +`Cross-Cluster Replication APIs `_ +are used to perform cross-cluster replication operations. -.. autoclass:: GraphClient +.. autoclass:: CcrClient :members: -Licensing APIs --------------- +Enrich +------ -`Licensing API `_ -can be used to manage your licences. +`Enrich APIs `_ +can be used to add data from your existing indices to incoming documents during ingest. +.. autoclass:: EnrichClient + :members: -.. py:module:: elasticsearch.client.license +EQL +--- +`EQL APIs `_ +accept EQL to query event-based time series data, such as logs, metrics, and traces. -.. autoclass:: LicenseClient +.. autoclass:: EqlClient :members: -Machine Learning APIs ---------------------- +Graph Explore +------------- -`Machine Learning `_ -can be useful for discovering new patterns about your data. For a more detailed explanation -about X-Pack's machine learning please refer to the official documentation. +`Graph Explore API `_ +enables you to extract and summarize information about the documents and terms in your Elasticsearch index. +.. autoclass:: GraphClient + :members: -.. py:module:: elasticsearch.client.ml +Index Lifecycle Management (ILM) +-------------------------------- +`Index Lifecycle Management APIs `_ +used to set up policies to automatically manage the index lifecycle. -.. autoclass:: MlClient +.. autoclass:: IlmClient :members: -Security APIs -------------- - -`Security API `_ -can be used to help secure your Elasticsearch cluster. Integrating with LDAP and Active Directory. - -.. py:module:: elasticsearch.client.security +Licensing +--------- +`License APIs `_ +can be used to manage your licences. -.. autoclass:: SecurityClient +.. autoclass:: LicenseClient :members: -Watcher APIs -------------- - -`Watcher API `_ -can be used to notify you when certain pre-defined thresholds have happened. +Machine Learning +---------------- -.. py:module:: elasticsearch.client.watcher +`Machine Learning APIs `_ +can be useful for discovering new patterns about your data. For a more detailed explanation +about X-Pack's machine learning please refer to the official documentation. -.. autoclass:: WatcherClient +.. autoclass:: MlClient :members: - -Migration APIs ---------------- +Migration +--------- `Migration API `_ helps simplify upgrading X-Pack indices from one version to another. -.. py:module:: elasticsearch.client.migration - .. autoclass:: MigrationClient :members: +Monitoring +---------- -Enrich APIs ------------- - -`Enrich API `_ -can be used to add data from your existing indices to incoming documents during ingest. - -.. py:module:: elasticsearch.client.enrich - -.. autoclass:: EnrichClient - :members: - -SQL APIs --------- - -The `SQL REST API `_ -accepts SQL in a JSON document, executes it, and returns the results. - -.. py:module:: elasticsearch.client.sql +`Monitoring API `_ +used to collect data from the Elasticsearch nodes, Logstash nodes, Kibana instances, and Beats in your cluster. -.. autoclass:: SqlClient +.. autoclass:: MonitoringClient :members: -Cross-Cluster Replication APIs -------------------------------- +Rollup +------ -`Cross-Cluster Replication API `_ -used to perform cross-cluster replication operations. - -.. py:module:: elasticsearch.client.ccr +`Rollup API `_ +enables searching through rolled-up data using the standard query DSL. -.. autoclass:: CcrClient +.. autoclass:: RollupClient :members: +Searchable Snapshots +-------------------- -Monitoring APIs ----------------- - -`Monitoring API `_ -used to collect data from the Elasticsearch nodes, Logstash nodes, Kibana instances, and Beats in your cluster. - -.. py:module:: elasticsearch.client.monitoring +`Searchable Snapshots API `_ +used to perform searchable snapshots operations. -.. autoclass:: MonitoringClient +.. autoclass:: SearchableSnapshotsClient :members: +Security +-------- -Rollup APIs ------------- - -`Rollup API `_ -enables searching through rolled-up data using the standard query DSL. - -.. py:module:: elasticsearch.client.rollup +`Security API `_ +can be used to help secure your Elasticsearch cluster. Integrating with LDAP and Active Directory. -.. autoclass:: RollupClient +.. autoclass:: SecurityClient :members: - -Snapshot Lifecycle Management APIs +Snapshot Lifecycle Management (SLM) ----------------------------------- `Snapshot Lifecycle Management API `_ can be used to set up policies to automatically take snapshots and control how long they are retained. -.. py:module:: elasticsearch.client.slm - .. autoclass:: SlmClient :members: +SQL +--- -Searchable Snapshots APIs -------------------------- - -`Searchable Snapshots API `_ -used to perform searchable snapshots operations. - -.. py:module:: elasticsearch.client.searchable_snapshots +The `SQL REST API `_ +accepts SQL in a JSON document, executes it, and returns the results. -.. autoclass:: SearchableSnapshotsClient +.. autoclass:: SqlClient :members: +SSL Certificate +--------------- -Index Lifecycle Management APIs --------------------------------- - -`Index Lifecycle Management API `_ -used to set up policies to automatically manage the index lifecycle. - -.. py:module:: elasticsearch.client.ilm +`SSL Certificate API `_ +enables you to retrieve information about the X.509 certificates that are used +to encrypt communications in your Elasticsearch cluster. -.. autoclass:: IlmClient +.. autoclass:: SslClient :members: - -Transform APIs ---------------- +Transform +--------- `Transform API `_ manages transformation operations from grabbing data from source indices, transforms it, and saves it to a destination index. -.. py:module:: elasticsearch.client.transform - .. autoclass:: TransformClient :members: +Watcher +------- -Deprecation APIs ------------------ - -`Deprecation API `_ -used to retrieve information about different cluster, node, and index level settings that use deprecated features -that will be removed or changed in the next major version. - -.. py:module:: elasticsearch.client.deprecation +`Watcher APIs `_ +can be used to notify you when certain pre-defined thresholds have happened. -.. autoclass:: DeprecationClient +.. autoclass:: WatcherClient :members: diff --git a/elasticsearch/_async/client/__init__.py b/elasticsearch/_async/client/__init__.py index 082c90e24..43fc42627 100644 --- a/elasticsearch/_async/client/__init__.py +++ b/elasticsearch/_async/client/__init__.py @@ -30,7 +30,6 @@ from .indices import IndicesClient from .ingest import IngestClient from .nodes import NodesClient -from .remote import RemoteClient from .snapshot import SnapshotClient from .tasks import TasksClient @@ -208,7 +207,6 @@ class as kwargs, or a string in the format of ``host[:port]`` which will be self.indices = IndicesClient(self) self.ingest = IngestClient(self) self.nodes = NodesClient(self) - self.remote = RemoteClient(self) self.snapshot = SnapshotClient(self) self.tasks = TasksClient(self) @@ -1192,6 +1190,11 @@ async def rank_eval(self, body, index=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. :arg index: A comma-separated list of index names to search; use @@ -1313,6 +1316,11 @@ async def scripts_painless_execute(self, body=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The script to execute """ return await self.transport.perform_request( @@ -1636,6 +1644,11 @@ async def get_script_context(self, params=None, headers=None): Returns all script contexts. ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version """ return await self.transport.perform_request( "GET", "/_script_context", params=params, headers=headers @@ -1647,6 +1660,11 @@ async def get_script_languages(self, params=None, headers=None): Returns available script types, languages and contexts ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version """ return await self.transport.perform_request( "GET", "/_script_language", params=params, headers=headers diff --git a/elasticsearch/_async/client/__init__.pyi b/elasticsearch/_async/client/__init__.pyi index 1cdfc22a9..76f02795e 100644 --- a/elasticsearch/_async/client/__init__.pyi +++ b/elasticsearch/_async/client/__init__.pyi @@ -30,7 +30,6 @@ from .dangling_indices import DanglingIndicesClient from .indices import IndicesClient from .ingest import IngestClient from .nodes import NodesClient -from .remote import RemoteClient from .snapshot import SnapshotClient from .tasks import TasksClient @@ -66,7 +65,6 @@ class AsyncElasticsearch(object): indices: IndicesClient ingest: IngestClient nodes: NodesClient - remote: RemoteClient snapshot: SnapshotClient tasks: TasksClient diff --git a/elasticsearch/_async/client/autoscaling.py b/elasticsearch/_async/client/autoscaling.py index fbe7c1aaa..da5307e04 100644 --- a/elasticsearch/_async/client/autoscaling.py +++ b/elasticsearch/_async/client/autoscaling.py @@ -19,18 +19,6 @@ class AutoscalingClient(NamespacedClient): - @query_params() - async def get_autoscaling_decision(self, params=None, headers=None): - """ - Gets the current autoscaling decision based on the configured autoscaling - policy, indicating whether or not autoscaling is needed. - - ``_ - """ - return await self.transport.perform_request( - "GET", "/_autoscaling/decision", params=params, headers=headers - ) - @query_params() async def delete_autoscaling_policy(self, name, params=None, headers=None): """ @@ -38,6 +26,11 @@ async def delete_autoscaling_policy(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: the name of the autoscaling policy """ if name in SKIP_IN_PATH: @@ -57,6 +50,11 @@ async def put_autoscaling_policy(self, name, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: the name of the autoscaling policy :arg body: the specification of the autoscaling policy """ @@ -79,6 +77,11 @@ async def get_autoscaling_policy(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: the name of the autoscaling policy """ if name in SKIP_IN_PATH: @@ -90,3 +93,20 @@ async def get_autoscaling_policy(self, name, params=None, headers=None): params=params, headers=headers, ) + + @query_params() + async def get_autoscaling_capacity(self, params=None, headers=None): + """ + Gets the current autoscaling capacity based on the configured autoscaling + policy. + + ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + """ + return await self.transport.perform_request( + "GET", "/_autoscaling/capacity", params=params, headers=headers + ) diff --git a/elasticsearch/_async/client/autoscaling.pyi b/elasticsearch/_async/client/autoscaling.pyi index 2aa443704..7e4796083 100644 --- a/elasticsearch/_async/client/autoscaling.pyi +++ b/elasticsearch/_async/client/autoscaling.pyi @@ -19,8 +19,9 @@ from typing import Any, MutableMapping, Optional, Union, Collection from .utils import NamespacedClient class AutoscalingClient(NamespacedClient): - async def get_autoscaling_decision( + async def delete_autoscaling_policy( self, + name: Any, *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -33,10 +34,11 @@ class AutoscalingClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... - async def delete_autoscaling_policy( + async def put_autoscaling_policy( self, name: Any, *, + body: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -48,11 +50,10 @@ class AutoscalingClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... - async def put_autoscaling_policy( + async def get_autoscaling_policy( self, name: Any, *, - body: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -64,9 +65,8 @@ class AutoscalingClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... - async def get_autoscaling_policy( + async def get_autoscaling_capacity( self, - name: Any, *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., diff --git a/elasticsearch/_async/client/cluster.py b/elasticsearch/_async/client/cluster.py index 54c6fc69d..9b48a1262 100644 --- a/elasticsearch/_async/client/cluster.py +++ b/elasticsearch/_async/client/cluster.py @@ -268,6 +268,11 @@ async def delete_component_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout @@ -289,6 +294,11 @@ async def get_component_template(self, name=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The comma separated names of the component templates :arg local: Return local information, do not retrieve the state from master node (default: false) @@ -309,6 +319,11 @@ async def put_component_template(self, name, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg body: The template definition :arg create: Whether the index template should only be added if @@ -335,6 +350,11 @@ async def exists_component_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg local: Return local information, do not retrieve the state from master node (default: false) diff --git a/elasticsearch/_async/client/eql.py b/elasticsearch/_async/client/eql.py index 75b3cb41b..a6bae7619 100644 --- a/elasticsearch/_async/client/eql.py +++ b/elasticsearch/_async/client/eql.py @@ -26,6 +26,11 @@ async def search(self, index, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg index: The name of the index to scope the operation :arg body: Eql request body. Use the `query` to limit the query scope. @@ -57,6 +62,11 @@ async def delete(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The async search ID """ if id in SKIP_IN_PATH: @@ -74,6 +84,11 @@ async def get(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The async search ID :arg keep_alive: Update the time interval in which the results (partial or final) for this search will be available Default: 5d diff --git a/elasticsearch/_async/client/indices.py b/elasticsearch/_async/client/indices.py index 725f6c440..bee4107c0 100644 --- a/elasticsearch/_async/client/indices.py +++ b/elasticsearch/_async/client/indices.py @@ -1298,6 +1298,11 @@ async def delete_index_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout @@ -1319,6 +1324,11 @@ async def get_index_template(self, name=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The comma separated names of the index templates :arg flat_settings: Return settings in flat format (default: false) @@ -1338,6 +1348,11 @@ async def put_index_template(self, name, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg body: The template definition :arg cause: User defined reason for creating/updating the index @@ -1365,6 +1380,11 @@ async def exists_index_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg flat_settings: Return settings in flat format (default: false) @@ -1388,6 +1408,11 @@ async def simulate_index_template(self, name, body=None, params=None, headers=No ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the index (it must be a concrete index name) :arg body: New index template definition, which will be included @@ -1431,6 +1456,11 @@ async def simulate_template(self, body=None, name=None, params=None, headers=Non ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: New index template definition to be simulated, if no index template name is specified :arg name: The name of the index template @@ -1456,6 +1486,11 @@ async def resolve_index(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: A comma-separated list of names or wildcard expressions :arg expand_wildcards: Whether wildcard expressions should get diff --git a/elasticsearch/_async/client/ml.py b/elasticsearch/_async/client/ml.py index 04da39843..0eb86e2a1 100644 --- a/elasticsearch/_async/client/ml.py +++ b/elasticsearch/_async/client/ml.py @@ -278,6 +278,11 @@ async def find_file_structure(self, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The contents of the file to be analyzed :arg charset: Optional parameter to specify the character set of the file @@ -1162,6 +1167,11 @@ async def delete_data_frame_analytics(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to delete :arg force: True if the job should be forcefully deleted :arg timeout: Controls the time to wait until a job is deleted. @@ -1184,6 +1194,11 @@ async def evaluate_data_frame(self, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg body: The evaluation definition """ if body in SKIP_IN_PATH: @@ -1204,6 +1219,11 @@ async def get_data_frame_analytics(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no @@ -1232,6 +1252,11 @@ async def get_data_frame_analytics_stats(self, id=None, params=None, headers=Non ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics stats to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no @@ -1259,6 +1284,11 @@ async def put_data_frame_analytics(self, id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to create :arg body: The data frame analytics configuration """ @@ -1283,6 +1313,11 @@ async def start_data_frame_analytics( ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to start :arg body: The start data frame analytics parameters :arg timeout: Controls the time to wait until the task has @@ -1306,6 +1341,11 @@ async def stop_data_frame_analytics(self, id, body=None, params=None, headers=No ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to stop :arg body: The stop data frame analytics parameters :arg allow_no_match: Whether to ignore if a wildcard expression @@ -1335,6 +1375,11 @@ async def delete_trained_model(self, model_id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained model to delete """ if model_id in SKIP_IN_PATH: @@ -1363,6 +1408,11 @@ async def get_trained_models(self, model_id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained models to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no @@ -1402,6 +1452,11 @@ async def get_trained_models_stats(self, model_id=None, params=None, headers=Non ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained models stats to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no @@ -1428,6 +1483,11 @@ async def put_trained_model(self, model_id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained models to store :arg body: The trained model configuration """ @@ -1473,6 +1533,11 @@ async def explain_data_frame_analytics( ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg body: The data frame analytics config to explain :arg id: The ID of the data frame analytics to explain """ @@ -1631,6 +1696,11 @@ async def update_data_frame_analytics(self, id, body, params=None, headers=None) ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to update :arg body: The data frame analytics settings to update """ diff --git a/elasticsearch/_async/client/monitoring.py b/elasticsearch/_async/client/monitoring.py index 86f3f3a9d..24bdf6bda 100644 --- a/elasticsearch/_async/client/monitoring.py +++ b/elasticsearch/_async/client/monitoring.py @@ -26,6 +26,11 @@ async def bulk(self, body, doc_type=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The operation definition and data (action-data pairs), separated by newlines :arg doc_type: Default document type for items which don't diff --git a/elasticsearch/_async/client/remote.py b/elasticsearch/_async/client/remote.py deleted file mode 100644 index 4881dfe60..000000000 --- a/elasticsearch/_async/client/remote.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -from .utils import NamespacedClient, query_params - - -class RemoteClient(NamespacedClient): - @query_params() - def info(self, params=None, headers=None): - """ - ``_ - """ - return self.transport.perform_request( - "GET", "/_remote/info", params=params, headers=headers - ) diff --git a/elasticsearch/_async/client/remote.pyi b/elasticsearch/_async/client/remote.pyi deleted file mode 100644 index 599b9c047..000000000 --- a/elasticsearch/_async/client/remote.pyi +++ /dev/null @@ -1,33 +0,0 @@ -# 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. - -from typing import Any, MutableMapping, Optional, Union, Collection -from .utils import NamespacedClient - -class RemoteClient(NamespacedClient): - async def info( - self, - *, - timeout: Optional[Any] = None, - pretty: Optional[bool] = None, - human: Optional[bool] = None, - error_trace: Optional[bool] = None, - format: Optional[str] = None, - filter_path: Optional[Union[str, Collection[str]]] = None, - params: Optional[MutableMapping[str, Any]] = None, - headers: Optional[MutableMapping[str, str]] = None, - ) -> Any: ... diff --git a/elasticsearch/_async/client/rollup.py b/elasticsearch/_async/client/rollup.py index 72ac8ba4f..4868ec594 100644 --- a/elasticsearch/_async/client/rollup.py +++ b/elasticsearch/_async/client/rollup.py @@ -26,6 +26,11 @@ async def delete_job(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to delete """ if id in SKIP_IN_PATH: @@ -42,6 +47,11 @@ async def get_jobs(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs """ @@ -57,6 +67,11 @@ async def get_rollup_caps(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the index to check rollup capabilities on, or left blank for all jobs """ @@ -72,6 +87,11 @@ async def get_rollup_index_caps(self, index, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: The rollup index or index pattern to obtain rollup capabilities from. """ @@ -89,6 +109,11 @@ async def put_job(self, id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to create :arg body: The job configuration """ @@ -113,6 +138,11 @@ async def rollup_search( ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: The indices or index-pattern(s) (containing rollup or regular data) that should be searched :arg body: The search request body @@ -141,6 +171,11 @@ async def start_job(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to start """ if id in SKIP_IN_PATH: @@ -160,6 +195,11 @@ async def stop_job(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to stop :arg timeout: Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. diff --git a/elasticsearch/_async/client/searchable_snapshots.py b/elasticsearch/_async/client/searchable_snapshots.py index 536fc0f6d..f3297aefa 100644 --- a/elasticsearch/_async/client/searchable_snapshots.py +++ b/elasticsearch/_async/client/searchable_snapshots.py @@ -26,6 +26,11 @@ async def clear_cache(self, index=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: A comma-separated list of index name to limit the operation :arg allow_no_indices: Whether to ignore if a wildcard indices @@ -51,6 +56,11 @@ async def mount(self, repository, snapshot, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg repository: The name of the repository containing the snapshot of the index to mount :arg snapshot: The name of the snapshot of the index to mount @@ -80,6 +90,11 @@ async def stats(self, index=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: A comma-separated list of index names """ return await self.transport.perform_request( diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index b4f47678e..abbb36e88 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -30,7 +30,6 @@ from .indices import IndicesClient from .ingest import IngestClient from .nodes import NodesClient -from .remote import RemoteClient from .snapshot import SnapshotClient from .tasks import TasksClient @@ -208,7 +207,6 @@ class as kwargs, or a string in the format of ``host[:port]`` which will be self.indices = IndicesClient(self) self.ingest = IngestClient(self) self.nodes = NodesClient(self) - self.remote = RemoteClient(self) self.snapshot = SnapshotClient(self) self.tasks = TasksClient(self) @@ -1192,6 +1190,11 @@ def rank_eval(self, body, index=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. :arg index: A comma-separated list of index names to search; use @@ -1311,6 +1314,11 @@ def scripts_painless_execute(self, body=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The script to execute """ return self.transport.perform_request( @@ -1634,6 +1642,11 @@ def get_script_context(self, params=None, headers=None): Returns all script contexts. ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version """ return self.transport.perform_request( "GET", "/_script_context", params=params, headers=headers @@ -1645,6 +1658,11 @@ def get_script_languages(self, params=None, headers=None): Returns available script types, languages and contexts ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version """ return self.transport.perform_request( "GET", "/_script_language", params=params, headers=headers diff --git a/elasticsearch/client/__init__.pyi b/elasticsearch/client/__init__.pyi index 667f64cc3..df61b9f76 100644 --- a/elasticsearch/client/__init__.pyi +++ b/elasticsearch/client/__init__.pyi @@ -30,7 +30,6 @@ from .dangling_indices import DanglingIndicesClient from .indices import IndicesClient from .ingest import IngestClient from .nodes import NodesClient -from .remote import RemoteClient from .snapshot import SnapshotClient from .tasks import TasksClient @@ -66,7 +65,6 @@ class Elasticsearch(object): indices: IndicesClient ingest: IngestClient nodes: NodesClient - remote: RemoteClient snapshot: SnapshotClient tasks: TasksClient diff --git a/elasticsearch/client/autoscaling.py b/elasticsearch/client/autoscaling.py index 7d1c89baa..38c129c42 100644 --- a/elasticsearch/client/autoscaling.py +++ b/elasticsearch/client/autoscaling.py @@ -19,18 +19,6 @@ class AutoscalingClient(NamespacedClient): - @query_params() - def get_autoscaling_decision(self, params=None, headers=None): - """ - Gets the current autoscaling decision based on the configured autoscaling - policy, indicating whether or not autoscaling is needed. - - ``_ - """ - return self.transport.perform_request( - "GET", "/_autoscaling/decision", params=params, headers=headers - ) - @query_params() def delete_autoscaling_policy(self, name, params=None, headers=None): """ @@ -38,6 +26,11 @@ def delete_autoscaling_policy(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: the name of the autoscaling policy """ if name in SKIP_IN_PATH: @@ -57,6 +50,11 @@ def put_autoscaling_policy(self, name, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: the name of the autoscaling policy :arg body: the specification of the autoscaling policy """ @@ -79,6 +77,11 @@ def get_autoscaling_policy(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: the name of the autoscaling policy """ if name in SKIP_IN_PATH: @@ -90,3 +93,20 @@ def get_autoscaling_policy(self, name, params=None, headers=None): params=params, headers=headers, ) + + @query_params() + def get_autoscaling_capacity(self, params=None, headers=None): + """ + Gets the current autoscaling capacity based on the configured autoscaling + policy. + + ``_ + + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + """ + return self.transport.perform_request( + "GET", "/_autoscaling/capacity", params=params, headers=headers + ) diff --git a/elasticsearch/client/autoscaling.pyi b/elasticsearch/client/autoscaling.pyi index 881f5af89..e06e52b37 100644 --- a/elasticsearch/client/autoscaling.pyi +++ b/elasticsearch/client/autoscaling.pyi @@ -19,8 +19,9 @@ from typing import Any, MutableMapping, Optional, Union, Collection from .utils import NamespacedClient class AutoscalingClient(NamespacedClient): - def get_autoscaling_decision( + def delete_autoscaling_policy( self, + name: Any, *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., @@ -33,10 +34,11 @@ class AutoscalingClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... - def delete_autoscaling_policy( + def put_autoscaling_policy( self, name: Any, *, + body: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -48,11 +50,10 @@ class AutoscalingClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... - def put_autoscaling_policy( + def get_autoscaling_policy( self, name: Any, *, - body: Any, pretty: Optional[bool] = ..., human: Optional[bool] = ..., error_trace: Optional[bool] = ..., @@ -64,9 +65,8 @@ class AutoscalingClient(NamespacedClient): params: Optional[MutableMapping[str, Any]] = ..., headers: Optional[MutableMapping[str, str]] = ... ) -> Any: ... - def get_autoscaling_policy( + def get_autoscaling_capacity( self, - name: Any, *, pretty: Optional[bool] = ..., human: Optional[bool] = ..., diff --git a/elasticsearch/client/cluster.py b/elasticsearch/client/cluster.py index 1fecba4e9..eb705b2bf 100644 --- a/elasticsearch/client/cluster.py +++ b/elasticsearch/client/cluster.py @@ -268,6 +268,11 @@ def delete_component_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout @@ -289,6 +294,11 @@ def get_component_template(self, name=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The comma separated names of the component templates :arg local: Return local information, do not retrieve the state from master node (default: false) @@ -309,6 +319,11 @@ def put_component_template(self, name, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg body: The template definition :arg create: Whether the index template should only be added if @@ -335,6 +350,11 @@ def exists_component_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg local: Return local information, do not retrieve the state from master node (default: false) diff --git a/elasticsearch/client/eql.py b/elasticsearch/client/eql.py index 37c2dca3c..0a0294f4b 100644 --- a/elasticsearch/client/eql.py +++ b/elasticsearch/client/eql.py @@ -26,6 +26,11 @@ def search(self, index, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg index: The name of the index to scope the operation :arg body: Eql request body. Use the `query` to limit the query scope. @@ -57,6 +62,11 @@ def delete(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The async search ID """ if id in SKIP_IN_PATH: @@ -74,6 +84,11 @@ def get(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The async search ID :arg keep_alive: Update the time interval in which the results (partial or final) for this search will be available Default: 5d diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 4720d51bd..71ada0fad 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -1296,6 +1296,11 @@ def delete_index_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg master_timeout: Specify timeout for connection to master :arg timeout: Explicit operation timeout @@ -1317,6 +1322,11 @@ def get_index_template(self, name=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The comma separated names of the index templates :arg flat_settings: Return settings in flat format (default: false) @@ -1336,6 +1346,11 @@ def put_index_template(self, name, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg body: The template definition :arg cause: User defined reason for creating/updating the index @@ -1363,6 +1378,11 @@ def exists_index_template(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the template :arg flat_settings: Return settings in flat format (default: false) @@ -1386,6 +1406,11 @@ def simulate_index_template(self, name, body=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: The name of the index (it must be a concrete index name) :arg body: New index template definition, which will be included @@ -1429,6 +1454,11 @@ def simulate_template(self, body=None, name=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: New index template definition to be simulated, if no index template name is specified :arg name: The name of the index template @@ -1454,6 +1484,11 @@ def resolve_index(self, name, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg name: A comma-separated list of names or wildcard expressions :arg expand_wildcards: Whether wildcard expressions should get diff --git a/elasticsearch/client/ml.py b/elasticsearch/client/ml.py index 372353e46..316a2663a 100644 --- a/elasticsearch/client/ml.py +++ b/elasticsearch/client/ml.py @@ -270,6 +270,11 @@ def find_file_structure(self, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The contents of the file to be analyzed :arg charset: Optional parameter to specify the character set of the file @@ -1150,6 +1155,11 @@ def delete_data_frame_analytics(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to delete :arg force: True if the job should be forcefully deleted :arg timeout: Controls the time to wait until a job is deleted. @@ -1172,6 +1182,11 @@ def evaluate_data_frame(self, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg body: The evaluation definition """ if body in SKIP_IN_PATH: @@ -1192,6 +1207,11 @@ def get_data_frame_analytics(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no @@ -1220,6 +1240,11 @@ def get_data_frame_analytics_stats(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics stats to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no @@ -1247,6 +1272,11 @@ def put_data_frame_analytics(self, id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to create :arg body: The data frame analytics configuration """ @@ -1269,6 +1299,11 @@ def start_data_frame_analytics(self, id, body=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to start :arg body: The start data frame analytics parameters :arg timeout: Controls the time to wait until the task has @@ -1292,6 +1327,11 @@ def stop_data_frame_analytics(self, id, body=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to stop :arg body: The stop data frame analytics parameters :arg allow_no_match: Whether to ignore if a wildcard expression @@ -1321,6 +1361,11 @@ def delete_trained_model(self, model_id, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained model to delete """ if model_id in SKIP_IN_PATH: @@ -1349,6 +1394,11 @@ def get_trained_models(self, model_id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained models to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no @@ -1388,6 +1438,11 @@ def get_trained_models_stats(self, model_id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained models stats to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no @@ -1414,6 +1469,11 @@ def put_trained_model(self, model_id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg model_id: The ID of the trained models to store :arg body: The trained model configuration """ @@ -1459,6 +1519,11 @@ def explain_data_frame_analytics( ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg body: The data frame analytics config to explain :arg id: The ID of the data frame analytics to explain """ @@ -1617,6 +1682,11 @@ def update_data_frame_analytics(self, id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **beta** so may include breaking changes + or be removed in a future version + :arg id: The ID of the data frame analytics to update :arg body: The data frame analytics settings to update """ diff --git a/elasticsearch/client/monitoring.py b/elasticsearch/client/monitoring.py index 455039cc9..931b1882a 100644 --- a/elasticsearch/client/monitoring.py +++ b/elasticsearch/client/monitoring.py @@ -26,6 +26,11 @@ def bulk(self, body, doc_type=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg body: The operation definition and data (action-data pairs), separated by newlines :arg doc_type: Default document type for items which don't diff --git a/elasticsearch/client/remote.py b/elasticsearch/client/remote.py deleted file mode 100644 index 4881dfe60..000000000 --- a/elasticsearch/client/remote.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -from .utils import NamespacedClient, query_params - - -class RemoteClient(NamespacedClient): - @query_params() - def info(self, params=None, headers=None): - """ - ``_ - """ - return self.transport.perform_request( - "GET", "/_remote/info", params=params, headers=headers - ) diff --git a/elasticsearch/client/remote.pyi b/elasticsearch/client/remote.pyi deleted file mode 100644 index a624d84e3..000000000 --- a/elasticsearch/client/remote.pyi +++ /dev/null @@ -1,33 +0,0 @@ -# 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. - -from typing import Any, MutableMapping, Optional, Union, Collection -from .utils import NamespacedClient - -class RemoteClient(NamespacedClient): - def info( - self, - *, - timeout: Optional[Any] = None, - pretty: Optional[bool] = None, - human: Optional[bool] = None, - error_trace: Optional[bool] = None, - format: Optional[str] = None, - filter_path: Optional[Union[str, Collection[str]]] = None, - params: Optional[MutableMapping[str, Any]] = None, - headers: Optional[MutableMapping[str, str]] = None, - ) -> Any: ... diff --git a/elasticsearch/client/rollup.py b/elasticsearch/client/rollup.py index 33865f707..baf7abebc 100644 --- a/elasticsearch/client/rollup.py +++ b/elasticsearch/client/rollup.py @@ -26,6 +26,11 @@ def delete_job(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to delete """ if id in SKIP_IN_PATH: @@ -42,6 +47,11 @@ def get_jobs(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs """ @@ -57,6 +67,11 @@ def get_rollup_caps(self, id=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the index to check rollup capabilities on, or left blank for all jobs """ @@ -72,6 +87,11 @@ def get_rollup_index_caps(self, index, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: The rollup index or index pattern to obtain rollup capabilities from. """ @@ -89,6 +109,11 @@ def put_job(self, id, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to create :arg body: The job configuration """ @@ -111,6 +136,11 @@ def rollup_search(self, index, body, doc_type=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: The indices or index-pattern(s) (containing rollup or regular data) that should be searched :arg body: The search request body @@ -139,6 +169,11 @@ def start_job(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to start """ if id in SKIP_IN_PATH: @@ -158,6 +193,11 @@ def stop_job(self, id, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg id: The ID of the job to stop :arg timeout: Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. diff --git a/elasticsearch/client/searchable_snapshots.py b/elasticsearch/client/searchable_snapshots.py index 4957a807b..6faa85f47 100644 --- a/elasticsearch/client/searchable_snapshots.py +++ b/elasticsearch/client/searchable_snapshots.py @@ -26,6 +26,11 @@ def clear_cache(self, index=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: A comma-separated list of index name to limit the operation :arg allow_no_indices: Whether to ignore if a wildcard indices @@ -51,6 +56,11 @@ def mount(self, repository, snapshot, body, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg repository: The name of the repository containing the snapshot of the index to mount :arg snapshot: The name of the snapshot of the index to mount @@ -80,6 +90,11 @@ def stats(self, index=None, params=None, headers=None): ``_ + .. warning:: + + This API is **experimental** so may include breaking changes + or be removed in a future version + :arg index: A comma-separated list of index names """ return self.transport.perform_request( diff --git a/utils/generate_api.py b/utils/generate_api.py index 929753208..888b5526c 100644 --- a/utils/generate_api.py +++ b/utils/generate_api.py @@ -169,6 +169,8 @@ def __init__(self, namespace, name, definition, is_pyi=False): self._def = definition self.description = "" self.doc_url = "" + self.stability = self._def.get("stability", "stable") + if isinstance(definition["documentation"], str): self.doc_url = definition["documentation"] else: diff --git a/utils/templates/base b/utils/templates/base index a2bfaab09..b09f85543 100644 --- a/utils/templates/base +++ b/utils/templates/base @@ -9,6 +9,13 @@ `<{{ api.doc_url }}>`_ {% endif %} + {% if api.stability != "stable" %} + + .. warning:: + + This API is **{{ api.stability }}** so may include breaking changes + or be removed in a future version + {% endif %} {% if api.params|list|length %} {% for p, info in api.params %}