Skip to content

Commit 569c925

Browse files
Auto-generated API code
1 parent 20133a3 commit 569c925

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

elasticsearch/_async/client/cluster.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -572,20 +572,18 @@ async def put_component_template(
572572
*,
573573
name: str,
574574
template: t.Mapping[str, t.Any],
575-
aliases: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
575+
allow_auto_create: t.Optional[bool] = None,
576576
create: t.Optional[bool] = None,
577577
error_trace: t.Optional[bool] = None,
578578
filter_path: t.Optional[
579579
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
580580
] = None,
581581
human: t.Optional[bool] = None,
582-
mappings: t.Optional[t.Mapping[str, t.Any]] = None,
583582
master_timeout: t.Optional[
584583
t.Union["t.Literal[-1]", "t.Literal[0]", str]
585584
] = None,
586585
meta: t.Optional[t.Mapping[str, t.Any]] = None,
587586
pretty: t.Optional[bool] = None,
588-
settings: t.Optional[t.Mapping[str, t.Any]] = None,
589587
version: t.Optional[int] = None,
590588
) -> ObjectApiResponse[t.Any]:
591589
"""
@@ -594,15 +592,20 @@ async def put_component_template(
594592
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
595593
596594
:param name: The name of the template
597-
:param template:
598-
:param aliases:
595+
:param template: The template to be applied which includes mappings, settings,
596+
or aliases configuration.
597+
:param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
598+
cluster setting. If set to `true` in a template, then indices can be automatically
599+
created using that template even if auto-creation of indices is disabled
600+
via `actions.auto_create_index`. If set to `false` then data streams matching
601+
the template must always be explicitly created.
599602
:param create: Whether the index template should only be added if new or can
600603
also replace an existing one
601-
:param mappings:
602604
:param master_timeout: Specify timeout for connection to master
603-
:param meta:
604-
:param settings:
605-
:param version:
605+
:param meta: Optional user metadata about the component template. May have any
606+
contents. This map is not automatically generated by Elasticsearch.
607+
:param version: Version number used to manage component templates externally.
608+
This number isn't automatically generated or incremented by Elasticsearch.
606609
"""
607610
if name in SKIP_IN_PATH:
608611
raise ValueError("Empty value passed for parameter 'name'")
@@ -613,8 +616,8 @@ async def put_component_template(
613616
__query: t.Dict[str, t.Any] = {}
614617
if template is not None:
615618
__body["template"] = template
616-
if aliases is not None:
617-
__body["aliases"] = aliases
619+
if allow_auto_create is not None:
620+
__body["allow_auto_create"] = allow_auto_create
618621
if create is not None:
619622
__query["create"] = create
620623
if error_trace is not None:
@@ -623,16 +626,12 @@ async def put_component_template(
623626
__query["filter_path"] = filter_path
624627
if human is not None:
625628
__query["human"] = human
626-
if mappings is not None:
627-
__body["mappings"] = mappings
628629
if master_timeout is not None:
629630
__query["master_timeout"] = master_timeout
630631
if meta is not None:
631632
__body["_meta"] = meta
632633
if pretty is not None:
633634
__query["pretty"] = pretty
634-
if settings is not None:
635-
__body["settings"] = settings
636635
if version is not None:
637636
__body["version"] = version
638637
__headers = {"accept": "application/json", "content-type": "application/json"}

elasticsearch/_sync/client/cluster.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -572,20 +572,18 @@ def put_component_template(
572572
*,
573573
name: str,
574574
template: t.Mapping[str, t.Any],
575-
aliases: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
575+
allow_auto_create: t.Optional[bool] = None,
576576
create: t.Optional[bool] = None,
577577
error_trace: t.Optional[bool] = None,
578578
filter_path: t.Optional[
579579
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
580580
] = None,
581581
human: t.Optional[bool] = None,
582-
mappings: t.Optional[t.Mapping[str, t.Any]] = None,
583582
master_timeout: t.Optional[
584583
t.Union["t.Literal[-1]", "t.Literal[0]", str]
585584
] = None,
586585
meta: t.Optional[t.Mapping[str, t.Any]] = None,
587586
pretty: t.Optional[bool] = None,
588-
settings: t.Optional[t.Mapping[str, t.Any]] = None,
589587
version: t.Optional[int] = None,
590588
) -> ObjectApiResponse[t.Any]:
591589
"""
@@ -594,15 +592,20 @@ def put_component_template(
594592
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
595593
596594
:param name: The name of the template
597-
:param template:
598-
:param aliases:
595+
:param template: The template to be applied which includes mappings, settings,
596+
or aliases configuration.
597+
:param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
598+
cluster setting. If set to `true` in a template, then indices can be automatically
599+
created using that template even if auto-creation of indices is disabled
600+
via `actions.auto_create_index`. If set to `false` then data streams matching
601+
the template must always be explicitly created.
599602
:param create: Whether the index template should only be added if new or can
600603
also replace an existing one
601-
:param mappings:
602604
:param master_timeout: Specify timeout for connection to master
603-
:param meta:
604-
:param settings:
605-
:param version:
605+
:param meta: Optional user metadata about the component template. May have any
606+
contents. This map is not automatically generated by Elasticsearch.
607+
:param version: Version number used to manage component templates externally.
608+
This number isn't automatically generated or incremented by Elasticsearch.
606609
"""
607610
if name in SKIP_IN_PATH:
608611
raise ValueError("Empty value passed for parameter 'name'")
@@ -613,8 +616,8 @@ def put_component_template(
613616
__query: t.Dict[str, t.Any] = {}
614617
if template is not None:
615618
__body["template"] = template
616-
if aliases is not None:
617-
__body["aliases"] = aliases
619+
if allow_auto_create is not None:
620+
__body["allow_auto_create"] = allow_auto_create
618621
if create is not None:
619622
__query["create"] = create
620623
if error_trace is not None:
@@ -623,16 +626,12 @@ def put_component_template(
623626
__query["filter_path"] = filter_path
624627
if human is not None:
625628
__query["human"] = human
626-
if mappings is not None:
627-
__body["mappings"] = mappings
628629
if master_timeout is not None:
629630
__query["master_timeout"] = master_timeout
630631
if meta is not None:
631632
__body["_meta"] = meta
632633
if pretty is not None:
633634
__query["pretty"] = pretty
634-
if settings is not None:
635-
__body["settings"] = settings
636635
if version is not None:
637636
__body["version"] = version
638637
__headers = {"accept": "application/json", "content-type": "application/json"}

0 commit comments

Comments
 (0)