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