elasticsearch 8.13.2__py3-none-any.whl → 8.15.0__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 (96) hide show
  1. elasticsearch/_async/client/__init__.py +204 -169
  2. elasticsearch/_async/client/async_search.py +35 -20
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +785 -180
  5. elasticsearch/_async/client/ccr.py +20 -32
  6. elasticsearch/_async/client/cluster.py +94 -88
  7. elasticsearch/_async/client/connector.py +1470 -0
  8. elasticsearch/_async/client/dangling_indices.py +7 -11
  9. elasticsearch/_async/client/enrich.py +8 -8
  10. elasticsearch/_async/client/eql.py +17 -16
  11. elasticsearch/_async/client/esql.py +2 -2
  12. elasticsearch/_async/client/features.py +2 -2
  13. elasticsearch/_async/client/fleet.py +18 -17
  14. elasticsearch/_async/client/graph.py +4 -4
  15. elasticsearch/_async/client/ilm.py +36 -44
  16. elasticsearch/_async/client/indices.py +401 -411
  17. elasticsearch/_async/client/inference.py +65 -39
  18. elasticsearch/_async/client/ingest.py +22 -23
  19. elasticsearch/_async/client/license.py +18 -10
  20. elasticsearch/_async/client/logstash.py +6 -6
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +383 -176
  23. elasticsearch/_async/client/monitoring.py +2 -2
  24. elasticsearch/_async/client/nodes.py +32 -32
  25. elasticsearch/_async/client/query_rules.py +384 -0
  26. elasticsearch/_async/client/rollup.py +13 -13
  27. elasticsearch/_async/client/search_application.py +15 -10
  28. elasticsearch/_async/client/searchable_snapshots.py +9 -13
  29. elasticsearch/_async/client/security.py +587 -104
  30. elasticsearch/_async/client/shutdown.py +7 -7
  31. elasticsearch/_async/client/slm.py +11 -13
  32. elasticsearch/_async/client/snapshot.py +39 -52
  33. elasticsearch/_async/client/sql.py +12 -14
  34. elasticsearch/_async/client/ssl.py +1 -1
  35. elasticsearch/_async/client/synonyms.py +8 -8
  36. elasticsearch/_async/client/tasks.py +9 -10
  37. elasticsearch/_async/client/text_structure.py +3 -3
  38. elasticsearch/_async/client/transform.py +89 -34
  39. elasticsearch/_async/client/watcher.py +30 -15
  40. elasticsearch/_async/client/xpack.py +6 -7
  41. elasticsearch/_otel.py +2 -6
  42. elasticsearch/_sync/client/__init__.py +204 -169
  43. elasticsearch/_sync/client/async_search.py +35 -20
  44. elasticsearch/_sync/client/autoscaling.py +4 -4
  45. elasticsearch/_sync/client/cat.py +785 -180
  46. elasticsearch/_sync/client/ccr.py +20 -32
  47. elasticsearch/_sync/client/cluster.py +94 -88
  48. elasticsearch/_sync/client/connector.py +1470 -0
  49. elasticsearch/_sync/client/dangling_indices.py +7 -11
  50. elasticsearch/_sync/client/enrich.py +8 -8
  51. elasticsearch/_sync/client/eql.py +17 -16
  52. elasticsearch/_sync/client/esql.py +2 -2
  53. elasticsearch/_sync/client/features.py +2 -2
  54. elasticsearch/_sync/client/fleet.py +18 -17
  55. elasticsearch/_sync/client/graph.py +4 -4
  56. elasticsearch/_sync/client/ilm.py +36 -44
  57. elasticsearch/_sync/client/indices.py +401 -411
  58. elasticsearch/_sync/client/inference.py +65 -39
  59. elasticsearch/_sync/client/ingest.py +22 -23
  60. elasticsearch/_sync/client/license.py +18 -10
  61. elasticsearch/_sync/client/logstash.py +6 -6
  62. elasticsearch/_sync/client/migration.py +3 -3
  63. elasticsearch/_sync/client/ml.py +383 -176
  64. elasticsearch/_sync/client/monitoring.py +2 -2
  65. elasticsearch/_sync/client/nodes.py +32 -32
  66. elasticsearch/_sync/client/query_rules.py +384 -0
  67. elasticsearch/_sync/client/rollup.py +13 -13
  68. elasticsearch/_sync/client/search_application.py +15 -10
  69. elasticsearch/_sync/client/searchable_snapshots.py +9 -13
  70. elasticsearch/_sync/client/security.py +587 -104
  71. elasticsearch/_sync/client/shutdown.py +7 -7
  72. elasticsearch/_sync/client/slm.py +11 -13
  73. elasticsearch/_sync/client/snapshot.py +39 -52
  74. elasticsearch/_sync/client/sql.py +12 -14
  75. elasticsearch/_sync/client/ssl.py +1 -1
  76. elasticsearch/_sync/client/synonyms.py +8 -8
  77. elasticsearch/_sync/client/tasks.py +9 -10
  78. elasticsearch/_sync/client/text_structure.py +3 -3
  79. elasticsearch/_sync/client/transform.py +89 -34
  80. elasticsearch/_sync/client/watcher.py +30 -15
  81. elasticsearch/_sync/client/xpack.py +6 -7
  82. elasticsearch/_version.py +1 -1
  83. elasticsearch/client.py +3 -3
  84. elasticsearch/helpers/vectorstore/_async/vectorstore.py +36 -6
  85. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +36 -6
  86. elasticsearch/serializer.py +34 -1
  87. elasticsearch-8.15.0.dist-info/METADATA +177 -0
  88. elasticsearch-8.15.0.dist-info/RECORD +117 -0
  89. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info}/WHEEL +1 -2
  90. elasticsearch/_async/client/query_ruleset.py +0 -205
  91. elasticsearch/_sync/client/query_ruleset.py +0 -205
  92. elasticsearch-8.13.2.dist-info/METADATA +0 -147
  93. elasticsearch-8.13.2.dist-info/RECORD +0 -116
  94. elasticsearch-8.13.2.dist-info/top_level.txt +0 -1
  95. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/LICENSE +0 -0
  96. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/NOTICE +0 -0
@@ -36,12 +36,12 @@ class TransformClient(NamespacedClient):
36
36
  force: t.Optional[bool] = None,
37
37
  human: t.Optional[bool] = None,
38
38
  pretty: t.Optional[bool] = None,
39
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
39
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
40
40
  ) -> ObjectApiResponse[t.Any]:
41
41
  """
42
- Deletes an existing transform.
42
+ Deletes a transform.
43
43
 
44
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-transform.html>`_
44
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-transform.html>`_
45
45
 
46
46
  :param transform_id: Identifier for the transform.
47
47
  :param delete_dest_index: If this value is true, the destination index is deleted
@@ -101,7 +101,7 @@ class TransformClient(NamespacedClient):
101
101
  """
102
102
  Retrieves configuration information for transforms.
103
103
 
104
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-transform.html>`_
104
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-transform.html>`_
105
105
 
106
106
  :param transform_id: Identifier for the transform. It can be a transform identifier
107
107
  or a wildcard expression. You can get information for all transforms by using
@@ -165,12 +165,12 @@ class TransformClient(NamespacedClient):
165
165
  human: t.Optional[bool] = None,
166
166
  pretty: t.Optional[bool] = None,
167
167
  size: t.Optional[int] = None,
168
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
168
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
169
169
  ) -> ObjectApiResponse[t.Any]:
170
170
  """
171
171
  Retrieves usage information for transforms.
172
172
 
173
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-transform-stats.html>`_
173
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/get-transform-stats.html>`_
174
174
 
175
175
  :param transform_id: Identifier for the transform. It can be a transform identifier
176
176
  or a wildcard expression. You can get information for all transforms by using
@@ -236,7 +236,7 @@ class TransformClient(NamespacedClient):
236
236
  dest: t.Optional[t.Mapping[str, t.Any]] = None,
237
237
  error_trace: t.Optional[bool] = None,
238
238
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
239
- frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
239
+ frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
240
240
  human: t.Optional[bool] = None,
241
241
  latest: t.Optional[t.Mapping[str, t.Any]] = None,
242
242
  pivot: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -245,13 +245,16 @@ class TransformClient(NamespacedClient):
245
245
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
246
246
  source: t.Optional[t.Mapping[str, t.Any]] = None,
247
247
  sync: t.Optional[t.Mapping[str, t.Any]] = None,
248
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
248
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
249
249
  body: t.Optional[t.Dict[str, t.Any]] = None,
250
250
  ) -> ObjectApiResponse[t.Any]:
251
251
  """
252
- Previews a transform.
252
+ Previews a transform. It returns a maximum of 100 results. The calculations are
253
+ based on all the current data in the source index. It also generates a list of
254
+ mappings and settings for the destination index. These values are determined
255
+ based on the field types of the source index and the transform aggregations.
253
256
 
254
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/preview-transform.html>`_
257
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/preview-transform.html>`_
255
258
 
256
259
  :param transform_id: Identifier for the transform to preview. If you specify
257
260
  this path parameter, you cannot provide transform configuration details in
@@ -353,7 +356,7 @@ class TransformClient(NamespacedClient):
353
356
  description: t.Optional[str] = None,
354
357
  error_trace: t.Optional[bool] = None,
355
358
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
356
- frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
359
+ frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
357
360
  human: t.Optional[bool] = None,
358
361
  latest: t.Optional[t.Mapping[str, t.Any]] = None,
359
362
  meta: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -362,13 +365,32 @@ class TransformClient(NamespacedClient):
362
365
  retention_policy: t.Optional[t.Mapping[str, t.Any]] = None,
363
366
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
364
367
  sync: t.Optional[t.Mapping[str, t.Any]] = None,
365
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
368
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
366
369
  body: t.Optional[t.Dict[str, t.Any]] = None,
367
370
  ) -> ObjectApiResponse[t.Any]:
368
371
  """
369
- Instantiates a transform.
370
-
371
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-transform.html>`_
372
+ Creates a transform. A transform copies data from source indices, transforms
373
+ it, and persists it into an entity-centric destination index. You can also think
374
+ of the destination index as a two-dimensional tabular data structure (known as
375
+ a data frame). The ID for each document in the data frame is generated from a
376
+ hash of the entity, so there is a unique row per entity. You must choose either
377
+ the latest or pivot method for your transform; you cannot use both in a single
378
+ transform. If you choose to use the pivot method for your transform, the entities
379
+ are defined by the set of `group_by` fields in the pivot object. If you choose
380
+ to use the latest method, the entities are defined by the `unique_key` field
381
+ values in the latest object. You must have `create_index`, `index`, and `read`
382
+ privileges on the destination index and `read` and `view_index_metadata` privileges
383
+ on the source indices. When Elasticsearch security features are enabled, the
384
+ transform remembers which roles the user that created it had at the time of creation
385
+ and uses those same roles. If those roles do not have the required privileges
386
+ on the source and destination indices, the transform fails when it attempts unauthorized
387
+ operations. NOTE: You must use Kibana or this API to create a transform. Do not
388
+ add a transform directly into any `.transform-internal*` indices using the Elasticsearch
389
+ index API. If Elasticsearch security features are enabled, do not give users
390
+ any privileges on `.transform-internal*` indices. If you used transforms prior
391
+ to 7.5, also do not give users any privileges on `.data-frame-internal*` indices.
392
+
393
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-transform.html>`_
372
394
 
373
395
  :param transform_id: Identifier for the transform. This identifier can contain
374
396
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -466,9 +488,11 @@ class TransformClient(NamespacedClient):
466
488
  pretty: t.Optional[bool] = None,
467
489
  ) -> ObjectApiResponse[t.Any]:
468
490
  """
469
- Resets an existing transform.
491
+ Resets a transform. Before you can reset it, you must stop it; alternatively,
492
+ use the `force` query parameter. If the destination index was created by the
493
+ transform, it is deleted.
470
494
 
471
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/reset-transform.html>`_
495
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/reset-transform.html>`_
472
496
 
473
497
  :param transform_id: Identifier for the transform. This identifier can contain
474
498
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -511,12 +535,15 @@ class TransformClient(NamespacedClient):
511
535
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
512
536
  human: t.Optional[bool] = None,
513
537
  pretty: t.Optional[bool] = None,
514
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
538
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
515
539
  ) -> ObjectApiResponse[t.Any]:
516
540
  """
517
- Schedules now a transform.
541
+ Schedules now a transform. If you _schedule_now a transform, it will process
542
+ the new data instantly, without waiting for the configured frequency interval.
543
+ After _schedule_now API is called, the transform will be processed again at now
544
+ + frequency unless _schedule_now API is called again in the meantime.
518
545
 
519
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/schedule-now-transform.html>`_
546
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/schedule-now-transform.html>`_
520
547
 
521
548
  :param transform_id: Identifier for the transform.
522
549
  :param timeout: Controls the time to wait for the scheduling to take place
@@ -558,12 +585,28 @@ class TransformClient(NamespacedClient):
558
585
  from_: t.Optional[str] = None,
559
586
  human: t.Optional[bool] = None,
560
587
  pretty: t.Optional[bool] = None,
561
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
588
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
562
589
  ) -> ObjectApiResponse[t.Any]:
563
590
  """
564
- Starts one or more transforms.
565
-
566
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/start-transform.html>`_
591
+ Starts a transform. When you start a transform, it creates the destination index
592
+ if it does not already exist. The `number_of_shards` is set to `1` and the `auto_expand_replicas`
593
+ is set to `0-1`. If it is a pivot transform, it deduces the mapping definitions
594
+ for the destination index from the source indices and the transform aggregations.
595
+ If fields in the destination index are derived from scripts (as in the case of
596
+ `scripted_metric` or `bucket_script` aggregations), the transform uses dynamic
597
+ mappings unless an index template exists. If it is a latest transform, it does
598
+ not deduce mapping definitions; it uses dynamic mappings. To use explicit mappings,
599
+ create the destination index before you start the transform. Alternatively, you
600
+ can create an index template, though it does not affect the deduced mappings
601
+ in a pivot transform. When the transform starts, a series of validations occur
602
+ to ensure its success. If you deferred validation when you created the transform,
603
+ they occur when you start the transform—​with the exception of privilege checks.
604
+ When Elasticsearch security features are enabled, the transform remembers which
605
+ roles the user that created it had at the time of creation and uses those same
606
+ roles. If those roles do not have the required privileges on the source and destination
607
+ indices, the transform fails when it attempts unauthorized operations.
608
+
609
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/start-transform.html>`_
567
610
 
568
611
  :param transform_id: Identifier for the transform.
569
612
  :param from_: Restricts the set of transformed entities to those changed after
@@ -610,14 +653,14 @@ class TransformClient(NamespacedClient):
610
653
  force: t.Optional[bool] = None,
611
654
  human: t.Optional[bool] = None,
612
655
  pretty: t.Optional[bool] = None,
613
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
656
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
614
657
  wait_for_checkpoint: t.Optional[bool] = None,
615
658
  wait_for_completion: t.Optional[bool] = None,
616
659
  ) -> ObjectApiResponse[t.Any]:
617
660
  """
618
661
  Stops one or more transforms.
619
662
 
620
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/stop-transform.html>`_
663
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/stop-transform.html>`_
621
664
 
622
665
  :param transform_id: Identifier for the transform. To stop multiple transforms,
623
666
  use a comma-separated list or a wildcard expression. To stop all transforms,
@@ -696,7 +739,7 @@ class TransformClient(NamespacedClient):
696
739
  dest: t.Optional[t.Mapping[str, t.Any]] = None,
697
740
  error_trace: t.Optional[bool] = None,
698
741
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
699
- frequency: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
742
+ frequency: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
700
743
  human: t.Optional[bool] = None,
701
744
  meta: t.Optional[t.Mapping[str, t.Any]] = None,
702
745
  pretty: t.Optional[bool] = None,
@@ -704,13 +747,19 @@ class TransformClient(NamespacedClient):
704
747
  settings: t.Optional[t.Mapping[str, t.Any]] = None,
705
748
  source: t.Optional[t.Mapping[str, t.Any]] = None,
706
749
  sync: t.Optional[t.Mapping[str, t.Any]] = None,
707
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
750
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
708
751
  body: t.Optional[t.Dict[str, t.Any]] = None,
709
752
  ) -> ObjectApiResponse[t.Any]:
710
753
  """
711
- Updates certain properties of a transform.
754
+ Updates certain properties of a transform. All updated properties except `description`
755
+ do not take effect until after the transform starts the next checkpoint, thus
756
+ there is data consistency in each checkpoint. To use this API, you must have
757
+ `read` and `view_index_metadata` privileges for the source indices. You must
758
+ also have `index` and `read` privileges for the destination index. When Elasticsearch
759
+ security features are enabled, the transform remembers which roles the user who
760
+ updated it had at the time of update and runs with those privileges.
712
761
 
713
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/update-transform.html>`_
762
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/update-transform.html>`_
714
763
 
715
764
  :param transform_id: Identifier for the transform.
716
765
  :param defer_validation: When true, deferrable validations are not run. This
@@ -786,12 +835,18 @@ class TransformClient(NamespacedClient):
786
835
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
787
836
  human: t.Optional[bool] = None,
788
837
  pretty: t.Optional[bool] = None,
789
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
838
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
790
839
  ) -> ObjectApiResponse[t.Any]:
791
840
  """
792
- Upgrades all transforms.
793
-
794
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/upgrade-transforms.html>`_
841
+ Upgrades all transforms. This API identifies transforms that have a legacy configuration
842
+ format and upgrades them to the latest version. It also cleans up the internal
843
+ data structures that store the transform state and checkpoints. The upgrade does
844
+ not affect the source and destination indices. The upgrade also does not affect
845
+ the roles that transforms use when Elasticsearch security features are enabled;
846
+ the role used to read source data and write to the destination index remains
847
+ unchanged.
848
+
849
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/upgrade-transforms.html>`_
795
850
 
796
851
  :param dry_run: When true, the request checks for updates but does not run them.
797
852
  :param timeout: Period to wait for a response. If no response is received before
@@ -39,7 +39,7 @@ class WatcherClient(NamespacedClient):
39
39
  """
40
40
  Acknowledges a watch, manually throttling the execution of the watch's actions.
41
41
 
42
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-ack-watch.html>`_
42
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-ack-watch.html>`_
43
43
 
44
44
  :param watch_id: Watch ID
45
45
  :param action_id: A comma-separated list of the action ids to be acked
@@ -90,7 +90,7 @@ class WatcherClient(NamespacedClient):
90
90
  """
91
91
  Activates a currently inactive watch.
92
92
 
93
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-activate-watch.html>`_
93
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-activate-watch.html>`_
94
94
 
95
95
  :param watch_id: Watch ID
96
96
  """
@@ -130,7 +130,7 @@ class WatcherClient(NamespacedClient):
130
130
  """
131
131
  Deactivates a currently active watch.
132
132
 
133
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-deactivate-watch.html>`_
133
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-deactivate-watch.html>`_
134
134
 
135
135
  :param watch_id: Watch ID
136
136
  """
@@ -170,7 +170,7 @@ class WatcherClient(NamespacedClient):
170
170
  """
171
171
  Removes a watch from Watcher.
172
172
 
173
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-delete-watch.html>`_
173
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-delete-watch.html>`_
174
174
 
175
175
  :param id: Watch ID
176
176
  """
@@ -216,8 +216,10 @@ class WatcherClient(NamespacedClient):
216
216
  t.Mapping[
217
217
  str,
218
218
  t.Union[
219
- "t.Literal['execute', 'force_execute', 'force_simulate', 'simulate', 'skip']",
220
219
  str,
220
+ t.Literal[
221
+ "execute", "force_execute", "force_simulate", "simulate", "skip"
222
+ ],
221
223
  ],
222
224
  ]
223
225
  ] = None,
@@ -235,9 +237,15 @@ class WatcherClient(NamespacedClient):
235
237
  body: t.Optional[t.Dict[str, t.Any]] = None,
236
238
  ) -> ObjectApiResponse[t.Any]:
237
239
  """
238
- Forces the execution of a stored watch.
240
+ This API can be used to force execution of the watch outside of its triggering
241
+ logic or to simulate the watch execution for debugging purposes. For testing
242
+ and debugging purposes, you also have fine-grained control on how the watch runs.
243
+ You can execute the watch without executing all of its actions or alternatively
244
+ by simulating them. You can also force execution by ignoring the watch condition
245
+ and control whether a watch record would be written to the watch history after
246
+ execution.
239
247
 
240
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-execute-watch.html>`_
248
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-execute-watch.html>`_
241
249
 
242
250
  :param id: Identifier for the watch.
243
251
  :param action_modes: Determines how to handle the watch actions as part of the
@@ -320,7 +328,7 @@ class WatcherClient(NamespacedClient):
320
328
  """
321
329
  Retrieves a watch by its ID.
322
330
 
323
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-get-watch.html>`_
331
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-get-watch.html>`_
324
332
 
325
333
  :param id: Watch ID
326
334
  """
@@ -382,7 +390,7 @@ class WatcherClient(NamespacedClient):
382
390
  """
383
391
  Creates a new watch, or updates an existing one.
384
392
 
385
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-put-watch.html>`_
393
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-put-watch.html>`_
386
394
 
387
395
  :param id: Watch ID
388
396
  :param actions:
@@ -479,7 +487,7 @@ class WatcherClient(NamespacedClient):
479
487
  """
480
488
  Retrieves stored watches.
481
489
 
482
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-query-watches.html>`_
490
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-query-watches.html>`_
483
491
 
484
492
  :param from_: The offset from the first result to fetch. Needs to be non-negative.
485
493
  :param query: Optional, query filter watches to be returned.
@@ -549,7 +557,7 @@ class WatcherClient(NamespacedClient):
549
557
  """
550
558
  Starts Watcher if it is not already running.
551
559
 
552
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-start.html>`_
560
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-start.html>`_
553
561
  """
554
562
  __path_parts: t.Dict[str, str] = {}
555
563
  __path = "/_watcher/_start"
@@ -580,13 +588,20 @@ class WatcherClient(NamespacedClient):
580
588
  t.Union[
581
589
  t.Sequence[
582
590
  t.Union[
583
- "t.Literal['_all', 'current_watches', 'pending_watches', 'queued_watches']",
584
591
  str,
592
+ t.Literal[
593
+ "_all",
594
+ "current_watches",
595
+ "pending_watches",
596
+ "queued_watches",
597
+ ],
585
598
  ]
586
599
  ],
587
600
  t.Union[
588
- "t.Literal['_all', 'current_watches', 'pending_watches', 'queued_watches']",
589
601
  str,
602
+ t.Literal[
603
+ "_all", "current_watches", "pending_watches", "queued_watches"
604
+ ],
590
605
  ],
591
606
  ]
592
607
  ] = None,
@@ -599,7 +614,7 @@ class WatcherClient(NamespacedClient):
599
614
  """
600
615
  Retrieves the current Watcher metrics.
601
616
 
602
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-stats.html>`_
617
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-stats.html>`_
603
618
 
604
619
  :param metric: Defines which additional metrics are included in the response.
605
620
  :param emit_stacktraces: Defines whether stack traces are generated for each
@@ -645,7 +660,7 @@ class WatcherClient(NamespacedClient):
645
660
  """
646
661
  Stops Watcher if it is running.
647
662
 
648
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/watcher-api-stop.html>`_
663
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/watcher-api-stop.html>`_
649
664
  """
650
665
  __path_parts: t.Dict[str, str] = {}
651
666
  __path = "/_watcher/_stop"
@@ -41,9 +41,9 @@ class XPackClient(NamespacedClient):
41
41
  pretty: t.Optional[bool] = None,
42
42
  ) -> ObjectApiResponse[t.Any]:
43
43
  """
44
- Retrieves information about the installed X-Pack features.
44
+ Provides general information about the installed X-Pack features.
45
45
 
46
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/info-api.html>`_
46
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/info-api.html>`_
47
47
 
48
48
  :param accept_enterprise: If this param is used it must be set to true
49
49
  :param categories: A comma-separated list of the information categories to include
@@ -81,15 +81,14 @@ class XPackClient(NamespacedClient):
81
81
  error_trace: t.Optional[bool] = None,
82
82
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
83
83
  human: t.Optional[bool] = None,
84
- master_timeout: t.Optional[
85
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
86
- ] = None,
84
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
87
85
  pretty: t.Optional[bool] = None,
88
86
  ) -> ObjectApiResponse[t.Any]:
89
87
  """
90
- Retrieves usage information about the installed X-Pack features.
88
+ This API provides information about which features are currently enabled and
89
+ available under the current license and some usage statistics.
91
90
 
92
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/usage-api.html>`_
91
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/usage-api.html>`_
93
92
 
94
93
  :param master_timeout: Period to wait for a connection to the master node. If
95
94
  no response is received before the timeout expires, the request fails and
elasticsearch/_otel.py CHANGED
@@ -19,10 +19,7 @@ from __future__ import annotations
19
19
 
20
20
  import contextlib
21
21
  import os
22
- from typing import TYPE_CHECKING, Generator, Mapping
23
-
24
- if TYPE_CHECKING:
25
- from typing import Literal
22
+ from typing import Generator, Literal, Mapping
26
23
 
27
24
  try:
28
25
  from opentelemetry import trace
@@ -48,8 +45,7 @@ class OpenTelemetry:
48
45
  self,
49
46
  enabled: bool | None = None,
50
47
  tracer: trace.Tracer | None = None,
51
- # TODO import Literal at the top-level when dropping Python 3.7
52
- body_strategy: 'Literal["omit", "raw"]' | None = None,
48
+ body_strategy: Literal["omit", "raw"] | None = None,
53
49
  ):
54
50
  if enabled is None:
55
51
  enabled = os.environ.get(ENABLED_ENV_VAR, "true") == "true"