@@ -153,6 +153,127 @@ def _fetch_accounts_serialize(
153153 _request_auth = _request_auth ,
154154 )
155155
156+ @validate_call
157+ def fetch_non_aws_accounts (
158+ self ,
159+ request : FetchAccountsRequest ,
160+ _request_timeout : Union [
161+ None ,
162+ Annotated [StrictFloat , Field (gt = 0 )],
163+ Tuple [
164+ Annotated [StrictFloat , Field (gt = 0 )], Annotated [StrictFloat , Field (gt = 0 )]
165+ ],
166+ ] = None ,
167+ _request_auth : Optional [Dict [StrictStr , Any ]] = None ,
168+ _content_type : Optional [StrictStr ] = None ,
169+ _headers : Optional [Dict [StrictStr , Any ]] = None ,
170+ _host_index : Annotated [StrictInt , Field (ge = 0 , le = 0 )] = 0 ,
171+ ) -> FetchAccountsResponse :
172+ """Fetch Non Aws Accounts
173+
174+
175+
176+ :param request: (required)
177+ :type request: FetchAccountsRequest
178+ :param _request_timeout: timeout setting for this request. If one
179+ number provided, it will be total request
180+ timeout. It can also be a pair (tuple) of
181+ (connection, read) timeouts.
182+ :type _request_timeout: int, tuple(int, int), optional
183+ :param _request_auth: set to override the auth_settings for an a single
184+ request; this effectively ignores the
185+ authentication in the spec for a single request.
186+ :type _request_auth: dict, optional
187+ :param _content_type: force content-type for the request.
188+ :type _content_type: str, Optional
189+ :param _headers: set to override the headers for a single
190+ request; this effectively ignores the headers
191+ in the spec for a single request.
192+ :type _headers: dict, optional
193+ :param _host_index: set to override the host_index for a single
194+ request; this effectively ignores the host_index
195+ in the spec for a single request.
196+ :type _host_index: int, optional
197+ :return: Returns the result object.
198+ """
199+
200+ _param = self ._fetch_non_aws_accounts_serialize (
201+ request = request ,
202+ _request_auth = _request_auth ,
203+ _content_type = _content_type ,
204+ _headers = _headers ,
205+ _host_index = _host_index ,
206+ )
207+
208+ _response_types_map : Dict [str , Optional [str ]] = {
209+ "200" : "FetchAccountsResponse" ,
210+ "422" : "HTTPValidationError" ,
211+ }
212+ response_data = self .api_client .call_api (
213+ * _param , _request_timeout = _request_timeout
214+ )
215+ response_data .read ()
216+ return self .api_client .response_deserialize (
217+ response_data = response_data ,
218+ response_types_map = _response_types_map ,
219+ ).data
220+
221+ def _fetch_non_aws_accounts_serialize (
222+ self ,
223+ request : FetchAccountsRequest ,
224+ _request_auth ,
225+ _content_type ,
226+ _headers ,
227+ _host_index ,
228+ ) -> RequestSerialized :
229+ _host = None
230+
231+ _collection_formats : Dict [str , str ] = {}
232+
233+ _path_params : Dict [str , str ] = {}
234+ _query_params : List [Tuple [str , str ]] = []
235+ _header_params : Dict [str , Optional [str ]] = _headers or {}
236+ _form_params : List [Tuple [str , str ]] = []
237+ _files : Dict [str , Union [str , bytes ]] = {}
238+ _body_params : Optional [bytes ] = None
239+
240+ # process the body parameter
241+ if request is not None :
242+ _body_params = request
243+
244+ # set the HTTP header `Accept`
245+ _header_params ["Accept" ] = self .api_client .select_header_accept (
246+ ["application/json" ]
247+ )
248+
249+ # set the HTTP header `Content-Type`
250+ if _content_type :
251+ _header_params ["Content-Type" ] = _content_type
252+ else :
253+ _default_content_type = self .api_client .select_header_content_type (
254+ ["application/json" ]
255+ )
256+ if _default_content_type is not None :
257+ _header_params ["Content-Type" ] = _default_content_type
258+
259+ # authentication setting
260+ _auth_settings : List [str ] = []
261+
262+ return self .api_client .param_serialize (
263+ method = "POST" ,
264+ resource_path = "/rpc/tenant_account_service/fetch_non_aws_accounts" ,
265+ path_params = _path_params ,
266+ query_params = _query_params ,
267+ header_params = _header_params ,
268+ body = _body_params ,
269+ post_params = _form_params ,
270+ files = _files ,
271+ auth_settings = _auth_settings ,
272+ collection_formats = _collection_formats ,
273+ _host = _host ,
274+ _request_auth = _request_auth ,
275+ )
276+
156277 @validate_call
157278 def get_account_details_with_memory_metrics (
158279 self ,
0 commit comments