Skip to content

Commit f2c9f63

Browse files
Auto-generated API code
1 parent 7361e80 commit f2c9f63

File tree

6 files changed

+36
-2
lines changed

6 files changed

+36
-2
lines changed

elasticsearch/_async/client/inference.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ async def delete(
3636
str,
3737
]
3838
] = None,
39+
dry_run: t.Optional[bool] = None,
3940
error_trace: t.Optional[bool] = None,
4041
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
42+
force: t.Optional[bool] = None,
4143
human: t.Optional[bool] = None,
4244
pretty: t.Optional[bool] = None,
4345
) -> ObjectApiResponse[t.Any]:
@@ -48,6 +50,10 @@ async def delete(
4850
4951
:param inference_id: The inference Id
5052
:param task_type: The task type
53+
:param dry_run: When true, the endpoint is not deleted, and a list of ingest
54+
processors which reference this endpoint is returned
55+
:param force: When true, the inference endpoint is forcefully deleted even if
56+
it is still being used by ingest processors or semantic text fields
5157
"""
5258
if inference_id in SKIP_IN_PATH:
5359
raise ValueError("Empty value passed for parameter 'inference_id'")
@@ -64,10 +70,14 @@ async def delete(
6470
else:
6571
raise ValueError("Couldn't find a path for the given parameters")
6672
__query: t.Dict[str, t.Any] = {}
73+
if dry_run is not None:
74+
__query["dry_run"] = dry_run
6775
if error_trace is not None:
6876
__query["error_trace"] = error_trace
6977
if filter_path is not None:
7078
__query["filter_path"] = filter_path
79+
if force is not None:
80+
__query["force"] = force
7181
if human is not None:
7282
__query["human"] = human
7383
if pretty is not None:

elasticsearch/_async/client/ml.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5088,7 +5088,11 @@ async def update_trained_model_deployment(
50885088
if not __body:
50895089
if number_of_allocations is not None:
50905090
__body["number_of_allocations"] = number_of_allocations
5091-
__headers = {"accept": "application/json", "content-type": "application/json"}
5091+
if not __body:
5092+
__body = None # type: ignore[assignment]
5093+
__headers = {"accept": "application/json"}
5094+
if __body is not None:
5095+
__headers["content-type"] = "application/json"
50925096
return await self.perform_request( # type: ignore[return-value]
50935097
"POST",
50945098
__path,

elasticsearch/_async/client/security.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,9 @@ async def put_role(
21222122
this operation visible to search, if `wait_for` then wait for a refresh to
21232123
make this operation visible to search, if `false` then do nothing with refreshes.
21242124
:param run_as: A list of users that the owners of this role can impersonate.
2125+
*Note*: in Serverless, the run-as feature is disabled. For API compatibility,
2126+
you can still specify an empty `run_as` field, but a non-empty list will
2127+
be rejected.
21252128
:param transient_metadata: Indicates roles that might be incompatible with the
21262129
current cluster license, specifically roles with document and field level
21272130
security. When the cluster license doesn’t allow certain features for a given

elasticsearch/_sync/client/inference.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ def delete(
3636
str,
3737
]
3838
] = None,
39+
dry_run: t.Optional[bool] = None,
3940
error_trace: t.Optional[bool] = None,
4041
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
42+
force: t.Optional[bool] = None,
4143
human: t.Optional[bool] = None,
4244
pretty: t.Optional[bool] = None,
4345
) -> ObjectApiResponse[t.Any]:
@@ -48,6 +50,10 @@ def delete(
4850
4951
:param inference_id: The inference Id
5052
:param task_type: The task type
53+
:param dry_run: When true, the endpoint is not deleted, and a list of ingest
54+
processors which reference this endpoint is returned
55+
:param force: When true, the inference endpoint is forcefully deleted even if
56+
it is still being used by ingest processors or semantic text fields
5157
"""
5258
if inference_id in SKIP_IN_PATH:
5359
raise ValueError("Empty value passed for parameter 'inference_id'")
@@ -64,10 +70,14 @@ def delete(
6470
else:
6571
raise ValueError("Couldn't find a path for the given parameters")
6672
__query: t.Dict[str, t.Any] = {}
73+
if dry_run is not None:
74+
__query["dry_run"] = dry_run
6775
if error_trace is not None:
6876
__query["error_trace"] = error_trace
6977
if filter_path is not None:
7078
__query["filter_path"] = filter_path
79+
if force is not None:
80+
__query["force"] = force
7181
if human is not None:
7282
__query["human"] = human
7383
if pretty is not None:

elasticsearch/_sync/client/ml.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5088,7 +5088,11 @@ def update_trained_model_deployment(
50885088
if not __body:
50895089
if number_of_allocations is not None:
50905090
__body["number_of_allocations"] = number_of_allocations
5091-
__headers = {"accept": "application/json", "content-type": "application/json"}
5091+
if not __body:
5092+
__body = None # type: ignore[assignment]
5093+
__headers = {"accept": "application/json"}
5094+
if __body is not None:
5095+
__headers["content-type"] = "application/json"
50925096
return self.perform_request( # type: ignore[return-value]
50935097
"POST",
50945098
__path,

elasticsearch/_sync/client/security.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,9 @@ def put_role(
21222122
this operation visible to search, if `wait_for` then wait for a refresh to
21232123
make this operation visible to search, if `false` then do nothing with refreshes.
21242124
:param run_as: A list of users that the owners of this role can impersonate.
2125+
*Note*: in Serverless, the run-as feature is disabled. For API compatibility,
2126+
you can still specify an empty `run_as` field, but a non-empty list will
2127+
be rejected.
21252128
:param transient_metadata: Indicates roles that might be incompatible with the
21262129
current cluster license, specifically roles with document and field level
21272130
security. When the cluster license doesn’t allow certain features for a given

0 commit comments

Comments
 (0)