@@ -33,7 +33,9 @@ async def delete_autoscaling_policy(
33
33
error_trace : t .Optional [bool ] = None ,
34
34
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
35
35
human : t .Optional [bool ] = None ,
36
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
36
37
pretty : t .Optional [bool ] = None ,
38
+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
37
39
) -> ObjectApiResponse [t .Any ]:
38
40
"""
39
41
Delete an autoscaling policy. NOTE: This feature is designed for indirect use
@@ -43,6 +45,11 @@ async def delete_autoscaling_policy(
43
45
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-delete-autoscaling-policy.html>`_
44
46
45
47
: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.
46
53
"""
47
54
if name in SKIP_IN_PATH :
48
55
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -55,8 +62,12 @@ async def delete_autoscaling_policy(
55
62
__query ["filter_path" ] = filter_path
56
63
if human is not None :
57
64
__query ["human" ] = human
65
+ if master_timeout is not None :
66
+ __query ["master_timeout" ] = master_timeout
58
67
if pretty is not None :
59
68
__query ["pretty" ] = pretty
69
+ if timeout is not None :
70
+ __query ["timeout" ] = timeout
60
71
__headers = {"accept" : "application/json" }
61
72
return await self .perform_request ( # type: ignore[return-value]
62
73
"DELETE" ,
@@ -74,6 +85,7 @@ async def get_autoscaling_capacity(
74
85
error_trace : t .Optional [bool ] = None ,
75
86
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
76
87
human : t .Optional [bool ] = None ,
88
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
77
89
pretty : t .Optional [bool ] = None ,
78
90
) -> ObjectApiResponse [t .Any ]:
79
91
"""
@@ -91,6 +103,10 @@ async def get_autoscaling_capacity(
91
103
use this information to make autoscaling decisions.
92
104
93
105
`<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.
94
110
"""
95
111
__path_parts : t .Dict [str , str ] = {}
96
112
__path = "/_autoscaling/capacity"
@@ -101,6 +117,8 @@ async def get_autoscaling_capacity(
101
117
__query ["filter_path" ] = filter_path
102
118
if human is not None :
103
119
__query ["human" ] = human
120
+ if master_timeout is not None :
121
+ __query ["master_timeout" ] = master_timeout
104
122
if pretty is not None :
105
123
__query ["pretty" ] = pretty
106
124
__headers = {"accept" : "application/json" }
@@ -121,6 +139,7 @@ async def get_autoscaling_policy(
121
139
error_trace : t .Optional [bool ] = None ,
122
140
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
123
141
human : t .Optional [bool ] = None ,
142
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
124
143
pretty : t .Optional [bool ] = None ,
125
144
) -> ObjectApiResponse [t .Any ]:
126
145
"""
@@ -131,6 +150,9 @@ async def get_autoscaling_policy(
131
150
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
132
151
133
152
: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.
134
156
"""
135
157
if name in SKIP_IN_PATH :
136
158
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -143,6 +165,8 @@ async def get_autoscaling_policy(
143
165
__query ["filter_path" ] = filter_path
144
166
if human is not None :
145
167
__query ["human" ] = human
168
+ if master_timeout is not None :
169
+ __query ["master_timeout" ] = master_timeout
146
170
if pretty is not None :
147
171
__query ["pretty" ] = pretty
148
172
__headers = {"accept" : "application/json" }
@@ -167,7 +191,9 @@ async def put_autoscaling_policy(
167
191
error_trace : t .Optional [bool ] = None ,
168
192
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
169
193
human : t .Optional [bool ] = None ,
194
+ master_timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
170
195
pretty : t .Optional [bool ] = None ,
196
+ timeout : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
171
197
) -> ObjectApiResponse [t .Any ]:
172
198
"""
173
199
Create or update an autoscaling policy. NOTE: This feature is designed for indirect
@@ -178,6 +204,11 @@ async def put_autoscaling_policy(
178
204
179
205
:param name: the name of the autoscaling policy
180
206
: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.
181
212
"""
182
213
if name in SKIP_IN_PATH :
183
214
raise ValueError ("Empty value passed for parameter 'name'" )
@@ -196,8 +227,12 @@ async def put_autoscaling_policy(
196
227
__query ["filter_path" ] = filter_path
197
228
if human is not None :
198
229
__query ["human" ] = human
230
+ if master_timeout is not None :
231
+ __query ["master_timeout" ] = master_timeout
199
232
if pretty is not None :
200
233
__query ["pretty" ] = pretty
234
+ if timeout is not None :
235
+ __query ["timeout" ] = timeout
201
236
__body = policy if policy is not None else body
202
237
__headers = {"accept" : "application/json" , "content-type" : "application/json" }
203
238
return await self .perform_request ( # type: ignore[return-value]
0 commit comments