479 lines
18 KiB
Python
479 lines
18 KiB
Python
# Licensed to Elasticsearch B.V. under one or more contributor
|
|
# license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright
|
|
# ownership. Elasticsearch B.V. licenses this file to you under
|
|
# the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
from typing import Any, MutableMapping, Optional, Union, Collection
|
|
from .utils import NamespacedClient
|
|
|
|
class SecurityClient(NamespacedClient):
|
|
async def authenticate(
|
|
self,
|
|
*,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def change_password(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
username: Optional[Any] = ...,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def clear_cached_realms(
|
|
self,
|
|
realms: Any,
|
|
*,
|
|
usernames: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def clear_cached_roles(
|
|
self,
|
|
name: Any,
|
|
*,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def create_api_key(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def delete_privileges(
|
|
self,
|
|
application: Any,
|
|
name: Any,
|
|
*,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def delete_role(
|
|
self,
|
|
name: Any,
|
|
*,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def delete_role_mapping(
|
|
self,
|
|
name: Any,
|
|
*,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def delete_user(
|
|
self,
|
|
username: Any,
|
|
*,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def disable_user(
|
|
self,
|
|
username: Any,
|
|
*,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def enable_user(
|
|
self,
|
|
username: Any,
|
|
*,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_api_key(
|
|
self,
|
|
*,
|
|
id: Optional[Any] = ...,
|
|
name: Optional[Any] = ...,
|
|
owner: Optional[Any] = ...,
|
|
realm_name: Optional[Any] = ...,
|
|
username: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_privileges(
|
|
self,
|
|
*,
|
|
application: Optional[Any] = ...,
|
|
name: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_role(
|
|
self,
|
|
*,
|
|
name: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_role_mapping(
|
|
self,
|
|
*,
|
|
name: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_token(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_user(
|
|
self,
|
|
*,
|
|
username: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_user_privileges(
|
|
self,
|
|
*,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def has_privileges(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
user: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def invalidate_api_key(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def invalidate_token(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def put_privileges(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def put_role(
|
|
self,
|
|
name: Any,
|
|
*,
|
|
body: Any,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def put_role_mapping(
|
|
self,
|
|
name: Any,
|
|
*,
|
|
body: Any,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def put_user(
|
|
self,
|
|
username: Any,
|
|
*,
|
|
body: Any,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def get_builtin_privileges(
|
|
self,
|
|
*,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def clear_cached_privileges(
|
|
self,
|
|
application: Any,
|
|
*,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def clear_api_key_cache(
|
|
self,
|
|
ids: Any,
|
|
*,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|
|
async def grant_api_key(
|
|
self,
|
|
*,
|
|
body: Any,
|
|
refresh: Optional[Any] = ...,
|
|
pretty: Optional[bool] = ...,
|
|
human: Optional[bool] = ...,
|
|
error_trace: Optional[bool] = ...,
|
|
format: Optional[str] = ...,
|
|
filter_path: Optional[Union[str, Collection[str]]] = ...,
|
|
request_timeout: Optional[Union[int, float]] = ...,
|
|
ignore: Optional[Union[int, Collection[int]]] = ...,
|
|
opaque_id: Optional[str] = ...,
|
|
params: Optional[MutableMapping[str, Any]] = ...,
|
|
headers: Optional[MutableMapping[str, str]] = ...
|
|
) -> Any: ...
|