elasticsearch 8.13.2__py3-none-any.whl → 8.15.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. elasticsearch/_async/client/__init__.py +204 -169
  2. elasticsearch/_async/client/async_search.py +35 -20
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +785 -180
  5. elasticsearch/_async/client/ccr.py +20 -32
  6. elasticsearch/_async/client/cluster.py +94 -88
  7. elasticsearch/_async/client/connector.py +1470 -0
  8. elasticsearch/_async/client/dangling_indices.py +7 -11
  9. elasticsearch/_async/client/enrich.py +8 -8
  10. elasticsearch/_async/client/eql.py +17 -16
  11. elasticsearch/_async/client/esql.py +2 -2
  12. elasticsearch/_async/client/features.py +2 -2
  13. elasticsearch/_async/client/fleet.py +18 -17
  14. elasticsearch/_async/client/graph.py +4 -4
  15. elasticsearch/_async/client/ilm.py +36 -44
  16. elasticsearch/_async/client/indices.py +401 -411
  17. elasticsearch/_async/client/inference.py +65 -39
  18. elasticsearch/_async/client/ingest.py +22 -23
  19. elasticsearch/_async/client/license.py +18 -10
  20. elasticsearch/_async/client/logstash.py +6 -6
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +383 -176
  23. elasticsearch/_async/client/monitoring.py +2 -2
  24. elasticsearch/_async/client/nodes.py +32 -32
  25. elasticsearch/_async/client/query_rules.py +384 -0
  26. elasticsearch/_async/client/rollup.py +13 -13
  27. elasticsearch/_async/client/search_application.py +15 -10
  28. elasticsearch/_async/client/searchable_snapshots.py +9 -13
  29. elasticsearch/_async/client/security.py +587 -104
  30. elasticsearch/_async/client/shutdown.py +7 -7
  31. elasticsearch/_async/client/slm.py +11 -13
  32. elasticsearch/_async/client/snapshot.py +39 -52
  33. elasticsearch/_async/client/sql.py +12 -14
  34. elasticsearch/_async/client/ssl.py +1 -1
  35. elasticsearch/_async/client/synonyms.py +8 -8
  36. elasticsearch/_async/client/tasks.py +9 -10
  37. elasticsearch/_async/client/text_structure.py +3 -3
  38. elasticsearch/_async/client/transform.py +89 -34
  39. elasticsearch/_async/client/watcher.py +30 -15
  40. elasticsearch/_async/client/xpack.py +6 -7
  41. elasticsearch/_otel.py +2 -6
  42. elasticsearch/_sync/client/__init__.py +204 -169
  43. elasticsearch/_sync/client/async_search.py +35 -20
  44. elasticsearch/_sync/client/autoscaling.py +4 -4
  45. elasticsearch/_sync/client/cat.py +785 -180
  46. elasticsearch/_sync/client/ccr.py +20 -32
  47. elasticsearch/_sync/client/cluster.py +94 -88
  48. elasticsearch/_sync/client/connector.py +1470 -0
  49. elasticsearch/_sync/client/dangling_indices.py +7 -11
  50. elasticsearch/_sync/client/enrich.py +8 -8
  51. elasticsearch/_sync/client/eql.py +17 -16
  52. elasticsearch/_sync/client/esql.py +2 -2
  53. elasticsearch/_sync/client/features.py +2 -2
  54. elasticsearch/_sync/client/fleet.py +18 -17
  55. elasticsearch/_sync/client/graph.py +4 -4
  56. elasticsearch/_sync/client/ilm.py +36 -44
  57. elasticsearch/_sync/client/indices.py +401 -411
  58. elasticsearch/_sync/client/inference.py +65 -39
  59. elasticsearch/_sync/client/ingest.py +22 -23
  60. elasticsearch/_sync/client/license.py +18 -10
  61. elasticsearch/_sync/client/logstash.py +6 -6
  62. elasticsearch/_sync/client/migration.py +3 -3
  63. elasticsearch/_sync/client/ml.py +383 -176
  64. elasticsearch/_sync/client/monitoring.py +2 -2
  65. elasticsearch/_sync/client/nodes.py +32 -32
  66. elasticsearch/_sync/client/query_rules.py +384 -0
  67. elasticsearch/_sync/client/rollup.py +13 -13
  68. elasticsearch/_sync/client/search_application.py +15 -10
  69. elasticsearch/_sync/client/searchable_snapshots.py +9 -13
  70. elasticsearch/_sync/client/security.py +587 -104
  71. elasticsearch/_sync/client/shutdown.py +7 -7
  72. elasticsearch/_sync/client/slm.py +11 -13
  73. elasticsearch/_sync/client/snapshot.py +39 -52
  74. elasticsearch/_sync/client/sql.py +12 -14
  75. elasticsearch/_sync/client/ssl.py +1 -1
  76. elasticsearch/_sync/client/synonyms.py +8 -8
  77. elasticsearch/_sync/client/tasks.py +9 -10
  78. elasticsearch/_sync/client/text_structure.py +3 -3
  79. elasticsearch/_sync/client/transform.py +89 -34
  80. elasticsearch/_sync/client/watcher.py +30 -15
  81. elasticsearch/_sync/client/xpack.py +6 -7
  82. elasticsearch/_version.py +1 -1
  83. elasticsearch/client.py +3 -3
  84. elasticsearch/helpers/vectorstore/_async/vectorstore.py +36 -6
  85. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +36 -6
  86. elasticsearch/serializer.py +34 -1
  87. elasticsearch-8.15.0.dist-info/METADATA +177 -0
  88. elasticsearch-8.15.0.dist-info/RECORD +117 -0
  89. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info}/WHEEL +1 -2
  90. elasticsearch/_async/client/query_ruleset.py +0 -205
  91. elasticsearch/_sync/client/query_ruleset.py +0 -205
  92. elasticsearch-8.13.2.dist-info/METADATA +0 -147
  93. elasticsearch-8.13.2.dist-info/RECORD +0 -116
  94. elasticsearch-8.13.2.dist-info/top_level.txt +0 -1
  95. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/LICENSE +0 -0
  96. {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/NOTICE +0 -0
@@ -32,7 +32,7 @@ class SecurityClient(NamespacedClient):
32
32
  self,
33
33
  *,
34
34
  grant_type: t.Optional[
35
- t.Union["t.Literal['access_token', 'password']", str]
35
+ t.Union[str, t.Literal["access_token", "password"]]
36
36
  ] = None,
37
37
  access_token: t.Optional[str] = None,
38
38
  error_trace: t.Optional[bool] = None,
@@ -44,9 +44,9 @@ 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 the user profile on behalf of another user.
47
+ Creates or updates a user profile on behalf of another user.
48
48
 
49
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-activate-user-profile.html>`_
49
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-activate-user-profile.html>`_
50
50
 
51
51
  :param grant_type:
52
52
  :param access_token:
@@ -97,10 +97,14 @@ class SecurityClient(NamespacedClient):
97
97
  pretty: t.Optional[bool] = None,
98
98
  ) -> ObjectApiResponse[t.Any]:
99
99
  """
100
- Enables authentication as a user and retrieve information about the authenticated
101
- user.
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.
102
106
 
103
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-authenticate.html>`_
107
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-authenticate.html>`_
104
108
  """
105
109
  __path_parts: t.Dict[str, str] = {}
106
110
  __path = "/_security/_authenticate"
@@ -123,6 +127,122 @@ class SecurityClient(NamespacedClient):
123
127
  path_parts=__path_parts,
124
128
  )
125
129
 
130
+ @_rewrite_parameters(
131
+ body_fields=("names",),
132
+ )
133
+ async def bulk_delete_role(
134
+ self,
135
+ *,
136
+ names: t.Optional[t.Sequence[str]] = None,
137
+ error_trace: t.Optional[bool] = None,
138
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
139
+ human: t.Optional[bool] = None,
140
+ pretty: t.Optional[bool] = None,
141
+ refresh: t.Optional[
142
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
143
+ ] = None,
144
+ body: t.Optional[t.Dict[str, t.Any]] = None,
145
+ ) -> ObjectApiResponse[t.Any]:
146
+ """
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.
150
+
151
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-bulk-delete-role.html>`_
152
+
153
+ :param names: An array of role names to delete
154
+ :param refresh: If `true` (the default) then refresh the affected shards to make
155
+ this operation visible to search, if `wait_for` then wait for a refresh to
156
+ make this operation visible to search, if `false` then do nothing with refreshes.
157
+ """
158
+ if names is None and body is None:
159
+ raise ValueError("Empty value passed for parameter 'names'")
160
+ __path_parts: t.Dict[str, str] = {}
161
+ __path = "/_security/role"
162
+ __query: t.Dict[str, t.Any] = {}
163
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
164
+ if error_trace is not None:
165
+ __query["error_trace"] = error_trace
166
+ if filter_path is not None:
167
+ __query["filter_path"] = filter_path
168
+ if human is not None:
169
+ __query["human"] = human
170
+ if pretty is not None:
171
+ __query["pretty"] = pretty
172
+ if refresh is not None:
173
+ __query["refresh"] = refresh
174
+ if not __body:
175
+ if names is not None:
176
+ __body["names"] = names
177
+ __headers = {"accept": "application/json", "content-type": "application/json"}
178
+ return await self.perform_request( # type: ignore[return-value]
179
+ "DELETE",
180
+ __path,
181
+ params=__query,
182
+ headers=__headers,
183
+ body=__body,
184
+ endpoint_id="security.bulk_delete_role",
185
+ path_parts=__path_parts,
186
+ )
187
+
188
+ @_rewrite_parameters(
189
+ body_fields=("roles",),
190
+ )
191
+ async def bulk_put_role(
192
+ self,
193
+ *,
194
+ roles: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
195
+ error_trace: t.Optional[bool] = None,
196
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
197
+ human: t.Optional[bool] = None,
198
+ pretty: t.Optional[bool] = None,
199
+ refresh: t.Optional[
200
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
201
+ ] = None,
202
+ body: t.Optional[t.Dict[str, t.Any]] = None,
203
+ ) -> ObjectApiResponse[t.Any]:
204
+ """
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.
208
+
209
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-bulk-put-role.html>`_
210
+
211
+ :param roles: A dictionary of role name to RoleDescriptor objects to add or update
212
+ :param refresh: If `true` (the default) then refresh the affected shards to make
213
+ this operation visible to search, if `wait_for` then wait for a refresh to
214
+ make this operation visible to search, if `false` then do nothing with refreshes.
215
+ """
216
+ if roles is None and body is None:
217
+ raise ValueError("Empty value passed for parameter 'roles'")
218
+ __path_parts: t.Dict[str, str] = {}
219
+ __path = "/_security/role"
220
+ __query: t.Dict[str, t.Any] = {}
221
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
222
+ if error_trace is not None:
223
+ __query["error_trace"] = error_trace
224
+ if filter_path is not None:
225
+ __query["filter_path"] = filter_path
226
+ if human is not None:
227
+ __query["human"] = human
228
+ if pretty is not None:
229
+ __query["pretty"] = pretty
230
+ if refresh is not None:
231
+ __query["refresh"] = refresh
232
+ if not __body:
233
+ if roles is not None:
234
+ __body["roles"] = roles
235
+ __headers = {"accept": "application/json", "content-type": "application/json"}
236
+ return await self.perform_request( # type: ignore[return-value]
237
+ "POST",
238
+ __path,
239
+ params=__query,
240
+ headers=__headers,
241
+ body=__body,
242
+ endpoint_id="security.bulk_put_role",
243
+ path_parts=__path_parts,
244
+ )
245
+
126
246
  @_rewrite_parameters(
127
247
  body_fields=("password", "password_hash"),
128
248
  )
@@ -137,14 +257,14 @@ class SecurityClient(NamespacedClient):
137
257
  password_hash: t.Optional[str] = None,
138
258
  pretty: t.Optional[bool] = None,
139
259
  refresh: t.Optional[
140
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
260
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
141
261
  ] = None,
142
262
  body: t.Optional[t.Dict[str, t.Any]] = None,
143
263
  ) -> ObjectApiResponse[t.Any]:
144
264
  """
145
265
  Changes the passwords of users in the native realm and built-in users.
146
266
 
147
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-change-password.html>`_
267
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-change-password.html>`_
148
268
 
149
269
  :param username: The user whose password you want to change. If you do not specify
150
270
  this parameter, the password is changed for the current user.
@@ -204,9 +324,10 @@ class SecurityClient(NamespacedClient):
204
324
  pretty: t.Optional[bool] = None,
205
325
  ) -> ObjectApiResponse[t.Any]:
206
326
  """
207
- Clear a subset or all entries from the API key cache.
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.
208
329
 
209
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-clear-api-key-cache.html>`_
330
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-api-key-cache.html>`_
210
331
 
211
332
  :param ids: Comma-separated list of API key IDs to evict from the API key cache.
212
333
  To evict all API keys, use `*`. Does not support other wildcard patterns.
@@ -247,7 +368,7 @@ class SecurityClient(NamespacedClient):
247
368
  """
248
369
  Evicts application privileges from the native application privileges cache.
249
370
 
250
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-clear-privilege-cache.html>`_
371
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-privilege-cache.html>`_
251
372
 
252
373
  :param application: A comma-separated list of application names
253
374
  """
@@ -289,7 +410,7 @@ class SecurityClient(NamespacedClient):
289
410
  Evicts users from the user cache. Can completely clear the cache or evict specific
290
411
  users.
291
412
 
292
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-clear-cache.html>`_
413
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-cache.html>`_
293
414
 
294
415
  :param realms: Comma-separated list of realms to clear
295
416
  :param usernames: Comma-separated list of usernames to clear from the cache
@@ -332,7 +453,7 @@ class SecurityClient(NamespacedClient):
332
453
  """
333
454
  Evicts roles from the native role cache.
334
455
 
335
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-clear-role-cache.html>`_
456
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-role-cache.html>`_
336
457
 
337
458
  :param name: Role name
338
459
  """
@@ -374,7 +495,7 @@ class SecurityClient(NamespacedClient):
374
495
  """
375
496
  Evicts tokens from the service account token caches.
376
497
 
377
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-clear-service-token-caches.html>`_
498
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-clear-service-token-caches.html>`_
378
499
 
379
500
  :param namespace: An identifier for the namespace
380
501
  :param service: An identifier for the service name
@@ -418,22 +539,26 @@ class SecurityClient(NamespacedClient):
418
539
  self,
419
540
  *,
420
541
  error_trace: t.Optional[bool] = None,
421
- expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
542
+ expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
422
543
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
423
544
  human: t.Optional[bool] = None,
424
545
  metadata: t.Optional[t.Mapping[str, t.Any]] = None,
425
546
  name: t.Optional[str] = None,
426
547
  pretty: t.Optional[bool] = None,
427
548
  refresh: t.Optional[
428
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
549
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
429
550
  ] = None,
430
551
  role_descriptors: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
431
552
  body: t.Optional[t.Dict[str, t.Any]] = None,
432
553
  ) -> ObjectApiResponse[t.Any]:
433
554
  """
434
- Creates an API key for access without requiring basic authentication.
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.
435
560
 
436
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-create-api-key.html>`_
561
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-create-api-key.html>`_
437
562
 
438
563
  :param expiration: Expiration time for the API key. By default, API keys never
439
564
  expire.
@@ -499,13 +624,13 @@ class SecurityClient(NamespacedClient):
499
624
  human: t.Optional[bool] = None,
500
625
  pretty: t.Optional[bool] = None,
501
626
  refresh: t.Optional[
502
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
627
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
503
628
  ] = None,
504
629
  ) -> ObjectApiResponse[t.Any]:
505
630
  """
506
- Creates a service account token for access without requiring basic authentication.
631
+ Creates a service accounts token for access without requiring basic authentication.
507
632
 
508
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-create-service-token.html>`_
633
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-create-service-token.html>`_
509
634
 
510
635
  :param namespace: An identifier for the namespace
511
636
  :param service: An identifier for the service name
@@ -569,13 +694,13 @@ class SecurityClient(NamespacedClient):
569
694
  human: t.Optional[bool] = None,
570
695
  pretty: t.Optional[bool] = None,
571
696
  refresh: t.Optional[
572
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
697
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
573
698
  ] = None,
574
699
  ) -> ObjectApiResponse[t.Any]:
575
700
  """
576
701
  Removes application privileges.
577
702
 
578
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-delete-privilege.html>`_
703
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-privilege.html>`_
579
704
 
580
705
  :param application: Application name
581
706
  :param name: Privilege name
@@ -625,13 +750,13 @@ class SecurityClient(NamespacedClient):
625
750
  human: t.Optional[bool] = None,
626
751
  pretty: t.Optional[bool] = None,
627
752
  refresh: t.Optional[
628
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
753
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
629
754
  ] = None,
630
755
  ) -> ObjectApiResponse[t.Any]:
631
756
  """
632
757
  Removes roles in the native realm.
633
758
 
634
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-delete-role.html>`_
759
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-role.html>`_
635
760
 
636
761
  :param name: Role name
637
762
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -673,13 +798,13 @@ class SecurityClient(NamespacedClient):
673
798
  human: t.Optional[bool] = None,
674
799
  pretty: t.Optional[bool] = None,
675
800
  refresh: t.Optional[
676
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
801
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
677
802
  ] = None,
678
803
  ) -> ObjectApiResponse[t.Any]:
679
804
  """
680
805
  Removes role mappings.
681
806
 
682
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-delete-role-mapping.html>`_
807
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-role-mapping.html>`_
683
808
 
684
809
  :param name: Role-mapping name
685
810
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -723,13 +848,13 @@ class SecurityClient(NamespacedClient):
723
848
  human: t.Optional[bool] = None,
724
849
  pretty: t.Optional[bool] = None,
725
850
  refresh: t.Optional[
726
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
851
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
727
852
  ] = None,
728
853
  ) -> ObjectApiResponse[t.Any]:
729
854
  """
730
855
  Deletes a service account token.
731
856
 
732
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-delete-service-token.html>`_
857
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-service-token.html>`_
733
858
 
734
859
  :param namespace: An identifier for the namespace
735
860
  :param service: An identifier for the service name
@@ -781,13 +906,13 @@ class SecurityClient(NamespacedClient):
781
906
  human: t.Optional[bool] = None,
782
907
  pretty: t.Optional[bool] = None,
783
908
  refresh: t.Optional[
784
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
909
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
785
910
  ] = None,
786
911
  ) -> ObjectApiResponse[t.Any]:
787
912
  """
788
913
  Deletes users from the native realm.
789
914
 
790
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-delete-user.html>`_
915
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-delete-user.html>`_
791
916
 
792
917
  :param username: username
793
918
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -829,13 +954,13 @@ class SecurityClient(NamespacedClient):
829
954
  human: t.Optional[bool] = None,
830
955
  pretty: t.Optional[bool] = None,
831
956
  refresh: t.Optional[
832
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
957
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
833
958
  ] = None,
834
959
  ) -> ObjectApiResponse[t.Any]:
835
960
  """
836
961
  Disables users in the native realm.
837
962
 
838
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-disable-user.html>`_
963
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-disable-user.html>`_
839
964
 
840
965
  :param username: The username of the user to disable
841
966
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -877,13 +1002,13 @@ class SecurityClient(NamespacedClient):
877
1002
  human: t.Optional[bool] = None,
878
1003
  pretty: t.Optional[bool] = None,
879
1004
  refresh: t.Optional[
880
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
1005
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
881
1006
  ] = None,
882
1007
  ) -> ObjectApiResponse[t.Any]:
883
1008
  """
884
1009
  Disables a user profile so it's not visible in user profile searches.
885
1010
 
886
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-disable-user-profile.html>`_
1011
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-disable-user-profile.html>`_
887
1012
 
888
1013
  :param uid: Unique identifier for the user profile.
889
1014
  :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
@@ -925,13 +1050,13 @@ class SecurityClient(NamespacedClient):
925
1050
  human: t.Optional[bool] = None,
926
1051
  pretty: t.Optional[bool] = None,
927
1052
  refresh: t.Optional[
928
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
1053
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
929
1054
  ] = None,
930
1055
  ) -> ObjectApiResponse[t.Any]:
931
1056
  """
932
1057
  Enables users in the native realm.
933
1058
 
934
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-enable-user.html>`_
1059
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-enable-user.html>`_
935
1060
 
936
1061
  :param username: The username of the user to enable
937
1062
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -973,13 +1098,13 @@ class SecurityClient(NamespacedClient):
973
1098
  human: t.Optional[bool] = None,
974
1099
  pretty: t.Optional[bool] = None,
975
1100
  refresh: t.Optional[
976
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
1101
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
977
1102
  ] = None,
978
1103
  ) -> ObjectApiResponse[t.Any]:
979
1104
  """
980
1105
  Enables a user profile so it's visible in user profile searches.
981
1106
 
982
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-enable-user-profile.html>`_
1107
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-enable-user-profile.html>`_
983
1108
 
984
1109
  :param uid: Unique identifier for the user profile.
985
1110
  :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
@@ -1021,10 +1146,10 @@ class SecurityClient(NamespacedClient):
1021
1146
  pretty: t.Optional[bool] = None,
1022
1147
  ) -> ObjectApiResponse[t.Any]:
1023
1148
  """
1024
- Allows a kibana instance to configure itself to communicate with a secured elasticsearch
1025
- cluster.
1149
+ Enables a Kibana instance to configure itself for communication with a secured
1150
+ Elasticsearch cluster.
1026
1151
 
1027
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-kibana-enrollment.html>`_
1152
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-kibana-enrollment.html>`_
1028
1153
  """
1029
1154
  __path_parts: t.Dict[str, str] = {}
1030
1155
  __path = "/_security/enroll/kibana"
@@ -1057,9 +1182,9 @@ class SecurityClient(NamespacedClient):
1057
1182
  pretty: t.Optional[bool] = None,
1058
1183
  ) -> ObjectApiResponse[t.Any]:
1059
1184
  """
1060
- Allows a new node to enroll to an existing cluster with security enabled.
1185
+ Allows a new node to join an existing cluster with security features enabled.
1061
1186
 
1062
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-node-enrollment.html>`_
1187
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-node-enrollment.html>`_
1063
1188
  """
1064
1189
  __path_parts: t.Dict[str, str] = {}
1065
1190
  __path = "/_security/enroll/node"
@@ -1097,11 +1222,15 @@ class SecurityClient(NamespacedClient):
1097
1222
  realm_name: t.Optional[str] = None,
1098
1223
  username: t.Optional[str] = None,
1099
1224
  with_limited_by: t.Optional[bool] = None,
1225
+ with_profile_uid: t.Optional[bool] = None,
1100
1226
  ) -> ObjectApiResponse[t.Any]:
1101
1227
  """
1102
- Retrieves information for one or more API keys.
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.
1103
1232
 
1104
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-api-key.html>`_
1233
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-api-key.html>`_
1105
1234
 
1106
1235
  :param active_only: A boolean flag that can be used to query API keys that are
1107
1236
  currently active. An API key is considered active if it is neither invalidated,
@@ -1123,6 +1252,8 @@ class SecurityClient(NamespacedClient):
1123
1252
  :param with_limited_by: Return the snapshot of the owner user's role descriptors
1124
1253
  associated with the API key. An API key's actual permission is the intersection
1125
1254
  of its assigned role descriptors and the owner user's role descriptors.
1255
+ :param with_profile_uid: Determines whether to also retrieve the profile uid,
1256
+ for the API key owner principal, if it exists.
1126
1257
  """
1127
1258
  __path_parts: t.Dict[str, str] = {}
1128
1259
  __path = "/_security/api_key"
@@ -1149,6 +1280,8 @@ class SecurityClient(NamespacedClient):
1149
1280
  __query["username"] = username
1150
1281
  if with_limited_by is not None:
1151
1282
  __query["with_limited_by"] = with_limited_by
1283
+ if with_profile_uid is not None:
1284
+ __query["with_profile_uid"] = with_profile_uid
1152
1285
  __headers = {"accept": "application/json"}
1153
1286
  return await self.perform_request( # type: ignore[return-value]
1154
1287
  "GET",
@@ -1172,7 +1305,7 @@ class SecurityClient(NamespacedClient):
1172
1305
  Retrieves the list of cluster privileges and index privileges that are available
1173
1306
  in this version of Elasticsearch.
1174
1307
 
1175
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-builtin-privileges.html>`_
1308
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-builtin-privileges.html>`_
1176
1309
  """
1177
1310
  __path_parts: t.Dict[str, str] = {}
1178
1311
  __path = "/_security/privilege/_builtin"
@@ -1209,7 +1342,7 @@ class SecurityClient(NamespacedClient):
1209
1342
  """
1210
1343
  Retrieves application privileges.
1211
1344
 
1212
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-privileges.html>`_
1345
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-privileges.html>`_
1213
1346
 
1214
1347
  :param application: Application name
1215
1348
  :param name: Privilege name
@@ -1254,9 +1387,11 @@ class SecurityClient(NamespacedClient):
1254
1387
  pretty: t.Optional[bool] = None,
1255
1388
  ) -> ObjectApiResponse[t.Any]:
1256
1389
  """
1257
- Retrieves roles in the native realm.
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.
1258
1393
 
1259
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-role.html>`_
1394
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-role.html>`_
1260
1395
 
1261
1396
  :param name: The name of the role. You can specify multiple roles as a comma-separated
1262
1397
  list. If you do not specify this parameter, the API returns information about
@@ -1301,7 +1436,7 @@ class SecurityClient(NamespacedClient):
1301
1436
  """
1302
1437
  Retrieves role mappings.
1303
1438
 
1304
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-role-mapping.html>`_
1439
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-role-mapping.html>`_
1305
1440
 
1306
1441
  :param name: The distinct name that identifies the role mapping. The name is
1307
1442
  used solely as an identifier to facilitate interaction via the API; it does
@@ -1347,9 +1482,9 @@ class SecurityClient(NamespacedClient):
1347
1482
  pretty: t.Optional[bool] = None,
1348
1483
  ) -> ObjectApiResponse[t.Any]:
1349
1484
  """
1350
- Retrieves information about service accounts.
1485
+ This API returns a list of service accounts that match the provided path parameter(s).
1351
1486
 
1352
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-service-accounts.html>`_
1487
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-service-accounts.html>`_
1353
1488
 
1354
1489
  :param namespace: Name of the namespace. Omit this parameter to retrieve information
1355
1490
  about all service accounts. If you omit this parameter, you must also omit
@@ -1400,7 +1535,7 @@ class SecurityClient(NamespacedClient):
1400
1535
  """
1401
1536
  Retrieves information of all service credentials for a service account.
1402
1537
 
1403
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-service-credentials.html>`_
1538
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-service-credentials.html>`_
1404
1539
 
1405
1540
  :param namespace: Name of the namespace.
1406
1541
  :param service: Name of the service name.
@@ -1450,8 +1585,10 @@ class SecurityClient(NamespacedClient):
1450
1585
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1451
1586
  grant_type: t.Optional[
1452
1587
  t.Union[
1453
- "t.Literal['_kerberos', 'client_credentials', 'password', 'refresh_token']",
1454
1588
  str,
1589
+ t.Literal[
1590
+ "_kerberos", "client_credentials", "password", "refresh_token"
1591
+ ],
1455
1592
  ]
1456
1593
  ] = None,
1457
1594
  human: t.Optional[bool] = None,
@@ -1466,7 +1603,7 @@ class SecurityClient(NamespacedClient):
1466
1603
  """
1467
1604
  Creates a bearer token for access without requiring basic authentication.
1468
1605
 
1469
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-token.html>`_
1606
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-token.html>`_
1470
1607
 
1471
1608
  :param grant_type:
1472
1609
  :param kerberos_ticket:
@@ -1525,7 +1662,7 @@ class SecurityClient(NamespacedClient):
1525
1662
  """
1526
1663
  Retrieves information about users in the native realm and built-in users.
1527
1664
 
1528
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-user.html>`_
1665
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-user.html>`_
1529
1666
 
1530
1667
  :param username: An identifier for the user. You can specify multiple usernames
1531
1668
  as a comma-separated list. If you omit this parameter, the API retrieves
@@ -1576,7 +1713,7 @@ class SecurityClient(NamespacedClient):
1576
1713
  """
1577
1714
  Retrieves security privileges for the logged in user.
1578
1715
 
1579
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-user-privileges.html>`_
1716
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-user-privileges.html>`_
1580
1717
 
1581
1718
  :param application: The name of the application. Application privileges are always
1582
1719
  associated with exactly one application. If you do not specify this parameter,
@@ -1624,9 +1761,9 @@ class SecurityClient(NamespacedClient):
1624
1761
  pretty: t.Optional[bool] = None,
1625
1762
  ) -> ObjectApiResponse[t.Any]:
1626
1763
  """
1627
- Retrieves user profiles for the given unique ID(s).
1764
+ Retrieves a user's profile using the unique profile ID.
1628
1765
 
1629
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-get-user-profile.html>`_
1766
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-get-user-profile.html>`_
1630
1767
 
1631
1768
  :param uid: A unique identifier for the user profile.
1632
1769
  :param data: List of filters for the `data` field of the profile document. To
@@ -1675,7 +1812,7 @@ class SecurityClient(NamespacedClient):
1675
1812
  *,
1676
1813
  api_key: t.Optional[t.Mapping[str, t.Any]] = None,
1677
1814
  grant_type: t.Optional[
1678
- t.Union["t.Literal['access_token', 'password']", str]
1815
+ t.Union[str, t.Literal["access_token", "password"]]
1679
1816
  ] = None,
1680
1817
  access_token: t.Optional[str] = None,
1681
1818
  error_trace: t.Optional[bool] = None,
@@ -1688,9 +1825,23 @@ class SecurityClient(NamespacedClient):
1688
1825
  body: t.Optional[t.Dict[str, t.Any]] = None,
1689
1826
  ) -> ObjectApiResponse[t.Any]:
1690
1827
  """
1691
- Creates an API key on behalf of another user.
1692
-
1693
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-grant-api-key.html>`_
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>`_
1694
1845
 
1695
1846
  :param api_key: Defines the API key.
1696
1847
  :param grant_type: The type of grant. Supported grant types are: `access_token`,
@@ -1756,8 +1907,68 @@ class SecurityClient(NamespacedClient):
1756
1907
  cluster: t.Optional[
1757
1908
  t.Sequence[
1758
1909
  t.Union[
1759
- "t.Literal['all', 'cancel_task', 'create_snapshot', 'cross_cluster_replication', 'cross_cluster_search', 'delegate_pki', 'grant_api_key', 'manage', 'manage_api_key', 'manage_autoscaling', 'manage_behavioral_analytics', 'manage_ccr', 'manage_data_frame_transforms', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_ingest_pipelines', 'manage_logstash_pipelines', 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_data_frame_transforms', 'monitor_enrich', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'none', 'post_behavioral_analytics_event', 'read_ccr', 'read_connector_secrets', 'read_fleet_secrets', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client', 'write_connector_secrets', 'write_fleet_secrets']",
1760
1910
  str,
1911
+ t.Literal[
1912
+ "all",
1913
+ "cancel_task",
1914
+ "create_snapshot",
1915
+ "cross_cluster_replication",
1916
+ "cross_cluster_search",
1917
+ "delegate_pki",
1918
+ "grant_api_key",
1919
+ "manage",
1920
+ "manage_api_key",
1921
+ "manage_autoscaling",
1922
+ "manage_behavioral_analytics",
1923
+ "manage_ccr",
1924
+ "manage_data_frame_transforms",
1925
+ "manage_data_stream_global_retention",
1926
+ "manage_enrich",
1927
+ "manage_ilm",
1928
+ "manage_index_templates",
1929
+ "manage_inference",
1930
+ "manage_ingest_pipelines",
1931
+ "manage_logstash_pipelines",
1932
+ "manage_ml",
1933
+ "manage_oidc",
1934
+ "manage_own_api_key",
1935
+ "manage_pipeline",
1936
+ "manage_rollup",
1937
+ "manage_saml",
1938
+ "manage_search_application",
1939
+ "manage_search_query_rules",
1940
+ "manage_search_synonyms",
1941
+ "manage_security",
1942
+ "manage_service_account",
1943
+ "manage_slm",
1944
+ "manage_token",
1945
+ "manage_transform",
1946
+ "manage_user_profile",
1947
+ "manage_watcher",
1948
+ "monitor",
1949
+ "monitor_data_frame_transforms",
1950
+ "monitor_data_stream_global_retention",
1951
+ "monitor_enrich",
1952
+ "monitor_inference",
1953
+ "monitor_ml",
1954
+ "monitor_rollup",
1955
+ "monitor_snapshot",
1956
+ "monitor_text_structure",
1957
+ "monitor_transform",
1958
+ "monitor_watcher",
1959
+ "none",
1960
+ "post_behavioral_analytics_event",
1961
+ "read_ccr",
1962
+ "read_connector_secrets",
1963
+ "read_fleet_secrets",
1964
+ "read_ilm",
1965
+ "read_pipeline",
1966
+ "read_security",
1967
+ "read_slm",
1968
+ "transport_client",
1969
+ "write_connector_secrets",
1970
+ "write_fleet_secrets",
1971
+ ],
1761
1972
  ]
1762
1973
  ]
1763
1974
  ] = None,
@@ -1771,7 +1982,7 @@ class SecurityClient(NamespacedClient):
1771
1982
  """
1772
1983
  Determines whether the specified user has a specified list of privileges.
1773
1984
 
1774
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-has-privileges.html>`_
1985
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-has-privileges.html>`_
1775
1986
 
1776
1987
  :param user: Username
1777
1988
  :param application:
@@ -1831,7 +2042,7 @@ class SecurityClient(NamespacedClient):
1831
2042
  Determines whether the users associated with the specified profile IDs have all
1832
2043
  the requested privileges.
1833
2044
 
1834
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-has-privileges-user-profile.html>`_
2045
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-has-privileges-user-profile.html>`_
1835
2046
 
1836
2047
  :param privileges:
1837
2048
  :param uids: A list of profile IDs. The privileges are checked for associated
@@ -1888,9 +2099,15 @@ class SecurityClient(NamespacedClient):
1888
2099
  body: t.Optional[t.Dict[str, t.Any]] = None,
1889
2100
  ) -> ObjectApiResponse[t.Any]:
1890
2101
  """
1891
- Invalidates one or more API keys.
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.
1892
2109
 
1893
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-invalidate-api-key.html>`_
2110
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-invalidate-api-key.html>`_
1894
2111
 
1895
2112
  :param id:
1896
2113
  :param ids: A list of API key ids. This parameter cannot be used with any of
@@ -1961,7 +2178,7 @@ class SecurityClient(NamespacedClient):
1961
2178
  """
1962
2179
  Invalidates one or more access tokens or refresh tokens.
1963
2180
 
1964
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-invalidate-token.html>`_
2181
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-invalidate-token.html>`_
1965
2182
 
1966
2183
  :param realm_name:
1967
2184
  :param refresh_token:
@@ -2015,13 +2232,13 @@ class SecurityClient(NamespacedClient):
2015
2232
  human: t.Optional[bool] = None,
2016
2233
  pretty: t.Optional[bool] = None,
2017
2234
  refresh: t.Optional[
2018
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
2235
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
2019
2236
  ] = None,
2020
2237
  ) -> ObjectApiResponse[t.Any]:
2021
2238
  """
2022
2239
  Adds or updates application privileges.
2023
2240
 
2024
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-put-privileges.html>`_
2241
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-privileges.html>`_
2025
2242
 
2026
2243
  :param privileges:
2027
2244
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -2063,6 +2280,7 @@ class SecurityClient(NamespacedClient):
2063
2280
  body_fields=(
2064
2281
  "applications",
2065
2282
  "cluster",
2283
+ "description",
2066
2284
  "global_",
2067
2285
  "indices",
2068
2286
  "metadata",
@@ -2079,11 +2297,72 @@ class SecurityClient(NamespacedClient):
2079
2297
  cluster: t.Optional[
2080
2298
  t.Sequence[
2081
2299
  t.Union[
2082
- "t.Literal['all', 'cancel_task', 'create_snapshot', 'cross_cluster_replication', 'cross_cluster_search', 'delegate_pki', 'grant_api_key', 'manage', 'manage_api_key', 'manage_autoscaling', 'manage_behavioral_analytics', 'manage_ccr', 'manage_data_frame_transforms', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_ingest_pipelines', 'manage_logstash_pipelines', 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_data_frame_transforms', 'monitor_enrich', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'none', 'post_behavioral_analytics_event', 'read_ccr', 'read_connector_secrets', 'read_fleet_secrets', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client', 'write_connector_secrets', 'write_fleet_secrets']",
2083
2300
  str,
2301
+ t.Literal[
2302
+ "all",
2303
+ "cancel_task",
2304
+ "create_snapshot",
2305
+ "cross_cluster_replication",
2306
+ "cross_cluster_search",
2307
+ "delegate_pki",
2308
+ "grant_api_key",
2309
+ "manage",
2310
+ "manage_api_key",
2311
+ "manage_autoscaling",
2312
+ "manage_behavioral_analytics",
2313
+ "manage_ccr",
2314
+ "manage_data_frame_transforms",
2315
+ "manage_data_stream_global_retention",
2316
+ "manage_enrich",
2317
+ "manage_ilm",
2318
+ "manage_index_templates",
2319
+ "manage_inference",
2320
+ "manage_ingest_pipelines",
2321
+ "manage_logstash_pipelines",
2322
+ "manage_ml",
2323
+ "manage_oidc",
2324
+ "manage_own_api_key",
2325
+ "manage_pipeline",
2326
+ "manage_rollup",
2327
+ "manage_saml",
2328
+ "manage_search_application",
2329
+ "manage_search_query_rules",
2330
+ "manage_search_synonyms",
2331
+ "manage_security",
2332
+ "manage_service_account",
2333
+ "manage_slm",
2334
+ "manage_token",
2335
+ "manage_transform",
2336
+ "manage_user_profile",
2337
+ "manage_watcher",
2338
+ "monitor",
2339
+ "monitor_data_frame_transforms",
2340
+ "monitor_data_stream_global_retention",
2341
+ "monitor_enrich",
2342
+ "monitor_inference",
2343
+ "monitor_ml",
2344
+ "monitor_rollup",
2345
+ "monitor_snapshot",
2346
+ "monitor_text_structure",
2347
+ "monitor_transform",
2348
+ "monitor_watcher",
2349
+ "none",
2350
+ "post_behavioral_analytics_event",
2351
+ "read_ccr",
2352
+ "read_connector_secrets",
2353
+ "read_fleet_secrets",
2354
+ "read_ilm",
2355
+ "read_pipeline",
2356
+ "read_security",
2357
+ "read_slm",
2358
+ "transport_client",
2359
+ "write_connector_secrets",
2360
+ "write_fleet_secrets",
2361
+ ],
2084
2362
  ]
2085
2363
  ]
2086
2364
  ] = None,
2365
+ description: t.Optional[str] = None,
2087
2366
  error_trace: t.Optional[bool] = None,
2088
2367
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2089
2368
  global_: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -2092,21 +2371,24 @@ class SecurityClient(NamespacedClient):
2092
2371
  metadata: t.Optional[t.Mapping[str, t.Any]] = None,
2093
2372
  pretty: t.Optional[bool] = None,
2094
2373
  refresh: t.Optional[
2095
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
2374
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
2096
2375
  ] = None,
2097
2376
  run_as: t.Optional[t.Sequence[str]] = None,
2098
2377
  transient_metadata: t.Optional[t.Mapping[str, t.Any]] = None,
2099
2378
  body: t.Optional[t.Dict[str, t.Any]] = None,
2100
2379
  ) -> ObjectApiResponse[t.Any]:
2101
2380
  """
2102
- Adds and updates roles in the native realm.
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.
2103
2384
 
2104
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-put-role.html>`_
2385
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-role.html>`_
2105
2386
 
2106
2387
  :param name: The name of the role.
2107
2388
  :param applications: A list of application privilege entries.
2108
2389
  :param cluster: A list of cluster privileges. These privileges define the cluster-level
2109
2390
  actions for users with this role.
2391
+ :param description: Optional description of the role descriptor
2110
2392
  :param global_: An object defining global privileges. A global privilege is a
2111
2393
  form of cluster privilege that is request-aware. Support for global privileges
2112
2394
  is currently limited to the management of application privileges.
@@ -2117,6 +2399,9 @@ class SecurityClient(NamespacedClient):
2117
2399
  this operation visible to search, if `wait_for` then wait for a refresh to
2118
2400
  make this operation visible to search, if `false` then do nothing with refreshes.
2119
2401
  :param run_as: A list of users that the owners of this role can impersonate.
2402
+ *Note*: in Serverless, the run-as feature is disabled. For API compatibility,
2403
+ you can still specify an empty `run_as` field, but a non-empty list will
2404
+ be rejected.
2120
2405
  :param transient_metadata: Indicates roles that might be incompatible with the
2121
2406
  current cluster license, specifically roles with document and field level
2122
2407
  security. When the cluster license doesn’t allow certain features for a given
@@ -2145,6 +2430,8 @@ class SecurityClient(NamespacedClient):
2145
2430
  __body["applications"] = applications
2146
2431
  if cluster is not None:
2147
2432
  __body["cluster"] = cluster
2433
+ if description is not None:
2434
+ __body["description"] = description
2148
2435
  if global_ is not None:
2149
2436
  __body["global"] = global_
2150
2437
  if indices is not None:
@@ -2187,7 +2474,7 @@ class SecurityClient(NamespacedClient):
2187
2474
  metadata: t.Optional[t.Mapping[str, t.Any]] = None,
2188
2475
  pretty: t.Optional[bool] = None,
2189
2476
  refresh: t.Optional[
2190
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
2477
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
2191
2478
  ] = None,
2192
2479
  role_templates: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
2193
2480
  roles: t.Optional[t.Sequence[str]] = None,
@@ -2198,7 +2485,7 @@ class SecurityClient(NamespacedClient):
2198
2485
  """
2199
2486
  Creates and updates role mappings.
2200
2487
 
2201
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-put-role-mapping.html>`_
2488
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-role-mapping.html>`_
2202
2489
 
2203
2490
  :param name: Role-mapping name
2204
2491
  :param enabled:
@@ -2277,7 +2564,7 @@ class SecurityClient(NamespacedClient):
2277
2564
  password_hash: t.Optional[str] = None,
2278
2565
  pretty: t.Optional[bool] = None,
2279
2566
  refresh: t.Optional[
2280
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
2567
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
2281
2568
  ] = None,
2282
2569
  roles: t.Optional[t.Sequence[str]] = None,
2283
2570
  body: t.Optional[t.Dict[str, t.Any]] = None,
@@ -2286,7 +2573,7 @@ class SecurityClient(NamespacedClient):
2286
2573
  Adds and updates users in the native realm. These users are commonly referred
2287
2574
  to as native users.
2288
2575
 
2289
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-put-user.html>`_
2576
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-put-user.html>`_
2290
2577
 
2291
2578
  :param username: The username of the User
2292
2579
  :param email:
@@ -2377,12 +2664,14 @@ class SecurityClient(NamespacedClient):
2377
2664
  ] = None,
2378
2665
  typed_keys: t.Optional[bool] = None,
2379
2666
  with_limited_by: t.Optional[bool] = None,
2667
+ with_profile_uid: t.Optional[bool] = None,
2380
2668
  body: t.Optional[t.Dict[str, t.Any]] = None,
2381
2669
  ) -> ObjectApiResponse[t.Any]:
2382
2670
  """
2383
- Retrieves information for API keys using a subset of query DSL
2671
+ Retrieves information for API keys in a paginated manner. You can optionally
2672
+ filter the results with a query.
2384
2673
 
2385
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-query-api-key.html>`_
2674
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-query-api-key.html>`_
2386
2675
 
2387
2676
  :param aggregations: Any aggregations to run over the corpus of returned API
2388
2677
  keys. Aggregations and queries work together. Aggregations are computed only
@@ -2418,6 +2707,8 @@ class SecurityClient(NamespacedClient):
2418
2707
  :param with_limited_by: Return the snapshot of the owner user's role descriptors
2419
2708
  associated with the API key. An API key's actual permission is the intersection
2420
2709
  of its assigned role descriptors and the owner user's role descriptors.
2710
+ :param with_profile_uid: Determines whether to also retrieve the profile uid,
2711
+ for the API key owner principal, if it exists.
2421
2712
  """
2422
2713
  __path_parts: t.Dict[str, str] = {}
2423
2714
  __path = "/_security/_query/api_key"
@@ -2446,6 +2737,8 @@ class SecurityClient(NamespacedClient):
2446
2737
  __query["typed_keys"] = typed_keys
2447
2738
  if with_limited_by is not None:
2448
2739
  __query["with_limited_by"] = with_limited_by
2740
+ if with_profile_uid is not None:
2741
+ __query["with_profile_uid"] = with_profile_uid
2449
2742
  if not __body:
2450
2743
  if aggregations is not None:
2451
2744
  __body["aggregations"] = aggregations
@@ -2476,6 +2769,181 @@ class SecurityClient(NamespacedClient):
2476
2769
  path_parts=__path_parts,
2477
2770
  )
2478
2771
 
2772
+ @_rewrite_parameters(
2773
+ body_fields=("from_", "query", "search_after", "size", "sort"),
2774
+ parameter_aliases={"from": "from_"},
2775
+ )
2776
+ async def query_role(
2777
+ self,
2778
+ *,
2779
+ error_trace: t.Optional[bool] = None,
2780
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2781
+ from_: t.Optional[int] = None,
2782
+ human: t.Optional[bool] = None,
2783
+ pretty: t.Optional[bool] = None,
2784
+ query: t.Optional[t.Mapping[str, t.Any]] = None,
2785
+ search_after: t.Optional[
2786
+ t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
2787
+ ] = None,
2788
+ size: t.Optional[int] = None,
2789
+ sort: t.Optional[
2790
+ t.Union[
2791
+ t.Sequence[t.Union[str, t.Mapping[str, t.Any]]],
2792
+ t.Union[str, t.Mapping[str, t.Any]],
2793
+ ]
2794
+ ] = None,
2795
+ body: t.Optional[t.Dict[str, t.Any]] = None,
2796
+ ) -> ObjectApiResponse[t.Any]:
2797
+ """
2798
+ Retrieves roles in a paginated manner. You can optionally filter the results
2799
+ with a query.
2800
+
2801
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-query-role.html>`_
2802
+
2803
+ :param from_: Starting document offset. By default, you cannot page through more
2804
+ than 10,000 hits using the from and size parameters. To page through more
2805
+ hits, use the `search_after` parameter.
2806
+ :param query: A query to filter which roles to return. If the query parameter
2807
+ is missing, it is equivalent to a `match_all` query. The query supports a
2808
+ subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
2809
+ `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
2810
+ You can query the following information associated with roles: `name`, `description`,
2811
+ `metadata`, `applications.application`, `applications.privileges`, `applications.resources`.
2812
+ :param search_after: Search after definition
2813
+ :param size: The number of hits to return. By default, you cannot page through
2814
+ more than 10,000 hits using the `from` and `size` parameters. To page through
2815
+ more hits, use the `search_after` parameter.
2816
+ :param sort: All public fields of a role are eligible for sorting. In addition,
2817
+ sort can also be applied to the `_doc` field to sort by index order.
2818
+ """
2819
+ __path_parts: t.Dict[str, str] = {}
2820
+ __path = "/_security/_query/role"
2821
+ __query: t.Dict[str, t.Any] = {}
2822
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
2823
+ if error_trace is not None:
2824
+ __query["error_trace"] = error_trace
2825
+ if filter_path is not None:
2826
+ __query["filter_path"] = filter_path
2827
+ if human is not None:
2828
+ __query["human"] = human
2829
+ if pretty is not None:
2830
+ __query["pretty"] = pretty
2831
+ if not __body:
2832
+ if from_ is not None:
2833
+ __body["from"] = from_
2834
+ if query is not None:
2835
+ __body["query"] = query
2836
+ if search_after is not None:
2837
+ __body["search_after"] = search_after
2838
+ if size is not None:
2839
+ __body["size"] = size
2840
+ if sort is not None:
2841
+ __body["sort"] = sort
2842
+ if not __body:
2843
+ __body = None # type: ignore[assignment]
2844
+ __headers = {"accept": "application/json"}
2845
+ if __body is not None:
2846
+ __headers["content-type"] = "application/json"
2847
+ return await self.perform_request( # type: ignore[return-value]
2848
+ "POST",
2849
+ __path,
2850
+ params=__query,
2851
+ headers=__headers,
2852
+ body=__body,
2853
+ endpoint_id="security.query_role",
2854
+ path_parts=__path_parts,
2855
+ )
2856
+
2857
+ @_rewrite_parameters(
2858
+ body_fields=("from_", "query", "search_after", "size", "sort"),
2859
+ parameter_aliases={"from": "from_"},
2860
+ )
2861
+ async def query_user(
2862
+ self,
2863
+ *,
2864
+ error_trace: t.Optional[bool] = None,
2865
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2866
+ from_: t.Optional[int] = None,
2867
+ human: t.Optional[bool] = None,
2868
+ pretty: t.Optional[bool] = None,
2869
+ query: t.Optional[t.Mapping[str, t.Any]] = None,
2870
+ search_after: t.Optional[
2871
+ t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
2872
+ ] = None,
2873
+ size: t.Optional[int] = None,
2874
+ sort: t.Optional[
2875
+ t.Union[
2876
+ t.Sequence[t.Union[str, t.Mapping[str, t.Any]]],
2877
+ t.Union[str, t.Mapping[str, t.Any]],
2878
+ ]
2879
+ ] = None,
2880
+ with_profile_uid: t.Optional[bool] = None,
2881
+ body: t.Optional[t.Dict[str, t.Any]] = None,
2882
+ ) -> ObjectApiResponse[t.Any]:
2883
+ """
2884
+ Retrieves information for Users in a paginated manner. You can optionally filter
2885
+ the results with a query.
2886
+
2887
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-query-user.html>`_
2888
+
2889
+ :param from_: Starting document offset. By default, you cannot page through more
2890
+ than 10,000 hits using the from and size parameters. To page through more
2891
+ hits, use the `search_after` parameter.
2892
+ :param query: A query to filter which users to return. If the query parameter
2893
+ is missing, it is equivalent to a `match_all` query. The query supports a
2894
+ subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
2895
+ `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
2896
+ You can query the following information associated with user: `username`,
2897
+ `roles`, `enabled`
2898
+ :param search_after: Search after definition
2899
+ :param size: The number of hits to return. By default, you cannot page through
2900
+ more than 10,000 hits using the `from` and `size` parameters. To page through
2901
+ more hits, use the `search_after` parameter.
2902
+ :param sort: Fields eligible for sorting are: username, roles, enabled In addition,
2903
+ sort can also be applied to the `_doc` field to sort by index order.
2904
+ :param with_profile_uid: If true will return the User Profile ID for the users
2905
+ in the query result, if any.
2906
+ """
2907
+ __path_parts: t.Dict[str, str] = {}
2908
+ __path = "/_security/_query/user"
2909
+ __query: t.Dict[str, t.Any] = {}
2910
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
2911
+ if error_trace is not None:
2912
+ __query["error_trace"] = error_trace
2913
+ if filter_path is not None:
2914
+ __query["filter_path"] = filter_path
2915
+ if human is not None:
2916
+ __query["human"] = human
2917
+ if pretty is not None:
2918
+ __query["pretty"] = pretty
2919
+ if with_profile_uid is not None:
2920
+ __query["with_profile_uid"] = with_profile_uid
2921
+ if not __body:
2922
+ if from_ is not None:
2923
+ __body["from"] = from_
2924
+ if query is not None:
2925
+ __body["query"] = query
2926
+ if search_after is not None:
2927
+ __body["search_after"] = search_after
2928
+ if size is not None:
2929
+ __body["size"] = size
2930
+ if sort is not None:
2931
+ __body["sort"] = sort
2932
+ if not __body:
2933
+ __body = None # type: ignore[assignment]
2934
+ __headers = {"accept": "application/json"}
2935
+ if __body is not None:
2936
+ __headers["content-type"] = "application/json"
2937
+ return await self.perform_request( # type: ignore[return-value]
2938
+ "POST",
2939
+ __path,
2940
+ params=__query,
2941
+ headers=__headers,
2942
+ body=__body,
2943
+ endpoint_id="security.query_user",
2944
+ path_parts=__path_parts,
2945
+ )
2946
+
2479
2947
  @_rewrite_parameters(
2480
2948
  body_fields=("content", "ids", "realm"),
2481
2949
  )
@@ -2492,10 +2960,9 @@ class SecurityClient(NamespacedClient):
2492
2960
  body: t.Optional[t.Dict[str, t.Any]] = None,
2493
2961
  ) -> ObjectApiResponse[t.Any]:
2494
2962
  """
2495
- Exchanges a SAML Response message for an Elasticsearch access token and refresh
2496
- token pair
2963
+ Submits a SAML Response message to Elasticsearch for consumption.
2497
2964
 
2498
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-saml-authenticate.html>`_
2965
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-authenticate.html>`_
2499
2966
 
2500
2967
  :param content: The SAML response as it was sent by the user’s browser, usually
2501
2968
  a Base64 encoded XML document.
@@ -2555,9 +3022,9 @@ class SecurityClient(NamespacedClient):
2555
3022
  body: t.Optional[t.Dict[str, t.Any]] = None,
2556
3023
  ) -> ObjectApiResponse[t.Any]:
2557
3024
  """
2558
- Verifies the logout response sent from the SAML IdP
3025
+ Verifies the logout response sent from the SAML IdP.
2559
3026
 
2560
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-saml-complete-logout.html>`_
3027
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-complete-logout.html>`_
2561
3028
 
2562
3029
  :param ids: A json array with all the valid SAML Request Ids that the caller
2563
3030
  of the API has for the current user.
@@ -2621,9 +3088,9 @@ class SecurityClient(NamespacedClient):
2621
3088
  body: t.Optional[t.Dict[str, t.Any]] = None,
2622
3089
  ) -> ObjectApiResponse[t.Any]:
2623
3090
  """
2624
- Consumes a SAML LogoutRequest
3091
+ Submits a SAML LogoutRequest message to Elasticsearch for consumption.
2625
3092
 
2626
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-saml-invalidate.html>`_
3093
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-invalidate.html>`_
2627
3094
 
2628
3095
  :param query_string: The query part of the URL that the user was redirected to
2629
3096
  by the SAML IdP to initiate the Single Logout. This query should include
@@ -2688,10 +3155,9 @@ class SecurityClient(NamespacedClient):
2688
3155
  body: t.Optional[t.Dict[str, t.Any]] = None,
2689
3156
  ) -> ObjectApiResponse[t.Any]:
2690
3157
  """
2691
- Invalidates an access token and a refresh token that were generated via the SAML
2692
- Authenticate API
3158
+ Submits a request to invalidate an access token and refresh token.
2693
3159
 
2694
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-saml-logout.html>`_
3160
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-logout.html>`_
2695
3161
 
2696
3162
  :param token: The access token that was returned as a response to calling the
2697
3163
  SAML authenticate API. Alternatively, the most recent token that was received
@@ -2746,9 +3212,10 @@ class SecurityClient(NamespacedClient):
2746
3212
  body: t.Optional[t.Dict[str, t.Any]] = None,
2747
3213
  ) -> ObjectApiResponse[t.Any]:
2748
3214
  """
2749
- Creates a SAML authentication request
3215
+ Creates a SAML authentication request (<AuthnRequest>) as a URL string, based
3216
+ on the configuration of the respective SAML realm in Elasticsearch.
2750
3217
 
2751
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-saml-prepare-authentication.html>`_
3218
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-prepare-authentication.html>`_
2752
3219
 
2753
3220
  :param acs: The Assertion Consumer Service URL that matches the one of the SAML
2754
3221
  realms in Elasticsearch. The realm is used to generate the authentication
@@ -2801,9 +3268,9 @@ class SecurityClient(NamespacedClient):
2801
3268
  pretty: t.Optional[bool] = None,
2802
3269
  ) -> ObjectApiResponse[t.Any]:
2803
3270
  """
2804
- Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider
3271
+ Generate SAML metadata for a SAML 2.0 Service Provider.
2805
3272
 
2806
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-saml-sp-metadata.html>`_
3273
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-saml-sp-metadata.html>`_
2807
3274
 
2808
3275
  :param realm_name: The name of the SAML realm in Elasticsearch.
2809
3276
  """
@@ -2849,7 +3316,7 @@ class SecurityClient(NamespacedClient):
2849
3316
  """
2850
3317
  Get suggestions for user profiles that match specified search criteria.
2851
3318
 
2852
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-suggest-user-profile.html>`_
3319
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-suggest-user-profile.html>`_
2853
3320
 
2854
3321
  :param data: List of filters for the `data` field of the profile document. To
2855
3322
  return all content use `data=*`. To return a subset of content use `data=<key>`
@@ -2907,7 +3374,7 @@ class SecurityClient(NamespacedClient):
2907
3374
  *,
2908
3375
  id: str,
2909
3376
  error_trace: t.Optional[bool] = None,
2910
- expiration: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3377
+ expiration: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2911
3378
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2912
3379
  human: t.Optional[bool] = None,
2913
3380
  metadata: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -2916,9 +3383,24 @@ class SecurityClient(NamespacedClient):
2916
3383
  body: t.Optional[t.Dict[str, t.Any]] = None,
2917
3384
  ) -> ObjectApiResponse[t.Any]:
2918
3385
  """
2919
- Updates attributes of an existing API key.
2920
-
2921
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-update-api-key.html>`_
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>`_
2922
3404
 
2923
3405
  :param id: The ID of the API key to update.
2924
3406
  :param expiration: Expiration time for the API key.
@@ -2986,14 +3468,15 @@ class SecurityClient(NamespacedClient):
2986
3468
  labels: t.Optional[t.Mapping[str, t.Any]] = None,
2987
3469
  pretty: t.Optional[bool] = None,
2988
3470
  refresh: t.Optional[
2989
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
3471
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
2990
3472
  ] = None,
2991
3473
  body: t.Optional[t.Dict[str, t.Any]] = None,
2992
3474
  ) -> ObjectApiResponse[t.Any]:
2993
3475
  """
2994
- Update application specific data for the user profile of the given unique ID.
3476
+ Updates specific data for the user profile that's associated with the specified
3477
+ unique ID.
2995
3478
 
2996
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-update-user-profile-data.html>`_
3479
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/security-api-update-user-profile-data.html>`_
2997
3480
 
2998
3481
  :param uid: A unique identifier for the user profile.
2999
3482
  :param data: Non-searchable data that you want to associate with the user profile.