elasticsearch 8.19.2__py3-none-any.whl → 8.19.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.
Files changed (98) hide show
  1. elasticsearch/_async/client/__init__.py +39 -18
  2. elasticsearch/_async/client/async_search.py +3 -3
  3. elasticsearch/_async/client/autoscaling.py +8 -4
  4. elasticsearch/_async/client/cat.py +40 -2
  5. elasticsearch/_async/client/ccr.py +2 -2
  6. elasticsearch/_async/client/cluster.py +10 -9
  7. elasticsearch/_async/client/connector.py +34 -33
  8. elasticsearch/_async/client/dangling_indices.py +6 -10
  9. elasticsearch/_async/client/eql.py +2 -2
  10. elasticsearch/_async/client/esql.py +1 -1
  11. elasticsearch/_async/client/features.py +2 -2
  12. elasticsearch/_async/client/fleet.py +3 -3
  13. elasticsearch/_async/client/indices.py +235 -25
  14. elasticsearch/_async/client/ingest.py +1 -1
  15. elasticsearch/_async/client/license.py +3 -5
  16. elasticsearch/_async/client/ml.py +61 -21
  17. elasticsearch/_async/client/monitoring.py +2 -1
  18. elasticsearch/_async/client/nodes.py +7 -7
  19. elasticsearch/_async/client/rollup.py +9 -9
  20. elasticsearch/_async/client/search_application.py +11 -11
  21. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  22. elasticsearch/_async/client/security.py +4 -4
  23. elasticsearch/_async/client/shutdown.py +7 -2
  24. elasticsearch/_async/client/simulate.py +2 -2
  25. elasticsearch/_async/client/slm.py +1 -1
  26. elasticsearch/_async/client/snapshot.py +3 -2
  27. elasticsearch/_async/client/streams.py +6 -6
  28. elasticsearch/_async/client/tasks.py +4 -4
  29. elasticsearch/_async/client/text_structure.py +5 -1
  30. elasticsearch/_async/client/transform.py +37 -0
  31. elasticsearch/_async/client/utils.py +4 -2
  32. elasticsearch/_async/client/watcher.py +2 -2
  33. elasticsearch/_async/client/xpack.py +2 -1
  34. elasticsearch/_sync/client/__init__.py +41 -18
  35. elasticsearch/_sync/client/async_search.py +3 -3
  36. elasticsearch/_sync/client/autoscaling.py +8 -4
  37. elasticsearch/_sync/client/cat.py +40 -2
  38. elasticsearch/_sync/client/ccr.py +2 -2
  39. elasticsearch/_sync/client/cluster.py +10 -9
  40. elasticsearch/_sync/client/connector.py +34 -33
  41. elasticsearch/_sync/client/dangling_indices.py +6 -10
  42. elasticsearch/_sync/client/eql.py +2 -2
  43. elasticsearch/_sync/client/esql.py +1 -1
  44. elasticsearch/_sync/client/features.py +2 -2
  45. elasticsearch/_sync/client/fleet.py +3 -3
  46. elasticsearch/_sync/client/indices.py +235 -25
  47. elasticsearch/_sync/client/ingest.py +1 -1
  48. elasticsearch/_sync/client/license.py +3 -5
  49. elasticsearch/_sync/client/ml.py +61 -21
  50. elasticsearch/_sync/client/monitoring.py +2 -1
  51. elasticsearch/_sync/client/nodes.py +7 -7
  52. elasticsearch/_sync/client/rollup.py +9 -9
  53. elasticsearch/_sync/client/search_application.py +11 -11
  54. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  55. elasticsearch/_sync/client/security.py +4 -4
  56. elasticsearch/_sync/client/shutdown.py +7 -2
  57. elasticsearch/_sync/client/simulate.py +2 -2
  58. elasticsearch/_sync/client/slm.py +1 -1
  59. elasticsearch/_sync/client/snapshot.py +3 -2
  60. elasticsearch/_sync/client/streams.py +6 -6
  61. elasticsearch/_sync/client/tasks.py +4 -4
  62. elasticsearch/_sync/client/text_structure.py +5 -1
  63. elasticsearch/_sync/client/transform.py +37 -0
  64. elasticsearch/_sync/client/utils.py +16 -2
  65. elasticsearch/_sync/client/watcher.py +2 -2
  66. elasticsearch/_sync/client/xpack.py +2 -1
  67. elasticsearch/_version.py +2 -2
  68. elasticsearch/dsl/_async/document.py +4 -5
  69. elasticsearch/dsl/_async/index.py +1 -1
  70. elasticsearch/dsl/_async/search.py +2 -3
  71. elasticsearch/dsl/_sync/document.py +4 -5
  72. elasticsearch/dsl/_sync/index.py +1 -1
  73. elasticsearch/dsl/_sync/search.py +2 -3
  74. elasticsearch/dsl/aggs.py +7 -7
  75. elasticsearch/dsl/async_connections.py +1 -2
  76. elasticsearch/dsl/connections.py +1 -2
  77. elasticsearch/dsl/document_base.py +1 -1
  78. elasticsearch/dsl/query.py +23 -0
  79. elasticsearch/dsl/serializer.py +1 -2
  80. elasticsearch/dsl/types.py +2 -0
  81. elasticsearch/dsl/utils.py +1 -2
  82. elasticsearch/esql/esql.py +1 -1
  83. elasticsearch/esql/functions.py +2 -2
  84. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  85. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  86. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  87. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  88. elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
  89. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  90. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  91. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  92. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
  93. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/METADATA +1 -1
  94. elasticsearch-8.19.3.dist-info/RECORD +166 -0
  95. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/WHEEL +1 -1
  96. elasticsearch-8.19.2.dist-info/RECORD +0 -166
  97. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/licenses/LICENSE +0 -0
  98. {elasticsearch-8.19.2.dist-info → elasticsearch-8.19.3.dist-info}/licenses/NOTICE +0 -0
@@ -20,7 +20,7 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import _rewrite_parameters
23
+ from .utils import Stability, Visibility, _availability_warning, _rewrite_parameters
24
24
 
25
25
 
26
26
  class MonitoringClient(NamespacedClient):
@@ -28,6 +28,7 @@ class MonitoringClient(NamespacedClient):
28
28
  @_rewrite_parameters(
29
29
  body_name="operations",
30
30
  )
31
+ @_availability_warning(Stability.STABLE, Visibility.PRIVATE)
31
32
  def bulk(
32
33
  self,
33
34
  *,
@@ -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 NodesClient(NamespacedClient):
33
33
 
34
34
  @_rewrite_parameters()
35
- @_stability_warning(Stability.EXPERIMENTAL)
35
+ @_availability_warning(Stability.EXPERIMENTAL)
36
36
  def clear_repositories_metering_archive(
37
37
  self,
38
38
  *,
@@ -86,7 +86,7 @@ class NodesClient(NamespacedClient):
86
86
  )
87
87
 
88
88
  @_rewrite_parameters()
89
- @_stability_warning(Stability.EXPERIMENTAL)
89
+ @_availability_warning(Stability.EXPERIMENTAL)
90
90
  def get_repositories_metering_info(
91
91
  self,
92
92
  *,
@@ -170,7 +170,7 @@ class NodesClient(NamespacedClient):
170
170
  select, or to get a task from an empty queue) are filtered out.
171
171
  :param interval: The interval to do the second sampling of threads.
172
172
  :param snapshots: Number of samples of thread stacktrace.
173
- :param sort: The sort order for 'cpu' type (default: total)
173
+ :param sort: The sort order for 'cpu' type
174
174
  :param threads: Specifies the number of hot threads to provide information for.
175
175
  :param timeout: Period to wait for a response. If no response is received before
176
176
  the timeout expires, the request fails and returns an error.
@@ -388,7 +388,7 @@ class NodesClient(NamespacedClient):
388
388
 
389
389
  :param node_id: Comma-separated list of node IDs or names used to limit returned
390
390
  information.
391
- :param metric: Limit the information returned to the specified metrics
391
+ :param metric: Limits the information returned to the specific metrics.
392
392
  :param index_metric: Limit the information returned for indices metric to the
393
393
  specific index metrics. It can be used only if indices (or all) metric is
394
394
  specified.
@@ -502,8 +502,8 @@ class NodesClient(NamespacedClient):
502
502
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-nodes-usage.html>`_
503
503
 
504
504
  :param node_id: A comma-separated list of node IDs or names to limit the returned
505
- information; use `_local` to return information from the node you're connecting
506
- to, leave empty to get information from all nodes
505
+ information. Use `_local` to return information from the node you're connecting
506
+ to, leave empty to get information from all nodes.
507
507
  :param metric: Limits the information returned to the specific metrics. A comma-separated
508
508
  list of the following options: `_all`, `rest_actions`.
509
509
  :param timeout: Period to wait for a response. If no response is received before
@@ -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 RollupClient(NamespacedClient):
33
33
 
34
34
  @_rewrite_parameters()
35
- @_stability_warning(Stability.EXPERIMENTAL)
35
+ @_availability_warning(Stability.EXPERIMENTAL)
36
36
  def delete_job(
37
37
  self,
38
38
  *,
@@ -95,7 +95,7 @@ class RollupClient(NamespacedClient):
95
95
  )
96
96
 
97
97
  @_rewrite_parameters()
98
- @_stability_warning(Stability.EXPERIMENTAL)
98
+ @_availability_warning(Stability.EXPERIMENTAL)
99
99
  def get_jobs(
100
100
  self,
101
101
  *,
@@ -147,7 +147,7 @@ class RollupClient(NamespacedClient):
147
147
  )
148
148
 
149
149
  @_rewrite_parameters()
150
- @_stability_warning(Stability.EXPERIMENTAL)
150
+ @_availability_warning(Stability.EXPERIMENTAL)
151
151
  def get_rollup_caps(
152
152
  self,
153
153
  *,
@@ -203,7 +203,7 @@ class RollupClient(NamespacedClient):
203
203
  )
204
204
 
205
205
  @_rewrite_parameters()
206
- @_stability_warning(Stability.EXPERIMENTAL)
206
+ @_availability_warning(Stability.EXPERIMENTAL)
207
207
  def get_rollup_index_caps(
208
208
  self,
209
209
  *,
@@ -266,7 +266,7 @@ class RollupClient(NamespacedClient):
266
266
  ),
267
267
  ignore_deprecated_options={"headers"},
268
268
  )
269
- @_stability_warning(Stability.EXPERIMENTAL)
269
+ @_availability_warning(Stability.EXPERIMENTAL)
270
270
  def put_job(
271
271
  self,
272
272
  *,
@@ -392,7 +392,7 @@ class RollupClient(NamespacedClient):
392
392
  @_rewrite_parameters(
393
393
  body_fields=("aggregations", "aggs", "query", "size"),
394
394
  )
395
- @_stability_warning(Stability.EXPERIMENTAL)
395
+ @_availability_warning(Stability.EXPERIMENTAL)
396
396
  def rollup_search(
397
397
  self,
398
398
  *,
@@ -503,7 +503,7 @@ class RollupClient(NamespacedClient):
503
503
  )
504
504
 
505
505
  @_rewrite_parameters()
506
- @_stability_warning(Stability.EXPERIMENTAL)
506
+ @_availability_warning(Stability.EXPERIMENTAL)
507
507
  def start_job(
508
508
  self,
509
509
  *,
@@ -549,7 +549,7 @@ class RollupClient(NamespacedClient):
549
549
  )
550
550
 
551
551
  @_rewrite_parameters()
552
- @_stability_warning(Stability.EXPERIMENTAL)
552
+ @_availability_warning(Stability.EXPERIMENTAL)
553
553
  def stop_job(
554
554
  self,
555
555
  *,
@@ -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 SearchApplicationClient(NamespacedClient):
33
33
 
34
34
  @_rewrite_parameters()
35
- @_stability_warning(Stability.BETA)
35
+ @_availability_warning(Stability.BETA)
36
36
  def delete(
37
37
  self,
38
38
  *,
@@ -77,7 +77,7 @@ class SearchApplicationClient(NamespacedClient):
77
77
  )
78
78
 
79
79
  @_rewrite_parameters()
80
- @_stability_warning(Stability.EXPERIMENTAL)
80
+ @_availability_warning(Stability.EXPERIMENTAL)
81
81
  def delete_behavioral_analytics(
82
82
  self,
83
83
  *,
@@ -122,7 +122,7 @@ class SearchApplicationClient(NamespacedClient):
122
122
  )
123
123
 
124
124
  @_rewrite_parameters()
125
- @_stability_warning(Stability.BETA)
125
+ @_availability_warning(Stability.BETA)
126
126
  def get(
127
127
  self,
128
128
  *,
@@ -166,7 +166,7 @@ class SearchApplicationClient(NamespacedClient):
166
166
  )
167
167
 
168
168
  @_rewrite_parameters()
169
- @_stability_warning(Stability.EXPERIMENTAL)
169
+ @_availability_warning(Stability.EXPERIMENTAL)
170
170
  def get_behavioral_analytics(
171
171
  self,
172
172
  *,
@@ -215,7 +215,7 @@ class SearchApplicationClient(NamespacedClient):
215
215
  @_rewrite_parameters(
216
216
  parameter_aliases={"from": "from_"},
217
217
  )
218
- @_stability_warning(Stability.BETA)
218
+ @_availability_warning(Stability.BETA)
219
219
  def list(
220
220
  self,
221
221
  *,
@@ -270,7 +270,7 @@ class SearchApplicationClient(NamespacedClient):
270
270
  @_rewrite_parameters(
271
271
  body_name="payload",
272
272
  )
273
- @_stability_warning(Stability.EXPERIMENTAL)
273
+ @_availability_warning(Stability.EXPERIMENTAL)
274
274
  def post_behavioral_analytics_event(
275
275
  self,
276
276
  *,
@@ -338,7 +338,7 @@ class SearchApplicationClient(NamespacedClient):
338
338
  @_rewrite_parameters(
339
339
  body_name="search_application",
340
340
  )
341
- @_stability_warning(Stability.BETA)
341
+ @_availability_warning(Stability.BETA)
342
342
  def put(
343
343
  self,
344
344
  *,
@@ -398,7 +398,7 @@ class SearchApplicationClient(NamespacedClient):
398
398
  )
399
399
 
400
400
  @_rewrite_parameters()
401
- @_stability_warning(Stability.EXPERIMENTAL)
401
+ @_availability_warning(Stability.EXPERIMENTAL)
402
402
  def put_behavioral_analytics(
403
403
  self,
404
404
  *,
@@ -445,7 +445,7 @@ class SearchApplicationClient(NamespacedClient):
445
445
  body_fields=("params",),
446
446
  ignore_deprecated_options={"params"},
447
447
  )
448
- @_stability_warning(Stability.EXPERIMENTAL)
448
+ @_availability_warning(Stability.EXPERIMENTAL)
449
449
  def render_query(
450
450
  self,
451
451
  *,
@@ -510,7 +510,7 @@ class SearchApplicationClient(NamespacedClient):
510
510
  body_fields=("params",),
511
511
  ignore_deprecated_options={"params"},
512
512
  )
513
- @_stability_warning(Stability.BETA)
513
+ @_availability_warning(Stability.BETA)
514
514
  def search(
515
515
  self,
516
516
  *,
@@ -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 SearchableSnapshotsClient(NamespacedClient):
33
33
 
34
34
  @_rewrite_parameters()
35
- @_stability_warning(Stability.EXPERIMENTAL)
35
+ @_availability_warning(Stability.EXPERIMENTAL)
36
36
  def cache_stats(
37
37
  self,
38
38
  *,
@@ -84,7 +84,7 @@ class SearchableSnapshotsClient(NamespacedClient):
84
84
  )
85
85
 
86
86
  @_rewrite_parameters()
87
- @_stability_warning(Stability.EXPERIMENTAL)
87
+ @_availability_warning(Stability.EXPERIMENTAL)
88
88
  def clear_cache(
89
89
  self,
90
90
  *,
@@ -119,7 +119,7 @@ class SearchableSnapshotsClient(NamespacedClient):
119
119
  into no concrete indices. (This includes `_all` string or when no indices
120
120
  have been specified)
121
121
  :param expand_wildcards: Whether to expand wildcard expression to concrete indices
122
- that are open, closed or both.
122
+ that are open, closed or both
123
123
  :param ignore_unavailable: Whether specified concrete indices should be ignored
124
124
  when unavailable (missing or closed)
125
125
  """
@@ -892,8 +892,8 @@ class SecurityClient(NamespacedClient):
892
892
  Token names must be unique in the context of the associated service account.
893
893
  They must also be globally unique with their fully qualified names, which
894
894
  are comprised of the service account principal and token name, such as `<namespace>/<service>/<token-name>`.
895
- :param refresh: If `true` then refresh the affected shards to make this operation
896
- visible to search, if `wait_for` (the default) then wait for a refresh to
895
+ :param refresh: If `true` (the default) then refresh the affected shards to make
896
+ this operation visible to search, if `wait_for` then wait for a refresh to
897
897
  make this operation visible to search, if `false` then do nothing with refreshes.
898
898
  """
899
899
  if namespace in SKIP_IN_PATH:
@@ -1208,8 +1208,8 @@ class SecurityClient(NamespacedClient):
1208
1208
  :param namespace: The namespace, which is a top-level grouping of service accounts.
1209
1209
  :param service: The service name.
1210
1210
  :param name: The name of the service account token.
1211
- :param refresh: If `true` then refresh the affected shards to make this operation
1212
- visible to search, if `wait_for` (the default) then wait for a refresh to
1211
+ :param refresh: If `true` (the default) then refresh the affected shards to make
1212
+ this operation visible to search, if `wait_for` then wait for a refresh to
1213
1213
  make this operation visible to search, if `false` then do nothing with refreshes.
1214
1214
  """
1215
1215
  if namespace in SKIP_IN_PATH:
@@ -20,7 +20,11 @@ import typing as t
20
20
  from elastic_transport import ObjectApiResponse
21
21
 
22
22
  from ._base import NamespacedClient
23
- from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
23
+ from .utils import (
24
+ SKIP_IN_PATH,
25
+ _quote,
26
+ _rewrite_parameters,
27
+ )
24
28
 
25
29
 
26
30
  class ShutdownClient(NamespacedClient):
@@ -108,7 +112,8 @@ class ShutdownClient(NamespacedClient):
108
112
 
109
113
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-shutdown.html>`_
110
114
 
111
- :param node_id: Which node for which to retrieve the shutdown status
115
+ :param node_id: Comma-separated list of nodes for which to retrieve the shutdown
116
+ status
112
117
  :param master_timeout: Period to wait for a connection to the master node. If
113
118
  no response is received before the timeout expires, the request fails and
114
119
  returns an error.
@@ -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
- @_stability_warning(Stability.EXPERIMENTAL)
43
+ @_availability_warning(Stability.EXPERIMENTAL)
44
44
  def ingest(
45
45
  self,
46
46
  *,
@@ -210,7 +210,7 @@ class SlmClient(NamespacedClient):
210
210
 
211
211
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-policy.html>`_
212
212
 
213
- :param policy_id: Comma-separated list of snapshot lifecycle policies to retrieve
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.
@@ -23,9 +23,10 @@ from ._base import NamespacedClient
23
23
  from .utils import (
24
24
  SKIP_IN_PATH,
25
25
  Stability,
26
+ Visibility,
27
+ _availability_warning,
26
28
  _quote,
27
29
  _rewrite_parameters,
28
- _stability_warning,
29
30
  )
30
31
 
31
32
 
@@ -913,7 +914,7 @@ class SnapshotClient(NamespacedClient):
913
914
  )
914
915
 
915
916
  @_rewrite_parameters()
916
- @_stability_warning(Stability.EXPERIMENTAL)
917
+ @_availability_warning(Stability.EXPERIMENTAL, Visibility.PRIVATE)
917
918
  def repository_verify_integrity(
918
919
  self,
919
920
  *,
@@ -23,15 +23,15 @@ from elastic_transport import ObjectApiResponse, TextApiResponse
23
23
  from ._base import NamespacedClient
24
24
  from .utils import (
25
25
  Stability,
26
+ _availability_warning,
26
27
  _rewrite_parameters,
27
- _stability_warning,
28
28
  )
29
29
 
30
30
 
31
31
  class StreamsClient(NamespacedClient):
32
32
 
33
33
  @_rewrite_parameters()
34
- @_stability_warning(Stability.EXPERIMENTAL)
34
+ @_availability_warning(Stability.EXPERIMENTAL)
35
35
  def logs_disable(
36
36
  self,
37
37
  *,
@@ -72,7 +72,7 @@ class StreamsClient(NamespacedClient):
72
72
  __query["pretty"] = pretty
73
73
  if timeout is not None:
74
74
  __query["timeout"] = timeout
75
- __headers = {"accept": "application/json,text/plain"}
75
+ __headers = {"accept": "text/plain,application/json"}
76
76
  return self.perform_request( # type: ignore[return-value]
77
77
  "POST",
78
78
  __path,
@@ -83,7 +83,7 @@ class StreamsClient(NamespacedClient):
83
83
  )
84
84
 
85
85
  @_rewrite_parameters()
86
- @_stability_warning(Stability.EXPERIMENTAL)
86
+ @_availability_warning(Stability.EXPERIMENTAL)
87
87
  def logs_enable(
88
88
  self,
89
89
  *,
@@ -127,7 +127,7 @@ class StreamsClient(NamespacedClient):
127
127
  __query["pretty"] = pretty
128
128
  if timeout is not None:
129
129
  __query["timeout"] = timeout
130
- __headers = {"accept": "application/json,text/plain"}
130
+ __headers = {"accept": "text/plain,application/json"}
131
131
  return self.perform_request( # type: ignore[return-value]
132
132
  "POST",
133
133
  __path,
@@ -138,7 +138,7 @@ class StreamsClient(NamespacedClient):
138
138
  )
139
139
 
140
140
  @_rewrite_parameters()
141
- @_stability_warning(Stability.EXPERIMENTAL)
141
+ @_availability_warning(Stability.EXPERIMENTAL)
142
142
  def status(
143
143
  self,
144
144
  *,
@@ -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
- @_stability_warning(Stability.EXPERIMENTAL)
35
+ @_availability_warning(Stability.EXPERIMENTAL)
36
36
  def cancel(
37
37
  self,
38
38
  *,
@@ -106,7 +106,7 @@ class TasksClient(NamespacedClient):
106
106
  )
107
107
 
108
108
  @_rewrite_parameters()
109
- @_stability_warning(Stability.EXPERIMENTAL)
109
+ @_availability_warning(Stability.EXPERIMENTAL)
110
110
  def get(
111
111
  self,
112
112
  *,
@@ -164,7 +164,7 @@ class TasksClient(NamespacedClient):
164
164
  )
165
165
 
166
166
  @_rewrite_parameters()
167
- @_stability_warning(Stability.EXPERIMENTAL)
167
+ @_availability_warning(Stability.EXPERIMENTAL)
168
168
  def list(
169
169
  self,
170
170
  *,
@@ -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[str] = None,
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,
@@ -85,6 +85,43 @@ class TransformClient(NamespacedClient):
85
85
  path_parts=__path_parts,
86
86
  )
87
87
 
88
+ @_rewrite_parameters()
89
+ def get_node_stats(
90
+ self,
91
+ *,
92
+ error_trace: t.Optional[bool] = None,
93
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
94
+ human: t.Optional[bool] = None,
95
+ pretty: t.Optional[bool] = None,
96
+ ) -> ObjectApiResponse[t.Any]:
97
+ """
98
+ .. raw:: html
99
+
100
+ <p>Get node stats.</p>
101
+ <p>Get per-node information about transform usage.</p>
102
+
103
+ """
104
+ __path_parts: t.Dict[str, str] = {}
105
+ __path = "/_transform/_node_stats"
106
+ __query: t.Dict[str, t.Any] = {}
107
+ if error_trace is not None:
108
+ __query["error_trace"] = error_trace
109
+ if filter_path is not None:
110
+ __query["filter_path"] = filter_path
111
+ if human is not None:
112
+ __query["human"] = human
113
+ if pretty is not None:
114
+ __query["pretty"] = pretty
115
+ __headers = {"accept": "application/json"}
116
+ return self.perform_request( # type: ignore[return-value]
117
+ "GET",
118
+ __path,
119
+ params=__query,
120
+ headers=__headers,
121
+ endpoint_id="transform.get_node_stats",
122
+ path_parts=__path_parts,
123
+ )
124
+
88
125
  @_rewrite_parameters(
89
126
  parameter_aliases={"from": "from_"},
90
127
  )
@@ -79,6 +79,12 @@ class Stability(Enum):
79
79
  EXPERIMENTAL = auto()
80
80
 
81
81
 
82
+ class Visibility(Enum):
83
+ PUBLIC = auto()
84
+ FEATURE_FLAG = auto()
85
+ PRIVATE = auto()
86
+
87
+
82
88
  _TYPE_HOSTS = Union[
83
89
  str, Sequence[Union[str, Mapping[str, Union[str, int]], NodeConfig]]
84
90
  ]
@@ -456,15 +462,23 @@ def _rewrite_parameters(
456
462
  return wrapper
457
463
 
458
464
 
459
- def _stability_warning(
465
+ def _availability_warning(
460
466
  stability: Stability,
467
+ visibility: Visibility = Visibility.PUBLIC,
461
468
  version: Optional[str] = None,
462
469
  message: Optional[str] = None,
463
470
  ) -> Callable[[F], F]:
464
471
  def wrapper(api: F) -> F:
465
472
  @wraps(api)
466
473
  def wrapped(*args: Any, **kwargs: Any) -> Any:
467
- if stability == Stability.BETA:
474
+ if visibility == Visibility.PRIVATE:
475
+ warnings.warn(
476
+ "This API is private. "
477
+ "Private APIs are not subject to the support SLA of official GA features.",
478
+ category=GeneralAvailabilityWarning,
479
+ stacklevel=warn_stacklevel(),
480
+ )
481
+ elif stability == Stability.BETA:
468
482
  warnings.warn(
469
483
  "This API is in beta and is subject to change. "
470
484
  "The design and code is less mature than official GA features and is being provided as-is with no warranties. "
@@ -492,9 +492,9 @@ class WatcherClient(NamespacedClient):
492
492
  :param active: The initial state of the watch. The default value is `true`, which
493
493
  means the watch is active by default.
494
494
  :param condition: The condition that defines if the actions should be run.
495
- :param if_primary_term: only update the watch if the last operation that has
495
+ :param if_primary_term: Only update the watch if the last operation that has
496
496
  changed the watch has the specified primary term
497
- :param if_seq_no: only update the watch if the last operation that has changed
497
+ :param if_seq_no: Only update the watch if the last operation that has changed
498
498
  the watch has the specified sequence number
499
499
  :param input: The input that defines the input that loads the data for the watch.
500
500
  :param metadata: Metadata JSON that will be copied into the history entries.
@@ -56,7 +56,8 @@ class XPackClient(NamespacedClient):
56
56
 
57
57
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/info-api.html>`_
58
58
 
59
- :param accept_enterprise: If this param is used it must be set to true
59
+ :param accept_enterprise: If used, this otherwise ignored parameter must be set
60
+ to true
60
61
  :param categories: A comma-separated list of the information categories to include
61
62
  in the response. For example, `build,license,features`.
62
63
  """
elasticsearch/_version.py CHANGED
@@ -15,5 +15,5 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- __versionstr__ = "8.19.2"
19
- __es_specification_commit__ = "f4816bb41c52c1bfda93c48191f0a0e4e2d575be"
18
+ __versionstr__ = "8.19.3"
19
+ __es_specification_commit__ = "1c755b6fc50623dce6993efb7bfd3bdaef68fb90"
@@ -31,9 +31,8 @@ from typing import (
31
31
 
32
32
  from typing_extensions import Self, dataclass_transform
33
33
 
34
- from elasticsearch.exceptions import NotFoundError, RequestError
35
- from elasticsearch.helpers import async_bulk
36
-
34
+ from ...exceptions import NotFoundError, RequestError
35
+ from ...helpers import async_bulk
37
36
  from .._async.index import AsyncIndex
38
37
  from ..async_connections import get_connection
39
38
  from ..document_base import DocumentBase, DocumentMeta, mapped_field
@@ -42,8 +41,8 @@ from ..utils import DOC_META_FIELDS, META_FIELDS, AsyncUsingType, merge
42
41
  from .search import AsyncSearch
43
42
 
44
43
  if TYPE_CHECKING:
45
- from elasticsearch import AsyncElasticsearch
46
- from elasticsearch.esql.esql import ESQLBase
44
+ from ... import AsyncElasticsearch
45
+ from ...esql.esql import ESQLBase
47
46
 
48
47
 
49
48
  class AsyncIndexMeta(DocumentMeta):
@@ -30,7 +30,7 @@ from .update_by_query import AsyncUpdateByQuery
30
30
  if TYPE_CHECKING:
31
31
  from elastic_transport import ObjectApiResponse
32
32
 
33
- from elasticsearch import AsyncElasticsearch
33
+ from ... import AsyncElasticsearch
34
34
 
35
35
 
36
36
  class AsyncIndexTemplate:
@@ -29,9 +29,8 @@ from typing import (
29
29
 
30
30
  from typing_extensions import Self
31
31
 
32
- from elasticsearch.exceptions import ApiError
33
- from elasticsearch.helpers import async_scan
34
-
32
+ from ...exceptions import ApiError
33
+ from ...helpers import async_scan
35
34
  from ..async_connections import get_connection
36
35
  from ..response import Response
37
36
  from ..search_base import MultiSearchBase, SearchBase