@@ -1622,7 +1622,9 @@ async def exists_index_template(
16221622 name : str ,
16231623 error_trace : t .Optional [bool ] = None ,
16241624 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
1625+ flat_settings : t .Optional [bool ] = None ,
16251626 human : t .Optional [bool ] = None ,
1627+ local : t .Optional [bool ] = None ,
16261628 master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
16271629 pretty : t .Optional [bool ] = None ,
16281630 ) -> HeadApiResponse :
@@ -1637,6 +1639,10 @@ async def exists_index_template(
16371639
16381640 :param name: Comma-separated list of index template names used to limit the request.
16391641 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.
16401646 :param master_timeout: Period to wait for a connection to the master node. If
16411647 no response is received before the timeout expires, the request fails and
16421648 returns an error.
@@ -1650,8 +1656,12 @@ async def exists_index_template(
16501656 __query ["error_trace" ] = error_trace
16511657 if filter_path is not None :
16521658 __query ["filter_path" ] = filter_path
1659+ if flat_settings is not None :
1660+ __query ["flat_settings" ] = flat_settings
16531661 if human is not None :
16541662 __query ["human" ] = human
1663+ if local is not None :
1664+ __query ["local" ] = local
16551665 if master_timeout is not None :
16561666 __query ["master_timeout" ] = master_timeout
16571667 if pretty is not None :
@@ -1801,9 +1811,6 @@ async def field_usage_stats(
18011811 human : t .Optional [bool ] = None ,
18021812 ignore_unavailable : t .Optional [bool ] = None ,
18031813 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 ,
18071814 ) -> ObjectApiResponse [t .Any ]:
18081815 """
18091816 .. raw:: html
@@ -1833,9 +1840,6 @@ async def field_usage_stats(
18331840 in the statistics.
18341841 :param ignore_unavailable: If `true`, missing or closed indices are not included
18351842 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`).
18391843 """
18401844 if index in SKIP_IN_PATH :
18411845 raise ValueError ("Empty value passed for parameter 'index'" )
@@ -1858,8 +1862,6 @@ async def field_usage_stats(
18581862 __query ["ignore_unavailable" ] = ignore_unavailable
18591863 if pretty is not None :
18601864 __query ["pretty" ] = pretty
1861- if wait_for_active_shards is not None :
1862- __query ["wait_for_active_shards" ] = wait_for_active_shards
18631865 __headers = {"accept" : "application/json" }
18641866 return await self .perform_request ( # type: ignore[return-value]
18651867 "GET" ,
@@ -3835,6 +3837,7 @@ async def put_settings(
38353837 master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
38363838 preserve_existing : t .Optional [bool ] = None ,
38373839 pretty : t .Optional [bool ] = None ,
3840+ reopen : t .Optional [bool ] = None ,
38383841 timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
38393842 ) -> ObjectApiResponse [t .Any ]:
38403843 """
@@ -3877,6 +3880,9 @@ async def put_settings(
38773880 no response is received before the timeout expires, the request fails and
38783881 returns an error.
38793882 :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.
38803886 :param timeout: Period to wait for a response. If no response is received before
38813887 the timeout expires, the request fails and returns an error.
38823888 """
@@ -3914,6 +3920,8 @@ async def put_settings(
39143920 __query ["preserve_existing" ] = preserve_existing
39153921 if pretty is not None :
39163922 __query ["pretty" ] = pretty
3923+ if reopen is not None :
3924+ __query ["reopen" ] = reopen
39173925 if timeout is not None :
39183926 __query ["timeout" ] = timeout
39193927 __body = settings if settings is not None else body
@@ -3981,7 +3989,7 @@ async def put_template(
39813989
39823990 :param name: The name of the template
39833991 :param aliases: Aliases for the index.
3984- :param cause:
3992+ :param cause: User defined reason for creating/updating the index template
39853993 :param create: If true, this request cannot replace or update existing index
39863994 templates.
39873995 :param index_patterns: Array of wildcard expressions used to match the names
@@ -4219,6 +4227,7 @@ async def reload_search_analyzers(
42194227 human : t .Optional [bool ] = None ,
42204228 ignore_unavailable : t .Optional [bool ] = None ,
42214229 pretty : t .Optional [bool ] = None ,
4230+ resource : t .Optional [str ] = None ,
42224231 ) -> ObjectApiResponse [t .Any ]:
42234232 """
42244233 .. raw:: html
@@ -4246,6 +4255,7 @@ async def reload_search_analyzers(
42464255 that are open, closed or both.
42474256 :param ignore_unavailable: Whether specified concrete indices should be ignored
42484257 when unavailable (missing or closed)
4258+ :param resource: Changed resource to reload analyzers from if applicable
42494259 """
42504260 if index in SKIP_IN_PATH :
42514261 raise ValueError ("Empty value passed for parameter 'index'" )
@@ -4266,6 +4276,8 @@ async def reload_search_analyzers(
42664276 __query ["ignore_unavailable" ] = ignore_unavailable
42674277 if pretty is not None :
42684278 __query ["pretty" ] = pretty
4279+ if resource is not None :
4280+ __query ["resource" ] = resource
42694281 __headers = {"accept" : "application/json" }
42704282 return await self .perform_request ( # type: ignore[return-value]
42714283 "POST" ,
@@ -4502,6 +4514,7 @@ async def rollover(
45024514 error_trace : t .Optional [bool ] = None ,
45034515 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
45044516 human : t .Optional [bool ] = None ,
4517+ lazy : t .Optional [bool ] = None ,
45054518 mappings : t .Optional [t .Mapping [str , t .Any ]] = None ,
45064519 master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
45074520 pretty : t .Optional [bool ] = None ,
@@ -4558,6 +4571,9 @@ async def rollover(
45584571 conditions are satisfied.
45594572 :param dry_run: If `true`, checks whether the current index satisfies the specified
45604573 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.
45614577 :param mappings: Mapping for fields in the index. If specified, this mapping
45624578 can include field names, field data types, and mapping paramaters.
45634579 :param master_timeout: Period to wait for a connection to the master node. If
@@ -4592,6 +4608,8 @@ async def rollover(
45924608 __query ["filter_path" ] = filter_path
45934609 if human is not None :
45944610 __query ["human" ] = human
4611+ if lazy is not None :
4612+ __query ["lazy" ] = lazy
45954613 if master_timeout is not None :
45964614 __query ["master_timeout" ] = master_timeout
45974615 if pretty is not None :
@@ -4908,6 +4926,8 @@ async def simulate_index_template(
49084926 self ,
49094927 * ,
49104928 name : str ,
4929+ cause : t .Optional [str ] = None ,
4930+ create : t .Optional [bool ] = None ,
49114931 error_trace : t .Optional [bool ] = None ,
49124932 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
49134933 human : t .Optional [bool ] = None ,
@@ -4925,6 +4945,10 @@ async def simulate_index_template(
49254945 `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template>`_
49264946
49274947 :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
49284952 :param include_defaults: If true, returns all relevant default configurations
49294953 for the index template.
49304954 :param master_timeout: Period to wait for a connection to the master node. If
@@ -4936,6 +4960,10 @@ async def simulate_index_template(
49364960 __path_parts : t .Dict [str , str ] = {"name" : _quote (name )}
49374961 __path = f'/_index_template/_simulate_index/{ __path_parts ["name" ]} '
49384962 __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
49394967 if error_trace is not None :
49404968 __query ["error_trace" ] = error_trace
49414969 if filter_path is not None :
@@ -4978,6 +5006,7 @@ async def simulate_template(
49785006 * ,
49795007 name : t .Optional [str ] = None ,
49805008 allow_auto_create : t .Optional [bool ] = None ,
5009+ cause : t .Optional [str ] = None ,
49815010 composed_of : t .Optional [t .Sequence [str ]] = None ,
49825011 create : t .Optional [bool ] = None ,
49835012 data_stream : t .Optional [t .Mapping [str , t .Any ]] = None ,
@@ -5014,6 +5043,8 @@ async def simulate_template(
50145043 via `actions.auto_create_index`. If set to `false`, then indices or data
50155044 streams matching the template must always be explicitly created, and may
50165045 never be automatically created.
5046+ :param cause: User defined reason for dry-run creating the new template for simulation
5047+ purposes
50175048 :param composed_of: An ordered list of component template names. Component templates
50185049 are merged in the order specified, meaning that the last component template
50195050 specified has the highest precedence.
@@ -5058,6 +5089,8 @@ async def simulate_template(
50585089 __path = "/_index_template/_simulate"
50595090 __query : t .Dict [str , t .Any ] = {}
50605091 __body : t .Dict [str , t .Any ] = body if body is not None else {}
5092+ if cause is not None :
5093+ __query ["cause" ] = cause
50615094 if create is not None :
50625095 __query ["create" ] = create
50635096 if error_trace is not None :
0 commit comments