Skip to content

Commit e2192ae

Browse files
Auto-generated code for main (#105)
Auto-generated API code
1 parent 636c579 commit e2192ae

22 files changed

+864
-262
lines changed

elasticsearch_serverless/_async/client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,9 +2126,9 @@ async def info(
21262126
pretty: t.Optional[bool] = None,
21272127
) -> ObjectApiResponse[t.Any]:
21282128
"""
2129-
Get cluster info. Returns basic information about the cluster.
2129+
Get cluster info. Get basic build, version, and cluster information.
21302130
2131-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
2131+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/rest-api-root.html>`_
21322132
"""
21332133
__path_parts: t.Dict[str, str] = {}
21342134
__path = "/"

elasticsearch_serverless/_async/client/cluster.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ async def delete_component_template(
3838
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3939
) -> ObjectApiResponse[t.Any]:
4040
"""
41-
Delete component templates. Deletes component templates. Component templates
42-
are building blocks for constructing index templates that specify index mappings,
43-
settings, and aliases.
41+
Delete component templates. Component templates are building blocks for constructing
42+
index templates that specify index mappings, settings, and aliases.
4443
4544
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
4645
@@ -148,7 +147,7 @@ async def get_component_template(
148147
pretty: t.Optional[bool] = None,
149148
) -> ObjectApiResponse[t.Any]:
150149
"""
151-
Get component templates. Retrieves information about component templates.
150+
Get component templates. Get information about component templates.
152151
153152
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
154153
@@ -266,20 +265,21 @@ async def put_component_template(
266265
body: t.Optional[t.Dict[str, t.Any]] = None,
267266
) -> ObjectApiResponse[t.Any]:
268267
"""
269-
Create or update a component template. Creates or updates a component template.
270-
Component templates are building blocks for constructing index templates that
271-
specify index mappings, settings, and aliases. An index template can be composed
272-
of multiple component templates. To use a component template, specify it in an
273-
index template’s `composed_of` list. Component templates are only applied to
274-
new data streams and indices as part of a matching index template. Settings and
275-
mappings specified directly in the index template or the create index request
276-
override any settings or mappings specified in a component template. Component
277-
templates are only used during index creation. For data streams, this includes
278-
data stream creation and the creation of a stream’s backing indices. Changes
279-
to component templates do not affect existing indices, including a stream’s backing
280-
indices. You can use C-style `/* *\\/` block comments in component templates.
268+
Create or update a component template. Component templates are building blocks
269+
for constructing index templates that specify index mappings, settings, and aliases.
270+
An index template can be composed of multiple component templates. To use a component
271+
template, specify it in an index template’s `composed_of` list. Component templates
272+
are only applied to new data streams and indices as part of a matching index
273+
template. Settings and mappings specified directly in the index template or the
274+
create index request override any settings or mappings specified in a component
275+
template. Component templates are only used during index creation. For data streams,
276+
this includes data stream creation and the creation of a stream’s backing indices.
277+
Changes to component templates do not affect existing indices, including a stream’s
278+
backing indices. You can use C-style `/* *\\/` block comments in component templates.
281279
You can include comments anywhere in the request body except before the opening
282-
curly bracket.
280+
curly bracket. **Applying component templates** You cannot directly apply a component
281+
template to a data stream or index. To be applied, a component template must
282+
be included in an index template's `composed_of` list.
283283
284284
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
285285
@@ -302,8 +302,8 @@ async def put_component_template(
302302
:param master_timeout: Period to wait for a connection to the master node. If
303303
no response is received before the timeout expires, the request fails and
304304
returns an error.
305-
:param meta: Optional user metadata about the component template. May have any
306-
contents. This map is not automatically generated by Elasticsearch. This
305+
:param meta: Optional user metadata about the component template. It may have
306+
any contents. This map is not automatically generated by Elasticsearch. This
307307
information is stored in the cluster state, so keeping it short is preferable.
308308
To unset `_meta`, replace the template without specifying this information.
309309
:param version: Version number used to manage component templates externally.

elasticsearch_serverless/_async/client/enrich.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ async def delete_policy(
3333
error_trace: t.Optional[bool] = None,
3434
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3535
human: t.Optional[bool] = None,
36+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3637
pretty: t.Optional[bool] = None,
3738
) -> ObjectApiResponse[t.Any]:
3839
"""
@@ -41,6 +42,7 @@ async def delete_policy(
4142
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-enrich-policy-api.html>`_
4243
4344
:param name: Enrich policy to delete.
45+
:param master_timeout: Period to wait for a connection to the master node.
4446
"""
4547
if name in SKIP_IN_PATH:
4648
raise ValueError("Empty value passed for parameter 'name'")
@@ -53,6 +55,8 @@ async def delete_policy(
5355
__query["filter_path"] = filter_path
5456
if human is not None:
5557
__query["human"] = human
58+
if master_timeout is not None:
59+
__query["master_timeout"] = master_timeout
5660
if pretty is not None:
5761
__query["pretty"] = pretty
5862
__headers = {"accept": "application/json"}
@@ -73,6 +77,7 @@ async def execute_policy(
7377
error_trace: t.Optional[bool] = None,
7478
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
7579
human: t.Optional[bool] = None,
80+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
7681
pretty: t.Optional[bool] = None,
7782
wait_for_completion: t.Optional[bool] = None,
7883
) -> ObjectApiResponse[t.Any]:
@@ -82,6 +87,7 @@ async def execute_policy(
8287
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/execute-enrich-policy-api.html>`_
8388
8489
:param name: Enrich policy to execute.
90+
:param master_timeout: Period to wait for a connection to the master node.
8591
:param wait_for_completion: If `true`, the request blocks other enrich policy
8692
execution requests until complete.
8793
"""
@@ -96,6 +102,8 @@ async def execute_policy(
96102
__query["filter_path"] = filter_path
97103
if human is not None:
98104
__query["human"] = human
105+
if master_timeout is not None:
106+
__query["master_timeout"] = master_timeout
99107
if pretty is not None:
100108
__query["pretty"] = pretty
101109
if wait_for_completion is not None:
@@ -118,6 +126,7 @@ async def get_policy(
118126
error_trace: t.Optional[bool] = None,
119127
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
120128
human: t.Optional[bool] = None,
129+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
121130
pretty: t.Optional[bool] = None,
122131
) -> ObjectApiResponse[t.Any]:
123132
"""
@@ -127,6 +136,7 @@ async def get_policy(
127136
128137
:param name: Comma-separated list of enrich policy names used to limit the request.
129138
To return information for all enrich policies, omit this parameter.
139+
:param master_timeout: Period to wait for a connection to the master node.
130140
"""
131141
__path_parts: t.Dict[str, str]
132142
if name not in SKIP_IN_PATH:
@@ -142,6 +152,8 @@ async def get_policy(
142152
__query["filter_path"] = filter_path
143153
if human is not None:
144154
__query["human"] = human
155+
if master_timeout is not None:
156+
__query["master_timeout"] = master_timeout
145157
if pretty is not None:
146158
__query["pretty"] = pretty
147159
__headers = {"accept": "application/json"}
@@ -165,6 +177,7 @@ async def put_policy(
165177
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
166178
geo_match: t.Optional[t.Mapping[str, t.Any]] = None,
167179
human: t.Optional[bool] = None,
180+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
168181
match: t.Optional[t.Mapping[str, t.Any]] = None,
169182
pretty: t.Optional[bool] = None,
170183
range: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -178,6 +191,7 @@ async def put_policy(
178191
:param name: Name of the enrich policy to create or update.
179192
:param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
180193
query.
194+
:param master_timeout: Period to wait for a connection to the master node.
181195
:param match: Matches enrich data to incoming documents based on a `term` query.
182196
:param range: Matches a number, date, or IP address in incoming documents to
183197
a range in the enrich index based on a `term` query.
@@ -194,6 +208,8 @@ async def put_policy(
194208
__query["filter_path"] = filter_path
195209
if human is not None:
196210
__query["human"] = human
211+
if master_timeout is not None:
212+
__query["master_timeout"] = master_timeout
197213
if pretty is not None:
198214
__query["pretty"] = pretty
199215
if not __body:

0 commit comments

Comments
 (0)