@@ -304,7 +304,7 @@ async def clone(
304
304
settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
305
305
timeout : t .Optional [t .Union [int , str ]] = None ,
306
306
wait_for_active_shards : t .Optional [
307
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
307
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
308
308
] = None ,
309
309
) -> ObjectApiResponse [t .Any ]:
310
310
"""
@@ -389,7 +389,7 @@ async def close(
389
389
pretty : t .Optional [bool ] = None ,
390
390
timeout : t .Optional [t .Union [int , str ]] = None ,
391
391
wait_for_active_shards : t .Optional [
392
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
392
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
393
393
] = None ,
394
394
) -> ObjectApiResponse [t .Any ]:
395
395
"""
@@ -458,7 +458,7 @@ async def create(
458
458
settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
459
459
timeout : t .Optional [t .Union [int , str ]] = None ,
460
460
wait_for_active_shards : t .Optional [
461
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
461
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
462
462
] = None ,
463
463
) -> ObjectApiResponse [t .Any ]:
464
464
"""
@@ -794,20 +794,28 @@ async def delete_data_stream(
794
794
async def delete_index_template (
795
795
self ,
796
796
* ,
797
- name : str ,
797
+ name : t . Union [ str , t . Union [ t . List [ str ], t . Tuple [ str , ...]]] ,
798
798
error_trace : t .Optional [bool ] = None ,
799
799
filter_path : t .Optional [
800
800
t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
801
801
] = None ,
802
802
human : t .Optional [bool ] = None ,
803
+ master_timeout : t .Optional [t .Union [int , str ]] = None ,
803
804
pretty : t .Optional [bool ] = None ,
805
+ timeout : t .Optional [t .Union [int , str ]] = None ,
804
806
) -> ObjectApiResponse [t .Any ]:
805
807
"""
806
808
Deletes an index template.
807
809
808
810
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html>`_
809
811
810
- :param name: The name of the template
812
+ :param name: Comma-separated list of index template names used to limit the request.
813
+ Wildcard (*) expressions are supported.
814
+ :param master_timeout: Period to wait for a connection to the master node. If
815
+ no response is received before the timeout expires, the request fails and
816
+ returns an error.
817
+ :param timeout: Period to wait for a response. If no response is received before
818
+ the timeout expires, the request fails and returns an error.
811
819
"""
812
820
if name in SKIP_IN_PATH :
813
821
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -819,8 +827,12 @@ async def delete_index_template(
819
827
__query ["filter_path" ] = filter_path
820
828
if human is not None :
821
829
__query ["human" ] = human
830
+ if master_timeout is not None :
831
+ __query ["master_timeout" ] = master_timeout
822
832
if pretty is not None :
823
833
__query ["pretty" ] = pretty
834
+ if timeout is not None :
835
+ __query ["timeout" ] = timeout
824
836
__headers = {"accept" : "application/json" }
825
837
return await self .perform_request ( # type: ignore[return-value]
826
838
"DELETE" , __path , params = __query , headers = __headers
@@ -1236,7 +1248,7 @@ async def exists_template(
1236
1248
async def field_usage_stats (
1237
1249
self ,
1238
1250
* ,
1239
- index : t .Optional [ t . Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]] = None ,
1251
+ index : t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]],
1240
1252
allow_no_indices : t .Optional [bool ] = None ,
1241
1253
error_trace : t .Optional [bool ] = None ,
1242
1254
expand_wildcards : t .Optional [
@@ -1269,7 +1281,7 @@ async def field_usage_stats(
1269
1281
pretty : t .Optional [bool ] = None ,
1270
1282
timeout : t .Optional [t .Union [int , str ]] = None ,
1271
1283
wait_for_active_shards : t .Optional [
1272
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
1284
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
1273
1285
] = None ,
1274
1286
) -> ObjectApiResponse [t .Any ]:
1275
1287
"""
@@ -1301,6 +1313,8 @@ async def field_usage_stats(
1301
1313
before proceeding with the operation. Set to all or any positive integer
1302
1314
up to the total number of shards in the index (`number_of_replicas+1`).
1303
1315
"""
1316
+ if index in SKIP_IN_PATH :
1317
+ raise ValueError ("Empty value passed for parameter 'index'" )
1304
1318
__path = f"/{ _quote (index )} /_field_usage_stats"
1305
1319
__query : t .Dict [str , t .Any ] = {}
1306
1320
if allow_no_indices is not None :
@@ -2171,7 +2185,7 @@ async def open(
2171
2185
pretty : t .Optional [bool ] = None ,
2172
2186
timeout : t .Optional [t .Union [int , str ]] = None ,
2173
2187
wait_for_active_shards : t .Optional [
2174
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
2188
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
2175
2189
] = None ,
2176
2190
) -> ObjectApiResponse [t .Any ]:
2177
2191
"""
@@ -3024,7 +3038,7 @@ async def rollover(
3024
3038
settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
3025
3039
timeout : t .Optional [t .Union [int , str ]] = None ,
3026
3040
wait_for_active_shards : t .Optional [
3027
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
3041
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
3028
3042
] = None ,
3029
3043
) -> ObjectApiResponse [t .Any ]:
3030
3044
"""
@@ -3268,7 +3282,7 @@ async def shrink(
3268
3282
settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
3269
3283
timeout : t .Optional [t .Union [int , str ]] = None ,
3270
3284
wait_for_active_shards : t .Optional [
3271
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
3285
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
3272
3286
] = None ,
3273
3287
) -> ObjectApiResponse [t .Any ]:
3274
3288
"""
@@ -3490,7 +3504,7 @@ async def split(
3490
3504
settings : t .Optional [t .Mapping [str , t .Any ]] = None ,
3491
3505
timeout : t .Optional [t .Union [int , str ]] = None ,
3492
3506
wait_for_active_shards : t .Optional [
3493
- t .Union [int , t .Union ["t.Literal['all']" , str ]]
3507
+ t .Union [int , t .Union ["t.Literal['all', 'index-setting' ]" , str ]]
3494
3508
] = None ,
3495
3509
) -> ObjectApiResponse [t .Any ]:
3496
3510
"""
0 commit comments