@@ -38,6 +38,7 @@ async def allocation_explain(
38
38
include_disk_info : t .Optional [bool ] = None ,
39
39
include_yes_decisions : t .Optional [bool ] = None ,
40
40
index : t .Optional [str ] = None ,
41
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
41
42
pretty : t .Optional [bool ] = None ,
42
43
primary : t .Optional [bool ] = None ,
43
44
shard : t .Optional [int ] = None ,
@@ -61,6 +62,7 @@ async def allocation_explain(
61
62
:param include_yes_decisions: If true, returns YES decisions in explanation.
62
63
:param index: Specifies the name of the index that you would like an explanation
63
64
for.
65
+ :param master_timeout: Period to wait for a connection to the master node.
64
66
:param primary: If true, returns explanation for the primary shard for the given
65
67
shard ID.
66
68
:param shard: Specifies the ID of the shard that you would like an explanation
@@ -80,6 +82,8 @@ async def allocation_explain(
80
82
__query ["include_disk_info" ] = include_disk_info
81
83
if include_yes_decisions is not None :
82
84
__query ["include_yes_decisions" ] = include_yes_decisions
85
+ if master_timeout is not None :
86
+ __query ["master_timeout" ] = master_timeout
83
87
if pretty is not None :
84
88
__query ["pretty" ] = pretty
85
89
if not __body :
@@ -119,9 +123,8 @@ async def delete_component_template(
119
123
timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
120
124
) -> ObjectApiResponse [t .Any ]:
121
125
"""
122
- Delete component templates. Deletes component templates. Component templates
123
- are building blocks for constructing index templates that specify index mappings,
124
- settings, and aliases.
126
+ Delete component templates. Component templates are building blocks for constructing
127
+ index templates that specify index mappings, settings, and aliases.
125
128
126
129
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
127
130
@@ -167,6 +170,7 @@ async def delete_voting_config_exclusions(
167
170
error_trace : t .Optional [bool ] = None ,
168
171
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
169
172
human : t .Optional [bool ] = None ,
173
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
170
174
pretty : t .Optional [bool ] = None ,
171
175
wait_for_removal : t .Optional [bool ] = None ,
172
176
) -> ObjectApiResponse [t .Any ]:
@@ -176,6 +180,7 @@ async def delete_voting_config_exclusions(
176
180
177
181
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html>`_
178
182
183
+ :param master_timeout: Period to wait for a connection to the master node.
179
184
:param wait_for_removal: Specifies whether to wait for all excluded nodes to
180
185
be removed from the cluster before clearing the voting configuration exclusions
181
186
list. Defaults to true, meaning that all excluded nodes must be removed from
@@ -192,6 +197,8 @@ async def delete_voting_config_exclusions(
192
197
__query ["filter_path" ] = filter_path
193
198
if human is not None :
194
199
__query ["human" ] = human
200
+ if master_timeout is not None :
201
+ __query ["master_timeout" ] = master_timeout
195
202
if pretty is not None :
196
203
__query ["pretty" ] = pretty
197
204
if wait_for_removal is not None :
@@ -275,7 +282,7 @@ async def get_component_template(
275
282
pretty : t .Optional [bool ] = None ,
276
283
) -> ObjectApiResponse [t .Any ]:
277
284
"""
278
- Get component templates. Retrieves information about component templates.
285
+ Get component templates. Get information about component templates.
279
286
280
287
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
281
288
@@ -625,6 +632,7 @@ async def post_voting_config_exclusions(
625
632
error_trace : t .Optional [bool ] = None ,
626
633
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
627
634
human : t .Optional [bool ] = None ,
635
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
628
636
node_ids : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
629
637
node_names : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
630
638
pretty : t .Optional [bool ] = None ,
@@ -661,6 +669,7 @@ async def post_voting_config_exclusions(
661
669
662
670
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html>`_
663
671
672
+ :param master_timeout: Period to wait for a connection to the master node.
664
673
:param node_ids: A comma-separated list of the persistent ids of the nodes to
665
674
exclude from the voting configuration. If specified, you may not also specify
666
675
node_names.
@@ -680,6 +689,8 @@ async def post_voting_config_exclusions(
680
689
__query ["filter_path" ] = filter_path
681
690
if human is not None :
682
691
__query ["human" ] = human
692
+ if master_timeout is not None :
693
+ __query ["master_timeout" ] = master_timeout
683
694
if node_ids is not None :
684
695
__query ["node_ids" ] = node_ids
685
696
if node_names is not None :
@@ -719,20 +730,21 @@ async def put_component_template(
719
730
body : t .Optional [t .Dict [str , t .Any ]] = None ,
720
731
) -> ObjectApiResponse [t .Any ]:
721
732
"""
722
- Create or update a component template. Creates or updates a component template.
723
- Component templates are building blocks for constructing index templates that
724
- specify index mappings, settings, and aliases. An index template can be composed
725
- of multiple component templates. To use a component template, specify it in an
726
- index template’s `composed_of` list. Component templates are only applied to
727
- new data streams and indices as part of a matching index template. Settings and
728
- mappings specified directly in the index template or the create index request
729
- override any settings or mappings specified in a component template. Component
730
- templates are only used during index creation. For data streams, this includes
731
- data stream creation and the creation of a stream’s backing indices. Changes
732
- to component templates do not affect existing indices, including a stream’s backing
733
- indices. You can use C-style `/* *\\ /` block comments in component templates.
733
+ Create or update a component template. Component templates are building blocks
734
+ for constructing index templates that specify index mappings, settings, and aliases.
735
+ An index template can be composed of multiple component templates. To use a component
736
+ template, specify it in an index template’s `composed_of` list. Component templates
737
+ are only applied to new data streams and indices as part of a matching index
738
+ template. Settings and mappings specified directly in the index template or the
739
+ create index request override any settings or mappings specified in a component
740
+ template. Component templates are only used during index creation. For data streams,
741
+ this includes data stream creation and the creation of a stream’s backing indices.
742
+ Changes to component templates do not affect existing indices, including a stream’s
743
+ backing indices. You can use C-style `/* *\\ /` block comments in component templates.
734
744
You can include comments anywhere in the request body except before the opening
735
- curly bracket.
745
+ curly bracket. **Applying component templates** You cannot directly apply a component
746
+ template to a data stream or index. To be applied, a component template must
747
+ be included in an index template's `composed_of` list.
736
748
737
749
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
738
750
@@ -755,8 +767,8 @@ async def put_component_template(
755
767
:param master_timeout: Period to wait for a connection to the master node. If
756
768
no response is received before the timeout expires, the request fails and
757
769
returns an error.
758
- :param meta: Optional user metadata about the component template. May have any
759
- contents. This map is not automatically generated by Elasticsearch. This
770
+ :param meta: Optional user metadata about the component template. It may have
771
+ any contents. This map is not automatically generated by Elasticsearch. This
760
772
information is stored in the cluster state, so keeping it short is preferable.
761
773
To unset `_meta`, replace the template without specifying this information.
762
774
:param version: Version number used to manage component templates externally.
0 commit comments