Skip to content

Commit 08e0d83

Browse files
Auto-generated API code
1 parent b0e320b commit 08e0d83

File tree

4 files changed

+144
-4
lines changed

4 files changed

+144
-4
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4641,8 +4641,9 @@ async def update_by_query(
46414641
body: t.Optional[t.Dict[str, t.Any]] = None,
46424642
) -> ObjectApiResponse[t.Any]:
46434643
"""
4644-
Performs an update on every document in the index without changing the source,
4645-
for example to pick up a mapping change.
4644+
Updates documents that match the specified query. If no query is specified, performs
4645+
an update on every document in the index without changing the source, for example
4646+
to pick up a mapping change.
46464647
46474648
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html>`_
46484649

elasticsearch/_async/client/indices.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3194,6 +3194,75 @@ async def reload_search_analyzers(
31943194
"POST", __path, params=__query, headers=__headers
31953195
)
31963196

3197+
@_rewrite_parameters()
3198+
async def resolve_cluster(
3199+
self,
3200+
*,
3201+
name: t.Union[str, t.Sequence[str]],
3202+
allow_no_indices: t.Optional[bool] = None,
3203+
error_trace: t.Optional[bool] = None,
3204+
expand_wildcards: t.Optional[
3205+
t.Union[
3206+
t.Sequence[
3207+
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3208+
],
3209+
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3210+
]
3211+
] = None,
3212+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3213+
human: t.Optional[bool] = None,
3214+
ignore_throttled: t.Optional[bool] = None,
3215+
ignore_unavailable: t.Optional[bool] = None,
3216+
pretty: t.Optional[bool] = None,
3217+
) -> ObjectApiResponse[t.Any]:
3218+
"""
3219+
Resolves the specified index expressions to return information about each cluster,
3220+
including the local cluster, if included.
3221+
3222+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html>`_
3223+
3224+
:param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3225+
and data streams to resolve. Resources on remote clusters can be specified
3226+
using the `<cluster>`:`<name>` syntax.
3227+
:param allow_no_indices: If false, the request returns an error if any wildcard
3228+
expression, index alias, or _all value targets only missing or closed indices.
3229+
This behavior applies even if the request targets other open indices. For
3230+
example, a request targeting foo*,bar* returns an error if an index starts
3231+
with foo but no index starts with bar.
3232+
:param expand_wildcards: Type of index that wildcard patterns can match. If the
3233+
request can target data streams, this argument determines whether wildcard
3234+
expressions match hidden data streams. Supports comma-separated values, such
3235+
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
3236+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3237+
when frozen. Defaults to false.
3238+
:param ignore_unavailable: If false, the request returns an error if it targets
3239+
a missing or closed index. Defaults to false.
3240+
"""
3241+
if name in SKIP_IN_PATH:
3242+
raise ValueError("Empty value passed for parameter 'name'")
3243+
__path = f"/_resolve/cluster/{_quote(name)}"
3244+
__query: t.Dict[str, t.Any] = {}
3245+
if allow_no_indices is not None:
3246+
__query["allow_no_indices"] = allow_no_indices
3247+
if error_trace is not None:
3248+
__query["error_trace"] = error_trace
3249+
if expand_wildcards is not None:
3250+
__query["expand_wildcards"] = expand_wildcards
3251+
if filter_path is not None:
3252+
__query["filter_path"] = filter_path
3253+
if human is not None:
3254+
__query["human"] = human
3255+
if ignore_throttled is not None:
3256+
__query["ignore_throttled"] = ignore_throttled
3257+
if ignore_unavailable is not None:
3258+
__query["ignore_unavailable"] = ignore_unavailable
3259+
if pretty is not None:
3260+
__query["pretty"] = pretty
3261+
__headers = {"accept": "application/json"}
3262+
return await self.perform_request( # type: ignore[return-value]
3263+
"GET", __path, params=__query, headers=__headers
3264+
)
3265+
31973266
@_rewrite_parameters()
31983267
async def resolve_index(
31993268
self,

elasticsearch/_sync/client/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4639,8 +4639,9 @@ def update_by_query(
46394639
body: t.Optional[t.Dict[str, t.Any]] = None,
46404640
) -> ObjectApiResponse[t.Any]:
46414641
"""
4642-
Performs an update on every document in the index without changing the source,
4643-
for example to pick up a mapping change.
4642+
Updates documents that match the specified query. If no query is specified, performs
4643+
an update on every document in the index without changing the source, for example
4644+
to pick up a mapping change.
46444645
46454646
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html>`_
46464647

elasticsearch/_sync/client/indices.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3194,6 +3194,75 @@ def reload_search_analyzers(
31943194
"POST", __path, params=__query, headers=__headers
31953195
)
31963196

3197+
@_rewrite_parameters()
3198+
def resolve_cluster(
3199+
self,
3200+
*,
3201+
name: t.Union[str, t.Sequence[str]],
3202+
allow_no_indices: t.Optional[bool] = None,
3203+
error_trace: t.Optional[bool] = None,
3204+
expand_wildcards: t.Optional[
3205+
t.Union[
3206+
t.Sequence[
3207+
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3208+
],
3209+
t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3210+
]
3211+
] = None,
3212+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3213+
human: t.Optional[bool] = None,
3214+
ignore_throttled: t.Optional[bool] = None,
3215+
ignore_unavailable: t.Optional[bool] = None,
3216+
pretty: t.Optional[bool] = None,
3217+
) -> ObjectApiResponse[t.Any]:
3218+
"""
3219+
Resolves the specified index expressions to return information about each cluster,
3220+
including the local cluster, if included.
3221+
3222+
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html>`_
3223+
3224+
:param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3225+
and data streams to resolve. Resources on remote clusters can be specified
3226+
using the `<cluster>`:`<name>` syntax.
3227+
:param allow_no_indices: If false, the request returns an error if any wildcard
3228+
expression, index alias, or _all value targets only missing or closed indices.
3229+
This behavior applies even if the request targets other open indices. For
3230+
example, a request targeting foo*,bar* returns an error if an index starts
3231+
with foo but no index starts with bar.
3232+
:param expand_wildcards: Type of index that wildcard patterns can match. If the
3233+
request can target data streams, this argument determines whether wildcard
3234+
expressions match hidden data streams. Supports comma-separated values, such
3235+
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
3236+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
3237+
when frozen. Defaults to false.
3238+
:param ignore_unavailable: If false, the request returns an error if it targets
3239+
a missing or closed index. Defaults to false.
3240+
"""
3241+
if name in SKIP_IN_PATH:
3242+
raise ValueError("Empty value passed for parameter 'name'")
3243+
__path = f"/_resolve/cluster/{_quote(name)}"
3244+
__query: t.Dict[str, t.Any] = {}
3245+
if allow_no_indices is not None:
3246+
__query["allow_no_indices"] = allow_no_indices
3247+
if error_trace is not None:
3248+
__query["error_trace"] = error_trace
3249+
if expand_wildcards is not None:
3250+
__query["expand_wildcards"] = expand_wildcards
3251+
if filter_path is not None:
3252+
__query["filter_path"] = filter_path
3253+
if human is not None:
3254+
__query["human"] = human
3255+
if ignore_throttled is not None:
3256+
__query["ignore_throttled"] = ignore_throttled
3257+
if ignore_unavailable is not None:
3258+
__query["ignore_unavailable"] = ignore_unavailable
3259+
if pretty is not None:
3260+
__query["pretty"] = pretty
3261+
__headers = {"accept": "application/json"}
3262+
return self.perform_request( # type: ignore[return-value]
3263+
"GET", __path, params=__query, headers=__headers
3264+
)
3265+
31973266
@_rewrite_parameters()
31983267
def resolve_index(
31993268
self,

0 commit comments

Comments
 (0)