Update APIs to 7.x-SNAPSHOT
This commit is contained in:
@@ -2145,3 +2145,33 @@ class AsyncElasticsearch(object):
|
||||
return await self.transport.perform_request(
|
||||
"POST", _make_path(index, "_pit"), params=params, headers=headers
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def terms_enum(self, index, body=None, params=None, headers=None):
|
||||
"""
|
||||
The terms enum API can be used to discover terms in the index that begin with
|
||||
the provided string. It is designed for low-latency look-ups used in auto-
|
||||
complete scenarios.
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-terms-enum.html>`_
|
||||
|
||||
.. warning::
|
||||
|
||||
This API is **beta** so may include breaking changes
|
||||
or be removed in a future version
|
||||
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
`_all` or empty string to perform the operation on all indices
|
||||
:arg body: field name, string which is the prefix expected in
|
||||
matching terms, timeout and size for max number of results
|
||||
"""
|
||||
if index in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'index'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path(index, "_terms_enum"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -1150,3 +1150,21 @@ class AsyncElasticsearch(object):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def terms_enum(
|
||||
self,
|
||||
index: Any,
|
||||
*,
|
||||
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: ...
|
||||
|
||||
@@ -762,3 +762,23 @@ class SecurityClient(NamespacedClient):
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
async def saml_complete_logout(self, body, params=None, headers=None):
|
||||
"""
|
||||
Verifies the logout response sent from the SAML IdP
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-complete-logout.html>`_
|
||||
|
||||
:arg body: The logout response to verify
|
||||
"""
|
||||
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/complete_logout",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -630,3 +630,20 @@ class SecurityClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def saml_complete_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: ...
|
||||
|
||||
@@ -285,3 +285,57 @@ class SnapshotClient(NamespacedClient):
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"blob_count",
|
||||
"concurrency",
|
||||
"detailed",
|
||||
"early_read_node_count",
|
||||
"max_blob_size",
|
||||
"max_total_data_size",
|
||||
"rare_action_probability",
|
||||
"rarely_abort_writes",
|
||||
"read_node_count",
|
||||
"seed",
|
||||
"timeout",
|
||||
)
|
||||
async def repository_analyze(self, repository, params=None, headers=None):
|
||||
"""
|
||||
Analyzes a repository for correctness and performance
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg blob_count: Number of blobs to create during the test.
|
||||
Defaults to 100.
|
||||
:arg concurrency: Number of operations to run concurrently
|
||||
during the test. Defaults to 10.
|
||||
:arg detailed: Whether to return detailed results or a summary.
|
||||
Defaults to 'false' so that only the summary is returned.
|
||||
:arg early_read_node_count: Number of nodes on which to perform
|
||||
an early read on a blob, i.e. before writing has completed. Early reads
|
||||
are rare actions so the 'rare_action_probability' parameter is also
|
||||
relevant. Defaults to 2.
|
||||
:arg max_blob_size: Maximum size of a blob to create during the
|
||||
test, e.g '1gb' or '100mb'. Defaults to '10mb'.
|
||||
:arg max_total_data_size: Maximum total size of all blobs to
|
||||
create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.
|
||||
:arg rare_action_probability: Probability of taking a rare
|
||||
action such as an early read or an overwrite. Defaults to 0.02.
|
||||
:arg rarely_abort_writes: Whether to rarely abort writes before
|
||||
they complete. Defaults to 'true'.
|
||||
:arg read_node_count: Number of nodes on which to read a blob
|
||||
after writing. Defaults to 10.
|
||||
:arg seed: Seed for the random number generator used to create
|
||||
the test workload. Defaults to a random value.
|
||||
:arg timeout: Explicit operation timeout. Defaults to '30s'.
|
||||
"""
|
||||
if repository in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'repository'.")
|
||||
|
||||
return await self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path("_snapshot", repository, "_analyze"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@@ -241,3 +241,31 @@ class SnapshotClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
async def repository_analyze(
|
||||
self,
|
||||
repository: Any,
|
||||
*,
|
||||
blob_count: Optional[Any] = ...,
|
||||
concurrency: Optional[Any] = ...,
|
||||
detailed: Optional[Any] = ...,
|
||||
early_read_node_count: Optional[Any] = ...,
|
||||
max_blob_size: Optional[Any] = ...,
|
||||
max_total_data_size: Optional[Any] = ...,
|
||||
rare_action_probability: Optional[Any] = ...,
|
||||
rarely_abort_writes: Optional[Any] = ...,
|
||||
read_node_count: Optional[Any] = ...,
|
||||
seed: Optional[Any] = ...,
|
||||
timeout: 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: ...
|
||||
|
||||
@@ -2133,3 +2133,33 @@ class Elasticsearch(object):
|
||||
return self.transport.perform_request(
|
||||
"POST", _make_path(index, "_pit"), params=params, headers=headers
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def terms_enum(self, index, body=None, params=None, headers=None):
|
||||
"""
|
||||
The terms enum API can be used to discover terms in the index that begin with
|
||||
the provided string. It is designed for low-latency look-ups used in auto-
|
||||
complete scenarios.
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-terms-enum.html>`_
|
||||
|
||||
.. warning::
|
||||
|
||||
This API is **beta** so may include breaking changes
|
||||
or be removed in a future version
|
||||
|
||||
:arg index: A comma-separated list of index names to search; use
|
||||
`_all` or empty string to perform the operation on all indices
|
||||
:arg body: field name, string which is the prefix expected in
|
||||
matching terms, timeout and size for max number of results
|
||||
"""
|
||||
if index in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'index'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path(index, "_terms_enum"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -1150,3 +1150,21 @@ class Elasticsearch(object):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def terms_enum(
|
||||
self,
|
||||
index: Any,
|
||||
*,
|
||||
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: ...
|
||||
|
||||
@@ -756,3 +756,23 @@ class SecurityClient(NamespacedClient):
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def saml_complete_logout(self, body, params=None, headers=None):
|
||||
"""
|
||||
Verifies the logout response sent from the SAML IdP
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-saml-complete-logout.html>`_
|
||||
|
||||
:arg body: The logout response to verify
|
||||
"""
|
||||
if body in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'body'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST",
|
||||
"/_security/saml/complete_logout",
|
||||
params=params,
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@@ -630,3 +630,20 @@ class SecurityClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def saml_complete_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: ...
|
||||
|
||||
@@ -285,3 +285,57 @@ class SnapshotClient(NamespacedClient):
|
||||
headers=headers,
|
||||
body=body,
|
||||
)
|
||||
|
||||
@query_params(
|
||||
"blob_count",
|
||||
"concurrency",
|
||||
"detailed",
|
||||
"early_read_node_count",
|
||||
"max_blob_size",
|
||||
"max_total_data_size",
|
||||
"rare_action_probability",
|
||||
"rarely_abort_writes",
|
||||
"read_node_count",
|
||||
"seed",
|
||||
"timeout",
|
||||
)
|
||||
def repository_analyze(self, repository, params=None, headers=None):
|
||||
"""
|
||||
Analyzes a repository for correctness and performance
|
||||
|
||||
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-snapshots.html>`_
|
||||
|
||||
:arg repository: A repository name
|
||||
:arg blob_count: Number of blobs to create during the test.
|
||||
Defaults to 100.
|
||||
:arg concurrency: Number of operations to run concurrently
|
||||
during the test. Defaults to 10.
|
||||
:arg detailed: Whether to return detailed results or a summary.
|
||||
Defaults to 'false' so that only the summary is returned.
|
||||
:arg early_read_node_count: Number of nodes on which to perform
|
||||
an early read on a blob, i.e. before writing has completed. Early reads
|
||||
are rare actions so the 'rare_action_probability' parameter is also
|
||||
relevant. Defaults to 2.
|
||||
:arg max_blob_size: Maximum size of a blob to create during the
|
||||
test, e.g '1gb' or '100mb'. Defaults to '10mb'.
|
||||
:arg max_total_data_size: Maximum total size of all blobs to
|
||||
create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.
|
||||
:arg rare_action_probability: Probability of taking a rare
|
||||
action such as an early read or an overwrite. Defaults to 0.02.
|
||||
:arg rarely_abort_writes: Whether to rarely abort writes before
|
||||
they complete. Defaults to 'true'.
|
||||
:arg read_node_count: Number of nodes on which to read a blob
|
||||
after writing. Defaults to 10.
|
||||
:arg seed: Seed for the random number generator used to create
|
||||
the test workload. Defaults to a random value.
|
||||
:arg timeout: Explicit operation timeout. Defaults to '30s'.
|
||||
"""
|
||||
if repository in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'repository'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"POST",
|
||||
_make_path("_snapshot", repository, "_analyze"),
|
||||
params=params,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
@@ -241,3 +241,31 @@ class SnapshotClient(NamespacedClient):
|
||||
params: Optional[MutableMapping[str, Any]] = ...,
|
||||
headers: Optional[MutableMapping[str, str]] = ...,
|
||||
) -> Any: ...
|
||||
def repository_analyze(
|
||||
self,
|
||||
repository: Any,
|
||||
*,
|
||||
blob_count: Optional[Any] = ...,
|
||||
concurrency: Optional[Any] = ...,
|
||||
detailed: Optional[Any] = ...,
|
||||
early_read_node_count: Optional[Any] = ...,
|
||||
max_blob_size: Optional[Any] = ...,
|
||||
max_total_data_size: Optional[Any] = ...,
|
||||
rare_action_probability: Optional[Any] = ...,
|
||||
rarely_abort_writes: Optional[Any] = ...,
|
||||
read_node_count: Optional[Any] = ...,
|
||||
seed: Optional[Any] = ...,
|
||||
timeout: 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: ...
|
||||
|
||||
@@ -60,6 +60,8 @@ IMPLEMENTED_FEATURES = {
|
||||
|
||||
# broken YAML tests on some releases
|
||||
SKIP_TESTS = {
|
||||
"ml/job_cat_apis[0]",
|
||||
"ml/post_data[0]",
|
||||
"ml/post_data[1]",
|
||||
"ml/post_data[2]",
|
||||
"ml/post_data[3]",
|
||||
@@ -69,6 +71,7 @@ SKIP_TESTS = {
|
||||
"ml/get_trained_model_stats[1]",
|
||||
"ml/get_trained_model_stats[2]",
|
||||
"ml/get_trained_model_stats[3]",
|
||||
"ml/set_upgrade_mode[0]",
|
||||
"ml/set_upgrade_mode[1]",
|
||||
"ml/set_upgrade_mode[2]",
|
||||
"ml/set_upgrade_mode[3]",
|
||||
|
||||
Reference in New Issue
Block a user