Update APIs to 7.x-SNAPSHOT

This commit is contained in:
Seth Michael Larson
2021-06-21 11:55:24 -05:00
parent 12aa9972dc
commit 3eb605ed9f
4 changed files with 78 additions and 0 deletions
+21
View File
@@ -1755,3 +1755,24 @@ class MlClient(NamespacedClient):
headers=headers, headers=headers,
body=body, body=body,
) )
@query_params("wait_for_completion")
async def reset_job(self, job_id, params=None, headers=None):
"""
Resets an existing anomaly detection job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-reset-job.html>`_
:arg job_id: The ID of the job to reset
:arg wait_for_completion: Should this request wait until the
operation has completed before returning Default: True
"""
if job_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'job_id'.")
return await self.transport.perform_request(
"POST",
_make_path("_ml", "anomaly_detectors", job_id, "_reset"),
params=params,
headers=headers,
)
+18
View File
@@ -1291,3 +1291,21 @@ class MlClient(NamespacedClient):
params: Optional[MutableMapping[str, Any]] = ..., params: Optional[MutableMapping[str, Any]] = ...,
headers: Optional[MutableMapping[str, str]] = ..., headers: Optional[MutableMapping[str, str]] = ...,
) -> Any: ... ) -> Any: ...
async def reset_job(
self,
job_id: Any,
*,
wait_for_completion: 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: ...
+21
View File
@@ -1735,3 +1735,24 @@ class MlClient(NamespacedClient):
headers=headers, headers=headers,
body=body, body=body,
) )
@query_params("wait_for_completion")
def reset_job(self, job_id, params=None, headers=None):
"""
Resets an existing anomaly detection job.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/ml-reset-job.html>`_
:arg job_id: The ID of the job to reset
:arg wait_for_completion: Should this request wait until the
operation has completed before returning Default: True
"""
if job_id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'job_id'.")
return self.transport.perform_request(
"POST",
_make_path("_ml", "anomaly_detectors", job_id, "_reset"),
params=params,
headers=headers,
)
+18
View File
@@ -1291,3 +1291,21 @@ class MlClient(NamespacedClient):
params: Optional[MutableMapping[str, Any]] = ..., params: Optional[MutableMapping[str, Any]] = ...,
headers: Optional[MutableMapping[str, str]] = ..., headers: Optional[MutableMapping[str, str]] = ...,
) -> Any: ... ) -> Any: ...
def reset_job(
self,
job_id: Any,
*,
wait_for_completion: 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: ...