@@ -33,7 +33,9 @@ async def delete_autoscaling_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 ,
38+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
3739 ) -> ObjectApiResponse [t .Any ]:
3840 """
3941 Delete an autoscaling policy. NOTE: This feature is designed for indirect use
@@ -43,6 +45,11 @@ async def delete_autoscaling_policy(
4345 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-delete-autoscaling-policy.html>`_
4446
4547 :param name: the name of the autoscaling policy
48+ :param master_timeout: Period to wait for a connection to the master node. If
49+ no response is received before the timeout expires, the request fails and
50+ returns an error.
51+ :param timeout: Period to wait for a response. If no response is received before
52+ the timeout expires, the request fails and returns an error.
4653 """
4754 if name in SKIP_IN_PATH :
4855 raise ValueError ("Empty value passed for parameter 'name'" )
@@ -55,8 +62,12 @@ async def delete_autoscaling_policy(
5562 __query ["filter_path" ] = filter_path
5663 if human is not None :
5764 __query ["human" ] = human
65+ if master_timeout is not None :
66+ __query ["master_timeout" ] = master_timeout
5867 if pretty is not None :
5968 __query ["pretty" ] = pretty
69+ if timeout is not None :
70+ __query ["timeout" ] = timeout
6071 __headers = {"accept" : "application/json" }
6172 return await self .perform_request ( # type: ignore[return-value]
6273 "DELETE" ,
@@ -74,6 +85,7 @@ async def get_autoscaling_capacity(
7485 error_trace : t .Optional [bool ] = None ,
7586 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
7687 human : t .Optional [bool ] = None ,
88+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
7789 pretty : t .Optional [bool ] = None ,
7890 ) -> ObjectApiResponse [t .Any ]:
7991 """
@@ -91,6 +103,10 @@ async def get_autoscaling_capacity(
91103 use this information to make autoscaling decisions.
92104
93105 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
106+
107+ :param master_timeout: Period to wait for a connection to the master node. If
108+ no response is received before the timeout expires, the request fails and
109+ returns an error.
94110 """
95111 __path_parts : t .Dict [str , str ] = {}
96112 __path = "/_autoscaling/capacity"
@@ -101,6 +117,8 @@ async def get_autoscaling_capacity(
101117 __query ["filter_path" ] = filter_path
102118 if human is not None :
103119 __query ["human" ] = human
120+ if master_timeout is not None :
121+ __query ["master_timeout" ] = master_timeout
104122 if pretty is not None :
105123 __query ["pretty" ] = pretty
106124 __headers = {"accept" : "application/json" }
@@ -121,6 +139,7 @@ async def get_autoscaling_policy(
121139 error_trace : t .Optional [bool ] = None ,
122140 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
123141 human : t .Optional [bool ] = None ,
142+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
124143 pretty : t .Optional [bool ] = None ,
125144 ) -> ObjectApiResponse [t .Any ]:
126145 """
@@ -131,6 +150,9 @@ async def get_autoscaling_policy(
131150 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
132151
133152 :param name: the name of the autoscaling policy
153+ :param master_timeout: Period to wait for a connection to the master node. If
154+ no response is received before the timeout expires, the request fails and
155+ returns an error.
134156 """
135157 if name in SKIP_IN_PATH :
136158 raise ValueError ("Empty value passed for parameter 'name'" )
@@ -143,6 +165,8 @@ async def get_autoscaling_policy(
143165 __query ["filter_path" ] = filter_path
144166 if human is not None :
145167 __query ["human" ] = human
168+ if master_timeout is not None :
169+ __query ["master_timeout" ] = master_timeout
146170 if pretty is not None :
147171 __query ["pretty" ] = pretty
148172 __headers = {"accept" : "application/json" }
@@ -167,7 +191,9 @@ async def put_autoscaling_policy(
167191 error_trace : t .Optional [bool ] = None ,
168192 filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
169193 human : t .Optional [bool ] = None ,
194+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
170195 pretty : t .Optional [bool ] = None ,
196+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
171197 ) -> ObjectApiResponse [t .Any ]:
172198 """
173199 Create or update an autoscaling policy. NOTE: This feature is designed for indirect
@@ -178,6 +204,11 @@ async def put_autoscaling_policy(
178204
179205 :param name: the name of the autoscaling policy
180206 :param policy:
207+ :param master_timeout: Period to wait for a connection to the master node. If
208+ no response is received before the timeout expires, the request fails and
209+ returns an error.
210+ :param timeout: Period to wait for a response. If no response is received before
211+ the timeout expires, the request fails and returns an error.
181212 """
182213 if name in SKIP_IN_PATH :
183214 raise ValueError ("Empty value passed for parameter 'name'" )
@@ -196,8 +227,12 @@ async def put_autoscaling_policy(
196227 __query ["filter_path" ] = filter_path
197228 if human is not None :
198229 __query ["human" ] = human
230+ if master_timeout is not None :
231+ __query ["master_timeout" ] = master_timeout
199232 if pretty is not None :
200233 __query ["pretty" ] = pretty
234+ if timeout is not None :
235+ __query ["timeout" ] = timeout
201236 __body = policy if policy is not None else body
202237 __headers = {"accept" : "application/json" , "content-type" : "application/json" }
203238 return await self .perform_request ( # type: ignore[return-value]
0 commit comments