elasticsearch 8.19.1__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 (112) hide show
  1. elasticsearch/_async/client/__init__.py +66 -67
  2. elasticsearch/_async/client/async_search.py +3 -3
  3. elasticsearch/_async/client/autoscaling.py +8 -4
  4. elasticsearch/_async/client/cat.py +521 -27
  5. elasticsearch/_async/client/ccr.py +2 -2
  6. elasticsearch/_async/client/cluster.py +10 -9
  7. elasticsearch/_async/client/connector.py +37 -36
  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 +4 -8
  13. elasticsearch/_async/client/graph.py +1 -5
  14. elasticsearch/_async/client/ilm.py +2 -10
  15. elasticsearch/_async/client/indices.py +393 -56
  16. elasticsearch/_async/client/inference.py +35 -121
  17. elasticsearch/_async/client/ingest.py +1 -1
  18. elasticsearch/_async/client/license.py +3 -5
  19. elasticsearch/_async/client/ml.py +61 -21
  20. elasticsearch/_async/client/monitoring.py +2 -1
  21. elasticsearch/_async/client/nodes.py +9 -9
  22. elasticsearch/_async/client/rollup.py +9 -9
  23. elasticsearch/_async/client/search_application.py +11 -11
  24. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  25. elasticsearch/_async/client/security.py +4 -4
  26. elasticsearch/_async/client/shutdown.py +12 -17
  27. elasticsearch/_async/client/simulate.py +2 -2
  28. elasticsearch/_async/client/slm.py +2 -6
  29. elasticsearch/_async/client/snapshot.py +3 -2
  30. elasticsearch/_async/client/streams.py +185 -0
  31. elasticsearch/_async/client/tasks.py +4 -4
  32. elasticsearch/_async/client/text_structure.py +5 -1
  33. elasticsearch/_async/client/transform.py +37 -0
  34. elasticsearch/_async/client/utils.py +4 -2
  35. elasticsearch/_async/client/watcher.py +3 -7
  36. elasticsearch/_async/client/xpack.py +2 -1
  37. elasticsearch/_async/helpers.py +58 -9
  38. elasticsearch/_sync/client/__init__.py +68 -67
  39. elasticsearch/_sync/client/async_search.py +3 -3
  40. elasticsearch/_sync/client/autoscaling.py +8 -4
  41. elasticsearch/_sync/client/cat.py +521 -27
  42. elasticsearch/_sync/client/ccr.py +2 -2
  43. elasticsearch/_sync/client/cluster.py +10 -9
  44. elasticsearch/_sync/client/connector.py +37 -36
  45. elasticsearch/_sync/client/dangling_indices.py +6 -10
  46. elasticsearch/_sync/client/eql.py +2 -2
  47. elasticsearch/_sync/client/esql.py +1 -1
  48. elasticsearch/_sync/client/features.py +2 -2
  49. elasticsearch/_sync/client/fleet.py +4 -8
  50. elasticsearch/_sync/client/graph.py +1 -5
  51. elasticsearch/_sync/client/ilm.py +2 -10
  52. elasticsearch/_sync/client/indices.py +393 -56
  53. elasticsearch/_sync/client/inference.py +35 -121
  54. elasticsearch/_sync/client/ingest.py +1 -1
  55. elasticsearch/_sync/client/license.py +3 -5
  56. elasticsearch/_sync/client/ml.py +61 -21
  57. elasticsearch/_sync/client/monitoring.py +2 -1
  58. elasticsearch/_sync/client/nodes.py +9 -9
  59. elasticsearch/_sync/client/rollup.py +9 -9
  60. elasticsearch/_sync/client/search_application.py +11 -11
  61. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  62. elasticsearch/_sync/client/security.py +4 -4
  63. elasticsearch/_sync/client/shutdown.py +12 -17
  64. elasticsearch/_sync/client/simulate.py +2 -2
  65. elasticsearch/_sync/client/slm.py +2 -6
  66. elasticsearch/_sync/client/snapshot.py +3 -2
  67. elasticsearch/_sync/client/streams.py +185 -0
  68. elasticsearch/_sync/client/tasks.py +4 -4
  69. elasticsearch/_sync/client/text_structure.py +5 -1
  70. elasticsearch/_sync/client/transform.py +37 -0
  71. elasticsearch/_sync/client/utils.py +16 -2
  72. elasticsearch/_sync/client/watcher.py +3 -7
  73. elasticsearch/_sync/client/xpack.py +2 -1
  74. elasticsearch/_version.py +2 -1
  75. elasticsearch/client.py +2 -0
  76. elasticsearch/compat.py +45 -1
  77. elasticsearch/dsl/__init__.py +28 -0
  78. elasticsearch/dsl/_async/document.py +4 -5
  79. elasticsearch/dsl/_async/index.py +1 -1
  80. elasticsearch/dsl/_async/search.py +2 -3
  81. elasticsearch/dsl/_sync/document.py +4 -5
  82. elasticsearch/dsl/_sync/index.py +1 -1
  83. elasticsearch/dsl/_sync/search.py +2 -3
  84. elasticsearch/dsl/aggs.py +104 -7
  85. elasticsearch/dsl/async_connections.py +1 -2
  86. elasticsearch/dsl/connections.py +1 -2
  87. elasticsearch/dsl/document_base.py +16 -1
  88. elasticsearch/dsl/field.py +12 -1
  89. elasticsearch/dsl/query.py +24 -1
  90. elasticsearch/dsl/response/__init__.py +3 -0
  91. elasticsearch/dsl/serializer.py +1 -2
  92. elasticsearch/dsl/types.py +187 -9
  93. elasticsearch/dsl/utils.py +1 -2
  94. elasticsearch/esql/esql.py +1 -1
  95. elasticsearch/esql/functions.py +2 -2
  96. elasticsearch/helpers/__init__.py +10 -1
  97. elasticsearch/helpers/actions.py +106 -33
  98. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  99. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  100. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  101. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  102. elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
  103. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  104. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  105. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  106. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
  107. {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/METADATA +2 -2
  108. elasticsearch-8.19.3.dist-info/RECORD +166 -0
  109. {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/WHEEL +1 -1
  110. elasticsearch-8.19.1.dist-info/RECORD +0 -164
  111. {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/licenses/LICENSE +0 -0
  112. {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/licenses/NOTICE +0 -0
@@ -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.
@@ -405,8 +405,8 @@ class NodesClient(NamespacedClient):
405
405
  are requested).
406
406
  :param include_unloaded_segments: If `true`, the response includes information
407
407
  from segments that are not loaded into memory.
408
- :param level: Indicates whether statistics are aggregated at the cluster, index,
409
- or shard level.
408
+ :param level: Indicates whether statistics are aggregated at the node, indices,
409
+ or shards level.
410
410
  :param timeout: Period to wait for a response. If no response is received before
411
411
  the timeout expires, the request fails and returns an error.
412
412
  :param types: A comma-separated list of document types for the indexing index
@@ -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):
@@ -33,13 +37,9 @@ class ShutdownClient(NamespacedClient):
33
37
  error_trace: t.Optional[bool] = None,
34
38
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
35
39
  human: t.Optional[bool] = None,
36
- master_timeout: t.Optional[
37
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
38
- ] = None,
40
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
39
41
  pretty: t.Optional[bool] = None,
40
- timeout: t.Optional[
41
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
42
- ] = None,
42
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
43
43
  ) -> ObjectApiResponse[t.Any]:
44
44
  """
45
45
  .. raw:: html
@@ -97,9 +97,7 @@ class ShutdownClient(NamespacedClient):
97
97
  error_trace: t.Optional[bool] = None,
98
98
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
99
99
  human: t.Optional[bool] = None,
100
- master_timeout: t.Optional[
101
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
102
- ] = None,
100
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
103
101
  pretty: t.Optional[bool] = None,
104
102
  ) -> ObjectApiResponse[t.Any]:
105
103
  """
@@ -114,7 +112,8 @@ class ShutdownClient(NamespacedClient):
114
112
 
115
113
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-shutdown.html>`_
116
114
 
117
- :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
118
117
  :param master_timeout: Period to wait for a connection to the master node. If
119
118
  no response is received before the timeout expires, the request fails and
120
119
  returns an error.
@@ -162,14 +161,10 @@ class ShutdownClient(NamespacedClient):
162
161
  error_trace: t.Optional[bool] = None,
163
162
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
164
163
  human: t.Optional[bool] = None,
165
- master_timeout: t.Optional[
166
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
167
- ] = None,
164
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
168
165
  pretty: t.Optional[bool] = None,
169
166
  target_node_name: t.Optional[str] = None,
170
- timeout: t.Optional[
171
- t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
172
- ] = None,
167
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
173
168
  body: t.Optional[t.Dict[str, t.Any]] = None,
174
169
  ) -> ObjectApiResponse[t.Any]:
175
170
  """
@@ -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.
@@ -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
- if not __body:
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 self.perform_request( # type: ignore[return-value]
440
436
  "PUT",
441
437
  __path,
@@ -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
  *,
@@ -0,0 +1,185 @@
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
+
19
+ import typing as t
20
+
21
+ from elastic_transport import ObjectApiResponse, TextApiResponse
22
+
23
+ from ._base import NamespacedClient
24
+ from .utils import (
25
+ Stability,
26
+ _availability_warning,
27
+ _rewrite_parameters,
28
+ )
29
+
30
+
31
+ class StreamsClient(NamespacedClient):
32
+
33
+ @_rewrite_parameters()
34
+ @_availability_warning(Stability.EXPERIMENTAL)
35
+ def logs_disable(
36
+ self,
37
+ *,
38
+ error_trace: t.Optional[bool] = None,
39
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
40
+ human: t.Optional[bool] = None,
41
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
42
+ pretty: t.Optional[bool] = None,
43
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
44
+ ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
45
+ """
46
+ .. raw:: html
47
+
48
+ <p>Disable logs stream.</p>
49
+ <p>Turn off the logs stream feature for this cluster.</p>
50
+
51
+
52
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
53
+
54
+ :param master_timeout: The period to wait for a connection to the master node.
55
+ If no response is received before the timeout expires, the request fails
56
+ and returns an error.
57
+ :param timeout: The period to wait for a response. If no response is received
58
+ before the timeout expires, the request fails and returns an error.
59
+ """
60
+ __path_parts: t.Dict[str, str] = {}
61
+ __path = "/_streams/logs/_disable"
62
+ __query: t.Dict[str, t.Any] = {}
63
+ if error_trace is not None:
64
+ __query["error_trace"] = error_trace
65
+ if filter_path is not None:
66
+ __query["filter_path"] = filter_path
67
+ if human is not None:
68
+ __query["human"] = human
69
+ if master_timeout is not None:
70
+ __query["master_timeout"] = master_timeout
71
+ if pretty is not None:
72
+ __query["pretty"] = pretty
73
+ if timeout is not None:
74
+ __query["timeout"] = timeout
75
+ __headers = {"accept": "text/plain,application/json"}
76
+ return self.perform_request( # type: ignore[return-value]
77
+ "POST",
78
+ __path,
79
+ params=__query,
80
+ headers=__headers,
81
+ endpoint_id="streams.logs_disable",
82
+ path_parts=__path_parts,
83
+ )
84
+
85
+ @_rewrite_parameters()
86
+ @_availability_warning(Stability.EXPERIMENTAL)
87
+ def logs_enable(
88
+ self,
89
+ *,
90
+ error_trace: t.Optional[bool] = None,
91
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
92
+ human: t.Optional[bool] = None,
93
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
94
+ pretty: t.Optional[bool] = None,
95
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
96
+ ) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
97
+ """
98
+ .. raw:: html
99
+
100
+ <p>Enable logs stream.</p>
101
+ <p>Turn on the logs stream feature for this cluster.</p>
102
+ <p>NOTE: To protect existing data, this feature can be turned on only if the
103
+ cluster does not have existing indices or data streams that match the pattern <code>logs|logs.*</code>.
104
+ If those indices or data streams exist, a <code>409 - Conflict</code> response and error is returned.</p>
105
+
106
+
107
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
108
+
109
+ :param master_timeout: The period to wait for a connection to the master node.
110
+ If no response is received before the timeout expires, the request fails
111
+ and returns an error.
112
+ :param timeout: The period to wait for a response. If no response is received
113
+ before the timeout expires, the request fails and returns an error.
114
+ """
115
+ __path_parts: t.Dict[str, str] = {}
116
+ __path = "/_streams/logs/_enable"
117
+ __query: t.Dict[str, t.Any] = {}
118
+ if error_trace is not None:
119
+ __query["error_trace"] = error_trace
120
+ if filter_path is not None:
121
+ __query["filter_path"] = filter_path
122
+ if human is not None:
123
+ __query["human"] = human
124
+ if master_timeout is not None:
125
+ __query["master_timeout"] = master_timeout
126
+ if pretty is not None:
127
+ __query["pretty"] = pretty
128
+ if timeout is not None:
129
+ __query["timeout"] = timeout
130
+ __headers = {"accept": "text/plain,application/json"}
131
+ return self.perform_request( # type: ignore[return-value]
132
+ "POST",
133
+ __path,
134
+ params=__query,
135
+ headers=__headers,
136
+ endpoint_id="streams.logs_enable",
137
+ path_parts=__path_parts,
138
+ )
139
+
140
+ @_rewrite_parameters()
141
+ @_availability_warning(Stability.EXPERIMENTAL)
142
+ def status(
143
+ self,
144
+ *,
145
+ error_trace: t.Optional[bool] = None,
146
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
147
+ human: t.Optional[bool] = None,
148
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
149
+ pretty: t.Optional[bool] = None,
150
+ ) -> ObjectApiResponse[t.Any]:
151
+ """
152
+ .. raw:: html
153
+
154
+ <p>Get the status of streams.</p>
155
+ <p>Get the current status for all types of streams.</p>
156
+
157
+
158
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
159
+
160
+ :param master_timeout: Period to wait for a connection to the master node. If
161
+ no response is received before the timeout expires, the request fails and
162
+ returns an error.
163
+ """
164
+ __path_parts: t.Dict[str, str] = {}
165
+ __path = "/_streams/status"
166
+ __query: t.Dict[str, t.Any] = {}
167
+ if error_trace is not None:
168
+ __query["error_trace"] = error_trace
169
+ if filter_path is not None:
170
+ __query["filter_path"] = filter_path
171
+ if human is not None:
172
+ __query["human"] = human
173
+ if master_timeout is not None:
174
+ __query["master_timeout"] = master_timeout
175
+ if pretty is not None:
176
+ __query["pretty"] = pretty
177
+ __headers = {"accept": "application/json"}
178
+ return self.perform_request( # type: ignore[return-value]
179
+ "GET",
180
+ __path,
181
+ params=__query,
182
+ headers=__headers,
183
+ endpoint_id="streams.status",
184
+ path_parts=__path_parts,
185
+ )
@@ -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,