elasticsearch 8.16.0__py3-none-any.whl → 8.17.1__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 (90) hide show
  1. elasticsearch/_async/client/__init__.py +234 -96
  2. elasticsearch/_async/client/async_search.py +12 -22
  3. elasticsearch/_async/client/autoscaling.py +39 -4
  4. elasticsearch/_async/client/cat.py +90 -221
  5. elasticsearch/_async/client/ccr.py +85 -35
  6. elasticsearch/_async/client/cluster.py +160 -68
  7. elasticsearch/_async/client/connector.py +362 -25
  8. elasticsearch/_async/client/dangling_indices.py +3 -3
  9. elasticsearch/_async/client/enrich.py +6 -6
  10. elasticsearch/_async/client/eql.py +13 -11
  11. elasticsearch/_async/client/esql.py +3 -2
  12. elasticsearch/_async/client/features.py +27 -5
  13. elasticsearch/_async/client/fleet.py +1 -1
  14. elasticsearch/_async/client/graph.py +9 -3
  15. elasticsearch/_async/client/ilm.py +74 -39
  16. elasticsearch/_async/client/indices.py +633 -152
  17. elasticsearch/_async/client/inference.py +99 -16
  18. elasticsearch/_async/client/ingest.py +201 -23
  19. elasticsearch/_async/client/license.py +38 -22
  20. elasticsearch/_async/client/logstash.py +12 -9
  21. elasticsearch/_async/client/migration.py +17 -8
  22. elasticsearch/_async/client/ml.py +137 -79
  23. elasticsearch/_async/client/monitoring.py +3 -2
  24. elasticsearch/_async/client/nodes.py +37 -23
  25. elasticsearch/_async/client/query_rules.py +47 -25
  26. elasticsearch/_async/client/rollup.py +96 -21
  27. elasticsearch/_async/client/search_application.py +138 -9
  28. elasticsearch/_async/client/searchable_snapshots.py +33 -24
  29. elasticsearch/_async/client/security.py +751 -123
  30. elasticsearch/_async/client/shutdown.py +38 -15
  31. elasticsearch/_async/client/simulate.py +151 -0
  32. elasticsearch/_async/client/slm.py +147 -28
  33. elasticsearch/_async/client/snapshot.py +309 -25
  34. elasticsearch/_async/client/sql.py +79 -58
  35. elasticsearch/_async/client/ssl.py +1 -1
  36. elasticsearch/_async/client/synonyms.py +52 -29
  37. elasticsearch/_async/client/tasks.py +71 -31
  38. elasticsearch/_async/client/text_structure.py +468 -48
  39. elasticsearch/_async/client/transform.py +21 -14
  40. elasticsearch/_async/client/watcher.py +226 -60
  41. elasticsearch/_async/client/xpack.py +13 -8
  42. elasticsearch/_sync/client/__init__.py +234 -96
  43. elasticsearch/_sync/client/async_search.py +12 -22
  44. elasticsearch/_sync/client/autoscaling.py +39 -4
  45. elasticsearch/_sync/client/cat.py +90 -221
  46. elasticsearch/_sync/client/ccr.py +85 -35
  47. elasticsearch/_sync/client/cluster.py +160 -68
  48. elasticsearch/_sync/client/connector.py +362 -25
  49. elasticsearch/_sync/client/dangling_indices.py +3 -3
  50. elasticsearch/_sync/client/enrich.py +6 -6
  51. elasticsearch/_sync/client/eql.py +13 -11
  52. elasticsearch/_sync/client/esql.py +3 -2
  53. elasticsearch/_sync/client/features.py +27 -5
  54. elasticsearch/_sync/client/fleet.py +1 -1
  55. elasticsearch/_sync/client/graph.py +9 -3
  56. elasticsearch/_sync/client/ilm.py +74 -39
  57. elasticsearch/_sync/client/indices.py +633 -152
  58. elasticsearch/_sync/client/inference.py +99 -16
  59. elasticsearch/_sync/client/ingest.py +201 -23
  60. elasticsearch/_sync/client/license.py +38 -22
  61. elasticsearch/_sync/client/logstash.py +12 -9
  62. elasticsearch/_sync/client/migration.py +17 -8
  63. elasticsearch/_sync/client/ml.py +137 -79
  64. elasticsearch/_sync/client/monitoring.py +3 -2
  65. elasticsearch/_sync/client/nodes.py +37 -23
  66. elasticsearch/_sync/client/query_rules.py +47 -25
  67. elasticsearch/_sync/client/rollup.py +96 -21
  68. elasticsearch/_sync/client/search_application.py +138 -9
  69. elasticsearch/_sync/client/searchable_snapshots.py +33 -24
  70. elasticsearch/_sync/client/security.py +751 -123
  71. elasticsearch/_sync/client/shutdown.py +38 -15
  72. elasticsearch/_sync/client/simulate.py +151 -0
  73. elasticsearch/_sync/client/slm.py +147 -28
  74. elasticsearch/_sync/client/snapshot.py +309 -25
  75. elasticsearch/_sync/client/sql.py +79 -58
  76. elasticsearch/_sync/client/ssl.py +1 -1
  77. elasticsearch/_sync/client/synonyms.py +52 -29
  78. elasticsearch/_sync/client/tasks.py +71 -31
  79. elasticsearch/_sync/client/text_structure.py +468 -48
  80. elasticsearch/_sync/client/transform.py +21 -14
  81. elasticsearch/_sync/client/watcher.py +226 -60
  82. elasticsearch/_sync/client/xpack.py +13 -8
  83. elasticsearch/_version.py +1 -1
  84. elasticsearch/client.py +2 -0
  85. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
  86. elasticsearch-8.17.1.dist-info/RECORD +119 -0
  87. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
  88. elasticsearch-8.16.0.dist-info/RECORD +0 -117
  89. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
  90. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
@@ -46,7 +46,7 @@ class ConnectorClient(NamespacedClient):
46
46
  Check in a connector. Update the `last_seen` field in the connector and set it
47
47
  to the current timestamp.
48
48
 
49
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/check-in-connector-api.html>`_
49
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/check-in-connector-api.html>`_
50
50
 
51
51
  :param connector_id: The unique identifier of the connector to be checked in
52
52
  """
@@ -91,7 +91,7 @@ class ConnectorClient(NamespacedClient):
91
91
  ingest pipelines, or data indices associated with the connector. These need to
92
92
  be removed manually.
93
93
 
94
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-connector-api.html>`_
94
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-connector-api.html>`_
95
95
 
96
96
  :param connector_id: The unique identifier of the connector to be deleted
97
97
  :param delete_sync_jobs: A flag indicating if associated sync jobs should be
@@ -136,7 +136,7 @@ class ConnectorClient(NamespacedClient):
136
136
  """
137
137
  Get a connector. Get the details about a connector.
138
138
 
139
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-connector-api.html>`_
139
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-connector-api.html>`_
140
140
 
141
141
  :param connector_id: The unique identifier of the connector
142
142
  """
@@ -232,7 +232,7 @@ class ConnectorClient(NamespacedClient):
232
232
  Update the connector last sync stats. Update the fields related to the last sync
233
233
  of a connector. This action is used for analytics and monitoring.
234
234
 
235
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-last-sync-api.html>`_
235
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-last-sync-api.html>`_
236
236
 
237
237
  :param connector_id: The unique identifier of the connector to be updated
238
238
  :param last_access_control_sync_error:
@@ -327,7 +327,7 @@ class ConnectorClient(NamespacedClient):
327
327
  """
328
328
  Get all connectors. Get information about all connectors.
329
329
 
330
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/list-connector-api.html>`_
330
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-connector-api.html>`_
331
331
 
332
332
  :param connector_name: A comma-separated list of connector names to fetch connector
333
333
  documents for
@@ -406,7 +406,7 @@ class ConnectorClient(NamespacedClient):
406
406
  a managed service on Elastic Cloud. Self-managed connectors (Connector clients)
407
407
  are self-managed on your infrastructure.
408
408
 
409
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/create-connector-api.html>`_
409
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-api.html>`_
410
410
 
411
411
  :param description:
412
412
  :param index_name:
@@ -485,7 +485,7 @@ class ConnectorClient(NamespacedClient):
485
485
  """
486
486
  Create or update a connector.
487
487
 
488
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/create-connector-api.html>`_
488
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-api.html>`_
489
489
 
490
490
  :param connector_id: The unique identifier of the connector to be created or
491
491
  updated. ID is auto-generated if not provided.
@@ -558,7 +558,7 @@ class ConnectorClient(NamespacedClient):
558
558
  connector service is then responsible for setting the status of connector sync
559
559
  jobs to cancelled.
560
560
 
561
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cancel-connector-sync-job-api.html>`_
561
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cancel-connector-sync-job-api.html>`_
562
562
 
563
563
  :param connector_sync_job_id: The unique identifier of the connector sync job
564
564
  """
@@ -589,6 +589,125 @@ class ConnectorClient(NamespacedClient):
589
589
  path_parts=__path_parts,
590
590
  )
591
591
 
592
+ @_rewrite_parameters()
593
+ @_stability_warning(Stability.EXPERIMENTAL)
594
+ def sync_job_check_in(
595
+ self,
596
+ *,
597
+ connector_sync_job_id: str,
598
+ error_trace: t.Optional[bool] = None,
599
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
600
+ human: t.Optional[bool] = None,
601
+ pretty: t.Optional[bool] = None,
602
+ ) -> ObjectApiResponse[t.Any]:
603
+ """
604
+ Check in a connector sync job. Check in a connector sync job and set the `last_seen`
605
+ field to the current time before updating it in the internal index. To sync data
606
+ using self-managed connectors, you need to deploy the Elastic connector service
607
+ on your own infrastructure. This service runs automatically on Elastic Cloud
608
+ for Elastic managed connectors.
609
+
610
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/check-in-connector-sync-job-api.html>`_
611
+
612
+ :param connector_sync_job_id: The unique identifier of the connector sync job
613
+ to be checked in.
614
+ """
615
+ if connector_sync_job_id in SKIP_IN_PATH:
616
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
617
+ __path_parts: t.Dict[str, str] = {
618
+ "connector_sync_job_id": _quote(connector_sync_job_id)
619
+ }
620
+ __path = (
621
+ f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_check_in'
622
+ )
623
+ __query: t.Dict[str, t.Any] = {}
624
+ if error_trace is not None:
625
+ __query["error_trace"] = error_trace
626
+ if filter_path is not None:
627
+ __query["filter_path"] = filter_path
628
+ if human is not None:
629
+ __query["human"] = human
630
+ if pretty is not None:
631
+ __query["pretty"] = pretty
632
+ __headers = {"accept": "application/json"}
633
+ return self.perform_request( # type: ignore[return-value]
634
+ "PUT",
635
+ __path,
636
+ params=__query,
637
+ headers=__headers,
638
+ endpoint_id="connector.sync_job_check_in",
639
+ path_parts=__path_parts,
640
+ )
641
+
642
+ @_rewrite_parameters(
643
+ body_fields=("worker_hostname", "sync_cursor"),
644
+ )
645
+ @_stability_warning(Stability.EXPERIMENTAL)
646
+ def sync_job_claim(
647
+ self,
648
+ *,
649
+ connector_sync_job_id: str,
650
+ worker_hostname: t.Optional[str] = None,
651
+ error_trace: t.Optional[bool] = None,
652
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
653
+ human: t.Optional[bool] = None,
654
+ pretty: t.Optional[bool] = None,
655
+ sync_cursor: t.Optional[t.Any] = None,
656
+ body: t.Optional[t.Dict[str, t.Any]] = None,
657
+ ) -> ObjectApiResponse[t.Any]:
658
+ """
659
+ Claim a connector sync job. This action updates the job status to `in_progress`
660
+ and sets the `last_seen` and `started_at` timestamps to the current time. Additionally,
661
+ it can set the `sync_cursor` property for the sync job. This API is not intended
662
+ for direct connector management by users. It supports the implementation of services
663
+ that utilize the connector protocol to communicate with Elasticsearch. To sync
664
+ data using self-managed connectors, you need to deploy the Elastic connector
665
+ service on your own infrastructure. This service runs automatically on Elastic
666
+ Cloud for Elastic managed connectors.
667
+
668
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/claim-connector-sync-job-api.html>`_
669
+
670
+ :param connector_sync_job_id: The unique identifier of the connector sync job.
671
+ :param worker_hostname: The host name of the current system that will run the
672
+ job.
673
+ :param sync_cursor: The cursor object from the last incremental sync job. This
674
+ should reference the `sync_cursor` field in the connector state for which
675
+ the job runs.
676
+ """
677
+ if connector_sync_job_id in SKIP_IN_PATH:
678
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
679
+ if worker_hostname is None and body is None:
680
+ raise ValueError("Empty value passed for parameter 'worker_hostname'")
681
+ __path_parts: t.Dict[str, str] = {
682
+ "connector_sync_job_id": _quote(connector_sync_job_id)
683
+ }
684
+ __path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_claim'
685
+ __query: t.Dict[str, t.Any] = {}
686
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
687
+ if error_trace is not None:
688
+ __query["error_trace"] = error_trace
689
+ if filter_path is not None:
690
+ __query["filter_path"] = filter_path
691
+ if human is not None:
692
+ __query["human"] = human
693
+ if pretty is not None:
694
+ __query["pretty"] = pretty
695
+ if not __body:
696
+ if worker_hostname is not None:
697
+ __body["worker_hostname"] = worker_hostname
698
+ if sync_cursor is not None:
699
+ __body["sync_cursor"] = sync_cursor
700
+ __headers = {"accept": "application/json", "content-type": "application/json"}
701
+ return self.perform_request( # type: ignore[return-value]
702
+ "PUT",
703
+ __path,
704
+ params=__query,
705
+ headers=__headers,
706
+ body=__body,
707
+ endpoint_id="connector.sync_job_claim",
708
+ path_parts=__path_parts,
709
+ )
710
+
592
711
  @_rewrite_parameters()
593
712
  @_stability_warning(Stability.BETA)
594
713
  def sync_job_delete(
@@ -604,7 +723,7 @@ class ConnectorClient(NamespacedClient):
604
723
  Delete a connector sync job. Remove a connector sync job and its associated data.
605
724
  This is a destructive action that is not recoverable.
606
725
 
607
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-connector-sync-job-api.html>`_
726
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-connector-sync-job-api.html>`_
608
727
 
609
728
  :param connector_sync_job_id: The unique identifier of the connector sync job
610
729
  to be deleted
@@ -634,6 +753,64 @@ class ConnectorClient(NamespacedClient):
634
753
  path_parts=__path_parts,
635
754
  )
636
755
 
756
+ @_rewrite_parameters(
757
+ body_fields=("error",),
758
+ )
759
+ @_stability_warning(Stability.EXPERIMENTAL)
760
+ def sync_job_error(
761
+ self,
762
+ *,
763
+ connector_sync_job_id: str,
764
+ error: t.Optional[str] = None,
765
+ error_trace: t.Optional[bool] = None,
766
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
767
+ human: t.Optional[bool] = None,
768
+ pretty: t.Optional[bool] = None,
769
+ body: t.Optional[t.Dict[str, t.Any]] = None,
770
+ ) -> ObjectApiResponse[t.Any]:
771
+ """
772
+ Set a connector sync job error. Set the `error` field for a connector sync job
773
+ and set its `status` to `error`. To sync data using self-managed connectors,
774
+ you need to deploy the Elastic connector service on your own infrastructure.
775
+ This service runs automatically on Elastic Cloud for Elastic managed connectors.
776
+
777
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/set-connector-sync-job-error-api.html>`_
778
+
779
+ :param connector_sync_job_id: The unique identifier for the connector sync job.
780
+ :param error: The error for the connector sync job error field.
781
+ """
782
+ if connector_sync_job_id in SKIP_IN_PATH:
783
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
784
+ if error is None and body is None:
785
+ raise ValueError("Empty value passed for parameter 'error'")
786
+ __path_parts: t.Dict[str, str] = {
787
+ "connector_sync_job_id": _quote(connector_sync_job_id)
788
+ }
789
+ __path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_error'
790
+ __query: t.Dict[str, t.Any] = {}
791
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
792
+ if error_trace is not None:
793
+ __query["error_trace"] = error_trace
794
+ if filter_path is not None:
795
+ __query["filter_path"] = filter_path
796
+ if human is not None:
797
+ __query["human"] = human
798
+ if pretty is not None:
799
+ __query["pretty"] = pretty
800
+ if not __body:
801
+ if error is not None:
802
+ __body["error"] = error
803
+ __headers = {"accept": "application/json", "content-type": "application/json"}
804
+ return self.perform_request( # type: ignore[return-value]
805
+ "PUT",
806
+ __path,
807
+ params=__query,
808
+ headers=__headers,
809
+ body=__body,
810
+ endpoint_id="connector.sync_job_error",
811
+ path_parts=__path_parts,
812
+ )
813
+
637
814
  @_rewrite_parameters()
638
815
  @_stability_warning(Stability.BETA)
639
816
  def sync_job_get(
@@ -648,7 +825,7 @@ class ConnectorClient(NamespacedClient):
648
825
  """
649
826
  Get a connector sync job.
650
827
 
651
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-connector-sync-job-api.html>`_
828
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-connector-sync-job-api.html>`_
652
829
 
653
830
  :param connector_sync_job_id: The unique identifier of the connector sync job
654
831
  """
@@ -718,7 +895,7 @@ class ConnectorClient(NamespacedClient):
718
895
  Get all connector sync jobs. Get information about all stored connector sync
719
896
  jobs listed by their creation date in ascending order.
720
897
 
721
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/list-connector-sync-jobs-api.html>`_
898
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-connector-sync-jobs-api.html>`_
722
899
 
723
900
  :param connector_id: A connector id to fetch connector sync jobs for
724
901
  :param from_: Starting offset (default: 0)
@@ -781,7 +958,7 @@ class ConnectorClient(NamespacedClient):
781
958
  Create a connector sync job. Create a connector sync job document in the internal
782
959
  index and initialize its counters and timestamps with default values.
783
960
 
784
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/create-connector-sync-job-api.html>`_
961
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-sync-job-api.html>`_
785
962
 
786
963
  :param id: The id of the associated connector
787
964
  :param job_type:
@@ -819,6 +996,106 @@ class ConnectorClient(NamespacedClient):
819
996
  path_parts=__path_parts,
820
997
  )
821
998
 
999
+ @_rewrite_parameters(
1000
+ body_fields=(
1001
+ "deleted_document_count",
1002
+ "indexed_document_count",
1003
+ "indexed_document_volume",
1004
+ "last_seen",
1005
+ "metadata",
1006
+ "total_document_count",
1007
+ ),
1008
+ )
1009
+ @_stability_warning(Stability.EXPERIMENTAL)
1010
+ def sync_job_update_stats(
1011
+ self,
1012
+ *,
1013
+ connector_sync_job_id: str,
1014
+ deleted_document_count: t.Optional[int] = None,
1015
+ indexed_document_count: t.Optional[int] = None,
1016
+ indexed_document_volume: t.Optional[int] = None,
1017
+ error_trace: t.Optional[bool] = None,
1018
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1019
+ human: t.Optional[bool] = None,
1020
+ last_seen: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1021
+ metadata: t.Optional[t.Mapping[str, t.Any]] = None,
1022
+ pretty: t.Optional[bool] = None,
1023
+ total_document_count: t.Optional[int] = None,
1024
+ body: t.Optional[t.Dict[str, t.Any]] = None,
1025
+ ) -> ObjectApiResponse[t.Any]:
1026
+ """
1027
+ Set the connector sync job stats. Stats include: `deleted_document_count`, `indexed_document_count`,
1028
+ `indexed_document_volume`, and `total_document_count`. You can also update `last_seen`.
1029
+ This API is mainly used by the connector service for updating sync job information.
1030
+ To sync data using self-managed connectors, you need to deploy the Elastic connector
1031
+ service on your own infrastructure. This service runs automatically on Elastic
1032
+ Cloud for Elastic managed connectors.
1033
+
1034
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/set-connector-sync-job-stats-api.html>`_
1035
+
1036
+ :param connector_sync_job_id: The unique identifier of the connector sync job.
1037
+ :param deleted_document_count: The number of documents the sync job deleted.
1038
+ :param indexed_document_count: The number of documents the sync job indexed.
1039
+ :param indexed_document_volume: The total size of the data (in MiB) the sync
1040
+ job indexed.
1041
+ :param last_seen: The timestamp to use in the `last_seen` property for the connector
1042
+ sync job.
1043
+ :param metadata: The connector-specific metadata.
1044
+ :param total_document_count: The total number of documents in the target index
1045
+ after the sync job finished.
1046
+ """
1047
+ if connector_sync_job_id in SKIP_IN_PATH:
1048
+ raise ValueError("Empty value passed for parameter 'connector_sync_job_id'")
1049
+ if deleted_document_count is None and body is None:
1050
+ raise ValueError(
1051
+ "Empty value passed for parameter 'deleted_document_count'"
1052
+ )
1053
+ if indexed_document_count is None and body is None:
1054
+ raise ValueError(
1055
+ "Empty value passed for parameter 'indexed_document_count'"
1056
+ )
1057
+ if indexed_document_volume is None and body is None:
1058
+ raise ValueError(
1059
+ "Empty value passed for parameter 'indexed_document_volume'"
1060
+ )
1061
+ __path_parts: t.Dict[str, str] = {
1062
+ "connector_sync_job_id": _quote(connector_sync_job_id)
1063
+ }
1064
+ __path = f'/_connector/_sync_job/{__path_parts["connector_sync_job_id"]}/_stats'
1065
+ __query: t.Dict[str, t.Any] = {}
1066
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
1067
+ if error_trace is not None:
1068
+ __query["error_trace"] = error_trace
1069
+ if filter_path is not None:
1070
+ __query["filter_path"] = filter_path
1071
+ if human is not None:
1072
+ __query["human"] = human
1073
+ if pretty is not None:
1074
+ __query["pretty"] = pretty
1075
+ if not __body:
1076
+ if deleted_document_count is not None:
1077
+ __body["deleted_document_count"] = deleted_document_count
1078
+ if indexed_document_count is not None:
1079
+ __body["indexed_document_count"] = indexed_document_count
1080
+ if indexed_document_volume is not None:
1081
+ __body["indexed_document_volume"] = indexed_document_volume
1082
+ if last_seen is not None:
1083
+ __body["last_seen"] = last_seen
1084
+ if metadata is not None:
1085
+ __body["metadata"] = metadata
1086
+ if total_document_count is not None:
1087
+ __body["total_document_count"] = total_document_count
1088
+ __headers = {"accept": "application/json", "content-type": "application/json"}
1089
+ return self.perform_request( # type: ignore[return-value]
1090
+ "PUT",
1091
+ __path,
1092
+ params=__query,
1093
+ headers=__headers,
1094
+ body=__body,
1095
+ endpoint_id="connector.sync_job_update_stats",
1096
+ path_parts=__path_parts,
1097
+ )
1098
+
822
1099
  @_rewrite_parameters()
823
1100
  @_stability_warning(Stability.EXPERIMENTAL)
824
1101
  def update_active_filtering(
@@ -834,7 +1111,7 @@ class ConnectorClient(NamespacedClient):
834
1111
  Activate the connector draft filter. Activates the valid draft filtering for
835
1112
  a connector.
836
1113
 
837
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-filtering-api.html>`_
1114
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-api.html>`_
838
1115
 
839
1116
  :param connector_id: The unique identifier of the connector to be updated
840
1117
  """
@@ -884,7 +1161,7 @@ class ConnectorClient(NamespacedClient):
884
1161
  secret ID is required only for Elastic managed (native) connectors. Self-managed
885
1162
  connectors (connector clients) do not use this field.
886
1163
 
887
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-api-key-id-api.html>`_
1164
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-api-key-id-api.html>`_
888
1165
 
889
1166
  :param connector_id: The unique identifier of the connector to be updated
890
1167
  :param api_key_id:
@@ -940,7 +1217,7 @@ class ConnectorClient(NamespacedClient):
940
1217
  Update the connector configuration. Update the configuration field in the connector
941
1218
  document.
942
1219
 
943
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-configuration-api.html>`_
1220
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-configuration-api.html>`_
944
1221
 
945
1222
  :param connector_id: The unique identifier of the connector to be updated
946
1223
  :param configuration:
@@ -997,7 +1274,7 @@ class ConnectorClient(NamespacedClient):
997
1274
  to error. Otherwise, if the error is reset to null, the connector status is updated
998
1275
  to connected.
999
1276
 
1000
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-error-api.html>`_
1277
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-error-api.html>`_
1001
1278
 
1002
1279
  :param connector_id: The unique identifier of the connector to be updated
1003
1280
  :param error:
@@ -1032,6 +1309,66 @@ class ConnectorClient(NamespacedClient):
1032
1309
  path_parts=__path_parts,
1033
1310
  )
1034
1311
 
1312
+ @_rewrite_parameters(
1313
+ body_fields=("features",),
1314
+ )
1315
+ @_stability_warning(Stability.EXPERIMENTAL)
1316
+ def update_features(
1317
+ self,
1318
+ *,
1319
+ connector_id: str,
1320
+ features: t.Optional[t.Mapping[str, t.Any]] = None,
1321
+ error_trace: t.Optional[bool] = None,
1322
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1323
+ human: t.Optional[bool] = None,
1324
+ pretty: t.Optional[bool] = None,
1325
+ body: t.Optional[t.Dict[str, t.Any]] = None,
1326
+ ) -> ObjectApiResponse[t.Any]:
1327
+ """
1328
+ Update the connector features. Update the connector features in the connector
1329
+ document. This API can be used to control the following aspects of a connector:
1330
+ * document-level security * incremental syncs * advanced sync rules * basic sync
1331
+ rules Normally, the running connector service automatically manages these features.
1332
+ However, you can use this API to override the default behavior. To sync data
1333
+ using self-managed connectors, you need to deploy the Elastic connector service
1334
+ on your own infrastructure. This service runs automatically on Elastic Cloud
1335
+ for Elastic managed connectors.
1336
+
1337
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-features-api.html>`_
1338
+
1339
+ :param connector_id: The unique identifier of the connector to be updated.
1340
+ :param features:
1341
+ """
1342
+ if connector_id in SKIP_IN_PATH:
1343
+ raise ValueError("Empty value passed for parameter 'connector_id'")
1344
+ if features is None and body is None:
1345
+ raise ValueError("Empty value passed for parameter 'features'")
1346
+ __path_parts: t.Dict[str, str] = {"connector_id": _quote(connector_id)}
1347
+ __path = f'/_connector/{__path_parts["connector_id"]}/_features'
1348
+ __query: t.Dict[str, t.Any] = {}
1349
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
1350
+ if error_trace is not None:
1351
+ __query["error_trace"] = error_trace
1352
+ if filter_path is not None:
1353
+ __query["filter_path"] = filter_path
1354
+ if human is not None:
1355
+ __query["human"] = human
1356
+ if pretty is not None:
1357
+ __query["pretty"] = pretty
1358
+ if not __body:
1359
+ if features is not None:
1360
+ __body["features"] = features
1361
+ __headers = {"accept": "application/json", "content-type": "application/json"}
1362
+ return self.perform_request( # type: ignore[return-value]
1363
+ "PUT",
1364
+ __path,
1365
+ params=__query,
1366
+ headers=__headers,
1367
+ body=__body,
1368
+ endpoint_id="connector.update_features",
1369
+ path_parts=__path_parts,
1370
+ )
1371
+
1035
1372
  @_rewrite_parameters(
1036
1373
  body_fields=("advanced_snippet", "filtering", "rules"),
1037
1374
  )
@@ -1055,7 +1392,7 @@ class ConnectorClient(NamespacedClient):
1055
1392
  is activated once validated by the running Elastic connector service. The filtering
1056
1393
  property is used to configure sync rules (both basic and advanced) for a connector.
1057
1394
 
1058
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-filtering-api.html>`_
1395
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-api.html>`_
1059
1396
 
1060
1397
  :param connector_id: The unique identifier of the connector to be updated
1061
1398
  :param advanced_snippet:
@@ -1113,7 +1450,7 @@ class ConnectorClient(NamespacedClient):
1113
1450
  Update the connector draft filtering validation. Update the draft filtering validation
1114
1451
  info for a connector.
1115
1452
 
1116
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-filtering-validation-api.html>`_
1453
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-validation-api.html>`_
1117
1454
 
1118
1455
  :param connector_id: The unique identifier of the connector to be updated
1119
1456
  :param validation:
@@ -1167,7 +1504,7 @@ class ConnectorClient(NamespacedClient):
1167
1504
  Update the connector index name. Update the `index_name` field of a connector,
1168
1505
  specifying the index where the data ingested by the connector is stored.
1169
1506
 
1170
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-index-name-api.html>`_
1507
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-index-name-api.html>`_
1171
1508
 
1172
1509
  :param connector_id: The unique identifier of the connector to be updated
1173
1510
  :param index_name:
@@ -1221,7 +1558,7 @@ class ConnectorClient(NamespacedClient):
1221
1558
  """
1222
1559
  Update the connector name and description.
1223
1560
 
1224
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-name-description-api.html>`_
1561
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-name-description-api.html>`_
1225
1562
 
1226
1563
  :param connector_id: The unique identifier of the connector to be updated
1227
1564
  :param description:
@@ -1275,7 +1612,7 @@ class ConnectorClient(NamespacedClient):
1275
1612
  """
1276
1613
  Update the connector is_native flag.
1277
1614
 
1278
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-native-api.html>`_
1615
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-native-api.html>`_
1279
1616
 
1280
1617
  :param connector_id: The unique identifier of the connector to be updated
1281
1618
  :param is_native:
@@ -1329,7 +1666,7 @@ class ConnectorClient(NamespacedClient):
1329
1666
  Update the connector pipeline. When you create a new connector, the configuration
1330
1667
  of an ingest pipeline is populated with default settings.
1331
1668
 
1332
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-pipeline-api.html>`_
1669
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-pipeline-api.html>`_
1333
1670
 
1334
1671
  :param connector_id: The unique identifier of the connector to be updated
1335
1672
  :param pipeline:
@@ -1382,7 +1719,7 @@ class ConnectorClient(NamespacedClient):
1382
1719
  """
1383
1720
  Update the connector scheduling.
1384
1721
 
1385
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-scheduling-api.html>`_
1722
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-scheduling-api.html>`_
1386
1723
 
1387
1724
  :param connector_id: The unique identifier of the connector to be updated
1388
1725
  :param scheduling:
@@ -1435,7 +1772,7 @@ class ConnectorClient(NamespacedClient):
1435
1772
  """
1436
1773
  Update the connector service type.
1437
1774
 
1438
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-service-type-api.html>`_
1775
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-service-type-api.html>`_
1439
1776
 
1440
1777
  :param connector_id: The unique identifier of the connector to be updated
1441
1778
  :param service_type:
@@ -1495,7 +1832,7 @@ class ConnectorClient(NamespacedClient):
1495
1832
  """
1496
1833
  Update the connector status.
1497
1834
 
1498
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-status-api.html>`_
1835
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-status-api.html>`_
1499
1836
 
1500
1837
  :param connector_id: The unique identifier of the connector to be updated
1501
1838
  :param status:
@@ -44,7 +44,7 @@ class DanglingIndicesClient(NamespacedClient):
44
44
  For example, this can happen if you delete more than `cluster.indices.tombstones.size`
45
45
  indices while an Elasticsearch node is offline.
46
46
 
47
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-gateway-dangling-indices.html>`_
47
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-index-delete.html>`_
48
48
 
49
49
  :param index_uuid: The UUID of the index to delete. Use the get dangling indices
50
50
  API to find the UUID.
@@ -103,7 +103,7 @@ class DanglingIndicesClient(NamespacedClient):
103
103
  For example, this can happen if you delete more than `cluster.indices.tombstones.size`
104
104
  indices while an Elasticsearch node is offline.
105
105
 
106
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-gateway-dangling-indices.html>`_
106
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-index-import.html>`_
107
107
 
108
108
  :param index_uuid: The UUID of the index to import. Use the get dangling indices
109
109
  API to locate the UUID.
@@ -162,7 +162,7 @@ class DanglingIndicesClient(NamespacedClient):
162
162
  indices while an Elasticsearch node is offline. Use this API to list dangling
163
163
  indices, which you can then import or delete.
164
164
 
165
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-gateway-dangling-indices.html>`_
165
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-indices-list.html>`_
166
166
  """
167
167
  __path_parts: t.Dict[str, str] = {}
168
168
  __path = "/_dangling"
@@ -38,7 +38,7 @@ class EnrichClient(NamespacedClient):
38
38
  """
39
39
  Delete an enrich policy. Deletes an existing enrich policy and its enrich index.
40
40
 
41
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-enrich-policy-api.html>`_
41
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-enrich-policy-api.html>`_
42
42
 
43
43
  :param name: Enrich policy to delete.
44
44
  """
@@ -77,9 +77,9 @@ class EnrichClient(NamespacedClient):
77
77
  wait_for_completion: t.Optional[bool] = None,
78
78
  ) -> ObjectApiResponse[t.Any]:
79
79
  """
80
- Creates the enrich index for an existing enrich policy.
80
+ Run an enrich policy. Create the enrich index for an existing enrich policy.
81
81
 
82
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/execute-enrich-policy-api.html>`_
82
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/execute-enrich-policy-api.html>`_
83
83
 
84
84
  :param name: Enrich policy to execute.
85
85
  :param wait_for_completion: If `true`, the request blocks other enrich policy
@@ -123,7 +123,7 @@ class EnrichClient(NamespacedClient):
123
123
  """
124
124
  Get an enrich policy. Returns information about an enrich policy.
125
125
 
126
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-enrich-policy-api.html>`_
126
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-enrich-policy-api.html>`_
127
127
 
128
128
  :param name: Comma-separated list of enrich policy names used to limit the request.
129
129
  To return information for all enrich policies, omit this parameter.
@@ -173,7 +173,7 @@ class EnrichClient(NamespacedClient):
173
173
  """
174
174
  Create an enrich policy. Creates an enrich policy.
175
175
 
176
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/put-enrich-policy-api.html>`_
176
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-enrich-policy-api.html>`_
177
177
 
178
178
  :param name: Name of the enrich policy to create or update.
179
179
  :param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
@@ -227,7 +227,7 @@ class EnrichClient(NamespacedClient):
227
227
  Get enrich stats. Returns enrich coordinator statistics and information about
228
228
  enrich policies that are currently executing.
229
229
 
230
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/enrich-stats-api.html>`_
230
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/enrich-stats-api.html>`_
231
231
  """
232
232
  __path_parts: t.Dict[str, str] = {}
233
233
  __path = "/_enrich/_stats"