elasticsearch 8.15.1__py3-none-any.whl → 8.17.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 (94) hide show
  1. elasticsearch/_async/client/__init__.py +237 -120
  2. elasticsearch/_async/client/async_search.py +33 -43
  3. elasticsearch/_async/client/autoscaling.py +59 -11
  4. elasticsearch/_async/client/cat.py +75 -66
  5. elasticsearch/_async/client/ccr.py +85 -35
  6. elasticsearch/_async/client/cluster.py +165 -70
  7. elasticsearch/_async/client/connector.py +112 -51
  8. elasticsearch/_async/client/dangling_indices.py +27 -12
  9. elasticsearch/_async/client/enrich.py +11 -11
  10. elasticsearch/_async/client/eql.py +13 -11
  11. elasticsearch/_async/client/esql.py +44 -5
  12. elasticsearch/_async/client/features.py +29 -6
  13. elasticsearch/_async/client/fleet.py +10 -2
  14. elasticsearch/_async/client/graph.py +9 -3
  15. elasticsearch/_async/client/ilm.py +74 -35
  16. elasticsearch/_async/client/indices.py +422 -152
  17. elasticsearch/_async/client/inference.py +4 -4
  18. elasticsearch/_async/client/ingest.py +47 -26
  19. elasticsearch/_async/client/license.py +38 -22
  20. elasticsearch/_async/client/logstash.py +3 -3
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +346 -291
  23. elasticsearch/_async/client/monitoring.py +1 -1
  24. elasticsearch/_async/client/nodes.py +43 -21
  25. elasticsearch/_async/client/query_rules.py +69 -15
  26. elasticsearch/_async/client/rollup.py +23 -9
  27. elasticsearch/_async/client/search_application.py +35 -16
  28. elasticsearch/_async/client/searchable_snapshots.py +13 -5
  29. elasticsearch/_async/client/security.py +378 -180
  30. elasticsearch/_async/client/slm.py +9 -9
  31. elasticsearch/_async/client/snapshot.py +97 -12
  32. elasticsearch/_async/client/sql.py +21 -16
  33. elasticsearch/_async/client/ssl.py +18 -3
  34. elasticsearch/_async/client/synonyms.py +17 -14
  35. elasticsearch/_async/client/tasks.py +19 -9
  36. elasticsearch/_async/client/text_structure.py +2 -2
  37. elasticsearch/_async/client/transform.py +78 -72
  38. elasticsearch/_async/client/utils.py +4 -0
  39. elasticsearch/_async/client/watcher.py +11 -11
  40. elasticsearch/_async/client/xpack.py +5 -3
  41. elasticsearch/_async/helpers.py +19 -10
  42. elasticsearch/_otel.py +2 -2
  43. elasticsearch/_sync/client/__init__.py +237 -120
  44. elasticsearch/_sync/client/async_search.py +33 -43
  45. elasticsearch/_sync/client/autoscaling.py +59 -11
  46. elasticsearch/_sync/client/cat.py +75 -66
  47. elasticsearch/_sync/client/ccr.py +85 -35
  48. elasticsearch/_sync/client/cluster.py +165 -70
  49. elasticsearch/_sync/client/connector.py +112 -51
  50. elasticsearch/_sync/client/dangling_indices.py +27 -12
  51. elasticsearch/_sync/client/enrich.py +11 -11
  52. elasticsearch/_sync/client/eql.py +13 -11
  53. elasticsearch/_sync/client/esql.py +44 -5
  54. elasticsearch/_sync/client/features.py +29 -6
  55. elasticsearch/_sync/client/fleet.py +10 -2
  56. elasticsearch/_sync/client/graph.py +9 -3
  57. elasticsearch/_sync/client/ilm.py +74 -35
  58. elasticsearch/_sync/client/indices.py +422 -152
  59. elasticsearch/_sync/client/inference.py +4 -4
  60. elasticsearch/_sync/client/ingest.py +47 -26
  61. elasticsearch/_sync/client/license.py +38 -22
  62. elasticsearch/_sync/client/logstash.py +3 -3
  63. elasticsearch/_sync/client/migration.py +3 -3
  64. elasticsearch/_sync/client/ml.py +346 -291
  65. elasticsearch/_sync/client/monitoring.py +1 -1
  66. elasticsearch/_sync/client/nodes.py +43 -21
  67. elasticsearch/_sync/client/query_rules.py +69 -15
  68. elasticsearch/_sync/client/rollup.py +23 -9
  69. elasticsearch/_sync/client/search_application.py +35 -16
  70. elasticsearch/_sync/client/searchable_snapshots.py +13 -5
  71. elasticsearch/_sync/client/security.py +378 -180
  72. elasticsearch/_sync/client/slm.py +9 -9
  73. elasticsearch/_sync/client/snapshot.py +97 -12
  74. elasticsearch/_sync/client/sql.py +21 -16
  75. elasticsearch/_sync/client/ssl.py +18 -3
  76. elasticsearch/_sync/client/synonyms.py +17 -14
  77. elasticsearch/_sync/client/tasks.py +19 -9
  78. elasticsearch/_sync/client/text_structure.py +2 -2
  79. elasticsearch/_sync/client/transform.py +78 -72
  80. elasticsearch/_sync/client/utils.py +40 -0
  81. elasticsearch/_sync/client/watcher.py +11 -11
  82. elasticsearch/_sync/client/xpack.py +5 -3
  83. elasticsearch/_version.py +1 -1
  84. elasticsearch/exceptions.py +4 -0
  85. elasticsearch/helpers/actions.py +19 -10
  86. elasticsearch/helpers/errors.py +12 -4
  87. elasticsearch/helpers/vectorstore/_async/strategies.py +30 -9
  88. elasticsearch/helpers/vectorstore/_sync/strategies.py +30 -9
  89. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/METADATA +4 -3
  90. elasticsearch-8.17.0.dist-info/RECORD +117 -0
  91. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/WHEEL +1 -1
  92. elasticsearch-8.15.1.dist-info/RECORD +0 -117
  93. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/licenses/LICENSE +0 -0
  94. {elasticsearch-8.15.1.dist-info → elasticsearch-8.17.0.dist-info}/licenses/NOTICE +0 -0
@@ -44,9 +44,10 @@ class SecurityClient(NamespacedClient):
44
44
  body: t.Optional[t.Dict[str, t.Any]] = None,
45
45
  ) -> ObjectApiResponse[t.Any]:
46
46
  """
47
- Creates or updates a user profile on behalf of another user.
47
+ Activate a user profile. Create or update a user profile on behalf of another
48
+ user.
48
49
 
49
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-activate-user-profile.html>`_
50
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-activate-user-profile.html>`_
50
51
 
51
52
  :param grant_type:
52
53
  :param access_token:
@@ -97,14 +98,14 @@ class SecurityClient(NamespacedClient):
97
98
  pretty: t.Optional[bool] = None,
98
99
  ) -> ObjectApiResponse[t.Any]:
99
100
  """
100
- Enables you to submit a request with a basic auth header to authenticate a user
101
- and retrieve information about the authenticated user. A successful call returns
102
- a JSON structure that shows user information such as their username, the roles
103
- that are assigned to the user, any assigned metadata, and information about the
104
- realms that authenticated and authorized the user. If the user cannot be authenticated,
105
- this API returns a 401 status code.
101
+ Authenticate a user. Authenticates a user and returns information about the authenticated
102
+ user. Include the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication).
103
+ A successful call returns a JSON structure that shows user information such as
104
+ their username, the roles that are assigned to the user, any assigned metadata,
105
+ and information about the realms that authenticated and authorized the user.
106
+ If the user cannot be authenticated, this API returns a 401 status code.
106
107
 
107
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-authenticate.html>`_
108
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-authenticate.html>`_
108
109
  """
109
110
  __path_parts: t.Dict[str, str] = {}
110
111
  __path = "/_security/_authenticate"
@@ -144,11 +145,11 @@ class SecurityClient(NamespacedClient):
144
145
  body: t.Optional[t.Dict[str, t.Any]] = None,
145
146
  ) -> ObjectApiResponse[t.Any]:
146
147
  """
147
- The role management APIs are generally the preferred way to manage roles, rather
148
- than using file-based role management. The bulk delete roles API cannot delete
149
- roles that are defined in roles files.
148
+ Bulk delete roles. The role management APIs are generally the preferred way to
149
+ manage roles, rather than using file-based role management. The bulk delete roles
150
+ API cannot delete roles that are defined in roles files.
150
151
 
151
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-bulk-delete-role.html>`_
152
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-delete-role.html>`_
152
153
 
153
154
  :param names: An array of role names to delete
154
155
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -202,11 +203,11 @@ class SecurityClient(NamespacedClient):
202
203
  body: t.Optional[t.Dict[str, t.Any]] = None,
203
204
  ) -> ObjectApiResponse[t.Any]:
204
205
  """
205
- The role management APIs are generally the preferred way to manage roles, rather
206
- than using file-based role management. The bulk create or update roles API cannot
207
- update roles that are defined in roles files.
206
+ Bulk create or update roles. The role management APIs are generally the preferred
207
+ way to manage roles, rather than using file-based role management. The bulk create
208
+ or update roles API cannot update roles that are defined in roles files.
208
209
 
209
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-bulk-put-role.html>`_
210
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-put-role.html>`_
210
211
 
211
212
  :param roles: A dictionary of role name to RoleDescriptor objects to add or update
212
213
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -262,9 +263,10 @@ class SecurityClient(NamespacedClient):
262
263
  body: t.Optional[t.Dict[str, t.Any]] = None,
263
264
  ) -> ObjectApiResponse[t.Any]:
264
265
  """
265
- Changes the passwords of users in the native realm and built-in users.
266
+ Change passwords. Change the passwords of users in the native realm and built-in
267
+ users.
266
268
 
267
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-change-password.html>`_
269
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-change-password.html>`_
268
270
 
269
271
  :param username: The user whose password you want to change. If you do not specify
270
272
  this parameter, the password is changed for the current user.
@@ -324,10 +326,10 @@ class SecurityClient(NamespacedClient):
324
326
  pretty: t.Optional[bool] = None,
325
327
  ) -> ObjectApiResponse[t.Any]:
326
328
  """
327
- Evicts a subset of all entries from the API key cache. The cache is also automatically
328
- cleared on state changes of the security index.
329
+ Clear the API key cache. Evict a subset of all entries from the API key cache.
330
+ The cache is also automatically cleared on state changes of the security index.
329
331
 
330
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-api-key-cache.html>`_
332
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-api-key-cache.html>`_
331
333
 
332
334
  :param ids: Comma-separated list of API key IDs to evict from the API key cache.
333
335
  To evict all API keys, use `*`. Does not support other wildcard patterns.
@@ -366,9 +368,11 @@ class SecurityClient(NamespacedClient):
366
368
  pretty: t.Optional[bool] = None,
367
369
  ) -> ObjectApiResponse[t.Any]:
368
370
  """
369
- Evicts application privileges from the native application privileges cache.
371
+ Clear the privileges cache. Evict privileges from the native application privilege
372
+ cache. The cache is also automatically cleared for applications that have their
373
+ privileges updated.
370
374
 
371
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-privilege-cache.html>`_
375
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-privilege-cache.html>`_
372
376
 
373
377
  :param application: A comma-separated list of application names
374
378
  """
@@ -407,10 +411,10 @@ class SecurityClient(NamespacedClient):
407
411
  usernames: t.Optional[t.Sequence[str]] = None,
408
412
  ) -> ObjectApiResponse[t.Any]:
409
413
  """
410
- Evicts users from the user cache. Can completely clear the cache or evict specific
411
- users.
414
+ Clear the user cache. Evict users from the user cache. You can completely clear
415
+ the cache or evict specific users.
412
416
 
413
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-cache.html>`_
417
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-cache.html>`_
414
418
 
415
419
  :param realms: Comma-separated list of realms to clear
416
420
  :param usernames: Comma-separated list of usernames to clear from the cache
@@ -451,9 +455,9 @@ class SecurityClient(NamespacedClient):
451
455
  pretty: t.Optional[bool] = None,
452
456
  ) -> ObjectApiResponse[t.Any]:
453
457
  """
454
- Evicts roles from the native role cache.
458
+ Clear the roles cache. Evict roles from the native role cache.
455
459
 
456
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-role-cache.html>`_
460
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-role-cache.html>`_
457
461
 
458
462
  :param name: Role name
459
463
  """
@@ -493,9 +497,10 @@ class SecurityClient(NamespacedClient):
493
497
  pretty: t.Optional[bool] = None,
494
498
  ) -> ObjectApiResponse[t.Any]:
495
499
  """
496
- Evicts tokens from the service account token caches.
500
+ Clear service account token caches. Evict a subset of all entries from the service
501
+ account token caches.
497
502
 
498
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-service-token-caches.html>`_
503
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-service-token-caches.html>`_
499
504
 
500
505
  :param namespace: An identifier for the namespace
501
506
  :param service: An identifier for the service name
@@ -552,13 +557,13 @@ class SecurityClient(NamespacedClient):
552
557
  body: t.Optional[t.Dict[str, t.Any]] = None,
553
558
  ) -> ObjectApiResponse[t.Any]:
554
559
  """
555
- Creates an API key for access without requiring basic authentication. A successful
556
- request returns a JSON structure that contains the API key, its unique id, and
557
- its name. If applicable, it also returns expiration information for the API key
558
- in milliseconds. NOTE: By default, API keys never expire. You can specify expiration
559
- information when you create the API keys.
560
+ Create an API key. Create an API key for access without requiring basic authentication.
561
+ A successful request returns a JSON structure that contains the API key, its
562
+ unique id, and its name. If applicable, it also returns expiration information
563
+ for the API key in milliseconds. NOTE: By default, API keys never expire. You
564
+ can specify expiration information when you create the API keys.
560
565
 
561
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-create-api-key.html>`_
566
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-api-key.html>`_
562
567
 
563
568
  :param expiration: Expiration time for the API key. By default, API keys never
564
569
  expire.
@@ -612,6 +617,90 @@ class SecurityClient(NamespacedClient):
612
617
  path_parts=__path_parts,
613
618
  )
614
619
 
620
+ @_rewrite_parameters(
621
+ body_fields=("access", "name", "expiration", "metadata"),
622
+ )
623
+ async def create_cross_cluster_api_key(
624
+ self,
625
+ *,
626
+ access: t.Optional[t.Mapping[str, t.Any]] = None,
627
+ name: t.Optional[str] = None,
628
+ error_trace: t.Optional[bool] = None,
629
+ expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
630
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
631
+ human: t.Optional[bool] = None,
632
+ metadata: t.Optional[t.Mapping[str, t.Any]] = None,
633
+ pretty: t.Optional[bool] = None,
634
+ body: t.Optional[t.Dict[str, t.Any]] = None,
635
+ ) -> ObjectApiResponse[t.Any]:
636
+ """
637
+ Create a cross-cluster API key. Create an API key of the `cross_cluster` type
638
+ for the API key based remote cluster access. A `cross_cluster` API key cannot
639
+ be used to authenticate through the REST interface. IMPORTANT: To authenticate
640
+ this request you must use a credential that is not an API key. Even if you use
641
+ an API key that has the required privilege, the API returns an error. Cross-cluster
642
+ API keys are created by the Elasticsearch API key service, which is automatically
643
+ enabled. NOTE: Unlike REST API keys, a cross-cluster API key does not capture
644
+ permissions of the authenticated user. The API key’s effective permission is
645
+ exactly as specified with the `access` property. A successful request returns
646
+ a JSON structure that contains the API key, its unique ID, and its name. If applicable,
647
+ it also returns expiration information for the API key in milliseconds. By default,
648
+ API keys never expire. You can specify expiration information when you create
649
+ the API keys. Cross-cluster API keys can only be updated with the update cross-cluster
650
+ API key API. Attempting to update them with the update REST API key API or the
651
+ bulk update REST API keys API will result in an error.
652
+
653
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-cross-cluster-api-key.html>`_
654
+
655
+ :param access: The access to be granted to this API key. The access is composed
656
+ of permissions for cross-cluster search and cross-cluster replication. At
657
+ least one of them must be specified. NOTE: No explicit privileges should
658
+ be specified for either search or replication access. The creation process
659
+ automatically converts the access specification to a role descriptor which
660
+ has relevant privileges assigned accordingly.
661
+ :param name: Specifies the name for this API key.
662
+ :param expiration: Expiration time for the API key. By default, API keys never
663
+ expire.
664
+ :param metadata: Arbitrary metadata that you want to associate with the API key.
665
+ It supports nested data structure. Within the metadata object, keys beginning
666
+ with `_` are reserved for system usage.
667
+ """
668
+ if access is None and body is None:
669
+ raise ValueError("Empty value passed for parameter 'access'")
670
+ if name is None and body is None:
671
+ raise ValueError("Empty value passed for parameter 'name'")
672
+ __path_parts: t.Dict[str, str] = {}
673
+ __path = "/_security/cross_cluster/api_key"
674
+ __query: t.Dict[str, t.Any] = {}
675
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
676
+ if error_trace is not None:
677
+ __query["error_trace"] = error_trace
678
+ if filter_path is not None:
679
+ __query["filter_path"] = filter_path
680
+ if human is not None:
681
+ __query["human"] = human
682
+ if pretty is not None:
683
+ __query["pretty"] = pretty
684
+ if not __body:
685
+ if access is not None:
686
+ __body["access"] = access
687
+ if name is not None:
688
+ __body["name"] = name
689
+ if expiration is not None:
690
+ __body["expiration"] = expiration
691
+ if metadata is not None:
692
+ __body["metadata"] = metadata
693
+ __headers = {"accept": "application/json", "content-type": "application/json"}
694
+ return await self.perform_request( # type: ignore[return-value]
695
+ "POST",
696
+ __path,
697
+ params=__query,
698
+ headers=__headers,
699
+ body=__body,
700
+ endpoint_id="security.create_cross_cluster_api_key",
701
+ path_parts=__path_parts,
702
+ )
703
+
615
704
  @_rewrite_parameters()
616
705
  async def create_service_token(
617
706
  self,
@@ -628,9 +717,10 @@ class SecurityClient(NamespacedClient):
628
717
  ] = None,
629
718
  ) -> ObjectApiResponse[t.Any]:
630
719
  """
631
- Creates a service accounts token for access without requiring basic authentication.
720
+ Create a service account token. Create a service accounts token for access without
721
+ requiring basic authentication.
632
722
 
633
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-create-service-token.html>`_
723
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-service-token.html>`_
634
724
 
635
725
  :param namespace: An identifier for the namespace
636
726
  :param service: An identifier for the service name
@@ -698,9 +788,9 @@ class SecurityClient(NamespacedClient):
698
788
  ] = None,
699
789
  ) -> ObjectApiResponse[t.Any]:
700
790
  """
701
- Removes application privileges.
791
+ Delete application privileges.
702
792
 
703
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-privilege.html>`_
793
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-privilege.html>`_
704
794
 
705
795
  :param application: Application name
706
796
  :param name: Privilege name
@@ -754,9 +844,9 @@ class SecurityClient(NamespacedClient):
754
844
  ] = None,
755
845
  ) -> ObjectApiResponse[t.Any]:
756
846
  """
757
- Removes roles in the native realm.
847
+ Delete roles. Delete roles in the native realm.
758
848
 
759
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-role.html>`_
849
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role.html>`_
760
850
 
761
851
  :param name: Role name
762
852
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -802,9 +892,9 @@ class SecurityClient(NamespacedClient):
802
892
  ] = None,
803
893
  ) -> ObjectApiResponse[t.Any]:
804
894
  """
805
- Removes role mappings.
895
+ Delete role mappings.
806
896
 
807
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-role-mapping.html>`_
897
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role-mapping.html>`_
808
898
 
809
899
  :param name: Role-mapping name
810
900
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -852,9 +942,10 @@ class SecurityClient(NamespacedClient):
852
942
  ] = None,
853
943
  ) -> ObjectApiResponse[t.Any]:
854
944
  """
855
- Deletes a service account token.
945
+ Delete service account tokens. Delete service account tokens for a service in
946
+ a specified namespace.
856
947
 
857
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-service-token.html>`_
948
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-service-token.html>`_
858
949
 
859
950
  :param namespace: An identifier for the namespace
860
951
  :param service: An identifier for the service name
@@ -910,9 +1001,9 @@ class SecurityClient(NamespacedClient):
910
1001
  ] = None,
911
1002
  ) -> ObjectApiResponse[t.Any]:
912
1003
  """
913
- Deletes users from the native realm.
1004
+ Delete users. Delete users from the native realm.
914
1005
 
915
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-user.html>`_
1006
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-user.html>`_
916
1007
 
917
1008
  :param username: username
918
1009
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -958,9 +1049,9 @@ class SecurityClient(NamespacedClient):
958
1049
  ] = None,
959
1050
  ) -> ObjectApiResponse[t.Any]:
960
1051
  """
961
- Disables users in the native realm.
1052
+ Disable users. Disable users in the native realm.
962
1053
 
963
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-disable-user.html>`_
1054
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user.html>`_
964
1055
 
965
1056
  :param username: The username of the user to disable
966
1057
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -1006,9 +1097,10 @@ class SecurityClient(NamespacedClient):
1006
1097
  ] = None,
1007
1098
  ) -> ObjectApiResponse[t.Any]:
1008
1099
  """
1009
- Disables a user profile so it's not visible in user profile searches.
1100
+ Disable a user profile. Disable user profiles so that they are not visible in
1101
+ user profile searches.
1010
1102
 
1011
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-disable-user-profile.html>`_
1103
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user-profile.html>`_
1012
1104
 
1013
1105
  :param uid: Unique identifier for the user profile.
1014
1106
  :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
@@ -1054,9 +1146,9 @@ class SecurityClient(NamespacedClient):
1054
1146
  ] = None,
1055
1147
  ) -> ObjectApiResponse[t.Any]:
1056
1148
  """
1057
- Enables users in the native realm.
1149
+ Enable users. Enable users in the native realm.
1058
1150
 
1059
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-enable-user.html>`_
1151
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user.html>`_
1060
1152
 
1061
1153
  :param username: The username of the user to enable
1062
1154
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -1102,9 +1194,10 @@ class SecurityClient(NamespacedClient):
1102
1194
  ] = None,
1103
1195
  ) -> ObjectApiResponse[t.Any]:
1104
1196
  """
1105
- Enables a user profile so it's visible in user profile searches.
1197
+ Enable a user profile. Enable user profiles to make them visible in user profile
1198
+ searches.
1106
1199
 
1107
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-enable-user-profile.html>`_
1200
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user-profile.html>`_
1108
1201
 
1109
1202
  :param uid: Unique identifier for the user profile.
1110
1203
  :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
@@ -1146,10 +1239,10 @@ class SecurityClient(NamespacedClient):
1146
1239
  pretty: t.Optional[bool] = None,
1147
1240
  ) -> ObjectApiResponse[t.Any]:
1148
1241
  """
1149
- Enables a Kibana instance to configure itself for communication with a secured
1150
- Elasticsearch cluster.
1242
+ Enroll Kibana. Enable a Kibana instance to configure itself for communication
1243
+ with a secured Elasticsearch cluster.
1151
1244
 
1152
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-kibana-enrollment.html>`_
1245
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-kibana-enrollment.html>`_
1153
1246
  """
1154
1247
  __path_parts: t.Dict[str, str] = {}
1155
1248
  __path = "/_security/enroll/kibana"
@@ -1182,9 +1275,10 @@ class SecurityClient(NamespacedClient):
1182
1275
  pretty: t.Optional[bool] = None,
1183
1276
  ) -> ObjectApiResponse[t.Any]:
1184
1277
  """
1185
- Allows a new node to join an existing cluster with security features enabled.
1278
+ Enroll a node. Enroll a new node to allow it to join an existing cluster with
1279
+ security features enabled.
1186
1280
 
1187
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-node-enrollment.html>`_
1281
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-node-enrollment.html>`_
1188
1282
  """
1189
1283
  __path_parts: t.Dict[str, str] = {}
1190
1284
  __path = "/_security/enroll/node"
@@ -1225,12 +1319,13 @@ class SecurityClient(NamespacedClient):
1225
1319
  with_profile_uid: t.Optional[bool] = None,
1226
1320
  ) -> ObjectApiResponse[t.Any]:
1227
1321
  """
1228
- Retrieves information for one or more API keys. NOTE: If you have only the `manage_own_api_key`
1229
- privilege, this API returns only the API keys that you own. If you have `read_security`,
1230
- `manage_api_key` or greater privileges (including `manage_security`), this API
1231
- returns all API keys regardless of ownership.
1322
+ Get API key information. Retrieves information for one or more API keys. NOTE:
1323
+ If you have only the `manage_own_api_key` privilege, this API returns only the
1324
+ API keys that you own. If you have `read_security`, `manage_api_key` or greater
1325
+ privileges (including `manage_security`), this API returns all API keys regardless
1326
+ of ownership.
1232
1327
 
1233
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-api-key.html>`_
1328
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-api-key.html>`_
1234
1329
 
1235
1330
  :param active_only: A boolean flag that can be used to query API keys that are
1236
1331
  currently active. An API key is considered active if it is neither invalidated,
@@ -1302,10 +1397,10 @@ class SecurityClient(NamespacedClient):
1302
1397
  pretty: t.Optional[bool] = None,
1303
1398
  ) -> ObjectApiResponse[t.Any]:
1304
1399
  """
1305
- Retrieves the list of cluster privileges and index privileges that are available
1306
- in this version of Elasticsearch.
1400
+ Get builtin privileges. Get the list of cluster privileges and index privileges
1401
+ that are available in this version of Elasticsearch.
1307
1402
 
1308
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-builtin-privileges.html>`_
1403
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-builtin-privileges.html>`_
1309
1404
  """
1310
1405
  __path_parts: t.Dict[str, str] = {}
1311
1406
  __path = "/_security/privilege/_builtin"
@@ -1340,9 +1435,9 @@ class SecurityClient(NamespacedClient):
1340
1435
  pretty: t.Optional[bool] = None,
1341
1436
  ) -> ObjectApiResponse[t.Any]:
1342
1437
  """
1343
- Retrieves application privileges.
1438
+ Get application privileges.
1344
1439
 
1345
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-privileges.html>`_
1440
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-privileges.html>`_
1346
1441
 
1347
1442
  :param application: Application name
1348
1443
  :param name: Privilege name
@@ -1387,11 +1482,11 @@ class SecurityClient(NamespacedClient):
1387
1482
  pretty: t.Optional[bool] = None,
1388
1483
  ) -> ObjectApiResponse[t.Any]:
1389
1484
  """
1390
- The role management APIs are generally the preferred way to manage roles, rather
1391
- than using file-based role management. The get roles API cannot retrieve roles
1392
- that are defined in roles files.
1485
+ Get roles. Get roles in the native realm. The role management APIs are generally
1486
+ the preferred way to manage roles, rather than using file-based role management.
1487
+ The get roles API cannot retrieve roles that are defined in roles files.
1393
1488
 
1394
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-role.html>`_
1489
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-role.html>`_
1395
1490
 
1396
1491
  :param name: The name of the role. You can specify multiple roles as a comma-separated
1397
1492
  list. If you do not specify this parameter, the API returns information about
@@ -1434,9 +1529,12 @@ class SecurityClient(NamespacedClient):
1434
1529
  pretty: t.Optional[bool] = None,
1435
1530
  ) -> ObjectApiResponse[t.Any]:
1436
1531
  """
1437
- Retrieves role mappings.
1532
+ Get role mappings. Role mappings define which roles are assigned to each user.
1533
+ The role mapping APIs are generally the preferred way to manage role mappings
1534
+ rather than using role mapping files. The get role mappings API cannot retrieve
1535
+ role mappings that are defined in role mapping files.
1438
1536
 
1439
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-role-mapping.html>`_
1537
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-role-mapping.html>`_
1440
1538
 
1441
1539
  :param name: The distinct name that identifies the role mapping. The name is
1442
1540
  used solely as an identifier to facilitate interaction via the API; it does
@@ -1482,9 +1580,10 @@ class SecurityClient(NamespacedClient):
1482
1580
  pretty: t.Optional[bool] = None,
1483
1581
  ) -> ObjectApiResponse[t.Any]:
1484
1582
  """
1485
- This API returns a list of service accounts that match the provided path parameter(s).
1583
+ Get service accounts. Get a list of service accounts that match the provided
1584
+ path parameters.
1486
1585
 
1487
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-service-accounts.html>`_
1586
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-accounts.html>`_
1488
1587
 
1489
1588
  :param namespace: Name of the namespace. Omit this parameter to retrieve information
1490
1589
  about all service accounts. If you omit this parameter, you must also omit
@@ -1533,9 +1632,9 @@ class SecurityClient(NamespacedClient):
1533
1632
  pretty: t.Optional[bool] = None,
1534
1633
  ) -> ObjectApiResponse[t.Any]:
1535
1634
  """
1536
- Retrieves information of all service credentials for a service account.
1635
+ Get service account credentials.
1537
1636
 
1538
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-service-credentials.html>`_
1637
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-credentials.html>`_
1539
1638
 
1540
1639
  :param namespace: Name of the namespace.
1541
1640
  :param service: Name of the service name.
@@ -1601,9 +1700,9 @@ class SecurityClient(NamespacedClient):
1601
1700
  body: t.Optional[t.Dict[str, t.Any]] = None,
1602
1701
  ) -> ObjectApiResponse[t.Any]:
1603
1702
  """
1604
- Creates a bearer token for access without requiring basic authentication.
1703
+ Get a token. Create a bearer token for access without requiring basic authentication.
1605
1704
 
1606
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-token.html>`_
1705
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-token.html>`_
1607
1706
 
1608
1707
  :param grant_type:
1609
1708
  :param kerberos_ticket:
@@ -1660,9 +1759,9 @@ class SecurityClient(NamespacedClient):
1660
1759
  with_profile_uid: t.Optional[bool] = None,
1661
1760
  ) -> ObjectApiResponse[t.Any]:
1662
1761
  """
1663
- Retrieves information about users in the native realm and built-in users.
1762
+ Get users. Get information about users in the native realm and built-in users.
1664
1763
 
1665
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-user.html>`_
1764
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user.html>`_
1666
1765
 
1667
1766
  :param username: An identifier for the user. You can specify multiple usernames
1668
1767
  as a comma-separated list. If you omit this parameter, the API retrieves
@@ -1711,9 +1810,9 @@ class SecurityClient(NamespacedClient):
1711
1810
  username: t.Optional[t.Union[None, str]] = None,
1712
1811
  ) -> ObjectApiResponse[t.Any]:
1713
1812
  """
1714
- Retrieves security privileges for the logged in user.
1813
+ Get user privileges.
1715
1814
 
1716
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-user-privileges.html>`_
1815
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-privileges.html>`_
1717
1816
 
1718
1817
  :param application: The name of the application. Application privileges are always
1719
1818
  associated with exactly one application. If you do not specify this parameter,
@@ -1761,9 +1860,9 @@ class SecurityClient(NamespacedClient):
1761
1860
  pretty: t.Optional[bool] = None,
1762
1861
  ) -> ObjectApiResponse[t.Any]:
1763
1862
  """
1764
- Retrieves a user's profile using the unique profile ID.
1863
+ Get a user profile. Get a user's profile using the unique profile ID.
1765
1864
 
1766
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-user-profile.html>`_
1865
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-profile.html>`_
1767
1866
 
1768
1867
  :param uid: A unique identifier for the user profile.
1769
1868
  :param data: List of filters for the `data` field of the profile document. To
@@ -1825,23 +1924,23 @@ class SecurityClient(NamespacedClient):
1825
1924
  body: t.Optional[t.Dict[str, t.Any]] = None,
1826
1925
  ) -> ObjectApiResponse[t.Any]:
1827
1926
  """
1828
- Creates an API key on behalf of another user. This API is similar to Create API
1829
- keys, however it creates the API key for a user that is different than the user
1830
- that runs the API. The caller must have authentication credentials (either an
1831
- access token, or a username and password) for the user on whose behalf the API
1832
- key will be created. It is not possible to use this API to create an API key
1833
- without that user’s credentials. The user, for whom the authentication credentials
1834
- is provided, can optionally "run as" (impersonate) another user. In this case,
1835
- the API key will be created on behalf of the impersonated user. This API is intended
1836
- be used by applications that need to create and manage API keys for end users,
1837
- but cannot guarantee that those users have permission to create API keys on their
1838
- own behalf. A successful grant API key API call returns a JSON structure that
1839
- contains the API key, its unique id, and its name. If applicable, it also returns
1840
- expiration information for the API key in milliseconds. By default, API keys
1841
- never expire. You can specify expiration information when you create the API
1842
- keys.
1843
-
1844
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-grant-api-key.html>`_
1927
+ Grant an API key. Create an API key on behalf of another user. This API is similar
1928
+ to the create API keys API, however it creates the API key for a user that is
1929
+ different than the user that runs the API. The caller must have authentication
1930
+ credentials (either an access token, or a username and password) for the user
1931
+ on whose behalf the API key will be created. It is not possible to use this API
1932
+ to create an API key without that user’s credentials. The user, for whom the
1933
+ authentication credentials is provided, can optionally "run as" (impersonate)
1934
+ another user. In this case, the API key will be created on behalf of the impersonated
1935
+ user. This API is intended be used by applications that need to create and manage
1936
+ API keys for end users, but cannot guarantee that those users have permission
1937
+ to create API keys on their own behalf. A successful grant API key API call returns
1938
+ a JSON structure that contains the API key, its unique id, and its name. If applicable,
1939
+ it also returns expiration information for the API key in milliseconds. By default,
1940
+ API keys never expire. You can specify expiration information when you create
1941
+ the API keys.
1942
+
1943
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-grant-api-key.html>`_
1845
1944
 
1846
1945
  :param api_key: Defines the API key.
1847
1946
  :param grant_type: The type of grant. Supported grant types are: `access_token`,
@@ -1953,13 +2052,13 @@ class SecurityClient(NamespacedClient):
1953
2052
  "monitor_ml",
1954
2053
  "monitor_rollup",
1955
2054
  "monitor_snapshot",
2055
+ "monitor_stats",
1956
2056
  "monitor_text_structure",
1957
2057
  "monitor_transform",
1958
2058
  "monitor_watcher",
1959
2059
  "none",
1960
2060
  "post_behavioral_analytics_event",
1961
2061
  "read_ccr",
1962
- "read_connector_secrets",
1963
2062
  "read_fleet_secrets",
1964
2063
  "read_ilm",
1965
2064
  "read_pipeline",
@@ -1980,9 +2079,10 @@ class SecurityClient(NamespacedClient):
1980
2079
  body: t.Optional[t.Dict[str, t.Any]] = None,
1981
2080
  ) -> ObjectApiResponse[t.Any]:
1982
2081
  """
1983
- Determines whether the specified user has a specified list of privileges.
2082
+ Check user privileges. Determine whether the specified user has a specified list
2083
+ of privileges.
1984
2084
 
1985
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-has-privileges.html>`_
2085
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges.html>`_
1986
2086
 
1987
2087
  :param user: Username
1988
2088
  :param application:
@@ -2039,10 +2139,10 @@ class SecurityClient(NamespacedClient):
2039
2139
  body: t.Optional[t.Dict[str, t.Any]] = None,
2040
2140
  ) -> ObjectApiResponse[t.Any]:
2041
2141
  """
2042
- Determines whether the users associated with the specified profile IDs have all
2043
- the requested privileges.
2142
+ Check user profile privileges. Determine whether the users associated with the
2143
+ specified user profile IDs have all the requested privileges.
2044
2144
 
2045
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-has-privileges-user-profile.html>`_
2145
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges-user-profile.html>`_
2046
2146
 
2047
2147
  :param privileges:
2048
2148
  :param uids: A list of profile IDs. The privileges are checked for associated
@@ -2099,15 +2199,19 @@ class SecurityClient(NamespacedClient):
2099
2199
  body: t.Optional[t.Dict[str, t.Any]] = None,
2100
2200
  ) -> ObjectApiResponse[t.Any]:
2101
2201
  """
2102
- Invalidates one or more API keys. The `manage_api_key` privilege allows deleting
2103
- any API keys. The `manage_own_api_key` only allows deleting API keys that are
2104
- owned by the user. In addition, with the `manage_own_api_key` privilege, an invalidation
2105
- request must be issued in one of the three formats: - Set the parameter `owner=true`.
2106
- - Or, set both `username` and `realm_name` to match the user’s identity. - Or,
2107
- if the request is issued by an API key, i.e. an API key invalidates itself, specify
2108
- its ID in the `ids` field.
2202
+ Invalidate API keys. This API invalidates API keys created by the create API
2203
+ key or grant API key APIs. Invalidated API keys fail authentication, but they
2204
+ can still be viewed using the get API key information and query API key information
2205
+ APIs, for at least the configured retention period, until they are automatically
2206
+ deleted. The `manage_api_key` privilege allows deleting any API keys. The `manage_own_api_key`
2207
+ only allows deleting API keys that are owned by the user. In addition, with the
2208
+ `manage_own_api_key` privilege, an invalidation request must be issued in one
2209
+ of the three formats: - Set the parameter `owner=true`. - Or, set both `username`
2210
+ and `realm_name` to match the user’s identity. - Or, if the request is issued
2211
+ by an API key, that is to say an API key invalidates itself, specify its ID in
2212
+ the `ids` field.
2109
2213
 
2110
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-invalidate-api-key.html>`_
2214
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-api-key.html>`_
2111
2215
 
2112
2216
  :param id:
2113
2217
  :param ids: A list of API key ids. This parameter cannot be used with any of
@@ -2176,9 +2280,14 @@ class SecurityClient(NamespacedClient):
2176
2280
  body: t.Optional[t.Dict[str, t.Any]] = None,
2177
2281
  ) -> ObjectApiResponse[t.Any]:
2178
2282
  """
2179
- Invalidates one or more access tokens or refresh tokens.
2283
+ Invalidate a token. The access tokens returned by the get token API have a finite
2284
+ period of time for which they are valid. After that time period, they can no
2285
+ longer be used. The time period is defined by the `xpack.security.authc.token.timeout`
2286
+ setting. The refresh tokens returned by the get token API are only valid for
2287
+ 24 hours. They can also be used exactly once. If you want to invalidate one or
2288
+ more access or refresh tokens immediately, use this invalidate token API.
2180
2289
 
2181
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-invalidate-token.html>`_
2290
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-token.html>`_
2182
2291
 
2183
2292
  :param realm_name:
2184
2293
  :param refresh_token:
@@ -2236,9 +2345,9 @@ class SecurityClient(NamespacedClient):
2236
2345
  ] = None,
2237
2346
  ) -> ObjectApiResponse[t.Any]:
2238
2347
  """
2239
- Adds or updates application privileges.
2348
+ Create or update application privileges.
2240
2349
 
2241
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-privileges.html>`_
2350
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-privileges.html>`_
2242
2351
 
2243
2352
  :param privileges:
2244
2353
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -2284,6 +2393,8 @@ class SecurityClient(NamespacedClient):
2284
2393
  "global_",
2285
2394
  "indices",
2286
2395
  "metadata",
2396
+ "remote_cluster",
2397
+ "remote_indices",
2287
2398
  "run_as",
2288
2399
  "transient_metadata",
2289
2400
  ),
@@ -2343,13 +2454,13 @@ class SecurityClient(NamespacedClient):
2343
2454
  "monitor_ml",
2344
2455
  "monitor_rollup",
2345
2456
  "monitor_snapshot",
2457
+ "monitor_stats",
2346
2458
  "monitor_text_structure",
2347
2459
  "monitor_transform",
2348
2460
  "monitor_watcher",
2349
2461
  "none",
2350
2462
  "post_behavioral_analytics_event",
2351
2463
  "read_ccr",
2352
- "read_connector_secrets",
2353
2464
  "read_fleet_secrets",
2354
2465
  "read_ilm",
2355
2466
  "read_pipeline",
@@ -2373,16 +2484,19 @@ class SecurityClient(NamespacedClient):
2373
2484
  refresh: t.Optional[
2374
2485
  t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
2375
2486
  ] = None,
2487
+ remote_cluster: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
2488
+ remote_indices: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
2376
2489
  run_as: t.Optional[t.Sequence[str]] = None,
2377
2490
  transient_metadata: t.Optional[t.Mapping[str, t.Any]] = None,
2378
2491
  body: t.Optional[t.Dict[str, t.Any]] = None,
2379
2492
  ) -> ObjectApiResponse[t.Any]:
2380
2493
  """
2381
- The role management APIs are generally the preferred way to manage roles, rather
2382
- than using file-based role management. The create or update roles API cannot
2383
- update roles that are defined in roles files.
2494
+ Create or update roles. The role management APIs are generally the preferred
2495
+ way to manage roles in the native realm, rather than using file-based role management.
2496
+ The create or update roles API cannot update roles that are defined in roles
2497
+ files. File-based role management is not available in Elastic Serverless.
2384
2498
 
2385
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-role.html>`_
2499
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role.html>`_
2386
2500
 
2387
2501
  :param name: The name of the role.
2388
2502
  :param applications: A list of application privilege entries.
@@ -2398,6 +2512,8 @@ class SecurityClient(NamespacedClient):
2398
2512
  :param refresh: If `true` (the default) then refresh the affected shards to make
2399
2513
  this operation visible to search, if `wait_for` then wait for a refresh to
2400
2514
  make this operation visible to search, if `false` then do nothing with refreshes.
2515
+ :param remote_cluster: A list of remote cluster permissions entries.
2516
+ :param remote_indices: A list of remote indices permissions entries.
2401
2517
  :param run_as: A list of users that the owners of this role can impersonate.
2402
2518
  *Note*: in Serverless, the run-as feature is disabled. For API compatibility,
2403
2519
  you can still specify an empty `run_as` field, but a non-empty list will
@@ -2438,6 +2554,10 @@ class SecurityClient(NamespacedClient):
2438
2554
  __body["indices"] = indices
2439
2555
  if metadata is not None:
2440
2556
  __body["metadata"] = metadata
2557
+ if remote_cluster is not None:
2558
+ __body["remote_cluster"] = remote_cluster
2559
+ if remote_indices is not None:
2560
+ __body["remote_indices"] = remote_indices
2441
2561
  if run_as is not None:
2442
2562
  __body["run_as"] = run_as
2443
2563
  if transient_metadata is not None:
@@ -2483,9 +2603,16 @@ class SecurityClient(NamespacedClient):
2483
2603
  body: t.Optional[t.Dict[str, t.Any]] = None,
2484
2604
  ) -> ObjectApiResponse[t.Any]:
2485
2605
  """
2486
- Creates and updates role mappings.
2606
+ Create or update role mappings. Role mappings define which roles are assigned
2607
+ to each user. Each mapping has rules that identify users and a list of roles
2608
+ that are granted to those users. The role mapping APIs are generally the preferred
2609
+ way to manage role mappings rather than using role mapping files. The create
2610
+ or update role mappings API cannot update role mappings that are defined in role
2611
+ mapping files. This API does not create roles. Rather, it maps users to existing
2612
+ roles. Roles can be created by using the create or update roles API or roles
2613
+ files.
2487
2614
 
2488
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-role-mapping.html>`_
2615
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role-mapping.html>`_
2489
2616
 
2490
2617
  :param name: Role-mapping name
2491
2618
  :param enabled:
@@ -2570,10 +2697,11 @@ class SecurityClient(NamespacedClient):
2570
2697
  body: t.Optional[t.Dict[str, t.Any]] = None,
2571
2698
  ) -> ObjectApiResponse[t.Any]:
2572
2699
  """
2573
- Adds and updates users in the native realm. These users are commonly referred
2574
- to as native users.
2700
+ Create or update users. A password is required for adding a new user but is optional
2701
+ when updating an existing user. To change a user’s password without updating
2702
+ any other fields, use the change password API.
2575
2703
 
2576
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-user.html>`_
2704
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-user.html>`_
2577
2705
 
2578
2706
  :param username: The username of the User
2579
2707
  :param email:
@@ -2668,10 +2796,10 @@ class SecurityClient(NamespacedClient):
2668
2796
  body: t.Optional[t.Dict[str, t.Any]] = None,
2669
2797
  ) -> ObjectApiResponse[t.Any]:
2670
2798
  """
2671
- Retrieves information for API keys in a paginated manner. You can optionally
2672
- filter the results with a query.
2799
+ Find API keys with a query. Get a paginated list of API keys and their information.
2800
+ You can optionally filter the results with a query.
2673
2801
 
2674
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-query-api-key.html>`_
2802
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-api-key.html>`_
2675
2803
 
2676
2804
  :param aggregations: Any aggregations to run over the corpus of returned API
2677
2805
  keys. Aggregations and queries work together. Aggregations are computed only
@@ -2795,10 +2923,10 @@ class SecurityClient(NamespacedClient):
2795
2923
  body: t.Optional[t.Dict[str, t.Any]] = None,
2796
2924
  ) -> ObjectApiResponse[t.Any]:
2797
2925
  """
2798
- Retrieves roles in a paginated manner. You can optionally filter the results
2799
- with a query.
2926
+ Find roles with a query. Get roles in a paginated manner. You can optionally
2927
+ filter the results with a query.
2800
2928
 
2801
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-query-role.html>`_
2929
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-role.html>`_
2802
2930
 
2803
2931
  :param from_: Starting document offset. By default, you cannot page through more
2804
2932
  than 10,000 hits using the from and size parameters. To page through more
@@ -2881,10 +3009,10 @@ class SecurityClient(NamespacedClient):
2881
3009
  body: t.Optional[t.Dict[str, t.Any]] = None,
2882
3010
  ) -> ObjectApiResponse[t.Any]:
2883
3011
  """
2884
- Retrieves information for Users in a paginated manner. You can optionally filter
2885
- the results with a query.
3012
+ Find users with a query. Get information for users in a paginated manner. You
3013
+ can optionally filter the results with a query.
2886
3014
 
2887
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-query-user.html>`_
3015
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-user.html>`_
2888
3016
 
2889
3017
  :param from_: Starting document offset. By default, you cannot page through more
2890
3018
  than 10,000 hits using the from and size parameters. To page through more
@@ -2960,9 +3088,9 @@ class SecurityClient(NamespacedClient):
2960
3088
  body: t.Optional[t.Dict[str, t.Any]] = None,
2961
3089
  ) -> ObjectApiResponse[t.Any]:
2962
3090
  """
2963
- Submits a SAML Response message to Elasticsearch for consumption.
3091
+ Authenticate SAML. Submits a SAML response message to Elasticsearch for consumption.
2964
3092
 
2965
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-authenticate.html>`_
3093
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-authenticate.html>`_
2966
3094
 
2967
3095
  :param content: The SAML response as it was sent by the user’s browser, usually
2968
3096
  a Base64 encoded XML document.
@@ -3022,9 +3150,9 @@ class SecurityClient(NamespacedClient):
3022
3150
  body: t.Optional[t.Dict[str, t.Any]] = None,
3023
3151
  ) -> ObjectApiResponse[t.Any]:
3024
3152
  """
3025
- Verifies the logout response sent from the SAML IdP.
3153
+ Logout of SAML completely. Verifies the logout response sent from the SAML IdP.
3026
3154
 
3027
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-complete-logout.html>`_
3155
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-complete-logout.html>`_
3028
3156
 
3029
3157
  :param ids: A json array with all the valid SAML Request Ids that the caller
3030
3158
  of the API has for the current user.
@@ -3088,9 +3216,9 @@ class SecurityClient(NamespacedClient):
3088
3216
  body: t.Optional[t.Dict[str, t.Any]] = None,
3089
3217
  ) -> ObjectApiResponse[t.Any]:
3090
3218
  """
3091
- Submits a SAML LogoutRequest message to Elasticsearch for consumption.
3219
+ Invalidate SAML. Submits a SAML LogoutRequest message to Elasticsearch for consumption.
3092
3220
 
3093
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-invalidate.html>`_
3221
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-invalidate.html>`_
3094
3222
 
3095
3223
  :param query_string: The query part of the URL that the user was redirected to
3096
3224
  by the SAML IdP to initiate the Single Logout. This query should include
@@ -3155,9 +3283,9 @@ class SecurityClient(NamespacedClient):
3155
3283
  body: t.Optional[t.Dict[str, t.Any]] = None,
3156
3284
  ) -> ObjectApiResponse[t.Any]:
3157
3285
  """
3158
- Submits a request to invalidate an access token and refresh token.
3286
+ Logout of SAML. Submits a request to invalidate an access token and refresh token.
3159
3287
 
3160
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-logout.html>`_
3288
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-logout.html>`_
3161
3289
 
3162
3290
  :param token: The access token that was returned as a response to calling the
3163
3291
  SAML authenticate API. Alternatively, the most recent token that was received
@@ -3212,10 +3340,10 @@ class SecurityClient(NamespacedClient):
3212
3340
  body: t.Optional[t.Dict[str, t.Any]] = None,
3213
3341
  ) -> ObjectApiResponse[t.Any]:
3214
3342
  """
3215
- Creates a SAML authentication request (<AuthnRequest>) as a URL string, based
3216
- on the configuration of the respective SAML realm in Elasticsearch.
3343
+ Prepare SAML authentication. Creates a SAML authentication request (`<AuthnRequest>`)
3344
+ as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.
3217
3345
 
3218
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-prepare-authentication.html>`_
3346
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-prepare-authentication.html>`_
3219
3347
 
3220
3348
  :param acs: The Assertion Consumer Service URL that matches the one of the SAML
3221
3349
  realms in Elasticsearch. The realm is used to generate the authentication
@@ -3268,9 +3396,10 @@ class SecurityClient(NamespacedClient):
3268
3396
  pretty: t.Optional[bool] = None,
3269
3397
  ) -> ObjectApiResponse[t.Any]:
3270
3398
  """
3271
- Generate SAML metadata for a SAML 2.0 Service Provider.
3399
+ Create SAML service provider metadata. Generate SAML metadata for a SAML 2.0
3400
+ Service Provider.
3272
3401
 
3273
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-sp-metadata.html>`_
3402
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-sp-metadata.html>`_
3274
3403
 
3275
3404
  :param realm_name: The name of the SAML realm in Elasticsearch.
3276
3405
  """
@@ -3314,9 +3443,10 @@ class SecurityClient(NamespacedClient):
3314
3443
  body: t.Optional[t.Dict[str, t.Any]] = None,
3315
3444
  ) -> ObjectApiResponse[t.Any]:
3316
3445
  """
3317
- Get suggestions for user profiles that match specified search criteria.
3446
+ Suggest a user profile. Get suggestions for user profiles that match specified
3447
+ search criteria.
3318
3448
 
3319
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-suggest-user-profile.html>`_
3449
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-suggest-user-profile.html>`_
3320
3450
 
3321
3451
  :param data: List of filters for the `data` field of the profile document. To
3322
3452
  return all content use `data=*`. To return a subset of content use `data=<key>`
@@ -3383,24 +3513,24 @@ class SecurityClient(NamespacedClient):
3383
3513
  body: t.Optional[t.Dict[str, t.Any]] = None,
3384
3514
  ) -> ObjectApiResponse[t.Any]:
3385
3515
  """
3386
- Updates attributes of an existing API key. Users can only update API keys that
3387
- they created or that were granted to them. Use this API to update API keys created
3388
- by the create API Key or grant API Key APIs. If you need to apply the same update
3389
- to many API keys, you can use bulk update API Keys to reduce overhead. It’s not
3390
- possible to update expired API keys, or API keys that have been invalidated by
3391
- invalidate API Key. This API supports updates to an API key’s access scope and
3392
- metadata. The access scope of an API key is derived from the `role_descriptors`
3393
- you specify in the request, and a snapshot of the owner user’s permissions at
3394
- the time of the request. The snapshot of the owner’s permissions is updated automatically
3395
- on every call. If you don’t specify `role_descriptors` in the request, a call
3396
- to this API might still change the API key’s access scope. This change can occur
3397
- if the owner user’s permissions have changed since the API key was created or
3398
- last modified. To update another user’s API key, use the `run_as` feature to
3399
- submit a request on behalf of another user. IMPORTANT: It’s not possible to use
3400
- an API key as the authentication credential for this API. To update an API key,
3401
- the owner user’s credentials are required.
3402
-
3403
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-update-api-key.html>`_
3516
+ Update an API key. Updates attributes of an existing API key. Users can only
3517
+ update API keys that they created or that were granted to them. Use this API
3518
+ to update API keys created by the create API Key or grant API Key APIs. If you
3519
+ need to apply the same update to many API keys, you can use bulk update API Keys
3520
+ to reduce overhead. It’s not possible to update expired API keys, or API keys
3521
+ that have been invalidated by invalidate API Key. This API supports updates to
3522
+ an API key’s access scope and metadata. The access scope of an API key is derived
3523
+ from the `role_descriptors` you specify in the request, and a snapshot of the
3524
+ owner user’s permissions at the time of the request. The snapshot of the owner’s
3525
+ permissions is updated automatically on every call. If you don’t specify `role_descriptors`
3526
+ in the request, a call to this API might still change the API key’s access scope.
3527
+ This change can occur if the owner user’s permissions have changed since the
3528
+ API key was created or last modified. To update another user’s API key, use the
3529
+ `run_as` feature to submit a request on behalf of another user. IMPORTANT: It’s
3530
+ not possible to use an API key as the authentication credential for this API.
3531
+ To update an API key, the owner user’s credentials are required.
3532
+
3533
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-api-key.html>`_
3404
3534
 
3405
3535
  :param id: The ID of the API key to update.
3406
3536
  :param expiration: Expiration time for the API key.
@@ -3452,6 +3582,74 @@ class SecurityClient(NamespacedClient):
3452
3582
  path_parts=__path_parts,
3453
3583
  )
3454
3584
 
3585
+ @_rewrite_parameters(
3586
+ body_fields=("access", "expiration", "metadata"),
3587
+ )
3588
+ async def update_cross_cluster_api_key(
3589
+ self,
3590
+ *,
3591
+ id: str,
3592
+ access: t.Optional[t.Mapping[str, t.Any]] = None,
3593
+ error_trace: t.Optional[bool] = None,
3594
+ expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3595
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3596
+ human: t.Optional[bool] = None,
3597
+ metadata: t.Optional[t.Mapping[str, t.Any]] = None,
3598
+ pretty: t.Optional[bool] = None,
3599
+ body: t.Optional[t.Dict[str, t.Any]] = None,
3600
+ ) -> ObjectApiResponse[t.Any]:
3601
+ """
3602
+ Update a cross-cluster API key. Update the attributes of an existing cross-cluster
3603
+ API key, which is used for API key based remote cluster access.
3604
+
3605
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-cross-cluster-api-key.html>`_
3606
+
3607
+ :param id: The ID of the cross-cluster API key to update.
3608
+ :param access: The access to be granted to this API key. The access is composed
3609
+ of permissions for cross cluster search and cross cluster replication. At
3610
+ least one of them must be specified. When specified, the new access assignment
3611
+ fully replaces the previously assigned access.
3612
+ :param expiration: Expiration time for the API key. By default, API keys never
3613
+ expire. This property can be omitted to leave the value unchanged.
3614
+ :param metadata: Arbitrary metadata that you want to associate with the API key.
3615
+ It supports nested data structure. Within the metadata object, keys beginning
3616
+ with `_` are reserved for system usage. When specified, this information
3617
+ fully replaces metadata previously associated with the API key.
3618
+ """
3619
+ if id in SKIP_IN_PATH:
3620
+ raise ValueError("Empty value passed for parameter 'id'")
3621
+ if access is None and body is None:
3622
+ raise ValueError("Empty value passed for parameter 'access'")
3623
+ __path_parts: t.Dict[str, str] = {"id": _quote(id)}
3624
+ __path = f'/_security/cross_cluster/api_key/{__path_parts["id"]}'
3625
+ __query: t.Dict[str, t.Any] = {}
3626
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
3627
+ if error_trace is not None:
3628
+ __query["error_trace"] = error_trace
3629
+ if filter_path is not None:
3630
+ __query["filter_path"] = filter_path
3631
+ if human is not None:
3632
+ __query["human"] = human
3633
+ if pretty is not None:
3634
+ __query["pretty"] = pretty
3635
+ if not __body:
3636
+ if access is not None:
3637
+ __body["access"] = access
3638
+ if expiration is not None:
3639
+ __body["expiration"] = expiration
3640
+ if metadata is not None:
3641
+ __body["metadata"] = metadata
3642
+ __headers = {"accept": "application/json", "content-type": "application/json"}
3643
+ return await self.perform_request( # type: ignore[return-value]
3644
+ "PUT",
3645
+ __path,
3646
+ params=__query,
3647
+ headers=__headers,
3648
+ body=__body,
3649
+ endpoint_id="security.update_cross_cluster_api_key",
3650
+ path_parts=__path_parts,
3651
+ )
3652
+
3455
3653
  @_rewrite_parameters(
3456
3654
  body_fields=("data", "labels"),
3457
3655
  )
@@ -3473,10 +3671,10 @@ class SecurityClient(NamespacedClient):
3473
3671
  body: t.Optional[t.Dict[str, t.Any]] = None,
3474
3672
  ) -> ObjectApiResponse[t.Any]:
3475
3673
  """
3476
- Updates specific data for the user profile that's associated with the specified
3477
- unique ID.
3674
+ Update user profile data. Update specific data for the user profile that is associated
3675
+ with a unique ID.
3478
3676
 
3479
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-update-user-profile-data.html>`_
3677
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-user-profile-data.html>`_
3480
3678
 
3481
3679
  :param uid: A unique identifier for the user profile.
3482
3680
  :param data: Non-searchable data that you want to associate with the user profile.