unitycatalog-client 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. unitycatalog/client/__init__.py +102 -0
  2. unitycatalog/client/api/__init__.py +13 -0
  3. unitycatalog/client/api/catalogs_api.py +1404 -0
  4. unitycatalog/client/api/functions_api.py +1135 -0
  5. unitycatalog/client/api/grants_api.py +630 -0
  6. unitycatalog/client/api/model_versions_api.py +1748 -0
  7. unitycatalog/client/api/registered_models_api.py +1438 -0
  8. unitycatalog/client/api/schemas_api.py +1421 -0
  9. unitycatalog/client/api/tables_api.py +1135 -0
  10. unitycatalog/client/api/temporary_credentials_api.py +1109 -0
  11. unitycatalog/client/api/volumes_api.py +1421 -0
  12. unitycatalog/client/api_client.py +773 -0
  13. unitycatalog/client/api_response.py +21 -0
  14. unitycatalog/client/configuration.py +432 -0
  15. unitycatalog/client/exceptions.py +199 -0
  16. unitycatalog/client/models/__init__.py +77 -0
  17. unitycatalog/client/models/aws_credentials.py +91 -0
  18. unitycatalog/client/models/azure_user_delegation_sas.py +87 -0
  19. unitycatalog/client/models/catalog_info.py +103 -0
  20. unitycatalog/client/models/column_info.py +108 -0
  21. unitycatalog/client/models/column_type_name.py +56 -0
  22. unitycatalog/client/models/create_catalog.py +91 -0
  23. unitycatalog/client/models/create_function.py +163 -0
  24. unitycatalog/client/models/create_function_request.py +91 -0
  25. unitycatalog/client/models/create_model_version.py +97 -0
  26. unitycatalog/client/models/create_registered_model.py +93 -0
  27. unitycatalog/client/models/create_schema.py +93 -0
  28. unitycatalog/client/models/create_table.py +113 -0
  29. unitycatalog/client/models/create_volume_request_content.py +99 -0
  30. unitycatalog/client/models/data_source_format.py +42 -0
  31. unitycatalog/client/models/dependency.py +97 -0
  32. unitycatalog/client/models/dependency_list.py +95 -0
  33. unitycatalog/client/models/finalize_model_version.py +89 -0
  34. unitycatalog/client/models/function_dependency.py +87 -0
  35. unitycatalog/client/models/function_info.py +189 -0
  36. unitycatalog/client/models/function_parameter_info.py +112 -0
  37. unitycatalog/client/models/function_parameter_infos.py +95 -0
  38. unitycatalog/client/models/function_parameter_mode.py +36 -0
  39. unitycatalog/client/models/function_parameter_type.py +37 -0
  40. unitycatalog/client/models/gcp_oauth_token.py +87 -0
  41. unitycatalog/client/models/generate_temporary_model_version_credential.py +96 -0
  42. unitycatalog/client/models/generate_temporary_path_credential.py +90 -0
  43. unitycatalog/client/models/generate_temporary_table_credential.py +90 -0
  44. unitycatalog/client/models/generate_temporary_volume_credential.py +90 -0
  45. unitycatalog/client/models/list_catalogs_response.py +97 -0
  46. unitycatalog/client/models/list_functions_response.py +97 -0
  47. unitycatalog/client/models/list_model_versions_response.py +97 -0
  48. unitycatalog/client/models/list_registered_models_response.py +97 -0
  49. unitycatalog/client/models/list_schemas_response.py +97 -0
  50. unitycatalog/client/models/list_tables_response.py +97 -0
  51. unitycatalog/client/models/list_volumes_response_content.py +97 -0
  52. unitycatalog/client/models/model_version_info.py +114 -0
  53. unitycatalog/client/models/model_version_operation.py +38 -0
  54. unitycatalog/client/models/model_version_status.py +39 -0
  55. unitycatalog/client/models/path_operation.py +39 -0
  56. unitycatalog/client/models/permissions_change.py +92 -0
  57. unitycatalog/client/models/permissions_list.py +95 -0
  58. unitycatalog/client/models/principal_type.py +37 -0
  59. unitycatalog/client/models/privilege.py +47 -0
  60. unitycatalog/client/models/privilege_assignment.py +90 -0
  61. unitycatalog/client/models/registered_model_info.py +109 -0
  62. unitycatalog/client/models/schema_info.py +107 -0
  63. unitycatalog/client/models/securable_type.py +42 -0
  64. unitycatalog/client/models/table_dependency.py +87 -0
  65. unitycatalog/client/models/table_info.py +125 -0
  66. unitycatalog/client/models/table_operation.py +38 -0
  67. unitycatalog/client/models/table_type.py +37 -0
  68. unitycatalog/client/models/temporary_credentials.py +105 -0
  69. unitycatalog/client/models/update_catalog.py +91 -0
  70. unitycatalog/client/models/update_model_version.py +87 -0
  71. unitycatalog/client/models/update_permissions.py +95 -0
  72. unitycatalog/client/models/update_registered_model.py +89 -0
  73. unitycatalog/client/models/update_schema.py +91 -0
  74. unitycatalog/client/models/update_volume_request_content.py +90 -0
  75. unitycatalog/client/models/volume_info.py +113 -0
  76. unitycatalog/client/models/volume_operation.py +38 -0
  77. unitycatalog/client/models/volume_type.py +37 -0
  78. unitycatalog/client/py.typed +0 -0
  79. unitycatalog/client/rest.py +215 -0
  80. unitycatalog_client-0.2.1.dist-info/METADATA +199 -0
  81. unitycatalog_client-0.2.1.dist-info/RECORD +82 -0
  82. unitycatalog_client-0.2.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,1109 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Unity Catalog API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from typing import Optional
20
+ from unitycatalog.client.models.generate_temporary_model_version_credential import GenerateTemporaryModelVersionCredential
21
+ from unitycatalog.client.models.generate_temporary_path_credential import GenerateTemporaryPathCredential
22
+ from unitycatalog.client.models.generate_temporary_table_credential import GenerateTemporaryTableCredential
23
+ from unitycatalog.client.models.generate_temporary_volume_credential import GenerateTemporaryVolumeCredential
24
+ from unitycatalog.client.models.temporary_credentials import TemporaryCredentials
25
+
26
+ from unitycatalog.client.api_client import ApiClient, RequestSerialized
27
+ from unitycatalog.client.api_response import ApiResponse
28
+ from unitycatalog.client.rest import RESTResponseType
29
+
30
+
31
+ class TemporaryCredentialsApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def generate_temporary_model_version_credentials(
46
+ self,
47
+ generate_temporary_model_version_credential: Optional[GenerateTemporaryModelVersionCredential] = None,
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> TemporaryCredentials:
61
+ """Generate temporary model version credentials. These credentials are used by clients to write and retrieve model artifacts from the model versions external storage location.
62
+
63
+
64
+ :param generate_temporary_model_version_credential:
65
+ :type generate_temporary_model_version_credential: GenerateTemporaryModelVersionCredential
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._generate_temporary_model_version_credentials_serialize(
89
+ generate_temporary_model_version_credential=generate_temporary_model_version_credential,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "TemporaryCredentials",
98
+ }
99
+ response_data = await self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ await response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ async def generate_temporary_model_version_credentials_with_http_info(
112
+ self,
113
+ generate_temporary_model_version_credential: Optional[GenerateTemporaryModelVersionCredential] = None,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[TemporaryCredentials]:
127
+ """Generate temporary model version credentials. These credentials are used by clients to write and retrieve model artifacts from the model versions external storage location.
128
+
129
+
130
+ :param generate_temporary_model_version_credential:
131
+ :type generate_temporary_model_version_credential: GenerateTemporaryModelVersionCredential
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._generate_temporary_model_version_credentials_serialize(
155
+ generate_temporary_model_version_credential=generate_temporary_model_version_credential,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '200': "TemporaryCredentials",
164
+ }
165
+ response_data = await self.api_client.call_api(
166
+ *_param,
167
+ _request_timeout=_request_timeout
168
+ )
169
+ await response_data.read()
170
+ return self.api_client.response_deserialize(
171
+ response_data=response_data,
172
+ response_types_map=_response_types_map,
173
+ )
174
+
175
+
176
+ @validate_call
177
+ async def generate_temporary_model_version_credentials_without_preload_content(
178
+ self,
179
+ generate_temporary_model_version_credential: Optional[GenerateTemporaryModelVersionCredential] = None,
180
+ _request_timeout: Union[
181
+ None,
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Tuple[
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Annotated[StrictFloat, Field(gt=0)]
186
+ ]
187
+ ] = None,
188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
189
+ _content_type: Optional[StrictStr] = None,
190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
192
+ ) -> RESTResponseType:
193
+ """Generate temporary model version credentials. These credentials are used by clients to write and retrieve model artifacts from the model versions external storage location.
194
+
195
+
196
+ :param generate_temporary_model_version_credential:
197
+ :type generate_temporary_model_version_credential: GenerateTemporaryModelVersionCredential
198
+ :param _request_timeout: timeout setting for this request. If one
199
+ number provided, it will be total request
200
+ timeout. It can also be a pair (tuple) of
201
+ (connection, read) timeouts.
202
+ :type _request_timeout: int, tuple(int, int), optional
203
+ :param _request_auth: set to override the auth_settings for an a single
204
+ request; this effectively ignores the
205
+ authentication in the spec for a single request.
206
+ :type _request_auth: dict, optional
207
+ :param _content_type: force content-type for the request.
208
+ :type _content_type: str, Optional
209
+ :param _headers: set to override the headers for a single
210
+ request; this effectively ignores the headers
211
+ in the spec for a single request.
212
+ :type _headers: dict, optional
213
+ :param _host_index: set to override the host_index for a single
214
+ request; this effectively ignores the host_index
215
+ in the spec for a single request.
216
+ :type _host_index: int, optional
217
+ :return: Returns the result object.
218
+ """ # noqa: E501
219
+
220
+ _param = self._generate_temporary_model_version_credentials_serialize(
221
+ generate_temporary_model_version_credential=generate_temporary_model_version_credential,
222
+ _request_auth=_request_auth,
223
+ _content_type=_content_type,
224
+ _headers=_headers,
225
+ _host_index=_host_index
226
+ )
227
+
228
+ _response_types_map: Dict[str, Optional[str]] = {
229
+ '200': "TemporaryCredentials",
230
+ }
231
+ response_data = await self.api_client.call_api(
232
+ *_param,
233
+ _request_timeout=_request_timeout
234
+ )
235
+ return response_data.response
236
+
237
+
238
+ def _generate_temporary_model_version_credentials_serialize(
239
+ self,
240
+ generate_temporary_model_version_credential,
241
+ _request_auth,
242
+ _content_type,
243
+ _headers,
244
+ _host_index,
245
+ ) -> RequestSerialized:
246
+
247
+ _host = None
248
+
249
+ _collection_formats: Dict[str, str] = {
250
+ }
251
+
252
+ _path_params: Dict[str, str] = {}
253
+ _query_params: List[Tuple[str, str]] = []
254
+ _header_params: Dict[str, Optional[str]] = _headers or {}
255
+ _form_params: List[Tuple[str, str]] = []
256
+ _files: Dict[str, Union[str, bytes]] = {}
257
+ _body_params: Optional[bytes] = None
258
+
259
+ # process the path parameters
260
+ # process the query parameters
261
+ # process the header parameters
262
+ # process the form parameters
263
+ # process the body parameter
264
+ if generate_temporary_model_version_credential is not None:
265
+ _body_params = generate_temporary_model_version_credential
266
+
267
+
268
+ # set the HTTP header `Accept`
269
+ _header_params['Accept'] = self.api_client.select_header_accept(
270
+ [
271
+ 'application/json'
272
+ ]
273
+ )
274
+
275
+ # set the HTTP header `Content-Type`
276
+ if _content_type:
277
+ _header_params['Content-Type'] = _content_type
278
+ else:
279
+ _default_content_type = (
280
+ self.api_client.select_header_content_type(
281
+ [
282
+ 'application/json'
283
+ ]
284
+ )
285
+ )
286
+ if _default_content_type is not None:
287
+ _header_params['Content-Type'] = _default_content_type
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ ]
292
+
293
+ return self.api_client.param_serialize(
294
+ method='POST',
295
+ resource_path='/temporary-model-version-credentials',
296
+ path_params=_path_params,
297
+ query_params=_query_params,
298
+ header_params=_header_params,
299
+ body=_body_params,
300
+ post_params=_form_params,
301
+ files=_files,
302
+ auth_settings=_auth_settings,
303
+ collection_formats=_collection_formats,
304
+ _host=_host,
305
+ _request_auth=_request_auth
306
+ )
307
+
308
+
309
+
310
+
311
+ @validate_call
312
+ async def generate_temporary_path_credentials(
313
+ self,
314
+ generate_temporary_path_credential: Optional[GenerateTemporaryPathCredential] = None,
315
+ _request_timeout: Union[
316
+ None,
317
+ Annotated[StrictFloat, Field(gt=0)],
318
+ Tuple[
319
+ Annotated[StrictFloat, Field(gt=0)],
320
+ Annotated[StrictFloat, Field(gt=0)]
321
+ ]
322
+ ] = None,
323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
324
+ _content_type: Optional[StrictStr] = None,
325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
327
+ ) -> TemporaryCredentials:
328
+ """Generate temporary path credentials.
329
+
330
+
331
+ :param generate_temporary_path_credential:
332
+ :type generate_temporary_path_credential: GenerateTemporaryPathCredential
333
+ :param _request_timeout: timeout setting for this request. If one
334
+ number provided, it will be total request
335
+ timeout. It can also be a pair (tuple) of
336
+ (connection, read) timeouts.
337
+ :type _request_timeout: int, tuple(int, int), optional
338
+ :param _request_auth: set to override the auth_settings for an a single
339
+ request; this effectively ignores the
340
+ authentication in the spec for a single request.
341
+ :type _request_auth: dict, optional
342
+ :param _content_type: force content-type for the request.
343
+ :type _content_type: str, Optional
344
+ :param _headers: set to override the headers for a single
345
+ request; this effectively ignores the headers
346
+ in the spec for a single request.
347
+ :type _headers: dict, optional
348
+ :param _host_index: set to override the host_index for a single
349
+ request; this effectively ignores the host_index
350
+ in the spec for a single request.
351
+ :type _host_index: int, optional
352
+ :return: Returns the result object.
353
+ """ # noqa: E501
354
+
355
+ _param = self._generate_temporary_path_credentials_serialize(
356
+ generate_temporary_path_credential=generate_temporary_path_credential,
357
+ _request_auth=_request_auth,
358
+ _content_type=_content_type,
359
+ _headers=_headers,
360
+ _host_index=_host_index
361
+ )
362
+
363
+ _response_types_map: Dict[str, Optional[str]] = {
364
+ '200': "TemporaryCredentials",
365
+ }
366
+ response_data = await self.api_client.call_api(
367
+ *_param,
368
+ _request_timeout=_request_timeout
369
+ )
370
+ await response_data.read()
371
+ return self.api_client.response_deserialize(
372
+ response_data=response_data,
373
+ response_types_map=_response_types_map,
374
+ ).data
375
+
376
+
377
+ @validate_call
378
+ async def generate_temporary_path_credentials_with_http_info(
379
+ self,
380
+ generate_temporary_path_credential: Optional[GenerateTemporaryPathCredential] = None,
381
+ _request_timeout: Union[
382
+ None,
383
+ Annotated[StrictFloat, Field(gt=0)],
384
+ Tuple[
385
+ Annotated[StrictFloat, Field(gt=0)],
386
+ Annotated[StrictFloat, Field(gt=0)]
387
+ ]
388
+ ] = None,
389
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
390
+ _content_type: Optional[StrictStr] = None,
391
+ _headers: Optional[Dict[StrictStr, Any]] = None,
392
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
393
+ ) -> ApiResponse[TemporaryCredentials]:
394
+ """Generate temporary path credentials.
395
+
396
+
397
+ :param generate_temporary_path_credential:
398
+ :type generate_temporary_path_credential: GenerateTemporaryPathCredential
399
+ :param _request_timeout: timeout setting for this request. If one
400
+ number provided, it will be total request
401
+ timeout. It can also be a pair (tuple) of
402
+ (connection, read) timeouts.
403
+ :type _request_timeout: int, tuple(int, int), optional
404
+ :param _request_auth: set to override the auth_settings for an a single
405
+ request; this effectively ignores the
406
+ authentication in the spec for a single request.
407
+ :type _request_auth: dict, optional
408
+ :param _content_type: force content-type for the request.
409
+ :type _content_type: str, Optional
410
+ :param _headers: set to override the headers for a single
411
+ request; this effectively ignores the headers
412
+ in the spec for a single request.
413
+ :type _headers: dict, optional
414
+ :param _host_index: set to override the host_index for a single
415
+ request; this effectively ignores the host_index
416
+ in the spec for a single request.
417
+ :type _host_index: int, optional
418
+ :return: Returns the result object.
419
+ """ # noqa: E501
420
+
421
+ _param = self._generate_temporary_path_credentials_serialize(
422
+ generate_temporary_path_credential=generate_temporary_path_credential,
423
+ _request_auth=_request_auth,
424
+ _content_type=_content_type,
425
+ _headers=_headers,
426
+ _host_index=_host_index
427
+ )
428
+
429
+ _response_types_map: Dict[str, Optional[str]] = {
430
+ '200': "TemporaryCredentials",
431
+ }
432
+ response_data = await self.api_client.call_api(
433
+ *_param,
434
+ _request_timeout=_request_timeout
435
+ )
436
+ await response_data.read()
437
+ return self.api_client.response_deserialize(
438
+ response_data=response_data,
439
+ response_types_map=_response_types_map,
440
+ )
441
+
442
+
443
+ @validate_call
444
+ async def generate_temporary_path_credentials_without_preload_content(
445
+ self,
446
+ generate_temporary_path_credential: Optional[GenerateTemporaryPathCredential] = None,
447
+ _request_timeout: Union[
448
+ None,
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Tuple[
451
+ Annotated[StrictFloat, Field(gt=0)],
452
+ Annotated[StrictFloat, Field(gt=0)]
453
+ ]
454
+ ] = None,
455
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
456
+ _content_type: Optional[StrictStr] = None,
457
+ _headers: Optional[Dict[StrictStr, Any]] = None,
458
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
459
+ ) -> RESTResponseType:
460
+ """Generate temporary path credentials.
461
+
462
+
463
+ :param generate_temporary_path_credential:
464
+ :type generate_temporary_path_credential: GenerateTemporaryPathCredential
465
+ :param _request_timeout: timeout setting for this request. If one
466
+ number provided, it will be total request
467
+ timeout. It can also be a pair (tuple) of
468
+ (connection, read) timeouts.
469
+ :type _request_timeout: int, tuple(int, int), optional
470
+ :param _request_auth: set to override the auth_settings for an a single
471
+ request; this effectively ignores the
472
+ authentication in the spec for a single request.
473
+ :type _request_auth: dict, optional
474
+ :param _content_type: force content-type for the request.
475
+ :type _content_type: str, Optional
476
+ :param _headers: set to override the headers for a single
477
+ request; this effectively ignores the headers
478
+ in the spec for a single request.
479
+ :type _headers: dict, optional
480
+ :param _host_index: set to override the host_index for a single
481
+ request; this effectively ignores the host_index
482
+ in the spec for a single request.
483
+ :type _host_index: int, optional
484
+ :return: Returns the result object.
485
+ """ # noqa: E501
486
+
487
+ _param = self._generate_temporary_path_credentials_serialize(
488
+ generate_temporary_path_credential=generate_temporary_path_credential,
489
+ _request_auth=_request_auth,
490
+ _content_type=_content_type,
491
+ _headers=_headers,
492
+ _host_index=_host_index
493
+ )
494
+
495
+ _response_types_map: Dict[str, Optional[str]] = {
496
+ '200': "TemporaryCredentials",
497
+ }
498
+ response_data = await self.api_client.call_api(
499
+ *_param,
500
+ _request_timeout=_request_timeout
501
+ )
502
+ return response_data.response
503
+
504
+
505
+ def _generate_temporary_path_credentials_serialize(
506
+ self,
507
+ generate_temporary_path_credential,
508
+ _request_auth,
509
+ _content_type,
510
+ _headers,
511
+ _host_index,
512
+ ) -> RequestSerialized:
513
+
514
+ _host = None
515
+
516
+ _collection_formats: Dict[str, str] = {
517
+ }
518
+
519
+ _path_params: Dict[str, str] = {}
520
+ _query_params: List[Tuple[str, str]] = []
521
+ _header_params: Dict[str, Optional[str]] = _headers or {}
522
+ _form_params: List[Tuple[str, str]] = []
523
+ _files: Dict[str, Union[str, bytes]] = {}
524
+ _body_params: Optional[bytes] = None
525
+
526
+ # process the path parameters
527
+ # process the query parameters
528
+ # process the header parameters
529
+ # process the form parameters
530
+ # process the body parameter
531
+ if generate_temporary_path_credential is not None:
532
+ _body_params = generate_temporary_path_credential
533
+
534
+
535
+ # set the HTTP header `Accept`
536
+ _header_params['Accept'] = self.api_client.select_header_accept(
537
+ [
538
+ 'application/json'
539
+ ]
540
+ )
541
+
542
+ # set the HTTP header `Content-Type`
543
+ if _content_type:
544
+ _header_params['Content-Type'] = _content_type
545
+ else:
546
+ _default_content_type = (
547
+ self.api_client.select_header_content_type(
548
+ [
549
+ 'application/json'
550
+ ]
551
+ )
552
+ )
553
+ if _default_content_type is not None:
554
+ _header_params['Content-Type'] = _default_content_type
555
+
556
+ # authentication setting
557
+ _auth_settings: List[str] = [
558
+ ]
559
+
560
+ return self.api_client.param_serialize(
561
+ method='POST',
562
+ resource_path='/temporary-path-credentials',
563
+ path_params=_path_params,
564
+ query_params=_query_params,
565
+ header_params=_header_params,
566
+ body=_body_params,
567
+ post_params=_form_params,
568
+ files=_files,
569
+ auth_settings=_auth_settings,
570
+ collection_formats=_collection_formats,
571
+ _host=_host,
572
+ _request_auth=_request_auth
573
+ )
574
+
575
+
576
+
577
+
578
+ @validate_call
579
+ async def generate_temporary_table_credentials(
580
+ self,
581
+ generate_temporary_table_credential: Optional[GenerateTemporaryTableCredential] = None,
582
+ _request_timeout: Union[
583
+ None,
584
+ Annotated[StrictFloat, Field(gt=0)],
585
+ Tuple[
586
+ Annotated[StrictFloat, Field(gt=0)],
587
+ Annotated[StrictFloat, Field(gt=0)]
588
+ ]
589
+ ] = None,
590
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
591
+ _content_type: Optional[StrictStr] = None,
592
+ _headers: Optional[Dict[StrictStr, Any]] = None,
593
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
594
+ ) -> TemporaryCredentials:
595
+ """Generate temporary table credentials.
596
+
597
+
598
+ :param generate_temporary_table_credential:
599
+ :type generate_temporary_table_credential: GenerateTemporaryTableCredential
600
+ :param _request_timeout: timeout setting for this request. If one
601
+ number provided, it will be total request
602
+ timeout. It can also be a pair (tuple) of
603
+ (connection, read) timeouts.
604
+ :type _request_timeout: int, tuple(int, int), optional
605
+ :param _request_auth: set to override the auth_settings for an a single
606
+ request; this effectively ignores the
607
+ authentication in the spec for a single request.
608
+ :type _request_auth: dict, optional
609
+ :param _content_type: force content-type for the request.
610
+ :type _content_type: str, Optional
611
+ :param _headers: set to override the headers for a single
612
+ request; this effectively ignores the headers
613
+ in the spec for a single request.
614
+ :type _headers: dict, optional
615
+ :param _host_index: set to override the host_index for a single
616
+ request; this effectively ignores the host_index
617
+ in the spec for a single request.
618
+ :type _host_index: int, optional
619
+ :return: Returns the result object.
620
+ """ # noqa: E501
621
+
622
+ _param = self._generate_temporary_table_credentials_serialize(
623
+ generate_temporary_table_credential=generate_temporary_table_credential,
624
+ _request_auth=_request_auth,
625
+ _content_type=_content_type,
626
+ _headers=_headers,
627
+ _host_index=_host_index
628
+ )
629
+
630
+ _response_types_map: Dict[str, Optional[str]] = {
631
+ '200': "TemporaryCredentials",
632
+ }
633
+ response_data = await self.api_client.call_api(
634
+ *_param,
635
+ _request_timeout=_request_timeout
636
+ )
637
+ await response_data.read()
638
+ return self.api_client.response_deserialize(
639
+ response_data=response_data,
640
+ response_types_map=_response_types_map,
641
+ ).data
642
+
643
+
644
+ @validate_call
645
+ async def generate_temporary_table_credentials_with_http_info(
646
+ self,
647
+ generate_temporary_table_credential: Optional[GenerateTemporaryTableCredential] = None,
648
+ _request_timeout: Union[
649
+ None,
650
+ Annotated[StrictFloat, Field(gt=0)],
651
+ Tuple[
652
+ Annotated[StrictFloat, Field(gt=0)],
653
+ Annotated[StrictFloat, Field(gt=0)]
654
+ ]
655
+ ] = None,
656
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
657
+ _content_type: Optional[StrictStr] = None,
658
+ _headers: Optional[Dict[StrictStr, Any]] = None,
659
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
660
+ ) -> ApiResponse[TemporaryCredentials]:
661
+ """Generate temporary table credentials.
662
+
663
+
664
+ :param generate_temporary_table_credential:
665
+ :type generate_temporary_table_credential: GenerateTemporaryTableCredential
666
+ :param _request_timeout: timeout setting for this request. If one
667
+ number provided, it will be total request
668
+ timeout. It can also be a pair (tuple) of
669
+ (connection, read) timeouts.
670
+ :type _request_timeout: int, tuple(int, int), optional
671
+ :param _request_auth: set to override the auth_settings for an a single
672
+ request; this effectively ignores the
673
+ authentication in the spec for a single request.
674
+ :type _request_auth: dict, optional
675
+ :param _content_type: force content-type for the request.
676
+ :type _content_type: str, Optional
677
+ :param _headers: set to override the headers for a single
678
+ request; this effectively ignores the headers
679
+ in the spec for a single request.
680
+ :type _headers: dict, optional
681
+ :param _host_index: set to override the host_index for a single
682
+ request; this effectively ignores the host_index
683
+ in the spec for a single request.
684
+ :type _host_index: int, optional
685
+ :return: Returns the result object.
686
+ """ # noqa: E501
687
+
688
+ _param = self._generate_temporary_table_credentials_serialize(
689
+ generate_temporary_table_credential=generate_temporary_table_credential,
690
+ _request_auth=_request_auth,
691
+ _content_type=_content_type,
692
+ _headers=_headers,
693
+ _host_index=_host_index
694
+ )
695
+
696
+ _response_types_map: Dict[str, Optional[str]] = {
697
+ '200': "TemporaryCredentials",
698
+ }
699
+ response_data = await self.api_client.call_api(
700
+ *_param,
701
+ _request_timeout=_request_timeout
702
+ )
703
+ await response_data.read()
704
+ return self.api_client.response_deserialize(
705
+ response_data=response_data,
706
+ response_types_map=_response_types_map,
707
+ )
708
+
709
+
710
+ @validate_call
711
+ async def generate_temporary_table_credentials_without_preload_content(
712
+ self,
713
+ generate_temporary_table_credential: Optional[GenerateTemporaryTableCredential] = None,
714
+ _request_timeout: Union[
715
+ None,
716
+ Annotated[StrictFloat, Field(gt=0)],
717
+ Tuple[
718
+ Annotated[StrictFloat, Field(gt=0)],
719
+ Annotated[StrictFloat, Field(gt=0)]
720
+ ]
721
+ ] = None,
722
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
723
+ _content_type: Optional[StrictStr] = None,
724
+ _headers: Optional[Dict[StrictStr, Any]] = None,
725
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
726
+ ) -> RESTResponseType:
727
+ """Generate temporary table credentials.
728
+
729
+
730
+ :param generate_temporary_table_credential:
731
+ :type generate_temporary_table_credential: GenerateTemporaryTableCredential
732
+ :param _request_timeout: timeout setting for this request. If one
733
+ number provided, it will be total request
734
+ timeout. It can also be a pair (tuple) of
735
+ (connection, read) timeouts.
736
+ :type _request_timeout: int, tuple(int, int), optional
737
+ :param _request_auth: set to override the auth_settings for an a single
738
+ request; this effectively ignores the
739
+ authentication in the spec for a single request.
740
+ :type _request_auth: dict, optional
741
+ :param _content_type: force content-type for the request.
742
+ :type _content_type: str, Optional
743
+ :param _headers: set to override the headers for a single
744
+ request; this effectively ignores the headers
745
+ in the spec for a single request.
746
+ :type _headers: dict, optional
747
+ :param _host_index: set to override the host_index for a single
748
+ request; this effectively ignores the host_index
749
+ in the spec for a single request.
750
+ :type _host_index: int, optional
751
+ :return: Returns the result object.
752
+ """ # noqa: E501
753
+
754
+ _param = self._generate_temporary_table_credentials_serialize(
755
+ generate_temporary_table_credential=generate_temporary_table_credential,
756
+ _request_auth=_request_auth,
757
+ _content_type=_content_type,
758
+ _headers=_headers,
759
+ _host_index=_host_index
760
+ )
761
+
762
+ _response_types_map: Dict[str, Optional[str]] = {
763
+ '200': "TemporaryCredentials",
764
+ }
765
+ response_data = await self.api_client.call_api(
766
+ *_param,
767
+ _request_timeout=_request_timeout
768
+ )
769
+ return response_data.response
770
+
771
+
772
+ def _generate_temporary_table_credentials_serialize(
773
+ self,
774
+ generate_temporary_table_credential,
775
+ _request_auth,
776
+ _content_type,
777
+ _headers,
778
+ _host_index,
779
+ ) -> RequestSerialized:
780
+
781
+ _host = None
782
+
783
+ _collection_formats: Dict[str, str] = {
784
+ }
785
+
786
+ _path_params: Dict[str, str] = {}
787
+ _query_params: List[Tuple[str, str]] = []
788
+ _header_params: Dict[str, Optional[str]] = _headers or {}
789
+ _form_params: List[Tuple[str, str]] = []
790
+ _files: Dict[str, Union[str, bytes]] = {}
791
+ _body_params: Optional[bytes] = None
792
+
793
+ # process the path parameters
794
+ # process the query parameters
795
+ # process the header parameters
796
+ # process the form parameters
797
+ # process the body parameter
798
+ if generate_temporary_table_credential is not None:
799
+ _body_params = generate_temporary_table_credential
800
+
801
+
802
+ # set the HTTP header `Accept`
803
+ _header_params['Accept'] = self.api_client.select_header_accept(
804
+ [
805
+ 'application/json'
806
+ ]
807
+ )
808
+
809
+ # set the HTTP header `Content-Type`
810
+ if _content_type:
811
+ _header_params['Content-Type'] = _content_type
812
+ else:
813
+ _default_content_type = (
814
+ self.api_client.select_header_content_type(
815
+ [
816
+ 'application/json'
817
+ ]
818
+ )
819
+ )
820
+ if _default_content_type is not None:
821
+ _header_params['Content-Type'] = _default_content_type
822
+
823
+ # authentication setting
824
+ _auth_settings: List[str] = [
825
+ ]
826
+
827
+ return self.api_client.param_serialize(
828
+ method='POST',
829
+ resource_path='/temporary-table-credentials',
830
+ path_params=_path_params,
831
+ query_params=_query_params,
832
+ header_params=_header_params,
833
+ body=_body_params,
834
+ post_params=_form_params,
835
+ files=_files,
836
+ auth_settings=_auth_settings,
837
+ collection_formats=_collection_formats,
838
+ _host=_host,
839
+ _request_auth=_request_auth
840
+ )
841
+
842
+
843
+
844
+
845
+ @validate_call
846
+ async def generate_temporary_volume_credentials(
847
+ self,
848
+ generate_temporary_volume_credential: Optional[GenerateTemporaryVolumeCredential] = None,
849
+ _request_timeout: Union[
850
+ None,
851
+ Annotated[StrictFloat, Field(gt=0)],
852
+ Tuple[
853
+ Annotated[StrictFloat, Field(gt=0)],
854
+ Annotated[StrictFloat, Field(gt=0)]
855
+ ]
856
+ ] = None,
857
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
858
+ _content_type: Optional[StrictStr] = None,
859
+ _headers: Optional[Dict[StrictStr, Any]] = None,
860
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
861
+ ) -> TemporaryCredentials:
862
+ """Generate temporary volume credentials.
863
+
864
+
865
+ :param generate_temporary_volume_credential:
866
+ :type generate_temporary_volume_credential: GenerateTemporaryVolumeCredential
867
+ :param _request_timeout: timeout setting for this request. If one
868
+ number provided, it will be total request
869
+ timeout. It can also be a pair (tuple) of
870
+ (connection, read) timeouts.
871
+ :type _request_timeout: int, tuple(int, int), optional
872
+ :param _request_auth: set to override the auth_settings for an a single
873
+ request; this effectively ignores the
874
+ authentication in the spec for a single request.
875
+ :type _request_auth: dict, optional
876
+ :param _content_type: force content-type for the request.
877
+ :type _content_type: str, Optional
878
+ :param _headers: set to override the headers for a single
879
+ request; this effectively ignores the headers
880
+ in the spec for a single request.
881
+ :type _headers: dict, optional
882
+ :param _host_index: set to override the host_index for a single
883
+ request; this effectively ignores the host_index
884
+ in the spec for a single request.
885
+ :type _host_index: int, optional
886
+ :return: Returns the result object.
887
+ """ # noqa: E501
888
+
889
+ _param = self._generate_temporary_volume_credentials_serialize(
890
+ generate_temporary_volume_credential=generate_temporary_volume_credential,
891
+ _request_auth=_request_auth,
892
+ _content_type=_content_type,
893
+ _headers=_headers,
894
+ _host_index=_host_index
895
+ )
896
+
897
+ _response_types_map: Dict[str, Optional[str]] = {
898
+ '200': "TemporaryCredentials",
899
+ }
900
+ response_data = await self.api_client.call_api(
901
+ *_param,
902
+ _request_timeout=_request_timeout
903
+ )
904
+ await response_data.read()
905
+ return self.api_client.response_deserialize(
906
+ response_data=response_data,
907
+ response_types_map=_response_types_map,
908
+ ).data
909
+
910
+
911
+ @validate_call
912
+ async def generate_temporary_volume_credentials_with_http_info(
913
+ self,
914
+ generate_temporary_volume_credential: Optional[GenerateTemporaryVolumeCredential] = None,
915
+ _request_timeout: Union[
916
+ None,
917
+ Annotated[StrictFloat, Field(gt=0)],
918
+ Tuple[
919
+ Annotated[StrictFloat, Field(gt=0)],
920
+ Annotated[StrictFloat, Field(gt=0)]
921
+ ]
922
+ ] = None,
923
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
924
+ _content_type: Optional[StrictStr] = None,
925
+ _headers: Optional[Dict[StrictStr, Any]] = None,
926
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
927
+ ) -> ApiResponse[TemporaryCredentials]:
928
+ """Generate temporary volume credentials.
929
+
930
+
931
+ :param generate_temporary_volume_credential:
932
+ :type generate_temporary_volume_credential: GenerateTemporaryVolumeCredential
933
+ :param _request_timeout: timeout setting for this request. If one
934
+ number provided, it will be total request
935
+ timeout. It can also be a pair (tuple) of
936
+ (connection, read) timeouts.
937
+ :type _request_timeout: int, tuple(int, int), optional
938
+ :param _request_auth: set to override the auth_settings for an a single
939
+ request; this effectively ignores the
940
+ authentication in the spec for a single request.
941
+ :type _request_auth: dict, optional
942
+ :param _content_type: force content-type for the request.
943
+ :type _content_type: str, Optional
944
+ :param _headers: set to override the headers for a single
945
+ request; this effectively ignores the headers
946
+ in the spec for a single request.
947
+ :type _headers: dict, optional
948
+ :param _host_index: set to override the host_index for a single
949
+ request; this effectively ignores the host_index
950
+ in the spec for a single request.
951
+ :type _host_index: int, optional
952
+ :return: Returns the result object.
953
+ """ # noqa: E501
954
+
955
+ _param = self._generate_temporary_volume_credentials_serialize(
956
+ generate_temporary_volume_credential=generate_temporary_volume_credential,
957
+ _request_auth=_request_auth,
958
+ _content_type=_content_type,
959
+ _headers=_headers,
960
+ _host_index=_host_index
961
+ )
962
+
963
+ _response_types_map: Dict[str, Optional[str]] = {
964
+ '200': "TemporaryCredentials",
965
+ }
966
+ response_data = await self.api_client.call_api(
967
+ *_param,
968
+ _request_timeout=_request_timeout
969
+ )
970
+ await response_data.read()
971
+ return self.api_client.response_deserialize(
972
+ response_data=response_data,
973
+ response_types_map=_response_types_map,
974
+ )
975
+
976
+
977
+ @validate_call
978
+ async def generate_temporary_volume_credentials_without_preload_content(
979
+ self,
980
+ generate_temporary_volume_credential: Optional[GenerateTemporaryVolumeCredential] = None,
981
+ _request_timeout: Union[
982
+ None,
983
+ Annotated[StrictFloat, Field(gt=0)],
984
+ Tuple[
985
+ Annotated[StrictFloat, Field(gt=0)],
986
+ Annotated[StrictFloat, Field(gt=0)]
987
+ ]
988
+ ] = None,
989
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
990
+ _content_type: Optional[StrictStr] = None,
991
+ _headers: Optional[Dict[StrictStr, Any]] = None,
992
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
993
+ ) -> RESTResponseType:
994
+ """Generate temporary volume credentials.
995
+
996
+
997
+ :param generate_temporary_volume_credential:
998
+ :type generate_temporary_volume_credential: GenerateTemporaryVolumeCredential
999
+ :param _request_timeout: timeout setting for this request. If one
1000
+ number provided, it will be total request
1001
+ timeout. It can also be a pair (tuple) of
1002
+ (connection, read) timeouts.
1003
+ :type _request_timeout: int, tuple(int, int), optional
1004
+ :param _request_auth: set to override the auth_settings for an a single
1005
+ request; this effectively ignores the
1006
+ authentication in the spec for a single request.
1007
+ :type _request_auth: dict, optional
1008
+ :param _content_type: force content-type for the request.
1009
+ :type _content_type: str, Optional
1010
+ :param _headers: set to override the headers for a single
1011
+ request; this effectively ignores the headers
1012
+ in the spec for a single request.
1013
+ :type _headers: dict, optional
1014
+ :param _host_index: set to override the host_index for a single
1015
+ request; this effectively ignores the host_index
1016
+ in the spec for a single request.
1017
+ :type _host_index: int, optional
1018
+ :return: Returns the result object.
1019
+ """ # noqa: E501
1020
+
1021
+ _param = self._generate_temporary_volume_credentials_serialize(
1022
+ generate_temporary_volume_credential=generate_temporary_volume_credential,
1023
+ _request_auth=_request_auth,
1024
+ _content_type=_content_type,
1025
+ _headers=_headers,
1026
+ _host_index=_host_index
1027
+ )
1028
+
1029
+ _response_types_map: Dict[str, Optional[str]] = {
1030
+ '200': "TemporaryCredentials",
1031
+ }
1032
+ response_data = await self.api_client.call_api(
1033
+ *_param,
1034
+ _request_timeout=_request_timeout
1035
+ )
1036
+ return response_data.response
1037
+
1038
+
1039
+ def _generate_temporary_volume_credentials_serialize(
1040
+ self,
1041
+ generate_temporary_volume_credential,
1042
+ _request_auth,
1043
+ _content_type,
1044
+ _headers,
1045
+ _host_index,
1046
+ ) -> RequestSerialized:
1047
+
1048
+ _host = None
1049
+
1050
+ _collection_formats: Dict[str, str] = {
1051
+ }
1052
+
1053
+ _path_params: Dict[str, str] = {}
1054
+ _query_params: List[Tuple[str, str]] = []
1055
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1056
+ _form_params: List[Tuple[str, str]] = []
1057
+ _files: Dict[str, Union[str, bytes]] = {}
1058
+ _body_params: Optional[bytes] = None
1059
+
1060
+ # process the path parameters
1061
+ # process the query parameters
1062
+ # process the header parameters
1063
+ # process the form parameters
1064
+ # process the body parameter
1065
+ if generate_temporary_volume_credential is not None:
1066
+ _body_params = generate_temporary_volume_credential
1067
+
1068
+
1069
+ # set the HTTP header `Accept`
1070
+ _header_params['Accept'] = self.api_client.select_header_accept(
1071
+ [
1072
+ 'application/json'
1073
+ ]
1074
+ )
1075
+
1076
+ # set the HTTP header `Content-Type`
1077
+ if _content_type:
1078
+ _header_params['Content-Type'] = _content_type
1079
+ else:
1080
+ _default_content_type = (
1081
+ self.api_client.select_header_content_type(
1082
+ [
1083
+ 'application/json'
1084
+ ]
1085
+ )
1086
+ )
1087
+ if _default_content_type is not None:
1088
+ _header_params['Content-Type'] = _default_content_type
1089
+
1090
+ # authentication setting
1091
+ _auth_settings: List[str] = [
1092
+ ]
1093
+
1094
+ return self.api_client.param_serialize(
1095
+ method='POST',
1096
+ resource_path='/temporary-volume-credentials',
1097
+ path_params=_path_params,
1098
+ query_params=_query_params,
1099
+ header_params=_header_params,
1100
+ body=_body_params,
1101
+ post_params=_form_params,
1102
+ files=_files,
1103
+ auth_settings=_auth_settings,
1104
+ collection_formats=_collection_formats,
1105
+ _host=_host,
1106
+ _request_auth=_request_auth
1107
+ )
1108
+
1109
+