Skip to content

Commit a92b51e

Browse files
Auto-generated API code
1 parent bef0c24 commit a92b51e

File tree

9 files changed

+86
-171
lines changed

9 files changed

+86
-171
lines changed

elasticsearch_serverless/_async/client/esql.py

Lines changed: 0 additions & 107 deletions
This file was deleted.

elasticsearch_serverless/_async/client/indices.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ async def create_data_stream(
309309
pretty: t.Optional[bool] = None,
310310
) -> ObjectApiResponse[t.Any]:
311311
"""
312-
Creates a data stream. You must have a matching index template with data stream
313-
enabled.
312+
Create a data stream. Creates a data stream. You must have a matching index template
313+
with data stream enabled.
314314
315315
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
316316
@@ -362,7 +362,7 @@ async def data_streams_stats(
362362
pretty: t.Optional[bool] = None,
363363
) -> ObjectApiResponse[t.Any]:
364364
"""
365-
Retrieves statistics for one or more data streams.
365+
Get data stream stats. Retrieves statistics for one or more data streams.
366366
367367
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
368368
@@ -563,8 +563,8 @@ async def delete_data_lifecycle(
563563
timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
564564
) -> ObjectApiResponse[t.Any]:
565565
"""
566-
Removes the data lifecycle from a data stream rendering it not managed by the
567-
data stream lifecycle
566+
Delete data stream lifecycles. Removes the data stream lifecycle from a data
567+
stream, rendering it not managed by the data stream lifecycle.
568568
569569
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html>`_
570570
@@ -623,7 +623,7 @@ async def delete_data_stream(
623623
pretty: t.Optional[bool] = None,
624624
) -> ObjectApiResponse[t.Any]:
625625
"""
626-
Deletes one or more data streams and their backing indices.
626+
Delete data streams. Deletes one or more data streams and their backing indices.
627627
628628
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
629629
@@ -1181,7 +1181,8 @@ async def get_data_lifecycle(
11811181
pretty: t.Optional[bool] = None,
11821182
) -> ObjectApiResponse[t.Any]:
11831183
"""
1184-
Retrieves the data stream lifecycle configuration of one or more data streams.
1184+
Get data stream lifecycles. Retrieves the data stream lifecycle configuration
1185+
of one or more data streams.
11851186
11861187
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html>`_
11871188
@@ -1240,7 +1241,7 @@ async def get_data_stream(
12401241
pretty: t.Optional[bool] = None,
12411242
) -> ObjectApiResponse[t.Any]:
12421243
"""
1243-
Retrieves information about one or more data streams.
1244+
Get data streams. Retrieves information about one or more data streams.
12441245
12451246
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
12461247
@@ -1546,14 +1547,14 @@ async def migrate_to_data_stream(
15461547
pretty: t.Optional[bool] = None,
15471548
) -> ObjectApiResponse[t.Any]:
15481549
"""
1549-
Converts an index alias to a data stream. You must have a matching index template
1550-
that is data stream enabled. The alias must meet the following criteria: The
1551-
alias must have a write index; All indices for the alias must have a `@timestamp`
1552-
field mapping of a `date` or `date_nanos` field type; The alias must not have
1553-
any filters; The alias must not use custom routing. If successful, the request
1554-
removes the alias and creates a data stream with the same name. The indices for
1555-
the alias become hidden backing indices for the stream. The write index for the
1556-
alias becomes the write index for the stream.
1550+
Convert an index alias to a data stream. Converts an index alias to a data stream.
1551+
You must have a matching index template that is data stream enabled. The alias
1552+
must meet the following criteria: The alias must have a write index; All indices
1553+
for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos`
1554+
field type; The alias must not have any filters; The alias must not use custom
1555+
routing. If successful, the request removes the alias and creates a data stream
1556+
with the same name. The indices for the alias become hidden backing indices for
1557+
the stream. The write index for the alias becomes the write index for the stream.
15571558
15581559
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
15591560
@@ -1596,7 +1597,8 @@ async def modify_data_stream(
15961597
body: t.Optional[t.Dict[str, t.Any]] = None,
15971598
) -> ObjectApiResponse[t.Any]:
15981599
"""
1599-
Performs one or more data stream modification actions in a single atomic operation.
1600+
Update data streams. Performs one or more data stream modification actions in
1601+
a single atomic operation.
16001602
16011603
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
16021604
@@ -1766,7 +1768,8 @@ async def put_data_lifecycle(
17661768
body: t.Optional[t.Dict[str, t.Any]] = None,
17671769
) -> ObjectApiResponse[t.Any]:
17681770
"""
1769-
Update the data lifecycle of the specified data streams.
1771+
Update data stream lifecycles. Update the data stream lifecycle of the specified
1772+
data streams.
17701773
17711774
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html>`_
17721775

elasticsearch_serverless/_async/client/ml.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def close_job(
4242
body: t.Optional[t.Dict[str, t.Any]] = None,
4343
) -> ObjectApiResponse[t.Any]:
4444
"""
45-
Close anomaly detection jobs A job can be opened and closed multiple times throughout
45+
Close anomaly detection jobs. A job can be opened and closed multiple times throughout
4646
its lifecycle. A closed job cannot receive data or perform analysis operations,
4747
but you can still explore and navigate results. When you close a job, it runs
4848
housekeeping tasks such as pruning the model history, flushing buffers, calculating
@@ -393,7 +393,7 @@ async def delete_job(
393393
wait_for_completion: t.Optional[bool] = None,
394394
) -> ObjectApiResponse[t.Any]:
395395
"""
396-
Deletes an anomaly detection job. All job configuration, model state and results
396+
Delete an anomaly detection job. All job configuration, model state and results
397397
are deleted. It is not currently possible to delete multiple jobs using wildcards
398398
or a comma separated list. If you delete a job that has a datafeed, the request
399399
first tries to delete the datafeed. This behavior is equivalent to calling the
@@ -1665,12 +1665,12 @@ async def open_job(
16651665
body: t.Optional[t.Dict[str, t.Any]] = None,
16661666
) -> ObjectApiResponse[t.Any]:
16671667
"""
1668-
Opens one or more anomaly detection jobs. An anomaly detection job must be opened
1669-
in order for it to be ready to receive and analyze data. It can be opened and
1670-
closed multiple times throughout its lifecycle. When you open a new job, it starts
1671-
with an empty model. When you open an existing job, the most recent model state
1672-
is automatically loaded. The job is ready to resume its analysis from where it
1673-
left off, once new data is received.
1668+
Open anomaly detection jobs. An anomaly detection job must be opened in order
1669+
for it to be ready to receive and analyze data. It can be opened and closed multiple
1670+
times throughout its lifecycle. When you open a new job, it starts with an empty
1671+
model. When you open an existing job, the most recent model state is automatically
1672+
loaded. The job is ready to resume its analysis from where it left off, once
1673+
new data is received.
16741674
16751675
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-open-job.html>`_
16761676
@@ -2471,8 +2471,8 @@ async def put_job(
24712471
body: t.Optional[t.Dict[str, t.Any]] = None,
24722472
) -> ObjectApiResponse[t.Any]:
24732473
"""
2474-
Instantiates an anomaly detection job. If you include a `datafeed_config`, you
2475-
must have read index privileges on the source index.
2474+
Create an anomaly detection job. If you include a `datafeed_config`, you must
2475+
have read index privileges on the source index.
24762476
24772477
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ml-put-job.html>`_
24782478

elasticsearch_serverless/_async/client/query_rules.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,23 @@ async def list_rulesets(
251251
)
252252

253253
@_rewrite_parameters(
254-
body_fields=("actions", "criteria", "type"),
254+
body_fields=("actions", "criteria", "type", "priority"),
255255
)
256256
async def put_rule(
257257
self,
258258
*,
259259
ruleset_id: str,
260260
rule_id: str,
261261
actions: t.Optional[t.Mapping[str, t.Any]] = None,
262-
criteria: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
262+
criteria: t.Optional[
263+
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
264+
] = None,
263265
type: t.Optional[t.Union["t.Literal['pinned']", str]] = None,
264266
error_trace: t.Optional[bool] = None,
265267
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
266268
human: t.Optional[bool] = None,
267269
pretty: t.Optional[bool] = None,
270+
priority: t.Optional[int] = None,
268271
body: t.Optional[t.Dict[str, t.Any]] = None,
269272
) -> ObjectApiResponse[t.Any]:
270273
"""
@@ -279,6 +282,7 @@ async def put_rule(
279282
:param actions:
280283
:param criteria:
281284
:param type:
285+
:param priority:
282286
"""
283287
if ruleset_id in SKIP_IN_PATH:
284288
raise ValueError("Empty value passed for parameter 'ruleset_id'")
@@ -312,6 +316,8 @@ async def put_rule(
312316
__body["criteria"] = criteria
313317
if type is not None:
314318
__body["type"] = type
319+
if priority is not None:
320+
__body["priority"] = priority
315321
__headers = {"accept": "application/json", "content-type": "application/json"}
316322
return await self.perform_request( # type: ignore[return-value]
317323
"PUT",
@@ -330,7 +336,9 @@ async def put_ruleset(
330336
self,
331337
*,
332338
ruleset_id: str,
333-
rules: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
339+
rules: t.Optional[
340+
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
341+
] = None,
334342
error_trace: t.Optional[bool] = None,
335343
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
336344
human: t.Optional[bool] = None,

elasticsearch_serverless/_async/client/security.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ async def has_privileges(
241241
cluster: t.Optional[
242242
t.Sequence[
243243
t.Union[
244-
"t.Literal['all', 'cancel_task', 'create_snapshot', 'cross_cluster_replication', 'cross_cluster_search', 'delegate_pki', 'grant_api_key', 'manage', 'manage_api_key', 'manage_autoscaling', 'manage_behavioral_analytics', 'manage_ccr', 'manage_data_frame_transforms', 'manage_data_stream_global_retention', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_inference', 'manage_ingest_pipelines', 'manage_logstash_pipelines', 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_data_frame_transforms', 'monitor_data_stream_global_retention', 'monitor_enrich', 'monitor_inference', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'none', 'post_behavioral_analytics_event', 'read_ccr', 'read_connector_secrets', 'read_fleet_secrets', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client', 'write_connector_secrets', 'write_fleet_secrets']",
244+
"t.Literal['all', 'cancel_task', 'create_snapshot', 'cross_cluster_replication', 'cross_cluster_search', 'delegate_pki', 'grant_api_key', 'manage', 'manage_api_key', 'manage_autoscaling', 'manage_behavioral_analytics', 'manage_ccr', 'manage_data_frame_transforms', 'manage_data_stream_global_retention', 'manage_enrich', 'manage_ilm', 'manage_index_templates', 'manage_inference', 'manage_ingest_pipelines', 'manage_logstash_pipelines', 'manage_ml', 'manage_oidc', 'manage_own_api_key', 'manage_pipeline', 'manage_rollup', 'manage_saml', 'manage_search_application', 'manage_search_query_rules', 'manage_search_synonyms', 'manage_security', 'manage_service_account', 'manage_slm', 'manage_token', 'manage_transform', 'manage_user_profile', 'manage_watcher', 'monitor', 'monitor_data_frame_transforms', 'monitor_data_stream_global_retention', 'monitor_enrich', 'monitor_inference', 'monitor_ml', 'monitor_rollup', 'monitor_snapshot', 'monitor_text_structure', 'monitor_transform', 'monitor_watcher', 'none', 'post_behavioral_analytics_event', 'read_ccr', 'read_fleet_secrets', 'read_ilm', 'read_pipeline', 'read_security', 'read_slm', 'transport_client', 'write_connector_secrets', 'write_fleet_secrets']",
245245
str,
246246
]
247247
]

0 commit comments

Comments
 (0)