@@ -1622,7 +1622,9 @@ async def exists_index_template(
1622
1622
name : str ,
1623
1623
error_trace : t .Optional [bool ] = None ,
1624
1624
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
1625
+ flat_settings : t .Optional [bool ] = None ,
1625
1626
human : t .Optional [bool ] = None ,
1627
+ local : t .Optional [bool ] = None ,
1626
1628
master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
1627
1629
pretty : t .Optional [bool ] = None ,
1628
1630
) -> HeadApiResponse :
@@ -1637,6 +1639,10 @@ async def exists_index_template(
1637
1639
1638
1640
:param name: Comma-separated list of index template names used to limit the request.
1639
1641
Wildcard (*) expressions are supported.
1642
+ :param flat_settings: If true, returns settings in flat format.
1643
+ :param local: If true, the request retrieves information from the local node
1644
+ only. Defaults to false, which means information is retrieved from the master
1645
+ node.
1640
1646
:param master_timeout: Period to wait for a connection to the master node. If
1641
1647
no response is received before the timeout expires, the request fails and
1642
1648
returns an error.
@@ -1650,8 +1656,12 @@ async def exists_index_template(
1650
1656
__query ["error_trace" ] = error_trace
1651
1657
if filter_path is not None :
1652
1658
__query ["filter_path" ] = filter_path
1659
+ if flat_settings is not None :
1660
+ __query ["flat_settings" ] = flat_settings
1653
1661
if human is not None :
1654
1662
__query ["human" ] = human
1663
+ if local is not None :
1664
+ __query ["local" ] = local
1655
1665
if master_timeout is not None :
1656
1666
__query ["master_timeout" ] = master_timeout
1657
1667
if pretty is not None :
@@ -1801,9 +1811,6 @@ async def field_usage_stats(
1801
1811
human : t .Optional [bool ] = None ,
1802
1812
ignore_unavailable : t .Optional [bool ] = None ,
1803
1813
pretty : t .Optional [bool ] = None ,
1804
- wait_for_active_shards : t .Optional [
1805
- t .Union [int , t .Union [str , t .Literal ["all" , "index-setting" ]]]
1806
- ] = None ,
1807
1814
) -> ObjectApiResponse [t .Any ]:
1808
1815
"""
1809
1816
.. raw:: html
@@ -1833,9 +1840,6 @@ async def field_usage_stats(
1833
1840
in the statistics.
1834
1841
:param ignore_unavailable: If `true`, missing or closed indices are not included
1835
1842
in the response.
1836
- :param wait_for_active_shards: The number of shard copies that must be active
1837
- before proceeding with the operation. Set to all or any positive integer
1838
- up to the total number of shards in the index (`number_of_replicas+1`).
1839
1843
"""
1840
1844
if index in SKIP_IN_PATH :
1841
1845
raise ValueError ("Empty value passed for parameter 'index'" )
@@ -1858,8 +1862,6 @@ async def field_usage_stats(
1858
1862
__query ["ignore_unavailable" ] = ignore_unavailable
1859
1863
if pretty is not None :
1860
1864
__query ["pretty" ] = pretty
1861
- if wait_for_active_shards is not None :
1862
- __query ["wait_for_active_shards" ] = wait_for_active_shards
1863
1865
__headers = {"accept" : "application/json" }
1864
1866
return await self .perform_request ( # type: ignore[return-value]
1865
1867
"GET" ,
@@ -3835,6 +3837,7 @@ async def put_settings(
3835
3837
master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
3836
3838
preserve_existing : t .Optional [bool ] = None ,
3837
3839
pretty : t .Optional [bool ] = None ,
3840
+ reopen : t .Optional [bool ] = None ,
3838
3841
timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
3839
3842
) -> ObjectApiResponse [t .Any ]:
3840
3843
"""
@@ -3877,6 +3880,9 @@ async def put_settings(
3877
3880
no response is received before the timeout expires, the request fails and
3878
3881
returns an error.
3879
3882
:param preserve_existing: If `true`, existing index settings remain unchanged.
3883
+ :param reopen: Whether to close and reopen the index to apply non-dynamic settings.
3884
+ If set to `true` the indices to which the settings are being applied will
3885
+ be closed temporarily and then reopened in order to apply the changes.
3880
3886
:param timeout: Period to wait for a response. If no response is received before
3881
3887
the timeout expires, the request fails and returns an error.
3882
3888
"""
@@ -3914,6 +3920,8 @@ async def put_settings(
3914
3920
__query ["preserve_existing" ] = preserve_existing
3915
3921
if pretty is not None :
3916
3922
__query ["pretty" ] = pretty
3923
+ if reopen is not None :
3924
+ __query ["reopen" ] = reopen
3917
3925
if timeout is not None :
3918
3926
__query ["timeout" ] = timeout
3919
3927
__body = settings if settings is not None else body
@@ -3981,7 +3989,7 @@ async def put_template(
3981
3989
3982
3990
:param name: The name of the template
3983
3991
:param aliases: Aliases for the index.
3984
- :param cause:
3992
+ :param cause: User defined reason for creating/updating the index template
3985
3993
:param create: If true, this request cannot replace or update existing index
3986
3994
templates.
3987
3995
:param index_patterns: Array of wildcard expressions used to match the names
@@ -4219,6 +4227,7 @@ async def reload_search_analyzers(
4219
4227
human : t .Optional [bool ] = None ,
4220
4228
ignore_unavailable : t .Optional [bool ] = None ,
4221
4229
pretty : t .Optional [bool ] = None ,
4230
+ resource : t .Optional [str ] = None ,
4222
4231
) -> ObjectApiResponse [t .Any ]:
4223
4232
"""
4224
4233
.. raw:: html
@@ -4246,6 +4255,7 @@ async def reload_search_analyzers(
4246
4255
that are open, closed or both.
4247
4256
:param ignore_unavailable: Whether specified concrete indices should be ignored
4248
4257
when unavailable (missing or closed)
4258
+ :param resource: Changed resource to reload analyzers from if applicable
4249
4259
"""
4250
4260
if index in SKIP_IN_PATH :
4251
4261
raise ValueError ("Empty value passed for parameter 'index'" )
@@ -4266,6 +4276,8 @@ async def reload_search_analyzers(
4266
4276
__query ["ignore_unavailable" ] = ignore_unavailable
4267
4277
if pretty is not None :
4268
4278
__query ["pretty" ] = pretty
4279
+ if resource is not None :
4280
+ __query ["resource" ] = resource
4269
4281
__headers = {"accept" : "application/json" }
4270
4282
return await self .perform_request ( # type: ignore[return-value]
4271
4283
"POST" ,
@@ -4502,6 +4514,7 @@ async def rollover(
4502
4514
error_trace : t .Optional [bool ] = None ,
4503
4515
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
4504
4516
human : t .Optional [bool ] = None ,
4517
+ lazy : t .Optional [bool ] = None ,
4505
4518
mappings : t .Optional [t .Mapping [str , t .Any ]] = None ,
4506
4519
master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
4507
4520
pretty : t .Optional [bool ] = None ,
@@ -4558,6 +4571,9 @@ async def rollover(
4558
4571
conditions are satisfied.
4559
4572
:param dry_run: If `true`, checks whether the current index satisfies the specified
4560
4573
conditions but does not perform a rollover.
4574
+ :param lazy: If set to true, the rollover action will only mark a data stream
4575
+ to signal that it needs to be rolled over at the next write. Only allowed
4576
+ on data streams.
4561
4577
:param mappings: Mapping for fields in the index. If specified, this mapping
4562
4578
can include field names, field data types, and mapping paramaters.
4563
4579
:param master_timeout: Period to wait for a connection to the master node. If
@@ -4592,6 +4608,8 @@ async def rollover(
4592
4608
__query ["filter_path" ] = filter_path
4593
4609
if human is not None :
4594
4610
__query ["human" ] = human
4611
+ if lazy is not None :
4612
+ __query ["lazy" ] = lazy
4595
4613
if master_timeout is not None :
4596
4614
__query ["master_timeout" ] = master_timeout
4597
4615
if pretty is not None :
@@ -4908,6 +4926,8 @@ async def simulate_index_template(
4908
4926
self ,
4909
4927
* ,
4910
4928
name : str ,
4929
+ cause : t .Optional [str ] = None ,
4930
+ create : t .Optional [bool ] = None ,
4911
4931
error_trace : t .Optional [bool ] = None ,
4912
4932
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
4913
4933
human : t .Optional [bool ] = None ,
@@ -4925,6 +4945,10 @@ async def simulate_index_template(
4925
4945
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template>`_
4926
4946
4927
4947
:param name: Name of the index to simulate
4948
+ :param cause: User defined reason for dry-run creating the new template for simulation
4949
+ purposes
4950
+ :param create: Whether the index template we optionally defined in the body should
4951
+ only be dry-run added if new or can also replace an existing one
4928
4952
:param include_defaults: If true, returns all relevant default configurations
4929
4953
for the index template.
4930
4954
:param master_timeout: Period to wait for a connection to the master node. If
@@ -4936,6 +4960,10 @@ async def simulate_index_template(
4936
4960
__path_parts : t .Dict [str , str ] = {"name" : _quote (name )}
4937
4961
__path = f'/_index_template/_simulate_index/{ __path_parts ["name" ]} '
4938
4962
__query : t .Dict [str , t .Any ] = {}
4963
+ if cause is not None :
4964
+ __query ["cause" ] = cause
4965
+ if create is not None :
4966
+ __query ["create" ] = create
4939
4967
if error_trace is not None :
4940
4968
__query ["error_trace" ] = error_trace
4941
4969
if filter_path is not None :
@@ -4978,6 +5006,7 @@ async def simulate_template(
4978
5006
* ,
4979
5007
name : t .Optional [str ] = None ,
4980
5008
allow_auto_create : t .Optional [bool ] = None ,
5009
+ cause : t .Optional [str ] = None ,
4981
5010
composed_of : t .Optional [t .Sequence [str ]] = None ,
4982
5011
create : t .Optional [bool ] = None ,
4983
5012
data_stream : t .Optional [t .Mapping [str , t .Any ]] = None ,
@@ -5014,6 +5043,8 @@ async def simulate_template(
5014
5043
via `actions.auto_create_index`. If set to `false`, then indices or data
5015
5044
streams matching the template must always be explicitly created, and may
5016
5045
never be automatically created.
5046
+ :param cause: User defined reason for dry-run creating the new template for simulation
5047
+ purposes
5017
5048
:param composed_of: An ordered list of component template names. Component templates
5018
5049
are merged in the order specified, meaning that the last component template
5019
5050
specified has the highest precedence.
@@ -5058,6 +5089,8 @@ async def simulate_template(
5058
5089
__path = "/_index_template/_simulate"
5059
5090
__query : t .Dict [str , t .Any ] = {}
5060
5091
__body : t .Dict [str , t .Any ] = body if body is not None else {}
5092
+ if cause is not None :
5093
+ __query ["cause" ] = cause
5061
5094
if create is not None :
5062
5095
__query ["create" ] = create
5063
5096
if error_trace is not None :
0 commit comments