@@ -33,6 +33,7 @@ async def delete_policy(
3333 error_trace : t .Optional [bool ] = None ,
3434 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
3535 human : t .Optional [bool ] = None ,
36+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
3637 pretty : t .Optional [bool ] = None ,
3738 ) -> ObjectApiResponse [t .Any ]:
3839 """
@@ -41,6 +42,7 @@ async def delete_policy(
4142 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-enrich-policy-api.html>`_
4243
4344 :param name: Enrich policy to delete.
45+ :param master_timeout: Period to wait for a connection to the master node.
4446 """
4547 if name in SKIP_IN_PATH :
4648 raise ValueError ("Empty value passed for parameter 'name'" )
@@ -53,6 +55,8 @@ async def delete_policy(
5355 __query ["filter_path" ] = filter_path
5456 if human is not None :
5557 __query ["human" ] = human
58+ if master_timeout is not None :
59+ __query ["master_timeout" ] = master_timeout
5660 if pretty is not None :
5761 __query ["pretty" ] = pretty
5862 __headers = {"accept" : "application/json" }
@@ -73,6 +77,7 @@ async def execute_policy(
7377 error_trace : t .Optional [bool ] = None ,
7478 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
7579 human : t .Optional [bool ] = None ,
80+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
7681 pretty : t .Optional [bool ] = None ,
7782 wait_for_completion : t .Optional [bool ] = None ,
7883 ) -> ObjectApiResponse [t .Any ]:
@@ -82,6 +87,7 @@ async def execute_policy(
8287 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/execute-enrich-policy-api.html>`_
8388
8489 :param name: Enrich policy to execute.
90+ :param master_timeout: Period to wait for a connection to the master node.
8591 :param wait_for_completion: If `true`, the request blocks other enrich policy
8692 execution requests until complete.
8793 """
@@ -96,6 +102,8 @@ async def execute_policy(
96102 __query ["filter_path" ] = filter_path
97103 if human is not None :
98104 __query ["human" ] = human
105+ if master_timeout is not None :
106+ __query ["master_timeout" ] = master_timeout
99107 if pretty is not None :
100108 __query ["pretty" ] = pretty
101109 if wait_for_completion is not None :
@@ -118,6 +126,7 @@ async def get_policy(
118126 error_trace : t .Optional [bool ] = None ,
119127 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
120128 human : t .Optional [bool ] = None ,
129+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
121130 pretty : t .Optional [bool ] = None ,
122131 ) -> ObjectApiResponse [t .Any ]:
123132 """
@@ -127,6 +136,7 @@ async def get_policy(
127136
128137 :param name: Comma-separated list of enrich policy names used to limit the request.
129138 To return information for all enrich policies, omit this parameter.
139+ :param master_timeout: Period to wait for a connection to the master node.
130140 """
131141 __path_parts : t .Dict [str , str ]
132142 if name not in SKIP_IN_PATH :
@@ -142,6 +152,8 @@ async def get_policy(
142152 __query ["filter_path" ] = filter_path
143153 if human is not None :
144154 __query ["human" ] = human
155+ if master_timeout is not None :
156+ __query ["master_timeout" ] = master_timeout
145157 if pretty is not None :
146158 __query ["pretty" ] = pretty
147159 __headers = {"accept" : "application/json" }
@@ -165,6 +177,7 @@ async def put_policy(
165177 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
166178 geo_match : t .Optional [t .Mapping [str , t .Any ]] = None ,
167179 human : t .Optional [bool ] = None ,
180+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
168181 match : t .Optional [t .Mapping [str , t .Any ]] = None ,
169182 pretty : t .Optional [bool ] = None ,
170183 range : t .Optional [t .Mapping [str , t .Any ]] = None ,
@@ -178,6 +191,7 @@ async def put_policy(
178191 :param name: Name of the enrich policy to create or update.
179192 :param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
180193 query.
194+ :param master_timeout: Period to wait for a connection to the master node.
181195 :param match: Matches enrich data to incoming documents based on a `term` query.
182196 :param range: Matches a number, date, or IP address in incoming documents to
183197 a range in the enrich index based on a `term` query.
@@ -194,6 +208,8 @@ async def put_policy(
194208 __query ["filter_path" ] = filter_path
195209 if human is not None :
196210 __query ["human" ] = human
211+ if master_timeout is not None :
212+ __query ["master_timeout" ] = master_timeout
197213 if pretty is not None :
198214 __query ["pretty" ] = pretty
199215 if not __body :
0 commit comments