Skip to content

Commit c082b85

Browse files
Auto-generated API code
1 parent e231d21 commit c082b85

File tree

8 files changed

+138
-10
lines changed

8 files changed

+138
-10
lines changed

elasticsearch_serverless/_async/client/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,14 @@ async def bulk(
456456
error_trace: t.Optional[bool] = None,
457457
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
458458
human: t.Optional[bool] = None,
459+
list_executed_pipelines: t.Optional[bool] = None,
459460
pipeline: t.Optional[str] = None,
460461
pretty: t.Optional[bool] = None,
461462
refresh: t.Optional[
462463
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
463464
] = None,
464465
require_alias: t.Optional[bool] = None,
466+
require_data_stream: t.Optional[bool] = None,
465467
routing: t.Optional[str] = None,
466468
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
467469
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -481,6 +483,8 @@ async def bulk(
481483
:param operations:
482484
:param index: Name of the data stream, index, or index alias to perform bulk
483485
actions on.
486+
:param list_executed_pipelines: If `true`, the response will include the ingest
487+
pipelines that were executed for each index or create.
484488
:param pipeline: ID of the pipeline to use to preprocess incoming documents.
485489
If the index has a default ingest pipeline specified, then setting the value
486490
to `_none` disables the default ingest pipeline for this request. If a final
@@ -491,6 +495,8 @@ async def bulk(
491495
make this operation visible to search, if `false` do nothing with refreshes.
492496
Valid values: `true`, `false`, `wait_for`.
493497
:param require_alias: If `true`, the request’s actions must target an index alias.
498+
:param require_data_stream: If `true`, the request's actions must target a data
499+
stream (existing or to-be-created).
494500
:param routing: Custom value used to route operations to a specific shard.
495501
:param source: `true` or `false` to return the `_source` field or not, or a list
496502
of fields to return.
@@ -524,6 +530,8 @@ async def bulk(
524530
__query["filter_path"] = filter_path
525531
if human is not None:
526532
__query["human"] = human
533+
if list_executed_pipelines is not None:
534+
__query["list_executed_pipelines"] = list_executed_pipelines
527535
if pipeline is not None:
528536
__query["pipeline"] = pipeline
529537
if pretty is not None:
@@ -532,6 +540,8 @@ async def bulk(
532540
__query["refresh"] = refresh
533541
if require_alias is not None:
534542
__query["require_alias"] = require_alias
543+
if require_data_stream is not None:
544+
__query["require_data_stream"] = require_data_stream
535545
if routing is not None:
536546
__query["routing"] = routing
537547
if source is not None:

elasticsearch_serverless/_async/client/indices.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ async def explain_data_lifecycle(
824824
pretty: t.Optional[bool] = None,
825825
) -> ObjectApiResponse[t.Any]:
826826
"""
827-
Get the status for a data stream lifecycle. Retrieves information about an index
828-
or data streams current data stream lifecycle status, such as time since index
827+
Get the status for a data stream lifecycle. Get information about an index or
828+
data stream's current data stream lifecycle status, such as time since index
829829
creation, time since rollover, the lifecycle configuration managing the index,
830830
or any errors encountered during lifecycle execution.
831831

elasticsearch_serverless/_async/client/license.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ async def get(
3737
pretty: t.Optional[bool] = None,
3838
) -> ObjectApiResponse[t.Any]:
3939
"""
40-
Get license information. Returns information about your Elastic license, including
41-
its type, its status, when it was issued, and when it expires. For more information
42-
about the different types of licenses, refer to [Elastic Stack subscriptions](https://www.elastic.co/subscriptions).
40+
Get license information. Get information about your Elastic license including
41+
its type, its status, when it was issued, and when it expires. NOTE: If the master
42+
node is generating a new cluster state, the get license API may return a `404
43+
Not Found` response. If you receive an unexpected 404 response after cluster
44+
startup, wait a short period and retry the request.
4345
4446
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html>`_
4547

elasticsearch_serverless/_async/client/ml.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@ async def get_trained_models(
14641464
],
14651465
]
14661466
] = None,
1467+
include_model_definition: t.Optional[bool] = None,
14671468
pretty: t.Optional[bool] = None,
14681469
size: t.Optional[int] = None,
14691470
tags: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -1490,6 +1491,8 @@ async def get_trained_models(
14901491
:param from_: Skips the specified number of models.
14911492
:param include: A comma delimited string of optional fields to include in the
14921493
response body.
1494+
:param include_model_definition: parameter is deprecated! Use [include=definition]
1495+
instead
14931496
:param size: Specifies the maximum number of models to obtain.
14941497
:param tags: A comma delimited string of tags. A trained model can have many
14951498
tags, or none. When supplied, only trained models that contain all the supplied
@@ -1519,6 +1522,8 @@ async def get_trained_models(
15191522
__query["human"] = human
15201523
if include is not None:
15211524
__query["include"] = include
1525+
if include_model_definition is not None:
1526+
__query["include_model_definition"] = include_model_definition
15221527
if pretty is not None:
15231528
__query["pretty"] = pretty
15241529
if size is not None:
@@ -2038,9 +2043,11 @@ async def put_calendar_job(
20382043
"description",
20392044
"headers",
20402045
"max_num_threads",
2046+
"meta",
20412047
"model_memory_limit",
20422048
"version",
20432049
),
2050+
parameter_aliases={"_meta": "meta"},
20442051
ignore_deprecated_options={"headers"},
20452052
)
20462053
async def put_data_frame_analytics(
@@ -2058,6 +2065,7 @@ async def put_data_frame_analytics(
20582065
headers: t.Optional[t.Mapping[str, t.Union[str, t.Sequence[str]]]] = None,
20592066
human: t.Optional[bool] = None,
20602067
max_num_threads: t.Optional[int] = None,
2068+
meta: t.Optional[t.Mapping[str, t.Any]] = None,
20612069
model_memory_limit: t.Optional[str] = None,
20622070
pretty: t.Optional[bool] = None,
20632071
version: t.Optional[str] = None,
@@ -2118,6 +2126,7 @@ async def put_data_frame_analytics(
21182126
Using more threads may decrease the time necessary to complete the analysis
21192127
at the cost of using more CPU. Note that the process may use additional threads
21202128
for operational functionality other than the analysis itself.
2129+
:param meta:
21212130
:param model_memory_limit: The approximate maximum amount of memory resources
21222131
that are permitted for analytical processing. If your `elasticsearch.yml`
21232132
file contains an `xpack.ml.max_model_memory_limit` setting, an error occurs
@@ -2162,6 +2171,8 @@ async def put_data_frame_analytics(
21622171
__body["headers"] = headers
21632172
if max_num_threads is not None:
21642173
__body["max_num_threads"] = max_num_threads
2174+
if meta is not None:
2175+
__body["_meta"] = meta
21652176
if model_memory_limit is not None:
21662177
__body["model_memory_limit"] = model_memory_limit
21672178
if version is not None:
@@ -2180,6 +2191,7 @@ async def put_data_frame_analytics(
21802191
@_rewrite_parameters(
21812192
body_fields=(
21822193
"aggregations",
2194+
"aggs",
21832195
"chunking_config",
21842196
"delayed_data_check_config",
21852197
"frequency",
@@ -2202,6 +2214,7 @@ async def put_datafeed(
22022214
*,
22032215
datafeed_id: str,
22042216
aggregations: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
2217+
aggs: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
22052218
allow_no_indices: t.Optional[bool] = None,
22062219
chunking_config: t.Optional[t.Mapping[str, t.Any]] = None,
22072220
delayed_data_check_config: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -2255,6 +2268,8 @@ async def put_datafeed(
22552268
:param aggregations: If set, the datafeed performs aggregation searches. Support
22562269
for aggregations is limited and should be used only with low cardinality
22572270
data.
2271+
:param aggs: If set, the datafeed performs aggregation searches. Support for
2272+
aggregations is limited and should be used only with low cardinality data.
22582273
:param allow_no_indices: If true, wildcard indices expressions that resolve into
22592274
no concrete indices are ignored. This includes the `_all` string or when
22602275
no indices are specified.
@@ -2342,6 +2357,8 @@ async def put_datafeed(
23422357
if not __body:
23432358
if aggregations is not None:
23442359
__body["aggregations"] = aggregations
2360+
if aggs is not None:
2361+
__body["aggs"] = aggs
23452362
if chunking_config is not None:
23462363
__body["chunking_config"] = chunking_config
23472364
if delayed_data_check_config is not None:
@@ -2464,6 +2481,7 @@ async def put_job(
24642481
analysis_config: t.Optional[t.Mapping[str, t.Any]] = None,
24652482
data_description: t.Optional[t.Mapping[str, t.Any]] = None,
24662483
allow_lazy_open: t.Optional[bool] = None,
2484+
allow_no_indices: t.Optional[bool] = None,
24672485
analysis_limits: t.Optional[t.Mapping[str, t.Any]] = None,
24682486
background_persist_interval: t.Optional[
24692487
t.Union[str, t.Literal[-1], t.Literal[0]]
@@ -2473,9 +2491,19 @@ async def put_job(
24732491
datafeed_config: t.Optional[t.Mapping[str, t.Any]] = None,
24742492
description: t.Optional[str] = None,
24752493
error_trace: t.Optional[bool] = None,
2494+
expand_wildcards: t.Optional[
2495+
t.Union[
2496+
t.Sequence[
2497+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2498+
],
2499+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
2500+
]
2501+
] = None,
24762502
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
24772503
groups: t.Optional[t.Sequence[str]] = None,
24782504
human: t.Optional[bool] = None,
2505+
ignore_throttled: t.Optional[bool] = None,
2506+
ignore_unavailable: t.Optional[bool] = None,
24792507
model_plot_config: t.Optional[t.Mapping[str, t.Any]] = None,
24802508
model_snapshot_retention_days: t.Optional[int] = None,
24812509
pretty: t.Optional[bool] = None,
@@ -2510,6 +2538,9 @@ async def put_job(
25102538
to true, the open anomaly detection jobs API does not return an error and
25112539
the job waits in the opening state until sufficient machine learning node
25122540
capacity is available.
2541+
:param allow_no_indices: If `true`, wildcard indices expressions that resolve
2542+
into no concrete indices are ignored. This includes the `_all` string or
2543+
when no indices are specified.
25132544
:param analysis_limits: Limits can be applied for the resources required to hold
25142545
the mathematical models in memory. These limits are approximate and can be
25152546
set per job. They do not control the memory used by other processes, for
@@ -2533,7 +2564,20 @@ async def put_job(
25332564
using those same roles. If you provide secondary authorization headers, those
25342565
credentials are used instead.
25352566
:param description: A description of the job.
2567+
:param expand_wildcards: Type of index that wildcard patterns can match. If the
2568+
request can target data streams, this argument determines whether wildcard
2569+
expressions match hidden data streams. Supports comma-separated values. Valid
2570+
values are: * `all`: Match any data stream or index, including hidden ones.
2571+
* `closed`: Match closed, non-hidden indices. Also matches any non-hidden
2572+
data stream. Data streams cannot be closed. * `hidden`: Match hidden data
2573+
streams and hidden indices. Must be combined with `open`, `closed`, or both.
2574+
* `none`: Wildcard patterns are not accepted. * `open`: Match open, non-hidden
2575+
indices. Also matches any non-hidden data stream.
25362576
:param groups: A list of job groups. A job can belong to no groups or many.
2577+
:param ignore_throttled: If `true`, concrete, expanded or aliased indices are
2578+
ignored when frozen.
2579+
:param ignore_unavailable: If `true`, unavailable indices (missing or closed)
2580+
are ignored.
25372581
:param model_plot_config: This advanced configuration option stores model information
25382582
along with the results. It provides a more detailed view into anomaly detection.
25392583
If you enable model plot it can add considerable overhead to the performance
@@ -2573,12 +2617,20 @@ async def put_job(
25732617
__path = f'/_ml/anomaly_detectors/{__path_parts["job_id"]}'
25742618
__query: t.Dict[str, t.Any] = {}
25752619
__body: t.Dict[str, t.Any] = body if body is not None else {}
2620+
if allow_no_indices is not None:
2621+
__query["allow_no_indices"] = allow_no_indices
25762622
if error_trace is not None:
25772623
__query["error_trace"] = error_trace
2624+
if expand_wildcards is not None:
2625+
__query["expand_wildcards"] = expand_wildcards
25782626
if filter_path is not None:
25792627
__query["filter_path"] = filter_path
25802628
if human is not None:
25812629
__query["human"] = human
2630+
if ignore_throttled is not None:
2631+
__query["ignore_throttled"] = ignore_throttled
2632+
if ignore_unavailable is not None:
2633+
__query["ignore_unavailable"] = ignore_unavailable
25822634
if pretty is not None:
25832635
__query["pretty"] = pretty
25842636
if not __body:

elasticsearch_serverless/_sync/client/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,14 @@ def bulk(
454454
error_trace: t.Optional[bool] = None,
455455
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
456456
human: t.Optional[bool] = None,
457+
list_executed_pipelines: t.Optional[bool] = None,
457458
pipeline: t.Optional[str] = None,
458459
pretty: t.Optional[bool] = None,
459460
refresh: t.Optional[
460461
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
461462
] = None,
462463
require_alias: t.Optional[bool] = None,
464+
require_data_stream: t.Optional[bool] = None,
463465
routing: t.Optional[str] = None,
464466
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
465467
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -479,6 +481,8 @@ def bulk(
479481
:param operations:
480482
:param index: Name of the data stream, index, or index alias to perform bulk
481483
actions on.
484+
:param list_executed_pipelines: If `true`, the response will include the ingest
485+
pipelines that were executed for each index or create.
482486
:param pipeline: ID of the pipeline to use to preprocess incoming documents.
483487
If the index has a default ingest pipeline specified, then setting the value
484488
to `_none` disables the default ingest pipeline for this request. If a final
@@ -489,6 +493,8 @@ def bulk(
489493
make this operation visible to search, if `false` do nothing with refreshes.
490494
Valid values: `true`, `false`, `wait_for`.
491495
:param require_alias: If `true`, the request’s actions must target an index alias.
496+
:param require_data_stream: If `true`, the request's actions must target a data
497+
stream (existing or to-be-created).
492498
:param routing: Custom value used to route operations to a specific shard.
493499
:param source: `true` or `false` to return the `_source` field or not, or a list
494500
of fields to return.
@@ -522,6 +528,8 @@ def bulk(
522528
__query["filter_path"] = filter_path
523529
if human is not None:
524530
__query["human"] = human
531+
if list_executed_pipelines is not None:
532+
__query["list_executed_pipelines"] = list_executed_pipelines
525533
if pipeline is not None:
526534
__query["pipeline"] = pipeline
527535
if pretty is not None:
@@ -530,6 +538,8 @@ def bulk(
530538
__query["refresh"] = refresh
531539
if require_alias is not None:
532540
__query["require_alias"] = require_alias
541+
if require_data_stream is not None:
542+
__query["require_data_stream"] = require_data_stream
533543
if routing is not None:
534544
__query["routing"] = routing
535545
if source is not None:

elasticsearch_serverless/_sync/client/indices.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ def explain_data_lifecycle(
824824
pretty: t.Optional[bool] = None,
825825
) -> ObjectApiResponse[t.Any]:
826826
"""
827-
Get the status for a data stream lifecycle. Retrieves information about an index
828-
or data streams current data stream lifecycle status, such as time since index
827+
Get the status for a data stream lifecycle. Get information about an index or
828+
data stream's current data stream lifecycle status, such as time since index
829829
creation, time since rollover, the lifecycle configuration managing the index,
830830
or any errors encountered during lifecycle execution.
831831

elasticsearch_serverless/_sync/client/license.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ def get(
3737
pretty: t.Optional[bool] = None,
3838
) -> ObjectApiResponse[t.Any]:
3939
"""
40-
Get license information. Returns information about your Elastic license, including
41-
its type, its status, when it was issued, and when it expires. For more information
42-
about the different types of licenses, refer to [Elastic Stack subscriptions](https://www.elastic.co/subscriptions).
40+
Get license information. Get information about your Elastic license including
41+
its type, its status, when it was issued, and when it expires. NOTE: If the master
42+
node is generating a new cluster state, the get license API may return a `404
43+
Not Found` response. If you receive an unexpected 404 response after cluster
44+
startup, wait a short period and retry the request.
4345
4446
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html>`_
4547

0 commit comments

Comments
 (0)