elasticsearch 8.17.1__py3-none-any.whl → 8.18.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 (139) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2146 -859
  3. elasticsearch/_async/client/_base.py +0 -1
  4. elasticsearch/_async/client/async_search.py +44 -29
  5. elasticsearch/_async/client/autoscaling.py +32 -26
  6. elasticsearch/_async/client/cat.py +244 -169
  7. elasticsearch/_async/client/ccr.py +268 -128
  8. elasticsearch/_async/client/cluster.py +191 -164
  9. elasticsearch/_async/client/connector.py +212 -116
  10. elasticsearch/_async/client/dangling_indices.py +22 -16
  11. elasticsearch/_async/client/enrich.py +51 -11
  12. elasticsearch/_async/client/eql.py +54 -13
  13. elasticsearch/_async/client/esql.py +352 -4
  14. elasticsearch/_async/client/features.py +37 -27
  15. elasticsearch/_async/client/fleet.py +22 -10
  16. elasticsearch/_async/client/graph.py +10 -9
  17. elasticsearch/_async/client/ilm.py +108 -77
  18. elasticsearch/_async/client/indices.py +1112 -677
  19. elasticsearch/_async/client/inference.py +1875 -133
  20. elasticsearch/_async/client/ingest.py +83 -50
  21. elasticsearch/_async/client/license.py +90 -38
  22. elasticsearch/_async/client/logstash.py +20 -9
  23. elasticsearch/_async/client/migration.py +26 -17
  24. elasticsearch/_async/client/ml.py +642 -365
  25. elasticsearch/_async/client/monitoring.py +6 -3
  26. elasticsearch/_async/client/nodes.py +51 -53
  27. elasticsearch/_async/client/query_rules.py +59 -33
  28. elasticsearch/_async/client/rollup.py +124 -86
  29. elasticsearch/_async/client/search_application.py +60 -32
  30. elasticsearch/_async/client/searchable_snapshots.py +25 -12
  31. elasticsearch/_async/client/security.py +896 -558
  32. elasticsearch/_async/client/shutdown.py +34 -36
  33. elasticsearch/_async/client/simulate.py +22 -28
  34. elasticsearch/_async/client/slm.py +65 -40
  35. elasticsearch/_async/client/snapshot.py +190 -213
  36. elasticsearch/_async/client/sql.py +43 -22
  37. elasticsearch/_async/client/ssl.py +17 -18
  38. elasticsearch/_async/client/synonyms.py +58 -37
  39. elasticsearch/_async/client/tasks.py +77 -48
  40. elasticsearch/_async/client/text_structure.py +65 -56
  41. elasticsearch/_async/client/transform.py +124 -93
  42. elasticsearch/_async/client/watcher.py +116 -72
  43. elasticsearch/_async/client/xpack.py +18 -9
  44. elasticsearch/_async/helpers.py +1 -2
  45. elasticsearch/_sync/client/__init__.py +2146 -859
  46. elasticsearch/_sync/client/_base.py +0 -1
  47. elasticsearch/_sync/client/async_search.py +44 -29
  48. elasticsearch/_sync/client/autoscaling.py +32 -26
  49. elasticsearch/_sync/client/cat.py +244 -169
  50. elasticsearch/_sync/client/ccr.py +268 -128
  51. elasticsearch/_sync/client/cluster.py +191 -164
  52. elasticsearch/_sync/client/connector.py +212 -116
  53. elasticsearch/_sync/client/dangling_indices.py +22 -16
  54. elasticsearch/_sync/client/enrich.py +51 -11
  55. elasticsearch/_sync/client/eql.py +54 -13
  56. elasticsearch/_sync/client/esql.py +352 -4
  57. elasticsearch/_sync/client/features.py +37 -27
  58. elasticsearch/_sync/client/fleet.py +22 -10
  59. elasticsearch/_sync/client/graph.py +10 -9
  60. elasticsearch/_sync/client/ilm.py +108 -77
  61. elasticsearch/_sync/client/indices.py +1112 -677
  62. elasticsearch/_sync/client/inference.py +1875 -133
  63. elasticsearch/_sync/client/ingest.py +83 -50
  64. elasticsearch/_sync/client/license.py +90 -38
  65. elasticsearch/_sync/client/logstash.py +20 -9
  66. elasticsearch/_sync/client/migration.py +26 -17
  67. elasticsearch/_sync/client/ml.py +642 -365
  68. elasticsearch/_sync/client/monitoring.py +6 -3
  69. elasticsearch/_sync/client/nodes.py +51 -53
  70. elasticsearch/_sync/client/query_rules.py +59 -33
  71. elasticsearch/_sync/client/rollup.py +124 -86
  72. elasticsearch/_sync/client/search_application.py +60 -32
  73. elasticsearch/_sync/client/searchable_snapshots.py +25 -12
  74. elasticsearch/_sync/client/security.py +896 -558
  75. elasticsearch/_sync/client/shutdown.py +34 -36
  76. elasticsearch/_sync/client/simulate.py +22 -28
  77. elasticsearch/_sync/client/slm.py +65 -40
  78. elasticsearch/_sync/client/snapshot.py +190 -213
  79. elasticsearch/_sync/client/sql.py +43 -22
  80. elasticsearch/_sync/client/ssl.py +17 -18
  81. elasticsearch/_sync/client/synonyms.py +58 -37
  82. elasticsearch/_sync/client/tasks.py +77 -48
  83. elasticsearch/_sync/client/text_structure.py +65 -56
  84. elasticsearch/_sync/client/transform.py +124 -93
  85. elasticsearch/_sync/client/utils.py +1 -4
  86. elasticsearch/_sync/client/watcher.py +116 -72
  87. elasticsearch/_sync/client/xpack.py +18 -9
  88. elasticsearch/_version.py +1 -1
  89. elasticsearch/client.py +2 -0
  90. elasticsearch/dsl/__init__.py +203 -0
  91. elasticsearch/dsl/_async/__init__.py +16 -0
  92. elasticsearch/dsl/_async/document.py +522 -0
  93. elasticsearch/dsl/_async/faceted_search.py +50 -0
  94. elasticsearch/dsl/_async/index.py +639 -0
  95. elasticsearch/dsl/_async/mapping.py +49 -0
  96. elasticsearch/dsl/_async/search.py +233 -0
  97. elasticsearch/dsl/_async/update_by_query.py +47 -0
  98. elasticsearch/dsl/_sync/__init__.py +16 -0
  99. elasticsearch/dsl/_sync/document.py +514 -0
  100. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  101. elasticsearch/dsl/_sync/index.py +597 -0
  102. elasticsearch/dsl/_sync/mapping.py +49 -0
  103. elasticsearch/dsl/_sync/search.py +226 -0
  104. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  105. elasticsearch/dsl/aggs.py +3730 -0
  106. elasticsearch/dsl/analysis.py +341 -0
  107. elasticsearch/dsl/async_connections.py +37 -0
  108. elasticsearch/dsl/connections.py +142 -0
  109. elasticsearch/dsl/document.py +20 -0
  110. elasticsearch/dsl/document_base.py +444 -0
  111. elasticsearch/dsl/exceptions.py +32 -0
  112. elasticsearch/dsl/faceted_search.py +28 -0
  113. elasticsearch/dsl/faceted_search_base.py +489 -0
  114. elasticsearch/dsl/field.py +4254 -0
  115. elasticsearch/dsl/function.py +180 -0
  116. elasticsearch/dsl/index.py +23 -0
  117. elasticsearch/dsl/index_base.py +178 -0
  118. elasticsearch/dsl/mapping.py +19 -0
  119. elasticsearch/dsl/mapping_base.py +219 -0
  120. elasticsearch/dsl/query.py +2816 -0
  121. elasticsearch/dsl/response/__init__.py +388 -0
  122. elasticsearch/dsl/response/aggs.py +100 -0
  123. elasticsearch/dsl/response/hit.py +53 -0
  124. elasticsearch/dsl/search.py +20 -0
  125. elasticsearch/dsl/search_base.py +1040 -0
  126. elasticsearch/dsl/serializer.py +34 -0
  127. elasticsearch/dsl/types.py +6471 -0
  128. elasticsearch/dsl/update_by_query.py +19 -0
  129. elasticsearch/dsl/update_by_query_base.py +149 -0
  130. elasticsearch/dsl/utils.py +687 -0
  131. elasticsearch/dsl/wrappers.py +119 -0
  132. elasticsearch/helpers/actions.py +1 -1
  133. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  134. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/METADATA +12 -2
  135. elasticsearch-8.18.0.dist-info/RECORD +161 -0
  136. elasticsearch-8.17.1.dist-info/RECORD +0 -119
  137. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/WHEEL +0 -0
  138. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/licenses/LICENSE +0 -0
  139. {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/licenses/NOTICE +0 -0
@@ -44,23 +44,21 @@ class SecurityClient(NamespacedClient):
44
44
  body: t.Optional[t.Dict[str, t.Any]] = None,
45
45
  ) -> ObjectApiResponse[t.Any]:
46
46
  """
47
- Activate a user profile. Create or update a user profile on behalf of another
48
- user. NOTE: The user profile feature is designed only for use by Kibana and Elastic's
49
- Observability, Enterprise Search, and Elastic Security solutions. Individual
50
- users and external applications should not call this API directly. The calling
51
- application must have either an `access_token` or a combination of `username`
52
- and `password` for the user that the profile document is intended for. Elastic
53
- reserves the right to change or remove this feature in future releases without
54
- prior notice. This API creates or updates a profile document for end users with
55
- information that is extracted from the user's authentication object including
56
- `username`, `full_name,` `roles`, and the authentication realm. For example,
57
- in the JWT `access_token` case, the profile user's `username` is extracted from
58
- the JWT token claim pointed to by the `claims.principal` setting of the JWT realm
59
- that authenticated the token. When updating a profile document, the API enables
60
- the document if it was disabled. Any updates do not change existing content for
61
- either the `labels` or `data` fields.
62
-
63
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-activate-user-profile.html>`_
47
+ .. raw:: html
48
+
49
+ <p>Activate a user profile.</p>
50
+ <p>Create or update a user profile on behalf of another user.</p>
51
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
52
+ Individual users and external applications should not call this API directly.
53
+ The calling application must have either an <code>access_token</code> or a combination of <code>username</code> and <code>password</code> for the user that the profile document is intended for.
54
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
55
+ <p>This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including <code>username</code>, <code>full_name,</code> <code>roles</code>, and the authentication realm.
56
+ For example, in the JWT <code>access_token</code> case, the profile user's <code>username</code> is extracted from the JWT token claim pointed to by the <code>claims.principal</code> setting of the JWT realm that authenticated the token.</p>
57
+ <p>When updating a profile document, the API enables the document if it was disabled.
58
+ Any updates do not change existing content for either the <code>labels</code> or <code>data</code> fields.</p>
59
+
60
+
61
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-activate-user-profile.html>`_
64
62
 
65
63
  :param grant_type: The type of grant.
66
64
  :param access_token: The user's Elasticsearch access token or JWT. Both `access`
@@ -117,14 +115,16 @@ class SecurityClient(NamespacedClient):
117
115
  pretty: t.Optional[bool] = None,
118
116
  ) -> ObjectApiResponse[t.Any]:
119
117
  """
120
- Authenticate a user. Authenticates a user and returns information about the authenticated
121
- user. Include the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication).
122
- A successful call returns a JSON structure that shows user information such as
123
- their username, the roles that are assigned to the user, any assigned metadata,
124
- and information about the realms that authenticated and authorized the user.
125
- If the user cannot be authenticated, this API returns a 401 status code.
118
+ .. raw:: html
126
119
 
127
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-authenticate.html>`_
120
+ <p>Authenticate a user.</p>
121
+ <p>Authenticates a user and returns information about the authenticated user.
122
+ Include the user information in a <a href="https://en.wikipedia.org/wiki/Basic_access_authentication">basic auth header</a>.
123
+ A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.
124
+ If the user cannot be authenticated, this API returns a 401 status code.</p>
125
+
126
+
127
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-authenticate.html>`_
128
128
  """
129
129
  __path_parts: t.Dict[str, str] = {}
130
130
  __path = "/_security/_authenticate"
@@ -164,11 +164,14 @@ class SecurityClient(NamespacedClient):
164
164
  body: t.Optional[t.Dict[str, t.Any]] = None,
165
165
  ) -> ObjectApiResponse[t.Any]:
166
166
  """
167
- Bulk delete roles. The role management APIs are generally the preferred way to
168
- manage roles, rather than using file-based role management. The bulk delete roles
169
- API cannot delete roles that are defined in roles files.
167
+ .. raw:: html
168
+
169
+ <p>Bulk delete roles.</p>
170
+ <p>The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
171
+ The bulk delete roles API cannot delete roles that are defined in roles files.</p>
170
172
 
171
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-delete-role.html>`_
173
+
174
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-delete-role.html>`_
172
175
 
173
176
  :param names: An array of role names to delete
174
177
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -222,11 +225,14 @@ class SecurityClient(NamespacedClient):
222
225
  body: t.Optional[t.Dict[str, t.Any]] = None,
223
226
  ) -> ObjectApiResponse[t.Any]:
224
227
  """
225
- Bulk create or update roles. The role management APIs are generally the preferred
226
- way to manage roles, rather than using file-based role management. The bulk create
227
- or update roles API cannot update roles that are defined in roles files.
228
+ .. raw:: html
229
+
230
+ <p>Bulk create or update roles.</p>
231
+ <p>The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
232
+ The bulk create or update roles API cannot update roles that are defined in roles files.</p>
233
+
228
234
 
229
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-put-role.html>`_
235
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-put-role.html>`_
230
236
 
231
237
  :param roles: A dictionary of role name to RoleDescriptor objects to add or update
232
238
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -280,25 +286,21 @@ class SecurityClient(NamespacedClient):
280
286
  body: t.Optional[t.Dict[str, t.Any]] = None,
281
287
  ) -> ObjectApiResponse[t.Any]:
282
288
  """
283
- Bulk update API keys. Update the attributes for multiple API keys. IMPORTANT:
284
- It is not possible to use an API key as the authentication credential for this
285
- API. To update API keys, the owner user's credentials are required. This API
286
- is similar to the update API key API but enables you to apply the same update
287
- to multiple API keys in one API call. This operation can greatly improve performance
288
- over making individual updates. It is not possible to update expired or invalidated
289
- API keys. This API supports updates to API key access scope, metadata and expiration.
290
- The access scope of each API key is derived from the `role_descriptors` you specify
291
- in the request and a snapshot of the owner user's permissions at the time of
292
- the request. The snapshot of the owner's permissions is updated automatically
293
- on every call. IMPORTANT: If you don't specify `role_descriptors` in the request,
294
- a call to this API might still change an API key's access scope. This change
295
- can occur if the owner user's permissions have changed since the API key was
296
- created or last modified. A successful request returns a JSON structure that
297
- contains the IDs of all updated API keys, the IDs of API keys that already had
298
- the requested changes and did not require an update, and error details for any
299
- failed update.
300
-
301
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-update-api-keys.html>`_
289
+ .. raw:: html
290
+
291
+ <p>Bulk update API keys.
292
+ Update the attributes for multiple API keys.</p>
293
+ <p>IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required.</p>
294
+ <p>This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates.</p>
295
+ <p>It is not possible to update expired or invalidated API keys.</p>
296
+ <p>This API supports updates to API key access scope, metadata and expiration.
297
+ The access scope of each API key is derived from the <code>role_descriptors</code> you specify in the request and a snapshot of the owner user's permissions at the time of the request.
298
+ The snapshot of the owner's permissions is updated automatically on every call.</p>
299
+ <p>IMPORTANT: If you don't specify <code>role_descriptors</code> in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified.</p>
300
+ <p>A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update.</p>
301
+
302
+
303
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-bulk-update-api-keys.html>`_
302
304
 
303
305
  :param ids: The API key identifiers.
304
306
  :param expiration: Expiration time for the API keys. By default, API keys never
@@ -370,10 +372,13 @@ class SecurityClient(NamespacedClient):
370
372
  body: t.Optional[t.Dict[str, t.Any]] = None,
371
373
  ) -> ObjectApiResponse[t.Any]:
372
374
  """
373
- Change passwords. Change the passwords of users in the native realm and built-in
374
- users.
375
+ .. raw:: html
376
+
377
+ <p>Change passwords.</p>
378
+ <p>Change the passwords of users in the native realm and built-in users.</p>
379
+
375
380
 
376
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-change-password.html>`_
381
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-change-password.html>`_
377
382
 
378
383
  :param username: The user whose password you want to change. If you do not specify
379
384
  this parameter, the password is changed for the current user.
@@ -433,10 +438,14 @@ class SecurityClient(NamespacedClient):
433
438
  pretty: t.Optional[bool] = None,
434
439
  ) -> ObjectApiResponse[t.Any]:
435
440
  """
436
- Clear the API key cache. Evict a subset of all entries from the API key cache.
437
- The cache is also automatically cleared on state changes of the security index.
441
+ .. raw:: html
438
442
 
439
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-api-key-cache.html>`_
443
+ <p>Clear the API key cache.</p>
444
+ <p>Evict a subset of all entries from the API key cache.
445
+ The cache is also automatically cleared on state changes of the security index.</p>
446
+
447
+
448
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-api-key-cache.html>`_
440
449
 
441
450
  :param ids: Comma-separated list of API key IDs to evict from the API key cache.
442
451
  To evict all API keys, use `*`. Does not support other wildcard patterns.
@@ -475,13 +484,17 @@ class SecurityClient(NamespacedClient):
475
484
  pretty: t.Optional[bool] = None,
476
485
  ) -> ObjectApiResponse[t.Any]:
477
486
  """
478
- Clear the privileges cache. Evict privileges from the native application privilege
479
- cache. The cache is also automatically cleared for applications that have their
480
- privileges updated.
487
+ .. raw:: html
488
+
489
+ <p>Clear the privileges cache.</p>
490
+ <p>Evict privileges from the native application privilege cache.
491
+ The cache is also automatically cleared for applications that have their privileges updated.</p>
481
492
 
482
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-privilege-cache.html>`_
483
493
 
484
- :param application: A comma-separated list of application names
494
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-privilege-cache.html>`_
495
+
496
+ :param application: A comma-separated list of applications. To clear all applications,
497
+ use an asterism (`*`). It does not support other wildcard patterns.
485
498
  """
486
499
  if application in SKIP_IN_PATH:
487
500
  raise ValueError("Empty value passed for parameter 'application'")
@@ -518,13 +531,23 @@ class SecurityClient(NamespacedClient):
518
531
  usernames: t.Optional[t.Sequence[str]] = None,
519
532
  ) -> ObjectApiResponse[t.Any]:
520
533
  """
521
- Clear the user cache. Evict users from the user cache. You can completely clear
522
- the cache or evict specific users.
534
+ .. raw:: html
535
+
536
+ <p>Clear the user cache.</p>
537
+ <p>Evict users from the user cache.
538
+ You can completely clear the cache or evict specific users.</p>
539
+ <p>User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request.
540
+ There are realm settings that you can use to configure the user cache.
541
+ For more information, refer to the documentation about controlling the user cache.</p>
542
+
523
543
 
524
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-cache.html>`_
544
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-cache.html>`_
525
545
 
526
- :param realms: Comma-separated list of realms to clear
527
- :param usernames: Comma-separated list of usernames to clear from the cache
546
+ :param realms: A comma-separated list of realms. To clear all realms, use an
547
+ asterisk (`*`). It does not support other wildcard patterns.
548
+ :param usernames: A comma-separated list of the users to clear from the cache.
549
+ If you do not specify this parameter, the API evicts all users from the user
550
+ cache.
528
551
  """
529
552
  if realms in SKIP_IN_PATH:
530
553
  raise ValueError("Empty value passed for parameter 'realms'")
@@ -562,11 +585,17 @@ class SecurityClient(NamespacedClient):
562
585
  pretty: t.Optional[bool] = None,
563
586
  ) -> ObjectApiResponse[t.Any]:
564
587
  """
565
- Clear the roles cache. Evict roles from the native role cache.
588
+ .. raw:: html
589
+
590
+ <p>Clear the roles cache.</p>
591
+ <p>Evict roles from the native role cache.</p>
592
+
566
593
 
567
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-role-cache.html>`_
594
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-role-cache.html>`_
568
595
 
569
- :param name: Role name
596
+ :param name: A comma-separated list of roles to evict from the role cache. To
597
+ evict all roles, use an asterisk (`*`). It does not support other wildcard
598
+ patterns.
570
599
  """
571
600
  if name in SKIP_IN_PATH:
572
601
  raise ValueError("Empty value passed for parameter 'name'")
@@ -604,14 +633,23 @@ class SecurityClient(NamespacedClient):
604
633
  pretty: t.Optional[bool] = None,
605
634
  ) -> ObjectApiResponse[t.Any]:
606
635
  """
607
- Clear service account token caches. Evict a subset of all entries from the service
608
- account token caches.
636
+ .. raw:: html
609
637
 
610
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-service-token-caches.html>`_
638
+ <p>Clear service account token caches.</p>
639
+ <p>Evict a subset of all entries from the service account token caches.
640
+ Two separate caches exist for service account tokens: one cache for tokens backed by the <code>service_tokens</code> file, and another for tokens backed by the <code>.security</code> index.
641
+ This API clears matching entries from both caches.</p>
642
+ <p>The cache for service account tokens backed by the <code>.security</code> index is cleared automatically on state changes of the security index.
643
+ The cache for tokens backed by the <code>service_tokens</code> file is cleared automatically on file changes.</p>
611
644
 
612
- :param namespace: An identifier for the namespace
613
- :param service: An identifier for the service name
614
- :param name: A comma-separated list of service token names
645
+
646
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-clear-service-token-caches.html>`_
647
+
648
+ :param namespace: The namespace, which is a top-level grouping of service accounts.
649
+ :param service: The name of the service, which must be unique within its namespace.
650
+ :param name: A comma-separated list of token names to evict from the service
651
+ account token caches. Use a wildcard (`*`) to evict all tokens that belong
652
+ to a service account. It does not support other wildcard patterns.
615
653
  """
616
654
  if namespace in SKIP_IN_PATH:
617
655
  raise ValueError("Empty value passed for parameter 'namespace'")
@@ -664,31 +702,43 @@ class SecurityClient(NamespacedClient):
664
702
  body: t.Optional[t.Dict[str, t.Any]] = None,
665
703
  ) -> ObjectApiResponse[t.Any]:
666
704
  """
667
- Create an API key. Create an API key for access without requiring basic authentication.
668
- A successful request returns a JSON structure that contains the API key, its
669
- unique id, and its name. If applicable, it also returns expiration information
670
- for the API key in milliseconds. NOTE: By default, API keys never expire. You
671
- can specify expiration information when you create the API keys.
705
+ .. raw:: html
672
706
 
673
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-api-key.html>`_
707
+ <p>Create an API key.</p>
708
+ <p>Create an API key for access without requiring basic authentication.</p>
709
+ <p>IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges.
710
+ If you specify privileges, the API returns an error.</p>
711
+ <p>A successful request returns a JSON structure that contains the API key, its unique id, and its name.
712
+ If applicable, it also returns expiration information for the API key in milliseconds.</p>
713
+ <p>NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.</p>
714
+ <p>The API keys are created by the Elasticsearch API key service, which is automatically enabled.
715
+ To configure or turn off the API key service, refer to API key service setting documentation.</p>
674
716
 
675
- :param expiration: Expiration time for the API key. By default, API keys never
676
- expire.
717
+
718
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-api-key.html>`_
719
+
720
+ :param expiration: The expiration time for the API key. By default, API keys
721
+ never expire.
677
722
  :param metadata: Arbitrary metadata that you want to associate with the API key.
678
723
  It supports nested data structure. Within the metadata object, keys beginning
679
724
  with `_` are reserved for system usage.
680
- :param name: Specifies the name for this API key.
725
+ :param name: A name for the API key.
681
726
  :param refresh: If `true` (the default) then refresh the affected shards to make
682
727
  this operation visible to search, if `wait_for` then wait for a refresh to
683
728
  make this operation visible to search, if `false` then do nothing with refreshes.
684
- :param role_descriptors: An array of role descriptors for this API key. This
685
- parameter is optional. When it is not specified or is an empty array, then
686
- the API key will have a point in time snapshot of permissions of the authenticated
687
- user. If you supply role descriptors then the resultant permissions would
688
- be an intersection of API keys permissions and authenticated users permissions
689
- thereby limiting the access scope for API keys. The structure of role descriptor
690
- is the same as the request for create role API. For more details, see create
691
- or update roles API.
729
+ :param role_descriptors: An array of role descriptors for this API key. When
730
+ it is not specified or it is an empty array, the API key will have a point
731
+ in time snapshot of permissions of the authenticated user. If you supply
732
+ role descriptors, the resultant permissions are an intersection of API keys
733
+ permissions and the authenticated user's permissions thereby limiting the
734
+ access scope for API keys. The structure of role descriptor is the same as
735
+ the request for the create role API. For more details, refer to the create
736
+ or update roles API. NOTE: Due to the way in which this permission intersection
737
+ is calculated, it is not possible to create an API key that is a child of
738
+ another API key, unless the derived key is created without any privileges.
739
+ In this case, you must explicitly specify a role descriptor with no privileges.
740
+ The derived API key can be used for authentication; it will not have authority
741
+ to call Elasticsearch APIs.
692
742
  """
693
743
  __path_parts: t.Dict[str, str] = {}
694
744
  __path = "/_security/api_key"
@@ -741,23 +791,21 @@ class SecurityClient(NamespacedClient):
741
791
  body: t.Optional[t.Dict[str, t.Any]] = None,
742
792
  ) -> ObjectApiResponse[t.Any]:
743
793
  """
744
- Create a cross-cluster API key. Create an API key of the `cross_cluster` type
745
- for the API key based remote cluster access. A `cross_cluster` API key cannot
746
- be used to authenticate through the REST interface. IMPORTANT: To authenticate
747
- this request you must use a credential that is not an API key. Even if you use
748
- an API key that has the required privilege, the API returns an error. Cross-cluster
749
- API keys are created by the Elasticsearch API key service, which is automatically
750
- enabled. NOTE: Unlike REST API keys, a cross-cluster API key does not capture
751
- permissions of the authenticated user. The API key’s effective permission is
752
- exactly as specified with the `access` property. A successful request returns
753
- a JSON structure that contains the API key, its unique ID, and its name. If applicable,
754
- it also returns expiration information for the API key in milliseconds. By default,
755
- API keys never expire. You can specify expiration information when you create
756
- the API keys. Cross-cluster API keys can only be updated with the update cross-cluster
757
- API key API. Attempting to update them with the update REST API key API or the
758
- bulk update REST API keys API will result in an error.
759
-
760
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-cross-cluster-api-key.html>`_
794
+ .. raw:: html
795
+
796
+ <p>Create a cross-cluster API key.</p>
797
+ <p>Create an API key of the <code>cross_cluster</code> type for the API key based remote cluster access.
798
+ A <code>cross_cluster</code> API key cannot be used to authenticate through the REST interface.</p>
799
+ <p>IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.</p>
800
+ <p>Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.</p>
801
+ <p>NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the <code>access</code> property.</p>
802
+ <p>A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds.</p>
803
+ <p>By default, API keys never expire. You can specify expiration information when you create the API keys.</p>
804
+ <p>Cross-cluster API keys can only be updated with the update cross-cluster API key API.
805
+ Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.</p>
806
+
807
+
808
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-cross-cluster-api-key.html>`_
761
809
 
762
810
  :param access: The access to be granted to this API key. The access is composed
763
811
  of permissions for cross-cluster search and cross-cluster replication. At
@@ -824,14 +872,26 @@ class SecurityClient(NamespacedClient):
824
872
  ] = None,
825
873
  ) -> ObjectApiResponse[t.Any]:
826
874
  """
827
- Create a service account token. Create a service accounts token for access without
828
- requiring basic authentication.
875
+ .. raw:: html
829
876
 
830
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-service-token.html>`_
877
+ <p>Create a service account token.</p>
878
+ <p>Create a service accounts token for access without requiring basic authentication.</p>
879
+ <p>NOTE: Service account tokens never expire.
880
+ You must actively delete them if they are no longer needed.</p>
831
881
 
832
- :param namespace: An identifier for the namespace
833
- :param service: An identifier for the service name
834
- :param name: An identifier for the token name
882
+
883
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-create-service-token.html>`_
884
+
885
+ :param namespace: The name of the namespace, which is a top-level grouping of
886
+ service accounts.
887
+ :param service: The name of the service.
888
+ :param name: The name for the service account token. If omitted, a random name
889
+ will be generated. Token names must be at least one and no more than 256
890
+ characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), dashes
891
+ (`-`), and underscores (`_`), but cannot begin with an underscore. NOTE:
892
+ Token names must be unique in the context of the associated service account.
893
+ They must also be globally unique with their fully qualified names, which
894
+ are comprised of the service account principal and token name, such as `<namespace>/<service>/<token-name>`.
835
895
  :param refresh: If `true` then refresh the affected shards to make this operation
836
896
  visible to search, if `wait_for` (the default) then wait for a refresh to
837
897
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -894,22 +954,19 @@ class SecurityClient(NamespacedClient):
894
954
  body: t.Optional[t.Dict[str, t.Any]] = None,
895
955
  ) -> ObjectApiResponse[t.Any]:
896
956
  """
897
- Delegate PKI authentication. This API implements the exchange of an X509Certificate
898
- chain for an Elasticsearch access token. The certificate chain is validated,
899
- according to RFC 5280, by sequentially considering the trust configuration of
900
- every installed PKI realm that has `delegation.enabled` set to `true`. A successfully
901
- trusted client certificate is also subject to the validation of the subject distinguished
902
- name according to thw `username_pattern` of the respective realm. This API is
903
- called by smart and trusted proxies, such as Kibana, which terminate the user's
904
- TLS session but still want to authenticate the user by using a PKI realm—-​as
905
- if the user connected directly to Elasticsearch. IMPORTANT: The association between
906
- the subject public key in the target certificate and the corresponding private
907
- key is not validated. This is part of the TLS authentication process and it is
908
- delegated to the proxy that calls this API. The proxy is trusted to have performed
909
- the TLS authentication and this API translates that authentication into an Elasticsearch
910
- access token.
911
-
912
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delegate-pki-authentication.html>`_
957
+ .. raw:: html
958
+
959
+ <p>Delegate PKI authentication.</p>
960
+ <p>This API implements the exchange of an X509Certificate chain for an Elasticsearch access token.
961
+ The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has <code>delegation.enabled</code> set to <code>true</code>.
962
+ A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw <code>username_pattern</code> of the respective realm.</p>
963
+ <p>This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-​as if the user connected directly to Elasticsearch.</p>
964
+ <p>IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated.
965
+ This is part of the TLS authentication process and it is delegated to the proxy that calls this API.
966
+ The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token.</p>
967
+
968
+
969
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delegate-pki-authentication.html>`_
913
970
 
914
971
  :param x509_certificate_chain: The X509Certificate chain, which is represented
915
972
  as an ordered string array. Each string in the array is a base64-encoded
@@ -963,12 +1020,21 @@ class SecurityClient(NamespacedClient):
963
1020
  ] = None,
964
1021
  ) -> ObjectApiResponse[t.Any]:
965
1022
  """
966
- Delete application privileges.
1023
+ .. raw:: html
1024
+
1025
+ <p>Delete application privileges.</p>
1026
+ <p>To use this API, you must have one of the following privileges:</p>
1027
+ <ul>
1028
+ <li>The <code>manage_security</code> cluster privilege (or a greater privilege such as <code>all</code>).</li>
1029
+ <li>The &quot;Manage Application Privileges&quot; global privilege for the application being referenced in the request.</li>
1030
+ </ul>
967
1031
 
968
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-privilege.html>`_
969
1032
 
970
- :param application: Application name
971
- :param name: Privilege name
1033
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-privilege.html>`_
1034
+
1035
+ :param application: The name of the application. Application privileges are always
1036
+ associated with exactly one application.
1037
+ :param name: The name of the privilege.
972
1038
  :param refresh: If `true` (the default) then refresh the affected shards to make
973
1039
  this operation visible to search, if `wait_for` then wait for a refresh to
974
1040
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1019,11 +1085,17 @@ class SecurityClient(NamespacedClient):
1019
1085
  ] = None,
1020
1086
  ) -> ObjectApiResponse[t.Any]:
1021
1087
  """
1022
- Delete roles. Delete roles in the native realm.
1088
+ .. raw:: html
1089
+
1090
+ <p>Delete roles.</p>
1091
+ <p>Delete roles in the native realm.
1092
+ The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
1093
+ The delete roles API cannot remove roles that are defined in roles files.</p>
1023
1094
 
1024
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role.html>`_
1025
1095
 
1026
- :param name: Role name
1096
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-role.html>`_
1097
+
1098
+ :param name: The name of the role.
1027
1099
  :param refresh: If `true` (the default) then refresh the affected shards to make
1028
1100
  this operation visible to search, if `wait_for` then wait for a refresh to
1029
1101
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1067,11 +1139,19 @@ class SecurityClient(NamespacedClient):
1067
1139
  ] = None,
1068
1140
  ) -> ObjectApiResponse[t.Any]:
1069
1141
  """
1070
- Delete role mappings.
1142
+ .. raw:: html
1071
1143
 
1072
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role-mapping.html>`_
1144
+ <p>Delete role mappings.</p>
1145
+ <p>Role mappings define which roles are assigned to each user.
1146
+ The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.
1147
+ The delete role mappings API cannot remove role mappings that are defined in role mapping files.</p>
1073
1148
 
1074
- :param name: Role-mapping name
1149
+
1150
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-role-mapping.html>`_
1151
+
1152
+ :param name: The distinct name that identifies the role mapping. The name is
1153
+ used solely as an identifier to facilitate interaction via the API; it does
1154
+ not affect the behavior of the mapping in any way.
1075
1155
  :param refresh: If `true` (the default) then refresh the affected shards to make
1076
1156
  this operation visible to search, if `wait_for` then wait for a refresh to
1077
1157
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1117,14 +1197,17 @@ class SecurityClient(NamespacedClient):
1117
1197
  ] = None,
1118
1198
  ) -> ObjectApiResponse[t.Any]:
1119
1199
  """
1120
- Delete service account tokens. Delete service account tokens for a service in
1121
- a specified namespace.
1200
+ .. raw:: html
1201
+
1202
+ <p>Delete service account tokens.</p>
1203
+ <p>Delete service account tokens for a service in a specified namespace.</p>
1204
+
1122
1205
 
1123
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-service-token.html>`_
1206
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-service-token.html>`_
1124
1207
 
1125
- :param namespace: An identifier for the namespace
1126
- :param service: An identifier for the service name
1127
- :param name: An identifier for the token name
1208
+ :param namespace: The namespace, which is a top-level grouping of service accounts.
1209
+ :param service: The service name.
1210
+ :param name: The name of the service account token.
1128
1211
  :param refresh: If `true` then refresh the affected shards to make this operation
1129
1212
  visible to search, if `wait_for` (the default) then wait for a refresh to
1130
1213
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1176,11 +1259,15 @@ class SecurityClient(NamespacedClient):
1176
1259
  ] = None,
1177
1260
  ) -> ObjectApiResponse[t.Any]:
1178
1261
  """
1179
- Delete users. Delete users from the native realm.
1262
+ .. raw:: html
1180
1263
 
1181
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-user.html>`_
1264
+ <p>Delete users.</p>
1265
+ <p>Delete users from the native realm.</p>
1182
1266
 
1183
- :param username: username
1267
+
1268
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-delete-user.html>`_
1269
+
1270
+ :param username: An identifier for the user.
1184
1271
  :param refresh: If `true` (the default) then refresh the affected shards to make
1185
1272
  this operation visible to search, if `wait_for` then wait for a refresh to
1186
1273
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1224,11 +1311,17 @@ class SecurityClient(NamespacedClient):
1224
1311
  ] = None,
1225
1312
  ) -> ObjectApiResponse[t.Any]:
1226
1313
  """
1227
- Disable users. Disable users in the native realm.
1314
+ .. raw:: html
1315
+
1316
+ <p>Disable users.</p>
1317
+ <p>Disable users in the native realm.
1318
+ By default, when you create users, they are enabled.
1319
+ You can use this API to revoke a user's access to Elasticsearch.</p>
1228
1320
 
1229
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user.html>`_
1230
1321
 
1231
- :param username: The username of the user to disable
1322
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-disable-user.html>`_
1323
+
1324
+ :param username: An identifier for the user.
1232
1325
  :param refresh: If `true` (the default) then refresh the affected shards to make
1233
1326
  this operation visible to search, if `wait_for` then wait for a refresh to
1234
1327
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1272,17 +1365,18 @@ class SecurityClient(NamespacedClient):
1272
1365
  ] = None,
1273
1366
  ) -> ObjectApiResponse[t.Any]:
1274
1367
  """
1275
- Disable a user profile. Disable user profiles so that they are not visible in
1276
- user profile searches. NOTE: The user profile feature is designed only for use
1277
- by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security
1278
- solutions. Individual users and external applications should not call this API
1279
- directly. Elastic reserves the right to change or remove this feature in future
1280
- releases without prior notice. When you activate a user profile, its automatically
1281
- enabled and visible in user profile searches. You can use the disable user profile
1282
- API to disable a user profile so it’s not visible in these searches. To re-enable
1283
- a disabled user profile, use the enable user profile API .
1368
+ .. raw:: html
1369
+
1370
+ <p>Disable a user profile.</p>
1371
+ <p>Disable user profiles so that they are not visible in user profile searches.</p>
1372
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
1373
+ Individual users and external applications should not call this API directly.
1374
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
1375
+ <p>When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.
1376
+ To re-enable a disabled user profile, use the enable user profile API .</p>
1284
1377
 
1285
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user-profile.html>`_
1378
+
1379
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-disable-user-profile.html>`_
1286
1380
 
1287
1381
  :param uid: Unique identifier for the user profile.
1288
1382
  :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
@@ -1328,11 +1422,16 @@ class SecurityClient(NamespacedClient):
1328
1422
  ] = None,
1329
1423
  ) -> ObjectApiResponse[t.Any]:
1330
1424
  """
1331
- Enable users. Enable users in the native realm.
1425
+ .. raw:: html
1426
+
1427
+ <p>Enable users.</p>
1428
+ <p>Enable users in the native realm.
1429
+ By default, when you create users, they are enabled.</p>
1430
+
1332
1431
 
1333
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user.html>`_
1432
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-enable-user.html>`_
1334
1433
 
1335
- :param username: The username of the user to enable
1434
+ :param username: An identifier for the user.
1336
1435
  :param refresh: If `true` (the default) then refresh the affected shards to make
1337
1436
  this operation visible to search, if `wait_for` then wait for a refresh to
1338
1437
  make this operation visible to search, if `false` then do nothing with refreshes.
@@ -1376,16 +1475,18 @@ class SecurityClient(NamespacedClient):
1376
1475
  ] = None,
1377
1476
  ) -> ObjectApiResponse[t.Any]:
1378
1477
  """
1379
- Enable a user profile. Enable user profiles to make them visible in user profile
1380
- searches. NOTE: The user profile feature is designed only for use by Kibana and
1381
- Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual
1382
- users and external applications should not call this API directly. Elastic reserves
1383
- the right to change or remove this feature in future releases without prior notice.
1384
- When you activate a user profile, it's automatically enabled and visible in user
1385
- profile searches. If you later disable the user profile, you can use the enable
1386
- user profile API to make the profile visible in these searches again.
1478
+ .. raw:: html
1387
1479
 
1388
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user-profile.html>`_
1480
+ <p>Enable a user profile.</p>
1481
+ <p>Enable user profiles to make them visible in user profile searches.</p>
1482
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
1483
+ Individual users and external applications should not call this API directly.
1484
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
1485
+ <p>When you activate a user profile, it's automatically enabled and visible in user profile searches.
1486
+ If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.</p>
1487
+
1488
+
1489
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-enable-user-profile.html>`_
1389
1490
 
1390
1491
  :param uid: A unique identifier for the user profile.
1391
1492
  :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
@@ -1427,10 +1528,15 @@ class SecurityClient(NamespacedClient):
1427
1528
  pretty: t.Optional[bool] = None,
1428
1529
  ) -> ObjectApiResponse[t.Any]:
1429
1530
  """
1430
- Enroll Kibana. Enable a Kibana instance to configure itself for communication
1431
- with a secured Elasticsearch cluster.
1531
+ .. raw:: html
1532
+
1533
+ <p>Enroll Kibana.</p>
1534
+ <p>Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.</p>
1535
+ <p>NOTE: This API is currently intended for internal use only by Kibana.
1536
+ Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled.</p>
1432
1537
 
1433
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-kibana-enrollment.html>`_
1538
+
1539
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-kibana-enrollment.html>`_
1434
1540
  """
1435
1541
  __path_parts: t.Dict[str, str] = {}
1436
1542
  __path = "/_security/enroll/kibana"
@@ -1463,10 +1569,15 @@ class SecurityClient(NamespacedClient):
1463
1569
  pretty: t.Optional[bool] = None,
1464
1570
  ) -> ObjectApiResponse[t.Any]:
1465
1571
  """
1466
- Enroll a node. Enroll a new node to allow it to join an existing cluster with
1467
- security features enabled.
1572
+ .. raw:: html
1573
+
1574
+ <p>Enroll a node.</p>
1575
+ <p>Enroll a new node to allow it to join an existing cluster with security features enabled.</p>
1576
+ <p>The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster.
1577
+ The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster.</p>
1578
+
1468
1579
 
1469
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-node-enrollment.html>`_
1580
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-node-enrollment.html>`_
1470
1581
  """
1471
1582
  __path_parts: t.Dict[str, str] = {}
1472
1583
  __path = "/_security/enroll/node"
@@ -1507,13 +1618,15 @@ class SecurityClient(NamespacedClient):
1507
1618
  with_profile_uid: t.Optional[bool] = None,
1508
1619
  ) -> ObjectApiResponse[t.Any]:
1509
1620
  """
1510
- Get API key information. Retrieves information for one or more API keys. NOTE:
1511
- If you have only the `manage_own_api_key` privilege, this API returns only the
1512
- API keys that you own. If you have `read_security`, `manage_api_key` or greater
1513
- privileges (including `manage_security`), this API returns all API keys regardless
1514
- of ownership.
1621
+ .. raw:: html
1622
+
1623
+ <p>Get API key information.</p>
1624
+ <p>Retrieves information for one or more API keys.
1625
+ NOTE: If you have only the <code>manage_own_api_key</code> privilege, this API returns only the API keys that you own.
1626
+ If you have <code>read_security</code>, <code>manage_api_key</code> or greater privileges (including <code>manage_security</code>), this API returns all API keys regardless of ownership.</p>
1627
+
1515
1628
 
1516
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-api-key.html>`_
1629
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-api-key.html>`_
1517
1630
 
1518
1631
  :param active_only: A boolean flag that can be used to query API keys that are
1519
1632
  currently active. An API key is considered active if it is neither invalidated,
@@ -1585,10 +1698,13 @@ class SecurityClient(NamespacedClient):
1585
1698
  pretty: t.Optional[bool] = None,
1586
1699
  ) -> ObjectApiResponse[t.Any]:
1587
1700
  """
1588
- Get builtin privileges. Get the list of cluster privileges and index privileges
1589
- that are available in this version of Elasticsearch.
1701
+ .. raw:: html
1590
1702
 
1591
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-builtin-privileges.html>`_
1703
+ <p>Get builtin privileges.</p>
1704
+ <p>Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.</p>
1705
+
1706
+
1707
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-builtin-privileges.html>`_
1592
1708
  """
1593
1709
  __path_parts: t.Dict[str, str] = {}
1594
1710
  __path = "/_security/privilege/_builtin"
@@ -1623,12 +1739,23 @@ class SecurityClient(NamespacedClient):
1623
1739
  pretty: t.Optional[bool] = None,
1624
1740
  ) -> ObjectApiResponse[t.Any]:
1625
1741
  """
1626
- Get application privileges.
1742
+ .. raw:: html
1743
+
1744
+ <p>Get application privileges.</p>
1745
+ <p>To use this API, you must have one of the following privileges:</p>
1746
+ <ul>
1747
+ <li>The <code>read_security</code> cluster privilege (or a greater privilege such as <code>manage_security</code> or <code>all</code>).</li>
1748
+ <li>The &quot;Manage Application Privileges&quot; global privilege for the application being referenced in the request.</li>
1749
+ </ul>
1627
1750
 
1628
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-privileges.html>`_
1629
1751
 
1630
- :param application: Application name
1631
- :param name: Privilege name
1752
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-privileges.html>`_
1753
+
1754
+ :param application: The name of the application. Application privileges are always
1755
+ associated with exactly one application. If you do not specify this parameter,
1756
+ the API returns information about all privileges for all applications.
1757
+ :param name: The name of the privilege. If you do not specify this parameter,
1758
+ the API returns information about all privileges for the requested application.
1632
1759
  """
1633
1760
  __path_parts: t.Dict[str, str]
1634
1761
  if application not in SKIP_IN_PATH and name not in SKIP_IN_PATH:
@@ -1670,11 +1797,15 @@ class SecurityClient(NamespacedClient):
1670
1797
  pretty: t.Optional[bool] = None,
1671
1798
  ) -> ObjectApiResponse[t.Any]:
1672
1799
  """
1673
- Get roles. Get roles in the native realm. The role management APIs are generally
1674
- the preferred way to manage roles, rather than using file-based role management.
1675
- The get roles API cannot retrieve roles that are defined in roles files.
1800
+ .. raw:: html
1801
+
1802
+ <p>Get roles.</p>
1803
+ <p>Get roles in the native realm.
1804
+ The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
1805
+ The get roles API cannot retrieve roles that are defined in roles files.</p>
1676
1806
 
1677
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-role.html>`_
1807
+
1808
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-role.html>`_
1678
1809
 
1679
1810
  :param name: The name of the role. You can specify multiple roles as a comma-separated
1680
1811
  list. If you do not specify this parameter, the API returns information about
@@ -1717,12 +1848,15 @@ class SecurityClient(NamespacedClient):
1717
1848
  pretty: t.Optional[bool] = None,
1718
1849
  ) -> ObjectApiResponse[t.Any]:
1719
1850
  """
1720
- Get role mappings. Role mappings define which roles are assigned to each user.
1721
- The role mapping APIs are generally the preferred way to manage role mappings
1722
- rather than using role mapping files. The get role mappings API cannot retrieve
1723
- role mappings that are defined in role mapping files.
1851
+ .. raw:: html
1852
+
1853
+ <p>Get role mappings.</p>
1854
+ <p>Role mappings define which roles are assigned to each user.
1855
+ The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.
1856
+ The get role mappings API cannot retrieve role mappings that are defined in role mapping files.</p>
1724
1857
 
1725
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-role-mapping.html>`_
1858
+
1859
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-role-mapping.html>`_
1726
1860
 
1727
1861
  :param name: The distinct name that identifies the role mapping. The name is
1728
1862
  used solely as an identifier to facilitate interaction via the API; it does
@@ -1768,15 +1902,19 @@ class SecurityClient(NamespacedClient):
1768
1902
  pretty: t.Optional[bool] = None,
1769
1903
  ) -> ObjectApiResponse[t.Any]:
1770
1904
  """
1771
- Get service accounts. Get a list of service accounts that match the provided
1772
- path parameters.
1905
+ .. raw:: html
1906
+
1907
+ <p>Get service accounts.</p>
1908
+ <p>Get a list of service accounts that match the provided path parameters.</p>
1909
+ <p>NOTE: Currently, only the <code>elastic/fleet-server</code> service account is available.</p>
1910
+
1773
1911
 
1774
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-accounts.html>`_
1912
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-service-accounts.html>`_
1775
1913
 
1776
- :param namespace: Name of the namespace. Omit this parameter to retrieve information
1777
- about all service accounts. If you omit this parameter, you must also omit
1778
- the `service` parameter.
1779
- :param service: Name of the service name. Omit this parameter to retrieve information
1914
+ :param namespace: The name of the namespace. Omit this parameter to retrieve
1915
+ information about all service accounts. If you omit this parameter, you must
1916
+ also omit the `service` parameter.
1917
+ :param service: The service name. Omit this parameter to retrieve information
1780
1918
  about all service accounts that belong to the specified `namespace`.
1781
1919
  """
1782
1920
  __path_parts: t.Dict[str, str]
@@ -1820,12 +1958,19 @@ class SecurityClient(NamespacedClient):
1820
1958
  pretty: t.Optional[bool] = None,
1821
1959
  ) -> ObjectApiResponse[t.Any]:
1822
1960
  """
1823
- Get service account credentials.
1961
+ .. raw:: html
1962
+
1963
+ <p>Get service account credentials.</p>
1964
+ <p>To use this API, you must have at least the <code>read_security</code> cluster privilege (or a greater privilege such as <code>manage_service_account</code> or <code>manage_security</code>).</p>
1965
+ <p>The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster.</p>
1966
+ <p>NOTE: For tokens backed by the <code>service_tokens</code> file, the API collects them from all nodes of the cluster.
1967
+ Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens.</p>
1968
+
1824
1969
 
1825
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-credentials.html>`_
1970
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-service-credentials.html>`_
1826
1971
 
1827
- :param namespace: Name of the namespace.
1828
- :param service: Name of the service name.
1972
+ :param namespace: The name of the namespace.
1973
+ :param service: The service name.
1829
1974
  """
1830
1975
  if namespace in SKIP_IN_PATH:
1831
1976
  raise ValueError("Empty value passed for parameter 'namespace'")
@@ -1866,10 +2011,19 @@ class SecurityClient(NamespacedClient):
1866
2011
  pretty: t.Optional[bool] = None,
1867
2012
  ) -> ObjectApiResponse[t.Any]:
1868
2013
  """
1869
- Get security index settings. Get the user-configurable settings for the security
1870
- internal index (`.security` and associated indices).
2014
+ .. raw:: html
1871
2015
 
1872
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-settings.html>`_
2016
+ <p>Get security index settings.</p>
2017
+ <p>Get the user-configurable settings for the security internal index (<code>.security</code> and associated indices).
2018
+ Only a subset of the index settings — those that are user-configurable—will be shown.
2019
+ This includes:</p>
2020
+ <ul>
2021
+ <li><code>index.auto_expand_replicas</code></li>
2022
+ <li><code>index.number_of_replicas</code></li>
2023
+ </ul>
2024
+
2025
+
2026
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-settings.html>`_
1873
2027
 
1874
2028
  :param master_timeout: Period to wait for a connection to the master node. If
1875
2029
  no response is received before the timeout expires, the request fails and
@@ -1931,16 +2085,39 @@ class SecurityClient(NamespacedClient):
1931
2085
  body: t.Optional[t.Dict[str, t.Any]] = None,
1932
2086
  ) -> ObjectApiResponse[t.Any]:
1933
2087
  """
1934
- Get a token. Create a bearer token for access without requiring basic authentication.
2088
+ .. raw:: html
1935
2089
 
1936
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-token.html>`_
2090
+ <p>Get a token.</p>
2091
+ <p>Create a bearer token for access without requiring basic authentication.
2092
+ The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface.
2093
+ Alternatively, you can explicitly enable the <code>xpack.security.authc.token.enabled</code> setting.
2094
+ When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface.</p>
2095
+ <p>The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body.</p>
2096
+ <p>A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available.</p>
2097
+ <p>The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used.
2098
+ That time period is defined by the <code>xpack.security.authc.token.timeout</code> setting.
2099
+ If you want to invalidate a token immediately, you can do so by using the invalidate token API.</p>
1937
2100
 
1938
- :param grant_type:
1939
- :param kerberos_ticket:
1940
- :param password:
1941
- :param refresh_token:
1942
- :param scope:
1943
- :param username:
2101
+
2102
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-token.html>`_
2103
+
2104
+ :param grant_type: The type of grant. Supported grant types are: `password`,
2105
+ `_kerberos`, `client_credentials`, and `refresh_token`.
2106
+ :param kerberos_ticket: The base64 encoded kerberos ticket. If you specify the
2107
+ `_kerberos` grant type, this parameter is required. This parameter is not
2108
+ valid with any other supported grant type.
2109
+ :param password: The user's password. If you specify the `password` grant type,
2110
+ this parameter is required. This parameter is not valid with any other supported
2111
+ grant type.
2112
+ :param refresh_token: The string that was returned when you created the token,
2113
+ which enables you to extend its life. If you specify the `refresh_token`
2114
+ grant type, this parameter is required. This parameter is not valid with
2115
+ any other supported grant type.
2116
+ :param scope: The scope of the token. Currently tokens are only issued for a
2117
+ scope of FULL regardless of the value sent with the request.
2118
+ :param username: The username that identifies the user. If you specify the `password`
2119
+ grant type, this parameter is required. This parameter is not valid with
2120
+ any other supported grant type.
1944
2121
  """
1945
2122
  __path_parts: t.Dict[str, str] = {}
1946
2123
  __path = "/_security/oauth2/token"
@@ -1990,15 +2167,19 @@ class SecurityClient(NamespacedClient):
1990
2167
  with_profile_uid: t.Optional[bool] = None,
1991
2168
  ) -> ObjectApiResponse[t.Any]:
1992
2169
  """
1993
- Get users. Get information about users in the native realm and built-in users.
2170
+ .. raw:: html
2171
+
2172
+ <p>Get users.</p>
2173
+ <p>Get information about users in the native realm and built-in users.</p>
1994
2174
 
1995
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user.html>`_
2175
+
2176
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user.html>`_
1996
2177
 
1997
2178
  :param username: An identifier for the user. You can specify multiple usernames
1998
2179
  as a comma-separated list. If you omit this parameter, the API retrieves
1999
2180
  information about all users.
2000
- :param with_profile_uid: If true will return the User Profile ID for a user,
2001
- if any.
2181
+ :param with_profile_uid: Determines whether to retrieve the user profile UID,
2182
+ if it exists, for the users.
2002
2183
  """
2003
2184
  __path_parts: t.Dict[str, str]
2004
2185
  if username not in SKIP_IN_PATH:
@@ -2041,9 +2222,16 @@ class SecurityClient(NamespacedClient):
2041
2222
  username: t.Optional[t.Union[None, str]] = None,
2042
2223
  ) -> ObjectApiResponse[t.Any]:
2043
2224
  """
2044
- Get user privileges.
2225
+ .. raw:: html
2226
+
2227
+ <p>Get user privileges.</p>
2228
+ <p>Get the security privileges for the logged in user.
2229
+ All users can use this API, but only to determine their own privileges.
2230
+ To check the privileges of other users, you must use the run as feature.
2231
+ To check whether a user has a specific list of privileges, use the has privileges API.</p>
2232
+
2045
2233
 
2046
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-privileges.html>`_
2234
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user-privileges.html>`_
2047
2235
 
2048
2236
  :param application: The name of the application. Application privileges are always
2049
2237
  associated with exactly one application. If you do not specify this parameter,
@@ -2091,13 +2279,16 @@ class SecurityClient(NamespacedClient):
2091
2279
  pretty: t.Optional[bool] = None,
2092
2280
  ) -> ObjectApiResponse[t.Any]:
2093
2281
  """
2094
- Get a user profile. Get a user's profile using the unique profile ID. NOTE: The
2095
- user profile feature is designed only for use by Kibana and Elastic's Observability,
2096
- Enterprise Search, and Elastic Security solutions. Individual users and external
2097
- applications should not call this API directly. Elastic reserves the right to
2098
- change or remove this feature in future releases without prior notice.
2282
+ .. raw:: html
2099
2283
 
2100
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-profile.html>`_
2284
+ <p>Get a user profile.</p>
2285
+ <p>Get a user's profile using the unique profile ID.</p>
2286
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
2287
+ Individual users and external applications should not call this API directly.
2288
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
2289
+
2290
+
2291
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-get-user-profile.html>`_
2101
2292
 
2102
2293
  :param uid: A unique identifier for the user profile.
2103
2294
  :param data: A comma-separated list of filters for the `data` field of the profile
@@ -2159,31 +2350,37 @@ class SecurityClient(NamespacedClient):
2159
2350
  body: t.Optional[t.Dict[str, t.Any]] = None,
2160
2351
  ) -> ObjectApiResponse[t.Any]:
2161
2352
  """
2162
- Grant an API key. Create an API key on behalf of another user. This API is similar
2163
- to the create API keys API, however it creates the API key for a user that is
2164
- different than the user that runs the API. The caller must have authentication
2165
- credentials (either an access token, or a username and password) for the user
2166
- on whose behalf the API key will be created. It is not possible to use this API
2167
- to create an API key without that user’s credentials. The user, for whom the
2168
- authentication credentials is provided, can optionally "run as" (impersonate)
2169
- another user. In this case, the API key will be created on behalf of the impersonated
2170
- user. This API is intended be used by applications that need to create and manage
2171
- API keys for end users, but cannot guarantee that those users have permission
2172
- to create API keys on their own behalf. A successful grant API key API call returns
2173
- a JSON structure that contains the API key, its unique id, and its name. If applicable,
2174
- it also returns expiration information for the API key in milliseconds. By default,
2175
- API keys never expire. You can specify expiration information when you create
2176
- the API keys.
2177
-
2178
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-grant-api-key.html>`_
2179
-
2180
- :param api_key: Defines the API key.
2353
+ .. raw:: html
2354
+
2355
+ <p>Grant an API key.</p>
2356
+ <p>Create an API key on behalf of another user.
2357
+ This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API.
2358
+ The caller must have authentication credentials for the user on whose behalf the API key will be created.
2359
+ It is not possible to use this API to create an API key without that user's credentials.
2360
+ The supported user authentication credential types are:</p>
2361
+ <ul>
2362
+ <li>username and password</li>
2363
+ <li>Elasticsearch access tokens</li>
2364
+ <li>JWTs</li>
2365
+ </ul>
2366
+ <p>The user, for whom the authentication credentials is provided, can optionally &quot;run as&quot; (impersonate) another user.
2367
+ In this case, the API key will be created on behalf of the impersonated user.</p>
2368
+ <p>This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
2369
+ The API keys are created by the Elasticsearch API key service, which is automatically enabled.</p>
2370
+ <p>A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.
2371
+ If applicable, it also returns expiration information for the API key in milliseconds.</p>
2372
+ <p>By default, API keys never expire. You can specify expiration information when you create the API keys.</p>
2373
+
2374
+
2375
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-grant-api-key.html>`_
2376
+
2377
+ :param api_key: The API key.
2181
2378
  :param grant_type: The type of grant. Supported grant types are: `access_token`,
2182
2379
  `password`.
2183
- :param access_token: The users access token. If you specify the `access_token`
2380
+ :param access_token: The user's access token. If you specify the `access_token`
2184
2381
  grant type, this parameter is required. It is not valid with other grant
2185
2382
  types.
2186
- :param password: The users password. If you specify the `password` grant type,
2383
+ :param password: The user's password. If you specify the `password` grant type,
2187
2384
  this parameter is required. It is not valid with other grant types.
2188
2385
  :param run_as: The name of the user to be impersonated.
2189
2386
  :param username: The user name that identifies the user. If you specify the `password`
@@ -2314,10 +2511,15 @@ class SecurityClient(NamespacedClient):
2314
2511
  body: t.Optional[t.Dict[str, t.Any]] = None,
2315
2512
  ) -> ObjectApiResponse[t.Any]:
2316
2513
  """
2317
- Check user privileges. Determine whether the specified user has a specified list
2318
- of privileges.
2514
+ .. raw:: html
2515
+
2516
+ <p>Check user privileges.</p>
2517
+ <p>Determine whether the specified user has a specified list of privileges.
2518
+ All users can use this API, but only to determine their own privileges.
2519
+ To check the privileges of other users, you must use the run as feature.</p>
2520
+
2319
2521
 
2320
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges.html>`_
2522
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-has-privileges.html>`_
2321
2523
 
2322
2524
  :param user: Username
2323
2525
  :param application:
@@ -2374,14 +2576,15 @@ class SecurityClient(NamespacedClient):
2374
2576
  body: t.Optional[t.Dict[str, t.Any]] = None,
2375
2577
  ) -> ObjectApiResponse[t.Any]:
2376
2578
  """
2377
- Check user profile privileges. Determine whether the users associated with the
2378
- specified user profile IDs have all the requested privileges. NOTE: The user
2379
- profile feature is designed only for use by Kibana and Elastic's Observability,
2380
- Enterprise Search, and Elastic Security solutions. Individual users and external
2381
- applications should not call this API directly. Elastic reserves the right to
2382
- change or remove this feature in future releases without prior notice.
2579
+ .. raw:: html
2383
2580
 
2384
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges-user-profile.html>`_
2581
+ <p>Check user profile privileges.</p>
2582
+ <p>Determine whether the users associated with the specified user profile IDs have all the requested privileges.</p>
2583
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly.
2584
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
2585
+
2586
+
2587
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-has-privileges-user-profile.html>`_
2385
2588
 
2386
2589
  :param privileges: An object containing all the privileges to be checked.
2387
2590
  :param uids: A list of profile IDs. The privileges are checked for associated
@@ -2438,33 +2641,39 @@ class SecurityClient(NamespacedClient):
2438
2641
  body: t.Optional[t.Dict[str, t.Any]] = None,
2439
2642
  ) -> ObjectApiResponse[t.Any]:
2440
2643
  """
2441
- Invalidate API keys. This API invalidates API keys created by the create API
2442
- key or grant API key APIs. Invalidated API keys fail authentication, but they
2443
- can still be viewed using the get API key information and query API key information
2444
- APIs, for at least the configured retention period, until they are automatically
2445
- deleted. The `manage_api_key` privilege allows deleting any API keys. The `manage_own_api_key`
2446
- only allows deleting API keys that are owned by the user. In addition, with the
2447
- `manage_own_api_key` privilege, an invalidation request must be issued in one
2448
- of the three formats: - Set the parameter `owner=true`. - Or, set both `username`
2449
- and `realm_name` to match the user’s identity. - Or, if the request is issued
2450
- by an API key, that is to say an API key invalidates itself, specify its ID in
2451
- the `ids` field.
2644
+ .. raw:: html
2645
+
2646
+ <p>Invalidate API keys.</p>
2647
+ <p>This API invalidates API keys created by the create API key or grant API key APIs.
2648
+ Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.</p>
2649
+ <p>To use this API, you must have at least the <code>manage_security</code>, <code>manage_api_key</code>, or <code>manage_own_api_key</code> cluster privileges.
2650
+ The <code>manage_security</code> privilege allows deleting any API key, including both REST and cross cluster API keys.
2651
+ The <code>manage_api_key</code> privilege allows deleting any REST API key, but not cross cluster API keys.
2652
+ The <code>manage_own_api_key</code> only allows deleting REST API keys that are owned by the user.
2653
+ In addition, with the <code>manage_own_api_key</code> privilege, an invalidation request must be issued in one of the three formats:</p>
2654
+ <ul>
2655
+ <li>Set the parameter <code>owner=true</code>.</li>
2656
+ <li>Or, set both <code>username</code> and <code>realm_name</code> to match the user's identity.</li>
2657
+ <li>Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the <code>ids</code> field.</li>
2658
+ </ul>
2452
2659
 
2453
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-api-key.html>`_
2660
+
2661
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-invalidate-api-key.html>`_
2454
2662
 
2455
2663
  :param id:
2456
2664
  :param ids: A list of API key ids. This parameter cannot be used with any of
2457
2665
  `name`, `realm_name`, or `username`.
2458
2666
  :param name: An API key name. This parameter cannot be used with any of `ids`,
2459
2667
  `realm_name` or `username`.
2460
- :param owner: Can be used to query API keys owned by the currently authenticated
2461
- user. The `realm_name` or `username` parameters cannot be specified when
2462
- this parameter is set to `true` as they are assumed to be the currently authenticated
2463
- ones.
2668
+ :param owner: Query API keys owned by the currently authenticated user. The `realm_name`
2669
+ or `username` parameters cannot be specified when this parameter is set to
2670
+ `true` as they are assumed to be the currently authenticated ones. NOTE:
2671
+ At least one of `ids`, `name`, `username`, and `realm_name` must be specified
2672
+ if `owner` is `false`.
2464
2673
  :param realm_name: The name of an authentication realm. This parameter cannot
2465
2674
  be used with either `ids` or `name`, or when `owner` flag is set to `true`.
2466
2675
  :param username: The username of a user. This parameter cannot be used with either
2467
- `ids` or `name`, or when `owner` flag is set to `true`.
2676
+ `ids` or `name` or when `owner` flag is set to `true`.
2468
2677
  """
2469
2678
  __path_parts: t.Dict[str, str] = {}
2470
2679
  __path = "/_security/api_key"
@@ -2519,19 +2728,30 @@ class SecurityClient(NamespacedClient):
2519
2728
  body: t.Optional[t.Dict[str, t.Any]] = None,
2520
2729
  ) -> ObjectApiResponse[t.Any]:
2521
2730
  """
2522
- Invalidate a token. The access tokens returned by the get token API have a finite
2523
- period of time for which they are valid. After that time period, they can no
2524
- longer be used. The time period is defined by the `xpack.security.authc.token.timeout`
2525
- setting. The refresh tokens returned by the get token API are only valid for
2526
- 24 hours. They can also be used exactly once. If you want to invalidate one or
2527
- more access or refresh tokens immediately, use this invalidate token API.
2731
+ .. raw:: html
2528
2732
 
2529
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-token.html>`_
2733
+ <p>Invalidate a token.</p>
2734
+ <p>The access tokens returned by the get token API have a finite period of time for which they are valid.
2735
+ After that time period, they can no longer be used.
2736
+ The time period is defined by the <code>xpack.security.authc.token.timeout</code> setting.</p>
2737
+ <p>The refresh tokens returned by the get token API are only valid for 24 hours.
2738
+ They can also be used exactly once.
2739
+ If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.</p>
2740
+ <p>NOTE: While all parameters are optional, at least one of them is required.
2741
+ More specifically, either one of <code>token</code> or <code>refresh_token</code> parameters is required.
2742
+ If none of these two are specified, then <code>realm_name</code> and/or <code>username</code> need to be specified.</p>
2530
2743
 
2531
- :param realm_name:
2532
- :param refresh_token:
2533
- :param token:
2534
- :param username:
2744
+
2745
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-invalidate-token.html>`_
2746
+
2747
+ :param realm_name: The name of an authentication realm. This parameter cannot
2748
+ be used with either `refresh_token` or `token`.
2749
+ :param refresh_token: A refresh token. This parameter cannot be used if any of
2750
+ `refresh_token`, `realm_name`, or `username` are used.
2751
+ :param token: An access token. This parameter cannot be used if any of `refresh_token`,
2752
+ `realm_name`, or `username` are used.
2753
+ :param username: The username of a user. This parameter cannot be used with either
2754
+ `refresh_token` or `token`.
2535
2755
  """
2536
2756
  __path_parts: t.Dict[str, str] = {}
2537
2757
  __path = "/_security/oauth2/token"
@@ -2582,14 +2802,15 @@ class SecurityClient(NamespacedClient):
2582
2802
  body: t.Optional[t.Dict[str, t.Any]] = None,
2583
2803
  ) -> ObjectApiResponse[t.Any]:
2584
2804
  """
2585
- Authenticate OpenID Connect. Exchange an OpenID Connect authentication response
2586
- message for an Elasticsearch internal access token and refresh token that can
2587
- be subsequently used for authentication. Elasticsearch exposes all the necessary
2588
- OpenID Connect related functionality with the OpenID Connect APIs. These APIs
2589
- are used internally by Kibana in order to provide OpenID Connect based authentication,
2590
- but can also be used by other, custom web applications or other clients.
2805
+ .. raw:: html
2806
+
2807
+ <p>Authenticate OpenID Connect.</p>
2808
+ <p>Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.</p>
2809
+ <p>Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.
2810
+ These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.</p>
2811
+
2591
2812
 
2592
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-oidc-authenticate.html>`_
2813
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-authenticate.html>`_
2593
2814
 
2594
2815
  :param nonce: Associate a client session with an ID token and mitigate replay
2595
2816
  attacks. This value needs to be the same as the one that was provided to
@@ -2646,12 +2867,12 @@ class SecurityClient(NamespacedClient):
2646
2867
  )
2647
2868
 
2648
2869
  @_rewrite_parameters(
2649
- body_fields=("access_token", "refresh_token"),
2870
+ body_fields=("token", "refresh_token"),
2650
2871
  )
2651
2872
  def oidc_logout(
2652
2873
  self,
2653
2874
  *,
2654
- access_token: t.Optional[str] = None,
2875
+ token: t.Optional[str] = None,
2655
2876
  error_trace: t.Optional[bool] = None,
2656
2877
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2657
2878
  human: t.Optional[bool] = None,
@@ -2660,23 +2881,22 @@ class SecurityClient(NamespacedClient):
2660
2881
  body: t.Optional[t.Dict[str, t.Any]] = None,
2661
2882
  ) -> ObjectApiResponse[t.Any]:
2662
2883
  """
2663
- Logout of OpenID Connect. Invalidate an access token and a refresh token that
2664
- were generated as a response to the `/_security/oidc/authenticate` API. If the
2665
- OpenID Connect authentication realm in Elasticsearch is accordingly configured,
2666
- the response to this call will contain a URI pointing to the end session endpoint
2667
- of the OpenID Connect Provider in order to perform single logout. Elasticsearch
2668
- exposes all the necessary OpenID Connect related functionality with the OpenID
2669
- Connect APIs. These APIs are used internally by Kibana in order to provide OpenID
2670
- Connect based authentication, but can also be used by other, custom web applications
2671
- or other clients.
2884
+ .. raw:: html
2672
2885
 
2673
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-oidc-logout.html>`_
2886
+ <p>Logout of OpenID Connect.</p>
2887
+ <p>Invalidate an access token and a refresh token that were generated as a response to the <code>/_security/oidc/authenticate</code> API.</p>
2888
+ <p>If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout.</p>
2889
+ <p>Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.
2890
+ These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.</p>
2674
2891
 
2675
- :param access_token: The access token to be invalidated.
2892
+
2893
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-logout.html>`_
2894
+
2895
+ :param token: The access token to be invalidated.
2676
2896
  :param refresh_token: The refresh token to be invalidated.
2677
2897
  """
2678
- if access_token is None and body is None:
2679
- raise ValueError("Empty value passed for parameter 'access_token'")
2898
+ if token is None and body is None:
2899
+ raise ValueError("Empty value passed for parameter 'token'")
2680
2900
  __path_parts: t.Dict[str, str] = {}
2681
2901
  __path = "/_security/oidc/logout"
2682
2902
  __query: t.Dict[str, t.Any] = {}
@@ -2690,8 +2910,8 @@ class SecurityClient(NamespacedClient):
2690
2910
  if pretty is not None:
2691
2911
  __query["pretty"] = pretty
2692
2912
  if not __body:
2693
- if access_token is not None:
2694
- __body["access_token"] = access_token
2913
+ if token is not None:
2914
+ __body["token"] = token
2695
2915
  if refresh_token is not None:
2696
2916
  __body["refresh_token"] = refresh_token
2697
2917
  __headers = {"accept": "application/json", "content-type": "application/json"}
@@ -2723,17 +2943,16 @@ class SecurityClient(NamespacedClient):
2723
2943
  body: t.Optional[t.Dict[str, t.Any]] = None,
2724
2944
  ) -> ObjectApiResponse[t.Any]:
2725
2945
  """
2726
- Prepare OpenID connect authentication. Create an oAuth 2.0 authentication request
2727
- as a URL string based on the configuration of the OpenID Connect authentication
2728
- realm in Elasticsearch. The response of this API is a URL pointing to the Authorization
2729
- Endpoint of the configured OpenID Connect Provider, which can be used to redirect
2730
- the browser of the user in order to continue the authentication process. Elasticsearch
2731
- exposes all the necessary OpenID Connect related functionality with the OpenID
2732
- Connect APIs. These APIs are used internally by Kibana in order to provide OpenID
2733
- Connect based authentication, but can also be used by other, custom web applications
2734
- or other clients.
2946
+ .. raw:: html
2735
2947
 
2736
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-oidc-prepare-authentication.html>`_
2948
+ <p>Prepare OpenID connect authentication.</p>
2949
+ <p>Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch.</p>
2950
+ <p>The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process.</p>
2951
+ <p>Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.
2952
+ These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.</p>
2953
+
2954
+
2955
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-oidc-prepare-authentication.html>`_
2737
2956
 
2738
2957
  :param iss: In the case of a third party initiated single sign on, this is the
2739
2958
  issuer identifier for the OP that the RP is to send the authentication request
@@ -2808,9 +3027,28 @@ class SecurityClient(NamespacedClient):
2808
3027
  ] = None,
2809
3028
  ) -> ObjectApiResponse[t.Any]:
2810
3029
  """
2811
- Create or update application privileges.
2812
-
2813
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-privileges.html>`_
3030
+ .. raw:: html
3031
+
3032
+ <p>Create or update application privileges.</p>
3033
+ <p>To use this API, you must have one of the following privileges:</p>
3034
+ <ul>
3035
+ <li>The <code>manage_security</code> cluster privilege (or a greater privilege such as <code>all</code>).</li>
3036
+ <li>The &quot;Manage Application Privileges&quot; global privilege for the application being referenced in the request.</li>
3037
+ </ul>
3038
+ <p>Application names are formed from a prefix, with an optional suffix that conform to the following rules:</p>
3039
+ <ul>
3040
+ <li>The prefix must begin with a lowercase ASCII letter.</li>
3041
+ <li>The prefix must contain only ASCII letters or digits.</li>
3042
+ <li>The prefix must be at least 3 characters long.</li>
3043
+ <li>If the suffix exists, it must begin with either a dash <code>-</code> or <code>_</code>.</li>
3044
+ <li>The suffix cannot contain any of the following characters: <code>\\</code>, <code>/</code>, <code>*</code>, <code>?</code>, <code>&quot;</code>, <code>&lt;</code>, <code>&gt;</code>, <code>|</code>, <code>,</code>, <code>*</code>.</li>
3045
+ <li>No part of the name can contain whitespace.</li>
3046
+ </ul>
3047
+ <p>Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters <code>_</code>, <code>-</code>, and <code>.</code>.</p>
3048
+ <p>Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: <code>/</code>, <code>*</code>, <code>:</code>.</p>
3049
+
3050
+
3051
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-privileges.html>`_
2814
3052
 
2815
3053
  :param privileges:
2816
3054
  :param refresh: If `true` (the default) then refresh the affected shards to make
@@ -2954,12 +3192,15 @@ class SecurityClient(NamespacedClient):
2954
3192
  body: t.Optional[t.Dict[str, t.Any]] = None,
2955
3193
  ) -> ObjectApiResponse[t.Any]:
2956
3194
  """
2957
- Create or update roles. The role management APIs are generally the preferred
2958
- way to manage roles in the native realm, rather than using file-based role management.
2959
- The create or update roles API cannot update roles that are defined in roles
2960
- files. File-based role management is not available in Elastic Serverless.
3195
+ .. raw:: html
3196
+
3197
+ <p>Create or update roles.</p>
3198
+ <p>The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.
3199
+ The create or update roles API cannot update roles that are defined in roles files.
3200
+ File-based role management is not available in Elastic Serverless.</p>
3201
+
2961
3202
 
2962
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role.html>`_
3203
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-role.html>`_
2963
3204
 
2964
3205
  :param name: The name of the role.
2965
3206
  :param applications: A list of application privilege entries.
@@ -2976,7 +3217,10 @@ class SecurityClient(NamespacedClient):
2976
3217
  this operation visible to search, if `wait_for` then wait for a refresh to
2977
3218
  make this operation visible to search, if `false` then do nothing with refreshes.
2978
3219
  :param remote_cluster: A list of remote cluster permissions entries.
2979
- :param remote_indices: A list of remote indices permissions entries.
3220
+ :param remote_indices: A list of remote indices permissions entries. NOTE: Remote
3221
+ indices are effective for remote clusters configured with the API key based
3222
+ model. They have no effect for remote clusters configured with the certificate
3223
+ based model.
2980
3224
  :param run_as: A list of users that the owners of this role can impersonate.
2981
3225
  *Note*: in Serverless, the run-as feature is disabled. For API compatibility,
2982
3226
  you can still specify an empty `run_as` field, but a non-empty list will
@@ -3066,26 +3310,48 @@ class SecurityClient(NamespacedClient):
3066
3310
  body: t.Optional[t.Dict[str, t.Any]] = None,
3067
3311
  ) -> ObjectApiResponse[t.Any]:
3068
3312
  """
3069
- Create or update role mappings. Role mappings define which roles are assigned
3070
- to each user. Each mapping has rules that identify users and a list of roles
3071
- that are granted to those users. The role mapping APIs are generally the preferred
3072
- way to manage role mappings rather than using role mapping files. The create
3073
- or update role mappings API cannot update role mappings that are defined in role
3074
- mapping files. This API does not create roles. Rather, it maps users to existing
3075
- roles. Roles can be created by using the create or update roles API or roles
3076
- files.
3313
+ .. raw:: html
3314
+
3315
+ <p>Create or update role mappings.</p>
3316
+ <p>Role mappings define which roles are assigned to each user.
3317
+ Each mapping has rules that identify users and a list of roles that are granted to those users.
3318
+ The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.</p>
3319
+ <p>NOTE: This API does not create roles. Rather, it maps users to existing roles.
3320
+ Roles can be created by using the create or update roles API or roles files.</p>
3321
+ <p><strong>Role templates</strong></p>
3322
+ <p>The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.
3323
+ For example, all users in the <code>cn=admin,dc=example,dc=com</code> LDAP group should be given the superuser role in Elasticsearch.
3324
+ The <code>roles</code> field is used for this purpose.</p>
3325
+ <p>For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.
3326
+ The <code>role_templates</code> field is used for this purpose.</p>
3327
+ <p>NOTE: To use role templates successfully, the relevant scripting feature must be enabled.
3328
+ Otherwise, all attempts to create a role mapping with role templates fail.</p>
3329
+ <p>All of the user fields that are available in the role mapping rules are also available in the role templates.
3330
+ Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.</p>
3331
+ <p>By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.
3332
+ If the format of the template is set to &quot;json&quot; then the template is expected to produce a JSON string or an array of JSON strings for the role names.</p>
3333
+
3334
+
3335
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-role-mapping.html>`_
3077
3336
 
3078
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role-mapping.html>`_
3079
-
3080
- :param name: Role-mapping name
3081
- :param enabled:
3082
- :param metadata:
3337
+ :param name: The distinct name that identifies the role mapping. The name is
3338
+ used solely as an identifier to facilitate interaction via the API; it does
3339
+ not affect the behavior of the mapping in any way.
3340
+ :param enabled: Mappings that have `enabled` set to `false` are ignored when
3341
+ role mapping is performed.
3342
+ :param metadata: Additional metadata that helps define which roles are assigned
3343
+ to each user. Within the metadata object, keys beginning with `_` are reserved
3344
+ for system usage.
3083
3345
  :param refresh: If `true` (the default) then refresh the affected shards to make
3084
3346
  this operation visible to search, if `wait_for` then wait for a refresh to
3085
3347
  make this operation visible to search, if `false` then do nothing with refreshes.
3086
- :param role_templates:
3087
- :param roles:
3088
- :param rules:
3348
+ :param role_templates: A list of Mustache templates that will be evaluated to
3349
+ determine the roles names that should granted to the users that match the
3350
+ role mapping rules. Exactly one of `roles` or `role_templates` must be specified.
3351
+ :param roles: A list of role names that are granted to the users that match the
3352
+ role mapping rules. Exactly one of `roles` or `role_templates` must be specified.
3353
+ :param rules: The rules that determine which users should be matched by the mapping.
3354
+ A rule is a logical condition that is expressed by using a JSON DSL.
3089
3355
  :param run_as:
3090
3356
  """
3091
3357
  if name in SKIP_IN_PATH:
@@ -3160,23 +3426,41 @@ class SecurityClient(NamespacedClient):
3160
3426
  body: t.Optional[t.Dict[str, t.Any]] = None,
3161
3427
  ) -> ObjectApiResponse[t.Any]:
3162
3428
  """
3163
- Create or update users. A password is required for adding a new user but is optional
3164
- when updating an existing user. To change a user’s password without updating
3165
- any other fields, use the change password API.
3166
-
3167
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-user.html>`_
3168
-
3169
- :param username: The username of the User
3170
- :param email:
3171
- :param enabled:
3172
- :param full_name:
3173
- :param metadata:
3174
- :param password:
3175
- :param password_hash:
3176
- :param refresh: If `true` (the default) then refresh the affected shards to make
3177
- this operation visible to search, if `wait_for` then wait for a refresh to
3178
- make this operation visible to search, if `false` then do nothing with refreshes.
3179
- :param roles:
3429
+ .. raw:: html
3430
+
3431
+ <p>Create or update users.</p>
3432
+ <p>Add and update users in the native realm.
3433
+ A password is required for adding a new user but is optional when updating an existing user.
3434
+ To change a user's password without updating any other fields, use the change password API.</p>
3435
+
3436
+
3437
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-put-user.html>`_
3438
+
3439
+ :param username: An identifier for the user. NOTE: Usernames must be at least
3440
+ 1 and no more than 507 characters. They can contain alphanumeric characters
3441
+ (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic
3442
+ Latin (ASCII) block. Leading or trailing whitespace is not allowed.
3443
+ :param email: The email of the user.
3444
+ :param enabled: Specifies whether the user is enabled.
3445
+ :param full_name: The full name of the user.
3446
+ :param metadata: Arbitrary metadata that you want to associate with the user.
3447
+ :param password: The user's password. Passwords must be at least 6 characters
3448
+ long. When adding a user, one of `password` or `password_hash` is required.
3449
+ When updating an existing user, the password is optional, so that other fields
3450
+ on the user (such as their roles) may be updated without modifying the user's
3451
+ password
3452
+ :param password_hash: A hash of the user's password. This must be produced using
3453
+ the same hashing algorithm as has been configured for password storage. For
3454
+ more details, see the explanation of the `xpack.security.authc.password_hashing.algorithm`
3455
+ setting in the user cache and password hash algorithm documentation. Using
3456
+ this parameter allows the client to pre-hash the password for performance
3457
+ and/or confidentiality reasons. The `password` parameter and the `password_hash`
3458
+ parameter cannot be used in the same request.
3459
+ :param refresh: Valid values are `true`, `false`, and `wait_for`. These values
3460
+ have the same meaning as in the index API, but the default value for this
3461
+ API is true.
3462
+ :param roles: A set of roles the user has. The roles determine the user's access
3463
+ permissions. To create a user without any roles, specify an empty list (`[]`).
3180
3464
  """
3181
3465
  if username in SKIP_IN_PATH:
3182
3466
  raise ValueError("Empty value passed for parameter 'username'")
@@ -3259,10 +3543,17 @@ class SecurityClient(NamespacedClient):
3259
3543
  body: t.Optional[t.Dict[str, t.Any]] = None,
3260
3544
  ) -> ObjectApiResponse[t.Any]:
3261
3545
  """
3262
- Find API keys with a query. Get a paginated list of API keys and their information.
3263
- You can optionally filter the results with a query.
3546
+ .. raw:: html
3264
3547
 
3265
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-api-key.html>`_
3548
+ <p>Find API keys with a query.</p>
3549
+ <p>Get a paginated list of API keys and their information.
3550
+ You can optionally filter the results with a query.</p>
3551
+ <p>To use this API, you must have at least the <code>manage_own_api_key</code> or the <code>read_security</code> cluster privileges.
3552
+ If you have only the <code>manage_own_api_key</code> privilege, this API returns only the API keys that you own.
3553
+ If you have the <code>read_security</code>, <code>manage_api_key</code>, or greater privileges (including <code>manage_security</code>), this API returns all API keys regardless of ownership.</p>
3554
+
3555
+
3556
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-api-key.html>`_
3266
3557
 
3267
3558
  :param aggregations: Any aggregations to run over the corpus of returned API
3268
3559
  keys. Aggregations and queries work together. Aggregations are computed only
@@ -3276,30 +3567,39 @@ class SecurityClient(NamespacedClient):
3276
3567
  `terms`, `range`, `date_range`, `missing`, `cardinality`, `value_count`,
3277
3568
  `composite`, `filter`, and `filters`. Additionally, aggregations only run
3278
3569
  over the same subset of fields that query works with.
3279
- :param from_: Starting document offset. By default, you cannot page through more
3280
- than 10,000 hits using the from and size parameters. To page through more
3281
- hits, use the `search_after` parameter.
3570
+ :param from_: The starting document offset. It must not be negative. By default,
3571
+ you cannot page through more than 10,000 hits using the `from` and `size`
3572
+ parameters. To page through more hits, use the `search_after` parameter.
3282
3573
  :param query: A query to filter which API keys to return. If the query parameter
3283
3574
  is missing, it is equivalent to a `match_all` query. The query supports a
3284
3575
  subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
3285
3576
  `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
3286
3577
  You can query the following public information associated with an API key:
3287
3578
  `id`, `type`, `name`, `creation`, `expiration`, `invalidated`, `invalidation`,
3288
- `username`, `realm`, and `metadata`.
3289
- :param search_after: Search after definition
3290
- :param size: The number of hits to return. By default, you cannot page through
3291
- more than 10,000 hits using the `from` and `size` parameters. To page through
3292
- more hits, use the `search_after` parameter.
3293
- :param sort: Other than `id`, all public fields of an API key are eligible for
3294
- sorting. In addition, sort can also be applied to the `_doc` field to sort
3295
- by index order.
3579
+ `username`, `realm`, and `metadata`. NOTE: The queryable string values associated
3580
+ with API keys are internally mapped as keywords. Consequently, if no `analyzer`
3581
+ parameter is specified for a `match` query, then the provided match query
3582
+ string is interpreted as a single keyword value. Such a match query is hence
3583
+ equivalent to a `term` query.
3584
+ :param search_after: The search after definition.
3585
+ :param size: The number of hits to return. It must not be negative. The `size`
3586
+ parameter can be set to `0`, in which case no API key matches are returned,
3587
+ only the aggregation results. By default, you cannot page through more than
3588
+ 10,000 hits using the `from` and `size` parameters. To page through more
3589
+ hits, use the `search_after` parameter.
3590
+ :param sort: The sort definition. Other than `id`, all public fields of an API
3591
+ key are eligible for sorting. In addition, sort can also be applied to the
3592
+ `_doc` field to sort by index order.
3296
3593
  :param typed_keys: Determines whether aggregation names are prefixed by their
3297
3594
  respective types in the response.
3298
3595
  :param with_limited_by: Return the snapshot of the owner user's role descriptors
3299
3596
  associated with the API key. An API key's actual permission is the intersection
3300
- of its assigned role descriptors and the owner user's role descriptors.
3301
- :param with_profile_uid: Determines whether to also retrieve the profile uid,
3302
- for the API key owner principal, if it exists.
3597
+ of its assigned role descriptors and the owner user's role descriptors (effectively
3598
+ limited by it). An API key cannot retrieve any API key’s limited-by role
3599
+ descriptors (including itself) unless it has `manage_api_key` or higher privileges.
3600
+ :param with_profile_uid: Determines whether to also retrieve the profile UID
3601
+ for the API key owner principal. If it exists, the profile UID is returned
3602
+ under the `profile_uid` response field for each API key.
3303
3603
  """
3304
3604
  __path_parts: t.Dict[str, str] = {}
3305
3605
  __path = "/_security/_query/api_key"
@@ -3386,26 +3686,34 @@ class SecurityClient(NamespacedClient):
3386
3686
  body: t.Optional[t.Dict[str, t.Any]] = None,
3387
3687
  ) -> ObjectApiResponse[t.Any]:
3388
3688
  """
3389
- Find roles with a query. Get roles in a paginated manner. You can optionally
3390
- filter the results with a query.
3689
+ .. raw:: html
3391
3690
 
3392
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-role.html>`_
3691
+ <p>Find roles with a query.</p>
3692
+ <p>Get roles in a paginated manner.
3693
+ The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
3694
+ The query roles API does not retrieve roles that are defined in roles files, nor built-in ones.
3695
+ You can optionally filter the results with a query.
3696
+ Also, the results can be paginated and sorted.</p>
3393
3697
 
3394
- :param from_: Starting document offset. By default, you cannot page through more
3395
- than 10,000 hits using the from and size parameters. To page through more
3396
- hits, use the `search_after` parameter.
3698
+
3699
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-role.html>`_
3700
+
3701
+ :param from_: The starting document offset. It must not be negative. By default,
3702
+ you cannot page through more than 10,000 hits using the `from` and `size`
3703
+ parameters. To page through more hits, use the `search_after` parameter.
3397
3704
  :param query: A query to filter which roles to return. If the query parameter
3398
3705
  is missing, it is equivalent to a `match_all` query. The query supports a
3399
3706
  subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
3400
3707
  `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
3401
3708
  You can query the following information associated with roles: `name`, `description`,
3402
- `metadata`, `applications.application`, `applications.privileges`, `applications.resources`.
3403
- :param search_after: Search after definition
3404
- :param size: The number of hits to return. By default, you cannot page through
3405
- more than 10,000 hits using the `from` and `size` parameters. To page through
3406
- more hits, use the `search_after` parameter.
3407
- :param sort: All public fields of a role are eligible for sorting. In addition,
3408
- sort can also be applied to the `_doc` field to sort by index order.
3709
+ `metadata`, `applications.application`, `applications.privileges`, and `applications.resources`.
3710
+ :param search_after: The search after definition.
3711
+ :param size: The number of hits to return. It must not be negative. By default,
3712
+ you cannot page through more than 10,000 hits using the `from` and `size`
3713
+ parameters. To page through more hits, use the `search_after` parameter.
3714
+ :param sort: The sort definition. You can sort on `username`, `roles`, or `enabled`.
3715
+ In addition, sort can also be applied to the `_doc` field to sort by index
3716
+ order.
3409
3717
  """
3410
3718
  __path_parts: t.Dict[str, str] = {}
3411
3719
  __path = "/_security/_query/role"
@@ -3472,28 +3780,35 @@ class SecurityClient(NamespacedClient):
3472
3780
  body: t.Optional[t.Dict[str, t.Any]] = None,
3473
3781
  ) -> ObjectApiResponse[t.Any]:
3474
3782
  """
3475
- Find users with a query. Get information for users in a paginated manner. You
3476
- can optionally filter the results with a query.
3783
+ .. raw:: html
3477
3784
 
3478
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-user.html>`_
3785
+ <p>Find users with a query.</p>
3786
+ <p>Get information for users in a paginated manner.
3787
+ You can optionally filter the results with a query.</p>
3788
+ <p>NOTE: As opposed to the get user API, built-in users are excluded from the result.
3789
+ This API is only for native users.</p>
3479
3790
 
3480
- :param from_: Starting document offset. By default, you cannot page through more
3481
- than 10,000 hits using the from and size parameters. To page through more
3482
- hits, use the `search_after` parameter.
3791
+
3792
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-query-user.html>`_
3793
+
3794
+ :param from_: The starting document offset. It must not be negative. By default,
3795
+ you cannot page through more than 10,000 hits using the `from` and `size`
3796
+ parameters. To page through more hits, use the `search_after` parameter.
3483
3797
  :param query: A query to filter which users to return. If the query parameter
3484
3798
  is missing, it is equivalent to a `match_all` query. The query supports a
3485
3799
  subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
3486
3800
  `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
3487
3801
  You can query the following information associated with user: `username`,
3488
- `roles`, `enabled`
3489
- :param search_after: Search after definition
3490
- :param size: The number of hits to return. By default, you cannot page through
3491
- more than 10,000 hits using the `from` and `size` parameters. To page through
3492
- more hits, use the `search_after` parameter.
3493
- :param sort: Fields eligible for sorting are: username, roles, enabled In addition,
3494
- sort can also be applied to the `_doc` field to sort by index order.
3495
- :param with_profile_uid: If true will return the User Profile ID for the users
3496
- in the query result, if any.
3802
+ `roles`, `enabled`, `full_name`, and `email`.
3803
+ :param search_after: The search after definition
3804
+ :param size: The number of hits to return. It must not be negative. By default,
3805
+ you cannot page through more than 10,000 hits using the `from` and `size`
3806
+ parameters. To page through more hits, use the `search_after` parameter.
3807
+ :param sort: The sort definition. Fields eligible for sorting are: `username`,
3808
+ `roles`, `enabled`. In addition, sort can also be applied to the `_doc` field
3809
+ to sort by index order.
3810
+ :param with_profile_uid: Determines whether to retrieve the user profile UID,
3811
+ if it exists, for the users.
3497
3812
  """
3498
3813
  __path_parts: t.Dict[str, str] = {}
3499
3814
  __path = "/_security/_query/user"
@@ -3551,21 +3866,23 @@ class SecurityClient(NamespacedClient):
3551
3866
  body: t.Optional[t.Dict[str, t.Any]] = None,
3552
3867
  ) -> ObjectApiResponse[t.Any]:
3553
3868
  """
3554
- Authenticate SAML. Submit a SAML response message to Elasticsearch for consumption.
3555
- NOTE: This API is intended for use by custom web applications other than Kibana.
3556
- If you are using Kibana, refer to the documentation for configuring SAML single-sign-on
3557
- on the Elastic Stack. The SAML message that is submitted can be: * A response
3558
- to a SAML authentication request that was previously created using the SAML prepare
3559
- authentication API. * An unsolicited SAML message in the case of an IdP-initiated
3560
- single sign-on (SSO) flow. In either case, the SAML message needs to be a base64
3561
- encoded XML document with a root element of `<Response>`. After successful validation,
3562
- Elasticsearch responds with an Elasticsearch internal access token and refresh
3563
- token that can be subsequently used for authentication. This API endpoint essentially
3564
- exchanges SAML responses that indicate successful authentication in the IdP for
3565
- Elasticsearch access and refresh tokens, which can be used for authentication
3566
- against Elasticsearch.
3567
-
3568
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-authenticate.html>`_
3869
+ .. raw:: html
3870
+
3871
+ <p>Authenticate SAML.</p>
3872
+ <p>Submit a SAML response message to Elasticsearch for consumption.</p>
3873
+ <p>NOTE: This API is intended for use by custom web applications other than Kibana.
3874
+ If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
3875
+ <p>The SAML message that is submitted can be:</p>
3876
+ <ul>
3877
+ <li>A response to a SAML authentication request that was previously created using the SAML prepare authentication API.</li>
3878
+ <li>An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow.</li>
3879
+ </ul>
3880
+ <p>In either case, the SAML message needs to be a base64 encoded XML document with a root element of <code>&lt;Response&gt;</code>.</p>
3881
+ <p>After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.
3882
+ This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch.</p>
3883
+
3884
+
3885
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-authenticate.html>`_
3569
3886
 
3570
3887
  :param content: The SAML response as it was sent by the user's browser, usually
3571
3888
  a Base64 encoded XML document.
@@ -3625,18 +3942,20 @@ class SecurityClient(NamespacedClient):
3625
3942
  body: t.Optional[t.Dict[str, t.Any]] = None,
3626
3943
  ) -> ObjectApiResponse[t.Any]:
3627
3944
  """
3628
- Logout of SAML completely. Verifies the logout response sent from the SAML IdP.
3629
- NOTE: This API is intended for use by custom web applications other than Kibana.
3630
- If you are using Kibana, refer to the documentation for configuring SAML single-sign-on
3631
- on the Elastic Stack. The SAML IdP may send a logout response back to the SP
3632
- after handling the SP-initiated SAML Single Logout. This API verifies the response
3633
- by ensuring the content is relevant and validating its signature. An empty response
3634
- is returned if the verification process is successful. The response can be sent
3635
- by the IdP with either the HTTP-Redirect or the HTTP-Post binding. The caller
3636
- of this API must prepare the request accordingly so that this API can handle
3637
- either of them.
3945
+ .. raw:: html
3946
+
3947
+ <p>Logout of SAML completely.</p>
3948
+ <p>Verifies the logout response sent from the SAML IdP.</p>
3949
+ <p>NOTE: This API is intended for use by custom web applications other than Kibana.
3950
+ If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
3951
+ <p>The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout.
3952
+ This API verifies the response by ensuring the content is relevant and validating its signature.
3953
+ An empty response is returned if the verification process is successful.
3954
+ The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding.
3955
+ The caller of this API must prepare the request accordingly so that this API can handle either of them.</p>
3638
3956
 
3639
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-complete-logout.html>`_
3957
+
3958
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-complete-logout.html>`_
3640
3959
 
3641
3960
  :param ids: A JSON array with all the valid SAML Request Ids that the caller
3642
3961
  of the API has for the current user.
@@ -3700,17 +4019,19 @@ class SecurityClient(NamespacedClient):
3700
4019
  body: t.Optional[t.Dict[str, t.Any]] = None,
3701
4020
  ) -> ObjectApiResponse[t.Any]:
3702
4021
  """
3703
- Invalidate SAML. Submit a SAML LogoutRequest message to Elasticsearch for consumption.
3704
- NOTE: This API is intended for use by custom web applications other than Kibana.
3705
- If you are using Kibana, refer to the documentation for configuring SAML single-sign-on
3706
- on the Elastic Stack. The logout request comes from the SAML IdP during an IdP
3707
- initiated Single Logout. The custom web application can use this API to have
3708
- Elasticsearch process the `LogoutRequest`. After successful validation of the
3709
- request, Elasticsearch invalidates the access token and refresh token that corresponds
3710
- to that specific SAML principal and provides a URL that contains a SAML LogoutResponse
3711
- message. Thus the user can be redirected back to their IdP.
4022
+ .. raw:: html
4023
+
4024
+ <p>Invalidate SAML.</p>
4025
+ <p>Submit a SAML LogoutRequest message to Elasticsearch for consumption.</p>
4026
+ <p>NOTE: This API is intended for use by custom web applications other than Kibana.
4027
+ If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
4028
+ <p>The logout request comes from the SAML IdP during an IdP initiated Single Logout.
4029
+ The custom web application can use this API to have Elasticsearch process the <code>LogoutRequest</code>.
4030
+ After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message.
4031
+ Thus the user can be redirected back to their IdP.</p>
3712
4032
 
3713
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-invalidate.html>`_
4033
+
4034
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-invalidate.html>`_
3714
4035
 
3715
4036
  :param query_string: The query part of the URL that the user was redirected to
3716
4037
  by the SAML IdP to initiate the Single Logout. This query should include
@@ -3775,16 +4096,17 @@ class SecurityClient(NamespacedClient):
3775
4096
  body: t.Optional[t.Dict[str, t.Any]] = None,
3776
4097
  ) -> ObjectApiResponse[t.Any]:
3777
4098
  """
3778
- Logout of SAML. Submits a request to invalidate an access token and refresh token.
3779
- NOTE: This API is intended for use by custom web applications other than Kibana.
3780
- If you are using Kibana, refer to the documentation for configuring SAML single-sign-on
3781
- on the Elastic Stack. This API invalidates the tokens that were generated for
3782
- a user by the SAML authenticate API. If the SAML realm in Elasticsearch is configured
3783
- accordingly and the SAML IdP supports this, the Elasticsearch response contains
3784
- a URL to redirect the user to the IdP that contains a SAML logout request (starting
3785
- an SP-initiated SAML Single Logout).
4099
+ .. raw:: html
4100
+
4101
+ <p>Logout of SAML.</p>
4102
+ <p>Submits a request to invalidate an access token and refresh token.</p>
4103
+ <p>NOTE: This API is intended for use by custom web applications other than Kibana.
4104
+ If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
4105
+ <p>This API invalidates the tokens that were generated for a user by the SAML authenticate API.
4106
+ If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout).</p>
4107
+
3786
4108
 
3787
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-logout.html>`_
4109
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-logout.html>`_
3788
4110
 
3789
4111
  :param token: The access token that was returned as a response to calling the
3790
4112
  SAML authenticate API. Alternatively, the most recent token that was received
@@ -3839,22 +4161,22 @@ class SecurityClient(NamespacedClient):
3839
4161
  body: t.Optional[t.Dict[str, t.Any]] = None,
3840
4162
  ) -> ObjectApiResponse[t.Any]:
3841
4163
  """
3842
- Prepare SAML authentication. Create a SAML authentication request (`<AuthnRequest>`)
3843
- as a URL string based on the configuration of the respective SAML realm in Elasticsearch.
3844
- NOTE: This API is intended for use by custom web applications other than Kibana.
3845
- If you are using Kibana, refer to the documentation for configuring SAML single-sign-on
3846
- on the Elastic Stack. This API returns a URL pointing to the SAML Identity Provider.
3847
- You can use the URL to redirect the browser of the user in order to continue
3848
- the authentication process. The URL includes a single parameter named `SAMLRequest`,
3849
- which contains a SAML Authentication request that is deflated and Base64 encoded.
3850
- If the configuration dictates that SAML authentication requests should be signed,
3851
- the URL has two extra parameters named `SigAlg` and `Signature`. These parameters
3852
- contain the algorithm used for the signature and the signature value itself.
3853
- It also returns a random string that uniquely identifies this SAML Authentication
3854
- request. The caller of this API needs to store this identifier as it needs to
3855
- be used in a following step of the authentication process.
3856
-
3857
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-prepare-authentication.html>`_
4164
+ .. raw:: html
4165
+
4166
+ <p>Prepare SAML authentication.</p>
4167
+ <p>Create a SAML authentication request (<code>&lt;AuthnRequest&gt;</code>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch.</p>
4168
+ <p>NOTE: This API is intended for use by custom web applications other than Kibana.
4169
+ If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
4170
+ <p>This API returns a URL pointing to the SAML Identity Provider.
4171
+ You can use the URL to redirect the browser of the user in order to continue the authentication process.
4172
+ The URL includes a single parameter named <code>SAMLRequest</code>, which contains a SAML Authentication request that is deflated and Base64 encoded.
4173
+ If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named <code>SigAlg</code> and <code>Signature</code>.
4174
+ These parameters contain the algorithm used for the signature and the signature value itself.
4175
+ It also returns a random string that uniquely identifies this SAML Authentication request.
4176
+ The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process.</p>
4177
+
4178
+
4179
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-prepare-authentication.html>`_
3858
4180
 
3859
4181
  :param acs: The Assertion Consumer Service URL that matches the one of the SAML
3860
4182
  realms in Elasticsearch. The realm is used to generate the authentication
@@ -3907,13 +4229,15 @@ class SecurityClient(NamespacedClient):
3907
4229
  pretty: t.Optional[bool] = None,
3908
4230
  ) -> ObjectApiResponse[t.Any]:
3909
4231
  """
3910
- Create SAML service provider metadata. Generate SAML metadata for a SAML 2.0
3911
- Service Provider. The SAML 2.0 specification provides a mechanism for Service
3912
- Providers to describe their capabilities and configuration using a metadata file.
3913
- This API generates Service Provider metadata based on the configuration of a
3914
- SAML realm in Elasticsearch.
4232
+ .. raw:: html
3915
4233
 
3916
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-sp-metadata.html>`_
4234
+ <p>Create SAML service provider metadata.</p>
4235
+ <p>Generate SAML metadata for a SAML 2.0 Service Provider.</p>
4236
+ <p>The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file.
4237
+ This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch.</p>
4238
+
4239
+
4240
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-saml-sp-metadata.html>`_
3917
4241
 
3918
4242
  :param realm_name: The name of the SAML realm in Elasticsearch.
3919
4243
  """
@@ -3957,14 +4281,16 @@ class SecurityClient(NamespacedClient):
3957
4281
  body: t.Optional[t.Dict[str, t.Any]] = None,
3958
4282
  ) -> ObjectApiResponse[t.Any]:
3959
4283
  """
3960
- Suggest a user profile. Get suggestions for user profiles that match specified
3961
- search criteria. NOTE: The user profile feature is designed only for use by Kibana
3962
- and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
3963
- Individual users and external applications should not call this API directly.
3964
- Elastic reserves the right to change or remove this feature in future releases
3965
- without prior notice.
4284
+ .. raw:: html
4285
+
4286
+ <p>Suggest a user profile.</p>
4287
+ <p>Get suggestions for user profiles that match specified search criteria.</p>
4288
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
4289
+ Individual users and external applications should not call this API directly.
4290
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
3966
4291
 
3967
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-suggest-user-profile.html>`_
4292
+
4293
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-suggest-user-profile.html>`_
3968
4294
 
3969
4295
  :param data: A comma-separated list of filters for the `data` field of the profile
3970
4296
  document. To return all content use `data=*`. To return a subset of content,
@@ -4033,38 +4359,43 @@ class SecurityClient(NamespacedClient):
4033
4359
  body: t.Optional[t.Dict[str, t.Any]] = None,
4034
4360
  ) -> ObjectApiResponse[t.Any]:
4035
4361
  """
4036
- Update an API key. Updates attributes of an existing API key. Users can only
4037
- update API keys that they created or that were granted to them. Use this API
4038
- to update API keys created by the create API Key or grant API Key APIs. If you
4039
- need to apply the same update to many API keys, you can use bulk update API Keys
4040
- to reduce overhead. It’s not possible to update expired API keys, or API keys
4041
- that have been invalidated by invalidate API Key. This API supports updates to
4042
- an API key’s access scope and metadata. The access scope of an API key is derived
4043
- from the `role_descriptors` you specify in the request, and a snapshot of the
4044
- owner user’s permissions at the time of the request. The snapshot of the owner’s
4045
- permissions is updated automatically on every call. If you don’t specify `role_descriptors`
4046
- in the request, a call to this API might still change the API key’s access scope.
4047
- This change can occur if the owner user’s permissions have changed since the
4048
- API key was created or last modified. To update another users API key, use the
4049
- `run_as` feature to submit a request on behalf of another user. IMPORTANT: It’s
4050
- not possible to use an API key as the authentication credential for this API.
4051
- To update an API key, the owner users credentials are required.
4052
-
4053
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-api-key.html>`_
4362
+ .. raw:: html
4363
+
4364
+ <p>Update an API key.</p>
4365
+ <p>Update attributes of an existing API key.
4366
+ This API supports updates to an API key's access scope, expiration, and metadata.</p>
4367
+ <p>To use this API, you must have at least the <code>manage_own_api_key</code> cluster privilege.
4368
+ Users can only update API keys that they created or that were granted to them.
4369
+ To update another user’s API key, use the <code>run_as</code> feature to submit a request on behalf of another user.</p>
4370
+ <p>IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required.</p>
4371
+ <p>Use this API to update API keys created by the create API key or grant API Key APIs.
4372
+ If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead.
4373
+ It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API.</p>
4374
+ <p>The access scope of an API key is derived from the <code>role_descriptors</code> you specify in the request and a snapshot of the owner user's permissions at the time of the request.
4375
+ The snapshot of the owner's permissions is updated automatically on every call.</p>
4376
+ <p>IMPORTANT: If you don't specify <code>role_descriptors</code> in the request, a call to this API might still change the API key's access scope.
4377
+ This change can occur if the owner user's permissions have changed since the API key was created or last modified.</p>
4378
+
4379
+
4380
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-api-key.html>`_
4054
4381
 
4055
4382
  :param id: The ID of the API key to update.
4056
- :param expiration: Expiration time for the API key.
4383
+ :param expiration: The expiration time for the API key. By default, API keys
4384
+ never expire. This property can be omitted to leave the expiration unchanged.
4057
4385
  :param metadata: Arbitrary metadata that you want to associate with the API key.
4058
- It supports nested data structure. Within the metadata object, keys beginning
4059
- with _ are reserved for system usage.
4060
- :param role_descriptors: An array of role descriptors for this API key. This
4061
- parameter is optional. When it is not specified or is an empty array, then
4062
- the API key will have a point in time snapshot of permissions of the authenticated
4063
- user. If you supply role descriptors then the resultant permissions would
4064
- be an intersection of API keys permissions and authenticated user’s permissions
4065
- thereby limiting the access scope for API keys. The structure of role descriptor
4066
- is the same as the request for create role API. For more details, see create
4067
- or update roles API.
4386
+ It supports a nested data structure. Within the metadata object, keys beginning
4387
+ with `_` are reserved for system usage. When specified, this value fully
4388
+ replaces the metadata previously associated with the API key.
4389
+ :param role_descriptors: The role descriptors to assign to this API key. The
4390
+ API key's effective permissions are an intersection of its assigned privileges
4391
+ and the point in time snapshot of permissions of the owner user. You can
4392
+ assign new privileges by specifying them in this parameter. To remove assigned
4393
+ privileges, you can supply an empty `role_descriptors` parameter, that is
4394
+ to say, an empty object `{}`. If an API key has no assigned privileges, it
4395
+ inherits the owner user's full permissions. The snapshot of the owner's permissions
4396
+ is always updated, whether you supply the `role_descriptors` parameter or
4397
+ not. The structure of a role descriptor is the same as the request for the
4398
+ create API keys API.
4068
4399
  """
4069
4400
  if id in SKIP_IN_PATH:
4070
4401
  raise ValueError("Empty value passed for parameter 'id'")
@@ -4119,21 +4450,22 @@ class SecurityClient(NamespacedClient):
4119
4450
  body: t.Optional[t.Dict[str, t.Any]] = None,
4120
4451
  ) -> ObjectApiResponse[t.Any]:
4121
4452
  """
4122
- Update a cross-cluster API key. Update the attributes of an existing cross-cluster
4123
- API key, which is used for API key based remote cluster access. To use this API,
4124
- you must have at least the `manage_security` cluster privilege. Users can only
4125
- update API keys that they created. To update another user's API key, use the
4126
- `run_as` feature to submit a request on behalf of another user. IMPORTANT: It's
4127
- not possible to use an API key as the authentication credential for this API.
4128
- To update an API key, the owner user's credentials are required. It's not possible
4129
- to update expired API keys, or API keys that have been invalidated by the invalidate
4130
- API key API. This API supports updates to an API key's access scope, metadata,
4131
- and expiration. The owner user's information, such as the `username` and `realm`,
4132
- is also updated automatically on every call. NOTE: This API cannot update REST
4133
- API keys, which should be updated by either the update API key or bulk update
4134
- API keys API.
4135
-
4136
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-cross-cluster-api-key.html>`_
4453
+ .. raw:: html
4454
+
4455
+ <p>Update a cross-cluster API key.</p>
4456
+ <p>Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.</p>
4457
+ <p>To use this API, you must have at least the <code>manage_security</code> cluster privilege.
4458
+ Users can only update API keys that they created.
4459
+ To update another user's API key, use the <code>run_as</code> feature to submit a request on behalf of another user.</p>
4460
+ <p>IMPORTANT: It's not possible to use an API key as the authentication credential for this API.
4461
+ To update an API key, the owner user's credentials are required.</p>
4462
+ <p>It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API.</p>
4463
+ <p>This API supports updates to an API key's access scope, metadata, and expiration.
4464
+ The owner user's information, such as the <code>username</code> and <code>realm</code>, is also updated automatically on every call.</p>
4465
+ <p>NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.</p>
4466
+
4467
+
4468
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-cross-cluster-api-key.html>`_
4137
4469
 
4138
4470
  :param id: The ID of the cross-cluster API key to update.
4139
4471
  :param access: The access to be granted to this API key. The access is composed
@@ -4203,14 +4535,16 @@ class SecurityClient(NamespacedClient):
4203
4535
  body: t.Optional[t.Dict[str, t.Any]] = None,
4204
4536
  ) -> ObjectApiResponse[t.Any]:
4205
4537
  """
4206
- Update security index settings. Update the user-configurable settings for the
4207
- security internal index (`.security` and associated indices). Only a subset of
4208
- settings are allowed to be modified, for example `index.auto_expand_replicas`
4209
- and `index.number_of_replicas`. If a specific index is not in use on the system
4210
- and settings are provided for it, the request will be rejected. This API does
4211
- not yet support configuring the settings for indices before they are in use.
4538
+ .. raw:: html
4539
+
4540
+ <p>Update security index settings.</p>
4541
+ <p>Update the user-configurable settings for the security internal index (<code>.security</code> and associated indices). Only a subset of settings are allowed to be modified. This includes <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
4542
+ <p>NOTE: If <code>index.auto_expand_replicas</code> is set, <code>index.number_of_replicas</code> will be ignored during updates.</p>
4543
+ <p>If a specific index is not in use on the system and settings are provided for it, the request will be rejected.
4544
+ This API does not yet support configuring the settings for indices before they are in use.</p>
4545
+
4212
4546
 
4213
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-settings.html>`_
4547
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-settings.html>`_
4214
4548
 
4215
4549
  :param master_timeout: The period to wait for a connection to the master node.
4216
4550
  If no response is received before the timeout expires, the request fails
@@ -4277,21 +4611,25 @@ class SecurityClient(NamespacedClient):
4277
4611
  body: t.Optional[t.Dict[str, t.Any]] = None,
4278
4612
  ) -> ObjectApiResponse[t.Any]:
4279
4613
  """
4280
- Update user profile data. Update specific data for the user profile that is associated
4281
- with a unique ID. NOTE: The user profile feature is designed only for use by
4282
- Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
4283
- Individual users and external applications should not call this API directly.
4284
- Elastic reserves the right to change or remove this feature in future releases
4285
- without prior notice. To use this API, you must have one of the following privileges:
4286
- * The `manage_user_profile` cluster privilege. * The `update_profile_data` global
4287
- privilege for the namespaces that are referenced in the request. This API updates
4288
- the `labels` and `data` fields of an existing user profile document with JSON
4289
- objects. New keys and their values are added to the profile document and conflicting
4290
- keys are replaced by data that's included in the request. For both labels and
4291
- data, content is namespaced by the top-level fields. The `update_profile_data`
4292
- global privilege grants privileges for updating only the allowed namespaces.
4293
-
4294
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-user-profile-data.html>`_
4614
+ .. raw:: html
4615
+
4616
+ <p>Update user profile data.</p>
4617
+ <p>Update specific data for the user profile that is associated with a unique ID.</p>
4618
+ <p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
4619
+ Individual users and external applications should not call this API directly.
4620
+ Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
4621
+ <p>To use this API, you must have one of the following privileges:</p>
4622
+ <ul>
4623
+ <li>The <code>manage_user_profile</code> cluster privilege.</li>
4624
+ <li>The <code>update_profile_data</code> global privilege for the namespaces that are referenced in the request.</li>
4625
+ </ul>
4626
+ <p>This API updates the <code>labels</code> and <code>data</code> fields of an existing user profile document with JSON objects.
4627
+ New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request.</p>
4628
+ <p>For both labels and data, content is namespaced by the top-level fields.
4629
+ The <code>update_profile_data</code> global privilege grants privileges for updating only the allowed namespaces.</p>
4630
+
4631
+
4632
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-update-user-profile-data.html>`_
4295
4633
 
4296
4634
  :param uid: A unique identifier for the user profile.
4297
4635
  :param data: Non-searchable data that you want to associate with the user profile.