elasticsearch 8.17.0__py3-none-any.whl → 8.17.2__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 (95) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2034 -740
  3. elasticsearch/_async/client/async_search.py +33 -22
  4. elasticsearch/_async/client/autoscaling.py +27 -21
  5. elasticsearch/_async/client/cat.py +280 -336
  6. elasticsearch/_async/client/ccr.py +96 -70
  7. elasticsearch/_async/client/cluster.py +152 -144
  8. elasticsearch/_async/client/connector.py +488 -55
  9. elasticsearch/_async/client/dangling_indices.py +22 -16
  10. elasticsearch/_async/client/enrich.py +25 -6
  11. elasticsearch/_async/client/eql.py +22 -9
  12. elasticsearch/_async/client/esql.py +295 -3
  13. elasticsearch/_async/client/features.py +25 -25
  14. elasticsearch/_async/client/fleet.py +15 -9
  15. elasticsearch/_async/client/graph.py +9 -8
  16. elasticsearch/_async/client/ilm.py +91 -61
  17. elasticsearch/_async/client/indices.py +746 -324
  18. elasticsearch/_async/client/inference.py +101 -4
  19. elasticsearch/_async/client/ingest.py +231 -19
  20. elasticsearch/_async/client/license.py +48 -31
  21. elasticsearch/_async/client/logstash.py +20 -6
  22. elasticsearch/_async/client/migration.py +25 -7
  23. elasticsearch/_async/client/ml.py +532 -278
  24. elasticsearch/_async/client/monitoring.py +5 -1
  25. elasticsearch/_async/client/nodes.py +46 -30
  26. elasticsearch/_async/client/query_rules.py +65 -18
  27. elasticsearch/_async/client/rollup.py +126 -13
  28. elasticsearch/_async/client/search_application.py +170 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +45 -23
  30. elasticsearch/_async/client/security.py +1299 -340
  31. elasticsearch/_async/client/shutdown.py +43 -15
  32. elasticsearch/_async/client/simulate.py +145 -0
  33. elasticsearch/_async/client/slm.py +163 -19
  34. elasticsearch/_async/client/snapshot.py +288 -23
  35. elasticsearch/_async/client/sql.py +94 -53
  36. elasticsearch/_async/client/ssl.py +16 -17
  37. elasticsearch/_async/client/synonyms.py +67 -26
  38. elasticsearch/_async/client/tasks.py +103 -28
  39. elasticsearch/_async/client/text_structure.py +475 -46
  40. elasticsearch/_async/client/transform.py +108 -72
  41. elasticsearch/_async/client/watcher.py +245 -43
  42. elasticsearch/_async/client/xpack.py +20 -6
  43. elasticsearch/_async/helpers.py +1 -1
  44. elasticsearch/_sync/client/__init__.py +2034 -740
  45. elasticsearch/_sync/client/async_search.py +33 -22
  46. elasticsearch/_sync/client/autoscaling.py +27 -21
  47. elasticsearch/_sync/client/cat.py +280 -336
  48. elasticsearch/_sync/client/ccr.py +96 -70
  49. elasticsearch/_sync/client/cluster.py +152 -144
  50. elasticsearch/_sync/client/connector.py +488 -55
  51. elasticsearch/_sync/client/dangling_indices.py +22 -16
  52. elasticsearch/_sync/client/enrich.py +25 -6
  53. elasticsearch/_sync/client/eql.py +22 -9
  54. elasticsearch/_sync/client/esql.py +295 -3
  55. elasticsearch/_sync/client/features.py +25 -25
  56. elasticsearch/_sync/client/fleet.py +15 -9
  57. elasticsearch/_sync/client/graph.py +9 -8
  58. elasticsearch/_sync/client/ilm.py +91 -61
  59. elasticsearch/_sync/client/indices.py +746 -324
  60. elasticsearch/_sync/client/inference.py +101 -4
  61. elasticsearch/_sync/client/ingest.py +231 -19
  62. elasticsearch/_sync/client/license.py +48 -31
  63. elasticsearch/_sync/client/logstash.py +20 -6
  64. elasticsearch/_sync/client/migration.py +25 -7
  65. elasticsearch/_sync/client/ml.py +532 -278
  66. elasticsearch/_sync/client/monitoring.py +5 -1
  67. elasticsearch/_sync/client/nodes.py +46 -30
  68. elasticsearch/_sync/client/query_rules.py +65 -18
  69. elasticsearch/_sync/client/rollup.py +126 -13
  70. elasticsearch/_sync/client/search_application.py +170 -13
  71. elasticsearch/_sync/client/searchable_snapshots.py +45 -23
  72. elasticsearch/_sync/client/security.py +1299 -340
  73. elasticsearch/_sync/client/shutdown.py +43 -15
  74. elasticsearch/_sync/client/simulate.py +145 -0
  75. elasticsearch/_sync/client/slm.py +163 -19
  76. elasticsearch/_sync/client/snapshot.py +288 -23
  77. elasticsearch/_sync/client/sql.py +94 -53
  78. elasticsearch/_sync/client/ssl.py +16 -17
  79. elasticsearch/_sync/client/synonyms.py +67 -26
  80. elasticsearch/_sync/client/tasks.py +103 -28
  81. elasticsearch/_sync/client/text_structure.py +475 -46
  82. elasticsearch/_sync/client/transform.py +108 -72
  83. elasticsearch/_sync/client/utils.py +1 -1
  84. elasticsearch/_sync/client/watcher.py +245 -43
  85. elasticsearch/_sync/client/xpack.py +20 -6
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/client.py +4 -0
  88. elasticsearch/helpers/actions.py +1 -1
  89. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  90. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
  91. elasticsearch-8.17.2.dist-info/RECORD +119 -0
  92. elasticsearch-8.17.0.dist-info/RECORD +0 -117
  93. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
  94. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
@@ -43,8 +43,11 @@ class ConnectorClient(NamespacedClient):
43
43
  pretty: t.Optional[bool] = None,
44
44
  ) -> ObjectApiResponse[t.Any]:
45
45
  """
46
- Check in a connector. Update the `last_seen` field in the connector and set it
47
- to the current timestamp.
46
+ .. raw:: html
47
+
48
+ <p>Check in a connector.</p>
49
+ <p>Update the <code>last_seen</code> field in the connector and set it to the current timestamp.</p>
50
+
48
51
 
49
52
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/check-in-connector-api.html>`_
50
53
 
@@ -86,10 +89,14 @@ class ConnectorClient(NamespacedClient):
86
89
  pretty: t.Optional[bool] = None,
87
90
  ) -> ObjectApiResponse[t.Any]:
88
91
  """
89
- Delete a connector. Removes a connector and associated sync jobs. This is a destructive
90
- action that is not recoverable. NOTE: This action doesn’t delete any API keys,
91
- ingest pipelines, or data indices associated with the connector. These need to
92
- be removed manually.
92
+ .. raw:: html
93
+
94
+ <p>Delete a connector.</p>
95
+ <p>Removes a connector and associated sync jobs.
96
+ This is a destructive action that is not recoverable.
97
+ NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector.
98
+ These need to be removed manually.</p>
99
+
93
100
 
94
101
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-connector-api.html>`_
95
102
 
@@ -134,7 +141,11 @@ class ConnectorClient(NamespacedClient):
134
141
  pretty: t.Optional[bool] = None,
135
142
  ) -> ObjectApiResponse[t.Any]:
136
143
  """
137
- Get a connector. Get the details about a connector.
144
+ .. raw:: html
145
+
146
+ <p>Get a connector.</p>
147
+ <p>Get the details about a connector.</p>
148
+
138
149
 
139
150
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-connector-api.html>`_
140
151
 
@@ -229,8 +240,12 @@ class ConnectorClient(NamespacedClient):
229
240
  body: t.Optional[t.Dict[str, t.Any]] = None,
230
241
  ) -> ObjectApiResponse[t.Any]:
231
242
  """
232
- Update the connector last sync stats. Update the fields related to the last sync
233
- of a connector. This action is used for analytics and monitoring.
243
+ .. raw:: html
244
+
245
+ <p>Update the connector last sync stats.</p>
246
+ <p>Update the fields related to the last sync of a connector.
247
+ This action is used for analytics and monitoring.</p>
248
+
234
249
 
235
250
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-last-sync-api.html>`_
236
251
 
@@ -325,7 +340,11 @@ class ConnectorClient(NamespacedClient):
325
340
  size: t.Optional[int] = None,
326
341
  ) -> ObjectApiResponse[t.Any]:
327
342
  """
328
- Get all connectors. Get information about all connectors.
343
+ .. raw:: html
344
+
345
+ <p>Get all connectors.</p>
346
+ <p>Get information about all connectors.</p>
347
+
329
348
 
330
349
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-connector-api.html>`_
331
350
 
@@ -400,11 +419,13 @@ class ConnectorClient(NamespacedClient):
400
419
  body: t.Optional[t.Dict[str, t.Any]] = None,
401
420
  ) -> ObjectApiResponse[t.Any]:
402
421
  """
403
- Create a connector. Connectors are Elasticsearch integrations that bring content
404
- from third-party data sources, which can be deployed on Elastic Cloud or hosted
405
- on your own infrastructure. Elastic managed connectors (Native connectors) are
406
- a managed service on Elastic Cloud. Self-managed connectors (Connector clients)
407
- are self-managed on your infrastructure.
422
+ .. raw:: html
423
+
424
+ <p>Create a connector.</p>
425
+ <p>Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.
426
+ Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud.
427
+ Self-managed connectors (Connector clients) are self-managed on your infrastructure.</p>
428
+
408
429
 
409
430
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-api.html>`_
410
431
 
@@ -483,7 +504,10 @@ class ConnectorClient(NamespacedClient):
483
504
  body: t.Optional[t.Dict[str, t.Any]] = None,
484
505
  ) -> ObjectApiResponse[t.Any]:
485
506
  """
486
- Create or update a connector.
507
+ .. raw:: html
508
+
509
+ <p>Create or update a connector.</p>
510
+
487
511
 
488
512
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-api.html>`_
489
513
 
@@ -553,10 +577,12 @@ class ConnectorClient(NamespacedClient):
553
577
  pretty: t.Optional[bool] = None,
554
578
  ) -> ObjectApiResponse[t.Any]:
555
579
  """
556
- Cancel a connector sync job. Cancel a connector sync job, which sets the status
557
- to cancelling and updates `cancellation_requested_at` to the current time. The
558
- connector service is then responsible for setting the status of connector sync
559
- jobs to cancelled.
580
+ .. raw:: html
581
+
582
+ <p>Cancel a connector sync job.</p>
583
+ <p>Cancel a connector sync job, which sets the status to cancelling and updates <code>cancellation_requested_at</code> to the current time.
584
+ The connector service is then responsible for setting the status of connector sync jobs to cancelled.</p>
585
+
560
586
 
561
587
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cancel-connector-sync-job-api.html>`_
562
588
 
@@ -589,6 +615,129 @@ class ConnectorClient(NamespacedClient):
589
615
  path_parts=__path_parts,
590
616
  )
591
617
 
618
+ @_rewrite_parameters()
619
+ @_stability_warning(Stability.EXPERIMENTAL)
620
+ async def sync_job_check_in(
621
+ self,
622
+ *,
623
+ connector_sync_job_id: str,
624
+ error_trace: t.Optional[bool] = None,
625
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
626
+ human: t.Optional[bool] = None,
627
+ pretty: t.Optional[bool] = None,
628
+ ) -> ObjectApiResponse[t.Any]:
629
+ """
630
+ .. raw:: html
631
+
632
+ <p>Check in a connector sync job.
633
+ Check in a connector sync job and set the <code>last_seen</code> field to the current time before updating it in the internal index.</p>
634
+ <p>To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
635
+ This service runs automatically on Elastic Cloud for Elastic managed connectors.</p>
636
+
637
+
638
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/check-in-connector-sync-job-api.html>`_
639
+
640
+ :param connector_sync_job_id: The unique identifier of the connector sync job
641
+ to be checked in.
642
+ """
643
+ if connector_sync_job_id in SKIP_IN_PATH:
644
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
645
+ __path_parts: t.Dict[str, str] = {
646
+ "connector_sync_job_id": _quote(connector_sync_job_id)
647
+ }
648
+ __path = (
649
+ f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_check_in'
650
+ )
651
+ __query: t.Dict[str, t.Any] = {}
652
+ if error_trace is not None:
653
+ __query["error_trace"] = error_trace
654
+ if filter_path is not None:
655
+ __query["filter_path"] = filter_path
656
+ if human is not None:
657
+ __query["human"] = human
658
+ if pretty is not None:
659
+ __query["pretty"] = pretty
660
+ __headers = {"accept": "application/json"}
661
+ return await self.perform_request( # type: ignore[return-value]
662
+ "PUT",
663
+ __path,
664
+ params=__query,
665
+ headers=__headers,
666
+ endpoint_id="connector.sync_job_check_in",
667
+ path_parts=__path_parts,
668
+ )
669
+
670
+ @_rewrite_parameters(
671
+ body_fields=("worker_hostname", "sync_cursor"),
672
+ )
673
+ @_stability_warning(Stability.EXPERIMENTAL)
674
+ async def sync_job_claim(
675
+ self,
676
+ *,
677
+ connector_sync_job_id: str,
678
+ worker_hostname: t.Optional[str] = None,
679
+ error_trace: t.Optional[bool] = None,
680
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
681
+ human: t.Optional[bool] = None,
682
+ pretty: t.Optional[bool] = None,
683
+ sync_cursor: t.Optional[t.Any] = None,
684
+ body: t.Optional[t.Dict[str, t.Any]] = None,
685
+ ) -> ObjectApiResponse[t.Any]:
686
+ """
687
+ .. raw:: html
688
+
689
+ <p>Claim a connector sync job.
690
+ This action updates the job status to <code>in_progress</code> and sets the <code>last_seen</code> and <code>started_at</code> timestamps to the current time.
691
+ Additionally, it can set the <code>sync_cursor</code> property for the sync job.</p>
692
+ <p>This API is not intended for direct connector management by users.
693
+ It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.</p>
694
+ <p>To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
695
+ This service runs automatically on Elastic Cloud for Elastic managed connectors.</p>
696
+
697
+
698
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/claim-connector-sync-job-api.html>`_
699
+
700
+ :param connector_sync_job_id: The unique identifier of the connector sync job.
701
+ :param worker_hostname: The host name of the current system that will run the
702
+ job.
703
+ :param sync_cursor: The cursor object from the last incremental sync job. This
704
+ should reference the `sync_cursor` field in the connector state for which
705
+ the job runs.
706
+ """
707
+ if connector_sync_job_id in SKIP_IN_PATH:
708
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
709
+ if worker_hostname is None and body is None:
710
+ raise ValueError("Empty value passed for parameter 'worker_hostname'")
711
+ __path_parts: t.Dict[str, str] = {
712
+ "connector_sync_job_id": _quote(connector_sync_job_id)
713
+ }
714
+ __path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_claim'
715
+ __query: t.Dict[str, t.Any] = {}
716
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
717
+ if error_trace is not None:
718
+ __query["error_trace"] = error_trace
719
+ if filter_path is not None:
720
+ __query["filter_path"] = filter_path
721
+ if human is not None:
722
+ __query["human"] = human
723
+ if pretty is not None:
724
+ __query["pretty"] = pretty
725
+ if not __body:
726
+ if worker_hostname is not None:
727
+ __body["worker_hostname"] = worker_hostname
728
+ if sync_cursor is not None:
729
+ __body["sync_cursor"] = sync_cursor
730
+ __headers = {"accept": "application/json", "content-type": "application/json"}
731
+ return await self.perform_request( # type: ignore[return-value]
732
+ "PUT",
733
+ __path,
734
+ params=__query,
735
+ headers=__headers,
736
+ body=__body,
737
+ endpoint_id="connector.sync_job_claim",
738
+ path_parts=__path_parts,
739
+ )
740
+
592
741
  @_rewrite_parameters()
593
742
  @_stability_warning(Stability.BETA)
594
743
  async def sync_job_delete(
@@ -601,8 +750,12 @@ class ConnectorClient(NamespacedClient):
601
750
  pretty: t.Optional[bool] = None,
602
751
  ) -> ObjectApiResponse[t.Any]:
603
752
  """
604
- Delete a connector sync job. Remove a connector sync job and its associated data.
605
- This is a destructive action that is not recoverable.
753
+ .. raw:: html
754
+
755
+ <p>Delete a connector sync job.</p>
756
+ <p>Remove a connector sync job and its associated data.
757
+ This is a destructive action that is not recoverable.</p>
758
+
606
759
 
607
760
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-connector-sync-job-api.html>`_
608
761
 
@@ -634,6 +787,67 @@ class ConnectorClient(NamespacedClient):
634
787
  path_parts=__path_parts,
635
788
  )
636
789
 
790
+ @_rewrite_parameters(
791
+ body_fields=("error",),
792
+ )
793
+ @_stability_warning(Stability.EXPERIMENTAL)
794
+ async def sync_job_error(
795
+ self,
796
+ *,
797
+ connector_sync_job_id: str,
798
+ error: t.Optional[str] = None,
799
+ error_trace: t.Optional[bool] = None,
800
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
801
+ human: t.Optional[bool] = None,
802
+ pretty: t.Optional[bool] = None,
803
+ body: t.Optional[t.Dict[str, t.Any]] = None,
804
+ ) -> ObjectApiResponse[t.Any]:
805
+ """
806
+ .. raw:: html
807
+
808
+ <p>Set a connector sync job error.
809
+ Set the <code>error</code> field for a connector sync job and set its <code>status</code> to <code>error</code>.</p>
810
+ <p>To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
811
+ This service runs automatically on Elastic Cloud for Elastic managed connectors.</p>
812
+
813
+
814
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/set-connector-sync-job-error-api.html>`_
815
+
816
+ :param connector_sync_job_id: The unique identifier for the connector sync job.
817
+ :param error: The error for the connector sync job error field.
818
+ """
819
+ if connector_sync_job_id in SKIP_IN_PATH:
820
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
821
+ if error is None and body is None:
822
+ raise ValueError("Empty value passed for parameter 'error'")
823
+ __path_parts: t.Dict[str, str] = {
824
+ "connector_sync_job_id": _quote(connector_sync_job_id)
825
+ }
826
+ __path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_error'
827
+ __query: t.Dict[str, t.Any] = {}
828
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
829
+ if error_trace is not None:
830
+ __query["error_trace"] = error_trace
831
+ if filter_path is not None:
832
+ __query["filter_path"] = filter_path
833
+ if human is not None:
834
+ __query["human"] = human
835
+ if pretty is not None:
836
+ __query["pretty"] = pretty
837
+ if not __body:
838
+ if error is not None:
839
+ __body["error"] = error
840
+ __headers = {"accept": "application/json", "content-type": "application/json"}
841
+ return await self.perform_request( # type: ignore[return-value]
842
+ "PUT",
843
+ __path,
844
+ params=__query,
845
+ headers=__headers,
846
+ body=__body,
847
+ endpoint_id="connector.sync_job_error",
848
+ path_parts=__path_parts,
849
+ )
850
+
637
851
  @_rewrite_parameters()
638
852
  @_stability_warning(Stability.BETA)
639
853
  async def sync_job_get(
@@ -646,7 +860,10 @@ class ConnectorClient(NamespacedClient):
646
860
  pretty: t.Optional[bool] = None,
647
861
  ) -> ObjectApiResponse[t.Any]:
648
862
  """
649
- Get a connector sync job.
863
+ .. raw:: html
864
+
865
+ <p>Get a connector sync job.</p>
866
+
650
867
 
651
868
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-connector-sync-job-api.html>`_
652
869
 
@@ -715,8 +932,11 @@ class ConnectorClient(NamespacedClient):
715
932
  ] = None,
716
933
  ) -> ObjectApiResponse[t.Any]:
717
934
  """
718
- Get all connector sync jobs. Get information about all stored connector sync
719
- jobs listed by their creation date in ascending order.
935
+ .. raw:: html
936
+
937
+ <p>Get all connector sync jobs.</p>
938
+ <p>Get information about all stored connector sync jobs listed by their creation date in ascending order.</p>
939
+
720
940
 
721
941
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-connector-sync-jobs-api.html>`_
722
942
 
@@ -778,8 +998,11 @@ class ConnectorClient(NamespacedClient):
778
998
  body: t.Optional[t.Dict[str, t.Any]] = None,
779
999
  ) -> ObjectApiResponse[t.Any]:
780
1000
  """
781
- Create a connector sync job. Create a connector sync job document in the internal
782
- index and initialize its counters and timestamps with default values.
1001
+ .. raw:: html
1002
+
1003
+ <p>Create a connector sync job.</p>
1004
+ <p>Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.</p>
1005
+
783
1006
 
784
1007
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-sync-job-api.html>`_
785
1008
 
@@ -819,6 +1042,109 @@ class ConnectorClient(NamespacedClient):
819
1042
  path_parts=__path_parts,
820
1043
  )
821
1044
 
1045
+ @_rewrite_parameters(
1046
+ body_fields=(
1047
+ "deleted_document_count",
1048
+ "indexed_document_count",
1049
+ "indexed_document_volume",
1050
+ "last_seen",
1051
+ "metadata",
1052
+ "total_document_count",
1053
+ ),
1054
+ )
1055
+ @_stability_warning(Stability.EXPERIMENTAL)
1056
+ async def sync_job_update_stats(
1057
+ self,
1058
+ *,
1059
+ connector_sync_job_id: str,
1060
+ deleted_document_count: t.Optional[int] = None,
1061
+ indexed_document_count: t.Optional[int] = None,
1062
+ indexed_document_volume: t.Optional[int] = None,
1063
+ error_trace: t.Optional[bool] = None,
1064
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1065
+ human: t.Optional[bool] = None,
1066
+ last_seen: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1067
+ metadata: t.Optional[t.Mapping[str, t.Any]] = None,
1068
+ pretty: t.Optional[bool] = None,
1069
+ total_document_count: t.Optional[int] = None,
1070
+ body: t.Optional[t.Dict[str, t.Any]] = None,
1071
+ ) -> ObjectApiResponse[t.Any]:
1072
+ """
1073
+ .. raw:: html
1074
+
1075
+ <p>Set the connector sync job stats.
1076
+ Stats include: <code>deleted_document_count</code>, <code>indexed_document_count</code>, <code>indexed_document_volume</code>, and <code>total_document_count</code>.
1077
+ You can also update <code>last_seen</code>.
1078
+ This API is mainly used by the connector service for updating sync job information.</p>
1079
+ <p>To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
1080
+ This service runs automatically on Elastic Cloud for Elastic managed connectors.</p>
1081
+
1082
+
1083
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/set-connector-sync-job-stats-api.html>`_
1084
+
1085
+ :param connector_sync_job_id: The unique identifier of the connector sync job.
1086
+ :param deleted_document_count: The number of documents the sync job deleted.
1087
+ :param indexed_document_count: The number of documents the sync job indexed.
1088
+ :param indexed_document_volume: The total size of the data (in MiB) the sync
1089
+ job indexed.
1090
+ :param last_seen: The timestamp to use in the `last_seen` property for the connector
1091
+ sync job.
1092
+ :param metadata: The connector-specific metadata.
1093
+ :param total_document_count: The total number of documents in the target index
1094
+ after the sync job finished.
1095
+ """
1096
+ if connector_sync_job_id in SKIP_IN_PATH:
1097
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
1098
+ if deleted_document_count is None and body is None:
1099
+ raise ValueError(
1100
+ "Empty value passed for parameter 'deleted_document_count'"
1101
+ )
1102
+ if indexed_document_count is None and body is None:
1103
+ raise ValueError(
1104
+ "Empty value passed for parameter 'indexed_document_count'"
1105
+ )
1106
+ if indexed_document_volume is None and body is None:
1107
+ raise ValueError(
1108
+ "Empty value passed for parameter 'indexed_document_volume'"
1109
+ )
1110
+ __path_parts: t.Dict[str, str] = {
1111
+ "connector_sync_job_id": _quote(connector_sync_job_id)
1112
+ }
1113
+ __path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_stats'
1114
+ __query: t.Dict[str, t.Any] = {}
1115
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
1116
+ if error_trace is not None:
1117
+ __query["error_trace"] = error_trace
1118
+ if filter_path is not None:
1119
+ __query["filter_path"] = filter_path
1120
+ if human is not None:
1121
+ __query["human"] = human
1122
+ if pretty is not None:
1123
+ __query["pretty"] = pretty
1124
+ if not __body:
1125
+ if deleted_document_count is not None:
1126
+ __body["deleted_document_count"] = deleted_document_count
1127
+ if indexed_document_count is not None:
1128
+ __body["indexed_document_count"] = indexed_document_count
1129
+ if indexed_document_volume is not None:
1130
+ __body["indexed_document_volume"] = indexed_document_volume
1131
+ if last_seen is not None:
1132
+ __body["last_seen"] = last_seen
1133
+ if metadata is not None:
1134
+ __body["metadata"] = metadata
1135
+ if total_document_count is not None:
1136
+ __body["total_document_count"] = total_document_count
1137
+ __headers = {"accept": "application/json", "content-type": "application/json"}
1138
+ return await self.perform_request( # type: ignore[return-value]
1139
+ "PUT",
1140
+ __path,
1141
+ params=__query,
1142
+ headers=__headers,
1143
+ body=__body,
1144
+ endpoint_id="connector.sync_job_update_stats",
1145
+ path_parts=__path_parts,
1146
+ )
1147
+
822
1148
  @_rewrite_parameters()
823
1149
  @_stability_warning(Stability.EXPERIMENTAL)
824
1150
  async def update_active_filtering(
@@ -831,8 +1157,11 @@ class ConnectorClient(NamespacedClient):
831
1157
  pretty: t.Optional[bool] = None,
832
1158
  ) -> ObjectApiResponse[t.Any]:
833
1159
  """
834
- Activate the connector draft filter. Activates the valid draft filtering for
835
- a connector.
1160
+ .. raw:: html
1161
+
1162
+ <p>Activate the connector draft filter.</p>
1163
+ <p>Activates the valid draft filtering for a connector.</p>
1164
+
836
1165
 
837
1166
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-api.html>`_
838
1167
 
@@ -878,11 +1207,14 @@ class ConnectorClient(NamespacedClient):
878
1207
  body: t.Optional[t.Dict[str, t.Any]] = None,
879
1208
  ) -> ObjectApiResponse[t.Any]:
880
1209
  """
881
- Update the connector API key ID. Update the `api_key_id` and `api_key_secret_id`
882
- fields of a connector. You can specify the ID of the API key used for authorization
883
- and the ID of the connector secret where the API key is stored. The connector
884
- secret ID is required only for Elastic managed (native) connectors. Self-managed
885
- connectors (connector clients) do not use this field.
1210
+ .. raw:: html
1211
+
1212
+ <p>Update the connector API key ID.</p>
1213
+ <p>Update the <code>api_key_id</code> and <code>api_key_secret_id</code> fields of a connector.
1214
+ You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored.
1215
+ The connector secret ID is required only for Elastic managed (native) connectors.
1216
+ Self-managed connectors (connector clients) do not use this field.</p>
1217
+
886
1218
 
887
1219
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-api-key-id-api.html>`_
888
1220
 
@@ -937,8 +1269,11 @@ class ConnectorClient(NamespacedClient):
937
1269
  body: t.Optional[t.Dict[str, t.Any]] = None,
938
1270
  ) -> ObjectApiResponse[t.Any]:
939
1271
  """
940
- Update the connector configuration. Update the configuration field in the connector
941
- document.
1272
+ .. raw:: html
1273
+
1274
+ <p>Update the connector configuration.</p>
1275
+ <p>Update the configuration field in the connector document.</p>
1276
+
942
1277
 
943
1278
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-configuration-api.html>`_
944
1279
 
@@ -992,10 +1327,13 @@ class ConnectorClient(NamespacedClient):
992
1327
  body: t.Optional[t.Dict[str, t.Any]] = None,
993
1328
  ) -> ObjectApiResponse[t.Any]:
994
1329
  """
995
- Update the connector error field. Set the error field for the connector. If the
996
- error provided in the request body is non-null, the connector’s status is updated
997
- to error. Otherwise, if the error is reset to null, the connector status is updated
998
- to connected.
1330
+ .. raw:: html
1331
+
1332
+ <p>Update the connector error field.</p>
1333
+ <p>Set the error field for the connector.
1334
+ If the error provided in the request body is non-null, the connector’s status is updated to error.
1335
+ Otherwise, if the error is reset to null, the connector status is updated to connected.</p>
1336
+
999
1337
 
1000
1338
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-error-api.html>`_
1001
1339
 
@@ -1032,6 +1370,74 @@ class ConnectorClient(NamespacedClient):
1032
1370
  path_parts=__path_parts,
1033
1371
  )
1034
1372
 
1373
+ @_rewrite_parameters(
1374
+ body_fields=("features",),
1375
+ )
1376
+ @_stability_warning(Stability.EXPERIMENTAL)
1377
+ async def update_features(
1378
+ self,
1379
+ *,
1380
+ connector_id: str,
1381
+ features: t.Optional[t.Mapping[str, t.Any]] = None,
1382
+ error_trace: t.Optional[bool] = None,
1383
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1384
+ human: t.Optional[bool] = None,
1385
+ pretty: t.Optional[bool] = None,
1386
+ body: t.Optional[t.Dict[str, t.Any]] = None,
1387
+ ) -> ObjectApiResponse[t.Any]:
1388
+ """
1389
+ .. raw:: html
1390
+
1391
+ <p>Update the connector features.
1392
+ Update the connector features in the connector document.
1393
+ This API can be used to control the following aspects of a connector:</p>
1394
+ <ul>
1395
+ <li>document-level security</li>
1396
+ <li>incremental syncs</li>
1397
+ <li>advanced sync rules</li>
1398
+ <li>basic sync rules</li>
1399
+ </ul>
1400
+ <p>Normally, the running connector service automatically manages these features.
1401
+ However, you can use this API to override the default behavior.</p>
1402
+ <p>To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
1403
+ This service runs automatically on Elastic Cloud for Elastic managed connectors.</p>
1404
+
1405
+
1406
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-features-api.html>`_
1407
+
1408
+ :param connector_id: The unique identifier of the connector to be updated.
1409
+ :param features:
1410
+ """
1411
+ if connector_id in SKIP_IN_PATH:
1412
+ raise ValueError("Empty value passed for parameter 'connector_id'")
1413
+ if features is None and body is None:
1414
+ raise ValueError("Empty value passed for parameter 'features'")
1415
+ __path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
1416
+ __path = f'/_connector/{__path_parts["connector_id"]}/_features'
1417
+ __query: t.Dict[str, t.Any] = {}
1418
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
1419
+ if error_trace is not None:
1420
+ __query["error_trace"] = error_trace
1421
+ if filter_path is not None:
1422
+ __query["filter_path"] = filter_path
1423
+ if human is not None:
1424
+ __query["human"] = human
1425
+ if pretty is not None:
1426
+ __query["pretty"] = pretty
1427
+ if not __body:
1428
+ if features is not None:
1429
+ __body["features"] = features
1430
+ __headers = {"accept": "application/json", "content-type": "application/json"}
1431
+ return await self.perform_request( # type: ignore[return-value]
1432
+ "PUT",
1433
+ __path,
1434
+ params=__query,
1435
+ headers=__headers,
1436
+ body=__body,
1437
+ endpoint_id="connector.update_features",
1438
+ path_parts=__path_parts,
1439
+ )
1440
+
1035
1441
  @_rewrite_parameters(
1036
1442
  body_fields=("advanced_snippet", "filtering", "rules"),
1037
1443
  )
@@ -1050,10 +1456,13 @@ class ConnectorClient(NamespacedClient):
1050
1456
  body: t.Optional[t.Dict[str, t.Any]] = None,
1051
1457
  ) -> ObjectApiResponse[t.Any]:
1052
1458
  """
1053
- Update the connector filtering. Update the draft filtering configuration of a
1054
- connector and marks the draft validation state as edited. The filtering draft
1055
- is activated once validated by the running Elastic connector service. The filtering
1056
- property is used to configure sync rules (both basic and advanced) for a connector.
1459
+ .. raw:: html
1460
+
1461
+ <p>Update the connector filtering.</p>
1462
+ <p>Update the draft filtering configuration of a connector and marks the draft validation state as edited.
1463
+ The filtering draft is activated once validated by the running Elastic connector service.
1464
+ The filtering property is used to configure sync rules (both basic and advanced) for a connector.</p>
1465
+
1057
1466
 
1058
1467
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-api.html>`_
1059
1468
 
@@ -1110,8 +1519,11 @@ class ConnectorClient(NamespacedClient):
1110
1519
  body: t.Optional[t.Dict[str, t.Any]] = None,
1111
1520
  ) -> ObjectApiResponse[t.Any]:
1112
1521
  """
1113
- Update the connector draft filtering validation. Update the draft filtering validation
1114
- info for a connector.
1522
+ .. raw:: html
1523
+
1524
+ <p>Update the connector draft filtering validation.</p>
1525
+ <p>Update the draft filtering validation info for a connector.</p>
1526
+
1115
1527
 
1116
1528
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-validation-api.html>`_
1117
1529
 
@@ -1164,8 +1576,11 @@ class ConnectorClient(NamespacedClient):
1164
1576
  body: t.Optional[t.Dict[str, t.Any]] = None,
1165
1577
  ) -> ObjectApiResponse[t.Any]:
1166
1578
  """
1167
- Update the connector index name. Update the `index_name` field of a connector,
1168
- specifying the index where the data ingested by the connector is stored.
1579
+ .. raw:: html
1580
+
1581
+ <p>Update the connector index name.</p>
1582
+ <p>Update the <code>index_name</code> field of a connector, specifying the index where the data ingested by the connector is stored.</p>
1583
+
1169
1584
 
1170
1585
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-index-name-api.html>`_
1171
1586
 
@@ -1219,7 +1634,10 @@ class ConnectorClient(NamespacedClient):
1219
1634
  body: t.Optional[t.Dict[str, t.Any]] = None,
1220
1635
  ) -> ObjectApiResponse[t.Any]:
1221
1636
  """
1222
- Update the connector name and description.
1637
+ .. raw:: html
1638
+
1639
+ <p>Update the connector name and description.</p>
1640
+
1223
1641
 
1224
1642
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-name-description-api.html>`_
1225
1643
 
@@ -1273,7 +1691,10 @@ class ConnectorClient(NamespacedClient):
1273
1691
  body: t.Optional[t.Dict[str, t.Any]] = None,
1274
1692
  ) -> ObjectApiResponse[t.Any]:
1275
1693
  """
1276
- Update the connector is_native flag.
1694
+ .. raw:: html
1695
+
1696
+ <p>Update the connector is_native flag.</p>
1697
+
1277
1698
 
1278
1699
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-native-api.html>`_
1279
1700
 
@@ -1326,8 +1747,11 @@ class ConnectorClient(NamespacedClient):
1326
1747
  body: t.Optional[t.Dict[str, t.Any]] = None,
1327
1748
  ) -> ObjectApiResponse[t.Any]:
1328
1749
  """
1329
- Update the connector pipeline. When you create a new connector, the configuration
1330
- of an ingest pipeline is populated with default settings.
1750
+ .. raw:: html
1751
+
1752
+ <p>Update the connector pipeline.</p>
1753
+ <p>When you create a new connector, the configuration of an ingest pipeline is populated with default settings.</p>
1754
+
1331
1755
 
1332
1756
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-pipeline-api.html>`_
1333
1757
 
@@ -1380,7 +1804,10 @@ class ConnectorClient(NamespacedClient):
1380
1804
  body: t.Optional[t.Dict[str, t.Any]] = None,
1381
1805
  ) -> ObjectApiResponse[t.Any]:
1382
1806
  """
1383
- Update the connector scheduling.
1807
+ .. raw:: html
1808
+
1809
+ <p>Update the connector scheduling.</p>
1810
+
1384
1811
 
1385
1812
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-scheduling-api.html>`_
1386
1813
 
@@ -1433,7 +1860,10 @@ class ConnectorClient(NamespacedClient):
1433
1860
  body: t.Optional[t.Dict[str, t.Any]] = None,
1434
1861
  ) -> ObjectApiResponse[t.Any]:
1435
1862
  """
1436
- Update the connector service type.
1863
+ .. raw:: html
1864
+
1865
+ <p>Update the connector service type.</p>
1866
+
1437
1867
 
1438
1868
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-service-type-api.html>`_
1439
1869
 
@@ -1493,7 +1923,10 @@ class ConnectorClient(NamespacedClient):
1493
1923
  body: t.Optional[t.Dict[str, t.Any]] = None,
1494
1924
  ) -> ObjectApiResponse[t.Any]:
1495
1925
  """
1496
- Update the connector status.
1926
+ .. raw:: html
1927
+
1928
+ <p>Update the connector status.</p>
1929
+
1497
1930
 
1498
1931
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-status-api.html>`_
1499
1932