elasticsearch 9.1.1__py3-none-any.whl → 9.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +69 -65
- elasticsearch/_async/client/async_search.py +3 -3
- elasticsearch/_async/client/autoscaling.py +8 -4
- elasticsearch/_async/client/cat.py +521 -27
- elasticsearch/_async/client/ccr.py +10 -10
- elasticsearch/_async/client/cluster.py +34 -33
- elasticsearch/_async/client/connector.py +45 -44
- elasticsearch/_async/client/dangling_indices.py +8 -12
- elasticsearch/_async/client/enrich.py +10 -10
- elasticsearch/_async/client/eql.py +10 -10
- elasticsearch/_async/client/esql.py +16 -16
- elasticsearch/_async/client/features.py +6 -6
- elasticsearch/_async/client/fleet.py +8 -12
- elasticsearch/_async/client/graph.py +3 -7
- elasticsearch/_async/client/ilm.py +20 -28
- elasticsearch/_async/client/indices.py +163 -169
- elasticsearch/_async/client/inference.py +41 -127
- elasticsearch/_async/client/ingest.py +9 -9
- elasticsearch/_async/client/license.py +5 -7
- elasticsearch/_async/client/logstash.py +7 -5
- elasticsearch/_async/client/migration.py +6 -6
- elasticsearch/_async/client/ml.py +125 -85
- elasticsearch/_async/client/monitoring.py +4 -3
- elasticsearch/_async/client/nodes.py +17 -17
- elasticsearch/_async/client/query_rules.py +16 -16
- elasticsearch/_async/client/rollup.py +21 -21
- elasticsearch/_async/client/search_application.py +19 -19
- elasticsearch/_async/client/searchable_snapshots.py +10 -10
- elasticsearch/_async/client/security.py +8 -7
- elasticsearch/_async/client/shutdown.py +14 -19
- elasticsearch/_async/client/simulate.py +4 -4
- elasticsearch/_async/client/slm.py +18 -22
- elasticsearch/_async/client/snapshot.py +20 -20
- elasticsearch/_async/client/sql.py +10 -10
- elasticsearch/_async/client/streams.py +186 -0
- elasticsearch/_async/client/synonyms.py +10 -10
- elasticsearch/_async/client/tasks.py +8 -8
- elasticsearch/_async/client/text_structure.py +13 -9
- elasticsearch/_async/client/transform.py +51 -12
- elasticsearch/_async/client/utils.py +4 -2
- elasticsearch/_async/client/watcher.py +27 -31
- elasticsearch/_async/client/xpack.py +6 -5
- elasticsearch/_async/helpers.py +58 -9
- elasticsearch/_sync/client/__init__.py +71 -65
- elasticsearch/_sync/client/async_search.py +3 -3
- elasticsearch/_sync/client/autoscaling.py +8 -4
- elasticsearch/_sync/client/cat.py +521 -27
- elasticsearch/_sync/client/ccr.py +10 -10
- elasticsearch/_sync/client/cluster.py +34 -33
- elasticsearch/_sync/client/connector.py +45 -44
- elasticsearch/_sync/client/dangling_indices.py +8 -12
- elasticsearch/_sync/client/enrich.py +10 -10
- elasticsearch/_sync/client/eql.py +10 -10
- elasticsearch/_sync/client/esql.py +16 -16
- elasticsearch/_sync/client/features.py +6 -6
- elasticsearch/_sync/client/fleet.py +8 -12
- elasticsearch/_sync/client/graph.py +3 -7
- elasticsearch/_sync/client/ilm.py +20 -28
- elasticsearch/_sync/client/indices.py +163 -169
- elasticsearch/_sync/client/inference.py +41 -127
- elasticsearch/_sync/client/ingest.py +9 -9
- elasticsearch/_sync/client/license.py +5 -7
- elasticsearch/_sync/client/logstash.py +7 -5
- elasticsearch/_sync/client/migration.py +6 -6
- elasticsearch/_sync/client/ml.py +125 -85
- elasticsearch/_sync/client/monitoring.py +4 -3
- elasticsearch/_sync/client/nodes.py +17 -17
- elasticsearch/_sync/client/query_rules.py +16 -16
- elasticsearch/_sync/client/rollup.py +21 -21
- elasticsearch/_sync/client/search_application.py +19 -19
- elasticsearch/_sync/client/searchable_snapshots.py +10 -10
- elasticsearch/_sync/client/security.py +8 -7
- elasticsearch/_sync/client/shutdown.py +14 -19
- elasticsearch/_sync/client/simulate.py +4 -4
- elasticsearch/_sync/client/slm.py +18 -22
- elasticsearch/_sync/client/snapshot.py +20 -20
- elasticsearch/_sync/client/sql.py +10 -10
- elasticsearch/_sync/client/streams.py +186 -0
- elasticsearch/_sync/client/synonyms.py +10 -10
- elasticsearch/_sync/client/tasks.py +8 -8
- elasticsearch/_sync/client/text_structure.py +13 -9
- elasticsearch/_sync/client/transform.py +51 -12
- elasticsearch/_sync/client/utils.py +16 -2
- elasticsearch/_sync/client/watcher.py +27 -31
- elasticsearch/_sync/client/xpack.py +6 -5
- elasticsearch/_version.py +2 -1
- elasticsearch/client.py +2 -0
- elasticsearch/compat.py +43 -1
- elasticsearch/dsl/__init__.py +28 -0
- elasticsearch/dsl/_async/document.py +4 -5
- elasticsearch/dsl/_async/index.py +1 -1
- elasticsearch/dsl/_async/search.py +2 -3
- elasticsearch/dsl/_sync/document.py +4 -5
- elasticsearch/dsl/_sync/index.py +1 -1
- elasticsearch/dsl/_sync/search.py +2 -3
- elasticsearch/dsl/aggs.py +100 -3
- elasticsearch/dsl/async_connections.py +1 -2
- elasticsearch/dsl/connections.py +1 -2
- elasticsearch/dsl/document_base.py +15 -0
- elasticsearch/dsl/field.py +12 -1
- elasticsearch/dsl/query.py +23 -0
- elasticsearch/dsl/response/__init__.py +3 -0
- elasticsearch/dsl/serializer.py +1 -2
- elasticsearch/dsl/types.py +185 -5
- elasticsearch/dsl/utils.py +1 -2
- elasticsearch/esql/esql.py +1 -1
- elasticsearch/esql/functions.py +2 -2
- elasticsearch/helpers/__init__.py +10 -1
- elasticsearch/helpers/actions.py +106 -33
- elasticsearch/helpers/vectorstore/__init__.py +7 -7
- elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
- elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
- {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/METADATA +2 -2
- elasticsearch-9.1.3.dist-info/RECORD +165 -0
- {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/WHEEL +1 -1
- elasticsearch-9.1.1.dist-info/RECORD +0 -163
- {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.1.1.dist-info → elasticsearch-9.1.3.dist-info}/licenses/NOTICE +0 -0
|
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -40,7 +40,7 @@ class SimulateClient(NamespacedClient):
|
|
|
40
40
|
"pipeline_substitutions",
|
|
41
41
|
),
|
|
42
42
|
)
|
|
43
|
-
@
|
|
43
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
44
44
|
async def ingest(
|
|
45
45
|
self,
|
|
46
46
|
*,
|
|
@@ -66,8 +66,8 @@ class SimulateClient(NamespacedClient):
|
|
|
66
66
|
"""
|
|
67
67
|
.. raw:: html
|
|
68
68
|
|
|
69
|
-
<p>Simulate data ingestion
|
|
70
|
-
Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.</p>
|
|
69
|
+
<p>Simulate data ingestion.</p>
|
|
70
|
+
<p>Run ingest pipelines against a set of provided documents, optionally with substitute pipeline definitions, to simulate ingesting data into an index.</p>
|
|
71
71
|
<p>This API is meant to be used for troubleshooting or pipeline development, as it does not actually index any data into Elasticsearch.</p>
|
|
72
72
|
<p>The API runs the default and final pipeline for that index against a set of documents provided in the body of the request.
|
|
73
73
|
If a pipeline contains a reroute processor, it follows that reroute processor to the new index, running that index's pipelines as well the same way that a non-simulated ingest would.
|
|
@@ -40,8 +40,8 @@ class SlmClient(NamespacedClient):
|
|
|
40
40
|
"""
|
|
41
41
|
.. raw:: html
|
|
42
42
|
|
|
43
|
-
<p>Delete a policy
|
|
44
|
-
Delete a snapshot lifecycle policy definition.
|
|
43
|
+
<p>Delete a policy.</p>
|
|
44
|
+
<p>Delete a snapshot lifecycle policy definition.
|
|
45
45
|
This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.</p>
|
|
46
46
|
|
|
47
47
|
|
|
@@ -96,8 +96,8 @@ class SlmClient(NamespacedClient):
|
|
|
96
96
|
"""
|
|
97
97
|
.. raw:: html
|
|
98
98
|
|
|
99
|
-
<p>Run a policy
|
|
100
|
-
Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.
|
|
99
|
+
<p>Run a policy.</p>
|
|
100
|
+
<p>Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.
|
|
101
101
|
The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.</p>
|
|
102
102
|
|
|
103
103
|
|
|
@@ -151,8 +151,8 @@ class SlmClient(NamespacedClient):
|
|
|
151
151
|
"""
|
|
152
152
|
.. raw:: html
|
|
153
153
|
|
|
154
|
-
<p>Run a retention policy
|
|
155
|
-
Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.
|
|
154
|
+
<p>Run a retention policy.</p>
|
|
155
|
+
<p>Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.
|
|
156
156
|
The retention policy is normally applied according to its schedule.</p>
|
|
157
157
|
|
|
158
158
|
|
|
@@ -204,13 +204,13 @@ class SlmClient(NamespacedClient):
|
|
|
204
204
|
"""
|
|
205
205
|
.. raw:: html
|
|
206
206
|
|
|
207
|
-
<p>Get policy information
|
|
208
|
-
Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.</p>
|
|
207
|
+
<p>Get policy information.</p>
|
|
208
|
+
<p>Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.</p>
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle>`_
|
|
212
212
|
|
|
213
|
-
:param policy_id:
|
|
213
|
+
:param policy_id: A comma-separated list of snapshot lifecycle policy identifiers.
|
|
214
214
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
215
215
|
If no response is received before the timeout expires, the request fails
|
|
216
216
|
and returns an error.
|
|
@@ -261,8 +261,8 @@ class SlmClient(NamespacedClient):
|
|
|
261
261
|
"""
|
|
262
262
|
.. raw:: html
|
|
263
263
|
|
|
264
|
-
<p>Get snapshot lifecycle management statistics
|
|
265
|
-
Get global and policy-level statistics about actions taken by snapshot lifecycle management.</p>
|
|
264
|
+
<p>Get snapshot lifecycle management statistics.</p>
|
|
265
|
+
<p>Get global and policy-level statistics about actions taken by snapshot lifecycle management.</p>
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats>`_
|
|
@@ -373,8 +373,8 @@ class SlmClient(NamespacedClient):
|
|
|
373
373
|
"""
|
|
374
374
|
.. raw:: html
|
|
375
375
|
|
|
376
|
-
<p>Create or update a policy
|
|
377
|
-
Create or update a snapshot lifecycle policy.
|
|
376
|
+
<p>Create or update a policy.</p>
|
|
377
|
+
<p>Create or update a snapshot lifecycle policy.
|
|
378
378
|
If the policy already exists, this request increments the policy version.
|
|
379
379
|
Only the latest version of a policy is stored.</p>
|
|
380
380
|
|
|
@@ -431,11 +431,7 @@ class SlmClient(NamespacedClient):
|
|
|
431
431
|
__body["retention"] = retention
|
|
432
432
|
if schedule is not None:
|
|
433
433
|
__body["schedule"] = schedule
|
|
434
|
-
|
|
435
|
-
__body = None # type: ignore[assignment]
|
|
436
|
-
__headers = {"accept": "application/json"}
|
|
437
|
-
if __body is not None:
|
|
438
|
-
__headers["content-type"] = "application/json"
|
|
434
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
439
435
|
return await self.perform_request( # type: ignore[return-value]
|
|
440
436
|
"PUT",
|
|
441
437
|
__path,
|
|
@@ -460,8 +456,8 @@ class SlmClient(NamespacedClient):
|
|
|
460
456
|
"""
|
|
461
457
|
.. raw:: html
|
|
462
458
|
|
|
463
|
-
<p>Start snapshot lifecycle management
|
|
464
|
-
Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.
|
|
459
|
+
<p>Start snapshot lifecycle management.</p>
|
|
460
|
+
<p>Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.
|
|
465
461
|
Manually starting SLM is necessary only if it has been stopped using the stop SLM API.</p>
|
|
466
462
|
|
|
467
463
|
|
|
@@ -514,8 +510,8 @@ class SlmClient(NamespacedClient):
|
|
|
514
510
|
"""
|
|
515
511
|
.. raw:: html
|
|
516
512
|
|
|
517
|
-
<p>Stop snapshot lifecycle management
|
|
518
|
-
Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
|
|
513
|
+
<p>Stop snapshot lifecycle management.</p>
|
|
514
|
+
<p>Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
|
|
519
515
|
This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.
|
|
520
516
|
Stopping SLM does not stop any snapshots that are in progress.
|
|
521
517
|
You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.</p>
|
|
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,8 +46,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
46
46
|
"""
|
|
47
47
|
.. raw:: html
|
|
48
48
|
|
|
49
|
-
<p>Clean up the snapshot repository
|
|
50
|
-
Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
|
|
49
|
+
<p>Clean up the snapshot repository.</p>
|
|
50
|
+
<p>Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository>`_
|
|
@@ -110,8 +110,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
110
110
|
"""
|
|
111
111
|
.. raw:: html
|
|
112
112
|
|
|
113
|
-
<p>Clone a snapshot
|
|
114
|
-
Clone part of all of a snapshot into another snapshot in the same repository.</p>
|
|
113
|
+
<p>Clone a snapshot.</p>
|
|
114
|
+
<p>Clone part of all of a snapshot into another snapshot in the same repository.</p>
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone>`_
|
|
@@ -207,8 +207,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
207
207
|
"""
|
|
208
208
|
.. raw:: html
|
|
209
209
|
|
|
210
|
-
<p>Create a snapshot
|
|
211
|
-
Take a snapshot of a cluster or of data streams and indices.</p>
|
|
210
|
+
<p>Create a snapshot.</p>
|
|
211
|
+
<p>Take a snapshot of a cluster or of data streams and indices.</p>
|
|
212
212
|
|
|
213
213
|
|
|
214
214
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create>`_
|
|
@@ -330,8 +330,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
330
330
|
"""
|
|
331
331
|
.. raw:: html
|
|
332
332
|
|
|
333
|
-
<p>Create or update a snapshot repository
|
|
334
|
-
IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
|
|
333
|
+
<p>Create or update a snapshot repository.</p>
|
|
334
|
+
<p>IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
|
|
335
335
|
To register a snapshot repository, the cluster's global metadata must be writeable.
|
|
336
336
|
Ensure there are no cluster blocks (for example, <code>cluster.blocks.read_only</code> and <code>clsuter.blocks.read_only_allow_delete</code> settings) that prevent write access.</p>
|
|
337
337
|
<p>Several options for this API can be specified using a query parameter or a request body parameter.
|
|
@@ -470,8 +470,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
470
470
|
"""
|
|
471
471
|
.. raw:: html
|
|
472
472
|
|
|
473
|
-
<p>Delete snapshot repositories
|
|
474
|
-
When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.
|
|
473
|
+
<p>Delete snapshot repositories.</p>
|
|
474
|
+
<p>When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.
|
|
475
475
|
The snapshots themselves are left untouched and in place.</p>
|
|
476
476
|
|
|
477
477
|
|
|
@@ -950,7 +950,7 @@ class SnapshotClient(NamespacedClient):
|
|
|
950
950
|
)
|
|
951
951
|
|
|
952
952
|
@_rewrite_parameters()
|
|
953
|
-
@
|
|
953
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
954
954
|
async def repository_verify_integrity(
|
|
955
955
|
self,
|
|
956
956
|
*,
|
|
@@ -971,8 +971,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
971
971
|
"""
|
|
972
972
|
.. raw:: html
|
|
973
973
|
|
|
974
|
-
<p>Verify the repository integrity
|
|
975
|
-
Verify the integrity of the contents of a snapshot repository.</p>
|
|
974
|
+
<p>Verify the repository integrity.</p>
|
|
975
|
+
<p>Verify the integrity of the contents of a snapshot repository.</p>
|
|
976
976
|
<p>This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.</p>
|
|
977
977
|
<p>If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its <code>read_only</code> option to <code>true</code>, and use this API to verify its integrity.
|
|
978
978
|
Until you do so:</p>
|
|
@@ -1110,8 +1110,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
1110
1110
|
"""
|
|
1111
1111
|
.. raw:: html
|
|
1112
1112
|
|
|
1113
|
-
<p>Restore a snapshot
|
|
1114
|
-
Restore a snapshot of a cluster or data streams and indices.</p>
|
|
1113
|
+
<p>Restore a snapshot.</p>
|
|
1114
|
+
<p>Restore a snapshot of a cluster or data streams and indices.</p>
|
|
1115
1115
|
<p>You can restore a snapshot only to a running cluster with an elected master node.
|
|
1116
1116
|
The snapshot repository must be registered and available to the cluster.
|
|
1117
1117
|
The snapshot and cluster versions must be compatible.</p>
|
|
@@ -1259,8 +1259,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
1259
1259
|
"""
|
|
1260
1260
|
.. raw:: html
|
|
1261
1261
|
|
|
1262
|
-
<p>Get the snapshot status
|
|
1263
|
-
Get a detailed description of the current state for each shard participating in the snapshot.</p>
|
|
1262
|
+
<p>Get the snapshot status.</p>
|
|
1263
|
+
<p>Get a detailed description of the current state for each shard participating in the snapshot.</p>
|
|
1264
1264
|
<p>Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
|
|
1265
1265
|
If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.</p>
|
|
1266
1266
|
<p>If you omit the <code><snapshot></code> request path parameter, the request retrieves information only for currently running snapshots.
|
|
@@ -1337,8 +1337,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
1337
1337
|
"""
|
|
1338
1338
|
.. raw:: html
|
|
1339
1339
|
|
|
1340
|
-
<p>Verify a snapshot repository
|
|
1341
|
-
Check for common misconfigurations in a snapshot repository.</p>
|
|
1340
|
+
<p>Verify a snapshot repository.</p>
|
|
1341
|
+
<p>Check for common misconfigurations in a snapshot repository.</p>
|
|
1342
1342
|
|
|
1343
1343
|
|
|
1344
1344
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository>`_
|
|
@@ -89,8 +89,8 @@ class SqlClient(NamespacedClient):
|
|
|
89
89
|
"""
|
|
90
90
|
.. raw:: html
|
|
91
91
|
|
|
92
|
-
<p>Delete an async SQL search
|
|
93
|
-
Delete an async SQL search or a stored synchronous SQL search.
|
|
92
|
+
<p>Delete an async SQL search.</p>
|
|
93
|
+
<p>Delete an async SQL search or a stored synchronous SQL search.
|
|
94
94
|
If the search is still running, the API cancels it.</p>
|
|
95
95
|
<p>If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:</p>
|
|
96
96
|
<ul>
|
|
@@ -145,8 +145,8 @@ class SqlClient(NamespacedClient):
|
|
|
145
145
|
"""
|
|
146
146
|
.. raw:: html
|
|
147
147
|
|
|
148
|
-
<p>Get async SQL search results
|
|
149
|
-
Get the current status and available results for an async SQL search or stored synchronous SQL search.</p>
|
|
148
|
+
<p>Get async SQL search results.</p>
|
|
149
|
+
<p>Get the current status and available results for an async SQL search or stored synchronous SQL search.</p>
|
|
150
150
|
<p>If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.</p>
|
|
151
151
|
|
|
152
152
|
|
|
@@ -208,8 +208,8 @@ class SqlClient(NamespacedClient):
|
|
|
208
208
|
"""
|
|
209
209
|
.. raw:: html
|
|
210
210
|
|
|
211
|
-
<p>Get the async SQL search status
|
|
212
|
-
Get the current status of an async SQL search or a stored synchronous SQL search.</p>
|
|
211
|
+
<p>Get the async SQL search status.</p>
|
|
212
|
+
<p>Get the current status of an async SQL search or a stored synchronous SQL search.</p>
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status>`_
|
|
@@ -297,8 +297,8 @@ class SqlClient(NamespacedClient):
|
|
|
297
297
|
"""
|
|
298
298
|
.. raw:: html
|
|
299
299
|
|
|
300
|
-
<p>Get SQL search results
|
|
301
|
-
Run an SQL request.</p>
|
|
300
|
+
<p>Get SQL search results.</p>
|
|
301
|
+
<p>Run an SQL request.</p>
|
|
302
302
|
|
|
303
303
|
|
|
304
304
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query>`_
|
|
@@ -422,8 +422,8 @@ class SqlClient(NamespacedClient):
|
|
|
422
422
|
"""
|
|
423
423
|
.. raw:: html
|
|
424
424
|
|
|
425
|
-
<p>Translate SQL into Elasticsearch queries
|
|
426
|
-
Translate an SQL search into a search API request containing Query DSL.
|
|
425
|
+
<p>Translate SQL into Elasticsearch queries.</p>
|
|
426
|
+
<p>Translate an SQL search into a search API request containing Query DSL.
|
|
427
427
|
It accepts the same request body parameters as the SQL search API, excluding <code>cursor</code>.</p>
|
|
428
428
|
|
|
429
429
|
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
|
3
|
+
# this work for additional information regarding copyright
|
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
|
6
|
+
# not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
import typing as t
|
|
19
|
+
|
|
20
|
+
from elastic_transport import ObjectApiResponse, TextApiResponse
|
|
21
|
+
|
|
22
|
+
from ._base import NamespacedClient
|
|
23
|
+
from .utils import (
|
|
24
|
+
Stability,
|
|
25
|
+
_availability_warning,
|
|
26
|
+
_rewrite_parameters,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class StreamsClient(NamespacedClient):
|
|
31
|
+
|
|
32
|
+
@_rewrite_parameters()
|
|
33
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
34
|
+
async def logs_disable(
|
|
35
|
+
self,
|
|
36
|
+
*,
|
|
37
|
+
error_trace: t.Optional[bool] = None,
|
|
38
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
39
|
+
human: t.Optional[bool] = None,
|
|
40
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
41
|
+
pretty: t.Optional[bool] = None,
|
|
42
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
43
|
+
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
|
|
44
|
+
"""
|
|
45
|
+
.. raw:: html
|
|
46
|
+
|
|
47
|
+
<p>Disable logs stream.</p>
|
|
48
|
+
<p>Turn off the logs stream feature for this cluster.</p>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
|
|
52
|
+
|
|
53
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
54
|
+
If no response is received before the timeout expires, the request fails
|
|
55
|
+
and returns an error.
|
|
56
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
57
|
+
before the timeout expires, the request fails and returns an error.
|
|
58
|
+
"""
|
|
59
|
+
__path_parts: t.Dict[str, str] = {}
|
|
60
|
+
__path = "/_streams/logs/_disable"
|
|
61
|
+
__query: t.Dict[str, t.Any] = {}
|
|
62
|
+
if error_trace is not None:
|
|
63
|
+
__query["error_trace"] = error_trace
|
|
64
|
+
if filter_path is not None:
|
|
65
|
+
__query["filter_path"] = filter_path
|
|
66
|
+
if human is not None:
|
|
67
|
+
__query["human"] = human
|
|
68
|
+
if master_timeout is not None:
|
|
69
|
+
__query["master_timeout"] = master_timeout
|
|
70
|
+
if pretty is not None:
|
|
71
|
+
__query["pretty"] = pretty
|
|
72
|
+
if timeout is not None:
|
|
73
|
+
__query["timeout"] = timeout
|
|
74
|
+
__headers = {"accept": "text/plain,application/json"}
|
|
75
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
76
|
+
"POST",
|
|
77
|
+
__path,
|
|
78
|
+
params=__query,
|
|
79
|
+
headers=__headers,
|
|
80
|
+
endpoint_id="streams.logs_disable",
|
|
81
|
+
path_parts=__path_parts,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
@_rewrite_parameters()
|
|
85
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
86
|
+
async def logs_enable(
|
|
87
|
+
self,
|
|
88
|
+
*,
|
|
89
|
+
error_trace: t.Optional[bool] = None,
|
|
90
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
91
|
+
human: t.Optional[bool] = None,
|
|
92
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
93
|
+
pretty: t.Optional[bool] = None,
|
|
94
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
95
|
+
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
|
|
96
|
+
"""
|
|
97
|
+
.. raw:: html
|
|
98
|
+
|
|
99
|
+
<p>Enable logs stream.</p>
|
|
100
|
+
<p>Turn on the logs stream feature for this cluster.</p>
|
|
101
|
+
<p>NOTE: To protect existing data, this feature can be turned on only if the
|
|
102
|
+
cluster does not have existing indices or data streams that match the pattern <code>logs|logs.*</code>.
|
|
103
|
+
If those indices or data streams exist, a <code>409 - Conflict</code> response and error is returned.</p>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
|
|
107
|
+
|
|
108
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
109
|
+
If no response is received before the timeout expires, the request fails
|
|
110
|
+
and returns an error.
|
|
111
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
112
|
+
before the timeout expires, the request fails and returns an error.
|
|
113
|
+
"""
|
|
114
|
+
__path_parts: t.Dict[str, str] = {}
|
|
115
|
+
__path = "/_streams/logs/_enable"
|
|
116
|
+
__query: t.Dict[str, t.Any] = {}
|
|
117
|
+
if error_trace is not None:
|
|
118
|
+
__query["error_trace"] = error_trace
|
|
119
|
+
if filter_path is not None:
|
|
120
|
+
__query["filter_path"] = filter_path
|
|
121
|
+
if human is not None:
|
|
122
|
+
__query["human"] = human
|
|
123
|
+
if master_timeout is not None:
|
|
124
|
+
__query["master_timeout"] = master_timeout
|
|
125
|
+
if pretty is not None:
|
|
126
|
+
__query["pretty"] = pretty
|
|
127
|
+
if timeout is not None:
|
|
128
|
+
__query["timeout"] = timeout
|
|
129
|
+
__headers = {"accept": "text/plain,application/json"}
|
|
130
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
131
|
+
"POST",
|
|
132
|
+
__path,
|
|
133
|
+
params=__query,
|
|
134
|
+
headers=__headers,
|
|
135
|
+
endpoint_id="streams.logs_enable",
|
|
136
|
+
path_parts=__path_parts,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
@_rewrite_parameters()
|
|
140
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
141
|
+
async def status(
|
|
142
|
+
self,
|
|
143
|
+
*,
|
|
144
|
+
error_trace: t.Optional[bool] = None,
|
|
145
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
146
|
+
human: t.Optional[bool] = None,
|
|
147
|
+
master_timeout: t.Optional[
|
|
148
|
+
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
149
|
+
] = None,
|
|
150
|
+
pretty: t.Optional[bool] = None,
|
|
151
|
+
) -> ObjectApiResponse[t.Any]:
|
|
152
|
+
"""
|
|
153
|
+
.. raw:: html
|
|
154
|
+
|
|
155
|
+
<p>Get the status of streams.</p>
|
|
156
|
+
<p>Get the current status for all types of streams.</p>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
|
|
160
|
+
|
|
161
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
162
|
+
no response is received before the timeout expires, the request fails and
|
|
163
|
+
returns an error.
|
|
164
|
+
"""
|
|
165
|
+
__path_parts: t.Dict[str, str] = {}
|
|
166
|
+
__path = "/_streams/status"
|
|
167
|
+
__query: t.Dict[str, t.Any] = {}
|
|
168
|
+
if error_trace is not None:
|
|
169
|
+
__query["error_trace"] = error_trace
|
|
170
|
+
if filter_path is not None:
|
|
171
|
+
__query["filter_path"] = filter_path
|
|
172
|
+
if human is not None:
|
|
173
|
+
__query["human"] = human
|
|
174
|
+
if master_timeout is not None:
|
|
175
|
+
__query["master_timeout"] = master_timeout
|
|
176
|
+
if pretty is not None:
|
|
177
|
+
__query["pretty"] = pretty
|
|
178
|
+
__headers = {"accept": "application/json"}
|
|
179
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
180
|
+
"GET",
|
|
181
|
+
__path,
|
|
182
|
+
params=__query,
|
|
183
|
+
headers=__headers,
|
|
184
|
+
endpoint_id="streams.status",
|
|
185
|
+
path_parts=__path_parts,
|
|
186
|
+
)
|
|
@@ -95,8 +95,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
95
95
|
"""
|
|
96
96
|
.. raw:: html
|
|
97
97
|
|
|
98
|
-
<p>Delete a synonym rule
|
|
99
|
-
Delete a synonym rule from a synonym set.</p>
|
|
98
|
+
<p>Delete a synonym rule.</p>
|
|
99
|
+
<p>Delete a synonym rule from a synonym set.</p>
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule>`_
|
|
@@ -204,8 +204,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
204
204
|
"""
|
|
205
205
|
.. raw:: html
|
|
206
206
|
|
|
207
|
-
<p>Get a synonym rule
|
|
208
|
-
Get a synonym rule from a synonym set.</p>
|
|
207
|
+
<p>Get a synonym rule.</p>
|
|
208
|
+
<p>Get a synonym rule from a synonym set.</p>
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule>`_
|
|
@@ -257,8 +257,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
257
257
|
"""
|
|
258
258
|
.. raw:: html
|
|
259
259
|
|
|
260
|
-
<p>Get all synonym sets
|
|
261
|
-
Get a summary of all defined synonym sets.</p>
|
|
260
|
+
<p>Get all synonym sets.</p>
|
|
261
|
+
<p>Get a summary of all defined synonym sets.</p>
|
|
262
262
|
|
|
263
263
|
|
|
264
264
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym>`_
|
|
@@ -311,8 +311,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
311
311
|
"""
|
|
312
312
|
.. raw:: html
|
|
313
313
|
|
|
314
|
-
<p>Create or update a synonym set
|
|
315
|
-
Synonyms sets are limited to a maximum of 10,000 synonym rules per set.
|
|
314
|
+
<p>Create or update a synonym set.</p>
|
|
315
|
+
<p>Synonyms sets are limited to a maximum of 10,000 synonym rules per set.
|
|
316
316
|
If you need to manage more synonym rules, you can create multiple synonym sets.</p>
|
|
317
317
|
<p>When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.
|
|
318
318
|
This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.</p>
|
|
@@ -378,8 +378,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
378
378
|
"""
|
|
379
379
|
.. raw:: html
|
|
380
380
|
|
|
381
|
-
<p>Create or update a synonym rule
|
|
382
|
-
Create or update a synonym rule in a synonym set.</p>
|
|
381
|
+
<p>Create or update a synonym rule.</p>
|
|
382
|
+
<p>Create or update a synonym rule in a synonym set.</p>
|
|
383
383
|
<p>If any of the synonym rules included is invalid, the API returns an error.</p>
|
|
384
384
|
<p>When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.</p>
|
|
385
385
|
|
|
@@ -23,16 +23,16 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class TasksClient(NamespacedClient):
|
|
33
33
|
|
|
34
34
|
@_rewrite_parameters()
|
|
35
|
-
@
|
|
35
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
36
36
|
async def cancel(
|
|
37
37
|
self,
|
|
38
38
|
*,
|
|
@@ -106,7 +106,7 @@ class TasksClient(NamespacedClient):
|
|
|
106
106
|
)
|
|
107
107
|
|
|
108
108
|
@_rewrite_parameters()
|
|
109
|
-
@
|
|
109
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
110
110
|
async def get(
|
|
111
111
|
self,
|
|
112
112
|
*,
|
|
@@ -121,8 +121,8 @@ class TasksClient(NamespacedClient):
|
|
|
121
121
|
"""
|
|
122
122
|
.. raw:: html
|
|
123
123
|
|
|
124
|
-
<p>Get task information
|
|
125
|
-
Get information about a task currently running in the cluster.</p>
|
|
124
|
+
<p>Get task information.</p>
|
|
125
|
+
<p>Get information about a task currently running in the cluster.</p>
|
|
126
126
|
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
127
127
|
The API may change in ways that are not backwards compatible.</p>
|
|
128
128
|
<p>If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.</p>
|
|
@@ -164,7 +164,7 @@ class TasksClient(NamespacedClient):
|
|
|
164
164
|
)
|
|
165
165
|
|
|
166
166
|
@_rewrite_parameters()
|
|
167
|
-
@
|
|
167
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
168
168
|
async def list(
|
|
169
169
|
self,
|
|
170
170
|
*,
|
|
@@ -185,8 +185,8 @@ class TasksClient(NamespacedClient):
|
|
|
185
185
|
"""
|
|
186
186
|
.. raw:: html
|
|
187
187
|
|
|
188
|
-
<p>Get all tasks
|
|
189
|
-
Get information about the tasks currently running on one or more nodes in the cluster.</p>
|
|
188
|
+
<p>Get all tasks.</p>
|
|
189
|
+
<p>Get information about the tasks currently running on one or more nodes in the cluster.</p>
|
|
190
190
|
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
191
191
|
The API may change in ways that are not backwards compatible.</p>
|
|
192
192
|
<p><strong>Identifying running tasks</strong></p>
|
|
@@ -55,8 +55,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
55
55
|
"""
|
|
56
56
|
.. raw:: html
|
|
57
57
|
|
|
58
|
-
<p>Find the structure of a text field
|
|
59
|
-
Find the structure of a text field in an Elasticsearch index.</p>
|
|
58
|
+
<p>Find the structure of a text field.</p>
|
|
59
|
+
<p>Find the structure of a text field in an Elasticsearch index.</p>
|
|
60
60
|
<p>This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch.
|
|
61
61
|
For example, if you have ingested data into a very simple index that has just <code>@timestamp</code> and message fields, you can use this API to see what common structure exists in the message field.</p>
|
|
62
62
|
<p>The response from the API contains:</p>
|
|
@@ -241,8 +241,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
241
241
|
"""
|
|
242
242
|
.. raw:: html
|
|
243
243
|
|
|
244
|
-
<p>Find the structure of text messages
|
|
245
|
-
Find the structure of a list of text messages.
|
|
244
|
+
<p>Find the structure of text messages.</p>
|
|
245
|
+
<p>Find the structure of a list of text messages.
|
|
246
246
|
The messages must contain data that is suitable to be ingested into Elasticsearch.</p>
|
|
247
247
|
<p>This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.
|
|
248
248
|
Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process.</p>
|
|
@@ -402,7 +402,11 @@ class TextStructureClient(NamespacedClient):
|
|
|
402
402
|
delimiter: t.Optional[str] = None,
|
|
403
403
|
ecs_compatibility: t.Optional[str] = None,
|
|
404
404
|
explain: t.Optional[bool] = None,
|
|
405
|
-
format: t.Optional[
|
|
405
|
+
format: t.Optional[
|
|
406
|
+
t.Union[
|
|
407
|
+
str, t.Literal["delimited", "ndjson", "semi_structured_text", "xml"]
|
|
408
|
+
]
|
|
409
|
+
] = None,
|
|
406
410
|
grok_pattern: t.Optional[str] = None,
|
|
407
411
|
has_header_row: t.Optional[bool] = None,
|
|
408
412
|
line_merge_size_limit: t.Optional[int] = None,
|
|
@@ -416,8 +420,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
416
420
|
"""
|
|
417
421
|
.. raw:: html
|
|
418
422
|
|
|
419
|
-
<p>Find the structure of a text file
|
|
420
|
-
The text file must contain data that is suitable to be ingested into Elasticsearch.</p>
|
|
423
|
+
<p>Find the structure of a text file.</p>
|
|
424
|
+
<p>The text file must contain data that is suitable to be ingested into Elasticsearch.</p>
|
|
421
425
|
<p>This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.
|
|
422
426
|
Unlike other Elasticsearch endpoints, the data that is posted to this endpoint does not need to be UTF-8 encoded and in JSON format.
|
|
423
427
|
It must, however, be text; binary text formats are not currently supported.
|
|
@@ -615,8 +619,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
615
619
|
"""
|
|
616
620
|
.. raw:: html
|
|
617
621
|
|
|
618
|
-
<p>Test a Grok pattern
|
|
619
|
-
Test a Grok pattern on one or more lines of text.
|
|
622
|
+
<p>Test a Grok pattern.</p>
|
|
623
|
+
<p>Test a Grok pattern on one or more lines of text.
|
|
620
624
|
The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.</p>
|
|
621
625
|
|
|
622
626
|
|