@@ -561,7 +561,9 @@ async def create_data_stream(
561
561
error_trace : t .Optional [bool ] = None ,
562
562
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
563
563
human : t .Optional [bool ] = None ,
564
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
564
565
pretty : t .Optional [bool ] = None ,
566
+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
565
567
) -> ObjectApiResponse [t .Any ]:
566
568
"""
567
569
Create a data stream. Creates a data stream. You must have a matching index template
@@ -574,6 +576,11 @@ async def create_data_stream(
574
576
`#`, `:`, or a space character; Cannot start with `-`, `_`, `+`, or `.ds-`;
575
577
Cannot be `.` or `..`; Cannot be longer than 255 bytes. Multi-byte characters
576
578
count towards this limit faster.
579
+ :param master_timeout: Period to wait for a connection to the master node. If
580
+ no response is received before the timeout expires, the request fails and
581
+ returns an error.
582
+ :param timeout: Period to wait for a response. If no response is received before
583
+ the timeout expires, the request fails and returns an error.
577
584
"""
578
585
if name in SKIP_IN_PATH :
579
586
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -586,8 +593,12 @@ async def create_data_stream(
586
593
__query ["filter_path" ] = filter_path
587
594
if human is not None :
588
595
__query ["human" ] = human
596
+ if master_timeout is not None :
597
+ __query ["master_timeout" ] = master_timeout
589
598
if pretty is not None :
590
599
__query ["pretty" ] = pretty
600
+ if timeout is not None :
601
+ __query ["timeout" ] = timeout
591
602
__headers = {"accept" : "application/json" }
592
603
return await self .perform_request ( # type: ignore[return-value]
593
604
"PUT" ,
@@ -869,6 +880,7 @@ async def delete_data_stream(
869
880
] = None ,
870
881
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
871
882
human : t .Optional [bool ] = None ,
883
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
872
884
pretty : t .Optional [bool ] = None ,
873
885
) -> ObjectApiResponse [t .Any ]:
874
886
"""
@@ -880,6 +892,9 @@ async def delete_data_stream(
880
892
are supported.
881
893
:param expand_wildcards: Type of data stream that wildcard patterns can match.
882
894
Supports comma-separated values,such as `open,hidden`.
895
+ :param master_timeout: Period to wait for a connection to the master node. If
896
+ no response is received before the timeout expires, the request fails and
897
+ returns an error.
883
898
"""
884
899
if name in SKIP_IN_PATH :
885
900
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -894,6 +909,8 @@ async def delete_data_stream(
894
909
__query ["filter_path" ] = filter_path
895
910
if human is not None :
896
911
__query ["human" ] = human
912
+ if master_timeout is not None :
913
+ __query ["master_timeout" ] = master_timeout
897
914
if pretty is not None :
898
915
__query ["pretty" ] = pretty
899
916
__headers = {"accept" : "application/json" }
@@ -1928,6 +1945,7 @@ async def get_data_lifecycle(
1928
1945
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
1929
1946
human : t .Optional [bool ] = None ,
1930
1947
include_defaults : t .Optional [bool ] = None ,
1948
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
1931
1949
pretty : t .Optional [bool ] = None ,
1932
1950
) -> ObjectApiResponse [t .Any ]:
1933
1951
"""
@@ -1943,6 +1961,9 @@ async def get_data_lifecycle(
1943
1961
Supports comma-separated values, such as `open,hidden`. Valid values are:
1944
1962
`all`, `open`, `closed`, `hidden`, `none`.
1945
1963
:param include_defaults: If `true`, return all default settings in the response.
1964
+ :param master_timeout: Period to wait for a connection to the master node. If
1965
+ no response is received before the timeout expires, the request fails and
1966
+ returns an error.
1946
1967
"""
1947
1968
if name in SKIP_IN_PATH :
1948
1969
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -1959,6 +1980,8 @@ async def get_data_lifecycle(
1959
1980
__query ["human" ] = human
1960
1981
if include_defaults is not None :
1961
1982
__query ["include_defaults" ] = include_defaults
1983
+ if master_timeout is not None :
1984
+ __query ["master_timeout" ] = master_timeout
1962
1985
if pretty is not None :
1963
1986
__query ["pretty" ] = pretty
1964
1987
__headers = {"accept" : "application/json" }
@@ -1988,6 +2011,7 @@ async def get_data_stream(
1988
2011
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
1989
2012
human : t .Optional [bool ] = None ,
1990
2013
include_defaults : t .Optional [bool ] = None ,
2014
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
1991
2015
pretty : t .Optional [bool ] = None ,
1992
2016
) -> ObjectApiResponse [t .Any ]:
1993
2017
"""
@@ -2002,6 +2026,9 @@ async def get_data_stream(
2002
2026
Supports comma-separated values, such as `open,hidden`.
2003
2027
:param include_defaults: If true, returns all relevant default configurations
2004
2028
for the index template.
2029
+ :param master_timeout: Period to wait for a connection to the master node. If
2030
+ no response is received before the timeout expires, the request fails and
2031
+ returns an error.
2005
2032
"""
2006
2033
__path_parts : t .Dict [str , str ]
2007
2034
if name not in SKIP_IN_PATH :
@@ -2021,6 +2048,8 @@ async def get_data_stream(
2021
2048
__query ["human" ] = human
2022
2049
if include_defaults is not None :
2023
2050
__query ["include_defaults" ] = include_defaults
2051
+ if master_timeout is not None :
2052
+ __query ["master_timeout" ] = master_timeout
2024
2053
if pretty is not None :
2025
2054
__query ["pretty" ] = pretty
2026
2055
__headers = {"accept" : "application/json" }
@@ -2435,7 +2464,9 @@ async def migrate_to_data_stream(
2435
2464
error_trace : t .Optional [bool ] = None ,
2436
2465
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2437
2466
human : t .Optional [bool ] = None ,
2467
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
2438
2468
pretty : t .Optional [bool ] = None ,
2469
+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
2439
2470
) -> ObjectApiResponse [t .Any ]:
2440
2471
"""
2441
2472
Convert an index alias to a data stream. Converts an index alias to a data stream.
@@ -2450,6 +2481,11 @@ async def migrate_to_data_stream(
2450
2481
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
2451
2482
2452
2483
:param name: Name of the index alias to convert to a data stream.
2484
+ :param master_timeout: Period to wait for a connection to the master node. If
2485
+ no response is received before the timeout expires, the request fails and
2486
+ returns an error.
2487
+ :param timeout: Period to wait for a response. If no response is received before
2488
+ the timeout expires, the request fails and returns an error.
2453
2489
"""
2454
2490
if name in SKIP_IN_PATH :
2455
2491
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -2462,8 +2498,12 @@ async def migrate_to_data_stream(
2462
2498
__query ["filter_path" ] = filter_path
2463
2499
if human is not None :
2464
2500
__query ["human" ] = human
2501
+ if master_timeout is not None :
2502
+ __query ["master_timeout" ] = master_timeout
2465
2503
if pretty is not None :
2466
2504
__query ["pretty" ] = pretty
2505
+ if timeout is not None :
2506
+ __query ["timeout" ] = timeout
2467
2507
__headers = {"accept" : "application/json" }
2468
2508
return await self .perform_request ( # type: ignore[return-value]
2469
2509
"POST" ,
@@ -2620,6 +2660,7 @@ async def promote_data_stream(
2620
2660
error_trace : t .Optional [bool ] = None ,
2621
2661
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
2622
2662
human : t .Optional [bool ] = None ,
2663
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
2623
2664
pretty : t .Optional [bool ] = None ,
2624
2665
) -> ObjectApiResponse [t .Any ]:
2625
2666
"""
@@ -2629,6 +2670,9 @@ async def promote_data_stream(
2629
2670
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
2630
2671
2631
2672
:param name: The name of the data stream
2673
+ :param master_timeout: Period to wait for a connection to the master node. If
2674
+ no response is received before the timeout expires, the request fails and
2675
+ returns an error.
2632
2676
"""
2633
2677
if name in SKIP_IN_PATH :
2634
2678
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -2641,6 +2685,8 @@ async def promote_data_stream(
2641
2685
__query ["filter_path" ] = filter_path
2642
2686
if human is not None :
2643
2687
__query ["human" ] = human
2688
+ if master_timeout is not None :
2689
+ __query ["master_timeout" ] = master_timeout
2644
2690
if pretty is not None :
2645
2691
__query ["pretty" ] = pretty
2646
2692
__headers = {"accept" : "application/json" }
0 commit comments