Update APIs to 7.x-SNAPSHOT
This commit is contained in:
@@ -183,3 +183,23 @@ class IlmClient(NamespacedClient):
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_ilm/stop", params=params, headers=headers
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def migrate_to_data_tiers(self, body=None, params=None, headers=None):
|
||||
"""
|
||||
Migrates the indices and ILM policies away from custom node attribute
|
||||
allocation routing to data tiers routing
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-migrate-to-data-tiers.html>`_
|
||||
|
||||
:arg body: Optionally specify a legacy index template name to
|
||||
delete and optionally specify a node attribute name used for index shard
|
||||
routing (defaults to "data")
|
||||
"""
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_ilm/migrate_to_data_tiers",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -191,3 +191,20 @@ class IlmClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def migrate_to_data_tiers(
|
||||
self,
|
||||
*,
|
||||
body: 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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
|
||||
@@ -361,9 +361,9 @@ class SecurityClient(NamespacedClient):
|
||||
@query_params()
|
||||
async def get_user_privileges(self, params=None, headers=None):
|
||||
"""
|
||||
Retrieves application privileges.
|
||||
Retrieves security privileges for the logged in user.
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-privileges.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-user-privileges.html>`_
|
||||
"""
|
||||
return await self.transport.perform_request(
|
||||
"GET", "/_security/user/_privileges", params=params, headers=headers
|
||||
@@ -782,3 +782,100 @@ class SecurityClient(NamespacedClient):
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def saml_authenticate(self, body, params=None, headers=None):
|
||||
"""
|
||||
Exchanges a SAML Response message for an Elasticsearch access token and refresh
|
||||
token pair
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-authenticate.html>`_
|
||||
|
||||
:arg body: The SAML response to authenticate
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_security/saml/authenticate",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def saml_invalidate(self, body, params=None, headers=None):
|
||||
"""
|
||||
Consumes a SAML LogoutRequest
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-invalidate.html>`_
|
||||
|
||||
:arg body: The LogoutRequest message
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
"/_security/saml/invalidate",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def saml_logout(self, body, params=None, headers=None):
|
||||
"""
|
||||
Invalidates an access token and a refresh token that were generated via the
|
||||
SAML Authenticate API
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-logout.html>`_
|
||||
|
||||
:arg body: The tokens to invalidate
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_security/saml/logout", params=params, headers=headers, body=body
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def saml_prepare_authentication(self, body, params=None, headers=None):
|
||||
"""
|
||||
Creates a SAML authentication request
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-prepare-authentication.html>`_
|
||||
|
||||
:arg body: The realm for which to create the authentication
|
||||
request, identified by either its name or the ACS URL
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST", "/_security/saml/prepare", params=params, headers=headers, body=body
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def saml_service_provider_metadata(
|
||||
self, realm_name, params=None, headers=None
|
||||
):
|
||||
"""
|
||||
Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-sp-metadata.html>`_
|
||||
|
||||
:arg realm_name: The name of the SAML realm to get the metadata
|
||||
for
|
||||
"""
|
||||
if realm_name in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'realm_name'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"GET",
|
||||
_make_path("_security", "saml", "metadata", realm_name),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@@ -647,3 +647,88 @@ class SecurityClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def saml_authenticate(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def saml_invalidate(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def saml_logout(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def saml_prepare_authentication(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def saml_service_provider_metadata(
|
||||
self,
|
||||
realm_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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
|
||||
@@ -183,3 +183,23 @@ class IlmClient(NamespacedClient):
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_ilm/stop", params=params, headers=headers
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def migrate_to_data_tiers(self, body=None, params=None, headers=None):
|
||||
"""
|
||||
Migrates the indices and ILM policies away from custom node attribute
|
||||
allocation routing to data tiers routing
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ilm-migrate-to-data-tiers.html>`_
|
||||
|
||||
:arg body: Optionally specify a legacy index template name to
|
||||
delete and optionally specify a node attribute name used for index shard
|
||||
routing (defaults to "data")
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"POST",
|
||||
"/_ilm/migrate_to_data_tiers",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -191,3 +191,20 @@ class IlmClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def migrate_to_data_tiers(
|
||||
self,
|
||||
*,
|
||||
body: 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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
|
||||
@@ -359,9 +359,9 @@ class SecurityClient(NamespacedClient):
|
||||
@query_params()
|
||||
def get_user_privileges(self, params=None, headers=None):
|
||||
"""
|
||||
Retrieves application privileges.
|
||||
Retrieves security privileges for the logged in user.
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-privileges.html>`_
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-get-user-privileges.html>`_
|
||||
"""
|
||||
return self.transport.perform_request(
|
||||
"GET", "/_security/user/_privileges", params=params, headers=headers
|
||||
@@ -776,3 +776,98 @@ class SecurityClient(NamespacedClient):
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def saml_authenticate(self, body, params=None, headers=None):
|
||||
"""
|
||||
Exchanges a SAML Response message for an Elasticsearch access token and refresh
|
||||
token pair
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-authenticate.html>`_
|
||||
|
||||
:arg body: The SAML response to authenticate
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST",
|
||||
"/_security/saml/authenticate",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def saml_invalidate(self, body, params=None, headers=None):
|
||||
"""
|
||||
Consumes a SAML LogoutRequest
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-invalidate.html>`_
|
||||
|
||||
:arg body: The LogoutRequest message
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST",
|
||||
"/_security/saml/invalidate",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def saml_logout(self, body, params=None, headers=None):
|
||||
"""
|
||||
Invalidates an access token and a refresh token that were generated via the
|
||||
SAML Authenticate API
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-logout.html>`_
|
||||
|
||||
:arg body: The tokens to invalidate
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_security/saml/logout", params=params, headers=headers, body=body
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def saml_prepare_authentication(self, body, params=None, headers=None):
|
||||
"""
|
||||
Creates a SAML authentication request
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-prepare-authentication.html>`_
|
||||
|
||||
:arg body: The realm for which to create the authentication
|
||||
request, identified by either its name or the ACS URL
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST", "/_security/saml/prepare", params=params, headers=headers, body=body
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def saml_service_provider_metadata(self, realm_name, params=None, headers=None):
|
||||
"""
|
||||
Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-sp-metadata.html>`_
|
||||
|
||||
:arg realm_name: The name of the SAML realm to get the metadata
|
||||
for
|
||||
"""
|
||||
if realm_name in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'realm_name'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"GET",
|
||||
_make_path("_security", "saml", "metadata", realm_name),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@@ -647,3 +647,88 @@ class SecurityClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def saml_authenticate(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def saml_invalidate(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def saml_logout(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def saml_prepare_authentication(
|
||||
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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def saml_service_provider_metadata(
|
||||
self,
|
||||
realm_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] = ...,
|
||||
http_auth: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
api_key: Optional[Union[str, Tuple[str, str]]] = ...,
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user