@@ -129,3 +129,100 @@ def assume_role_with_http_info(self, body, **kwargs): # noqa: E501
129129 _preload_content = params .get ('_preload_content' , True ),
130130 _request_timeout = params .get ('_request_timeout' ),
131131 collection_formats = collection_formats )
132+
133+ def get_caller_identity (self , body , ** kwargs ): # noqa: E501
134+ """get_caller_identity # noqa: E501
135+
136+ This method makes a synchronous HTTP request by default. To make an
137+ asynchronous HTTP request, please pass async_req=True
138+ >>> thread = api.get_caller_identity(body, async_req=True)
139+ >>> result = thread.get()
140+
141+ :param async_req bool
142+ :param GetCallerIdentityRequest body: (required)
143+ :return: GetCallerIdentityResponse
144+ If the method is called asynchronously,
145+ returns the request thread.
146+ """
147+ kwargs ['_return_http_data_only' ] = True
148+ if kwargs .get ('async_req' ):
149+ return self .get_caller_identity_with_http_info (body , ** kwargs ) # noqa: E501
150+ else :
151+ (data ) = self .get_caller_identity_with_http_info (body , ** kwargs ) # noqa: E501
152+ return data
153+
154+ def get_caller_identity_with_http_info (self , body , ** kwargs ): # noqa: E501
155+ """get_caller_identity # noqa: E501
156+
157+ This method makes a synchronous HTTP request by default. To make an
158+ asynchronous HTTP request, please pass async_req=True
159+ >>> thread = api.get_caller_identity_with_http_info(body, async_req=True)
160+ >>> result = thread.get()
161+
162+ :param async_req bool
163+ :param GetCallerIdentityRequest body: (required)
164+ :return: GetCallerIdentityResponse
165+ If the method is called asynchronously,
166+ returns the request thread.
167+ """
168+
169+ all_params = ['body' ] # noqa: E501
170+ all_params .append ('async_req' )
171+ all_params .append ('_return_http_data_only' )
172+ all_params .append ('_preload_content' )
173+ all_params .append ('_request_timeout' )
174+
175+ params = locals ()
176+ for key , val in six .iteritems (params ['kwargs' ]):
177+ if key not in all_params :
178+ raise TypeError (
179+ "Got an unexpected keyword argument '%s'"
180+ " to method get_caller_identity" % key
181+ )
182+ params [key ] = val
183+ del params ['kwargs' ]
184+ # verify the required parameter 'body' is set
185+ if self .api_client .client_side_validation and ('body' not in params or
186+ params ['body' ] is None ): # noqa: E501
187+ raise ValueError ("Missing the required parameter `body` when calling `get_caller_identity`" ) # noqa: E501
188+
189+ collection_formats = {}
190+
191+ path_params = {}
192+
193+ query_params = []
194+
195+ header_params = {}
196+
197+ form_params = []
198+ local_var_files = {}
199+
200+ body_params = None
201+ if 'body' in params :
202+ body_params = params ['body' ]
203+ # HTTP header `Accept`
204+ header_params ['Accept' ] = self .api_client .select_header_accept (
205+ ['application/json' ]) # noqa: E501
206+
207+ # HTTP header `Content-Type`
208+ header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
209+ ['application/x-www-form-urlencoded' ]) # noqa: E501
210+
211+ # Authentication setting
212+ auth_settings = ['volcengineSign' ] # noqa: E501
213+
214+ return self .api_client .call_api (
215+ '/GetCallerIdentity/2018-01-01/sts/post/application_x-www-form-urlencoded/' , 'POST' ,
216+ path_params ,
217+ query_params ,
218+ header_params ,
219+ body = body_params ,
220+ post_params = form_params ,
221+ files = local_var_files ,
222+ response_type = 'GetCallerIdentityResponse' , # noqa: E501
223+ auth_settings = auth_settings ,
224+ async_req = params .get ('async_req' ),
225+ _return_http_data_only = params .get ('_return_http_data_only' ),
226+ _preload_content = params .get ('_preload_content' , True ),
227+ _request_timeout = params .get ('_request_timeout' ),
228+ collection_formats = collection_formats )
0 commit comments