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.
- unitycatalog/client/__init__.py +102 -0
- unitycatalog/client/api/__init__.py +13 -0
- unitycatalog/client/api/catalogs_api.py +1404 -0
- unitycatalog/client/api/functions_api.py +1135 -0
- unitycatalog/client/api/grants_api.py +630 -0
- unitycatalog/client/api/model_versions_api.py +1748 -0
- unitycatalog/client/api/registered_models_api.py +1438 -0
- unitycatalog/client/api/schemas_api.py +1421 -0
- unitycatalog/client/api/tables_api.py +1135 -0
- unitycatalog/client/api/temporary_credentials_api.py +1109 -0
- unitycatalog/client/api/volumes_api.py +1421 -0
- unitycatalog/client/api_client.py +773 -0
- unitycatalog/client/api_response.py +21 -0
- unitycatalog/client/configuration.py +432 -0
- unitycatalog/client/exceptions.py +199 -0
- unitycatalog/client/models/__init__.py +77 -0
- unitycatalog/client/models/aws_credentials.py +91 -0
- unitycatalog/client/models/azure_user_delegation_sas.py +87 -0
- unitycatalog/client/models/catalog_info.py +103 -0
- unitycatalog/client/models/column_info.py +108 -0
- unitycatalog/client/models/column_type_name.py +56 -0
- unitycatalog/client/models/create_catalog.py +91 -0
- unitycatalog/client/models/create_function.py +163 -0
- unitycatalog/client/models/create_function_request.py +91 -0
- unitycatalog/client/models/create_model_version.py +97 -0
- unitycatalog/client/models/create_registered_model.py +93 -0
- unitycatalog/client/models/create_schema.py +93 -0
- unitycatalog/client/models/create_table.py +113 -0
- unitycatalog/client/models/create_volume_request_content.py +99 -0
- unitycatalog/client/models/data_source_format.py +42 -0
- unitycatalog/client/models/dependency.py +97 -0
- unitycatalog/client/models/dependency_list.py +95 -0
- unitycatalog/client/models/finalize_model_version.py +89 -0
- unitycatalog/client/models/function_dependency.py +87 -0
- unitycatalog/client/models/function_info.py +189 -0
- unitycatalog/client/models/function_parameter_info.py +112 -0
- unitycatalog/client/models/function_parameter_infos.py +95 -0
- unitycatalog/client/models/function_parameter_mode.py +36 -0
- unitycatalog/client/models/function_parameter_type.py +37 -0
- unitycatalog/client/models/gcp_oauth_token.py +87 -0
- unitycatalog/client/models/generate_temporary_model_version_credential.py +96 -0
- unitycatalog/client/models/generate_temporary_path_credential.py +90 -0
- unitycatalog/client/models/generate_temporary_table_credential.py +90 -0
- unitycatalog/client/models/generate_temporary_volume_credential.py +90 -0
- unitycatalog/client/models/list_catalogs_response.py +97 -0
- unitycatalog/client/models/list_functions_response.py +97 -0
- unitycatalog/client/models/list_model_versions_response.py +97 -0
- unitycatalog/client/models/list_registered_models_response.py +97 -0
- unitycatalog/client/models/list_schemas_response.py +97 -0
- unitycatalog/client/models/list_tables_response.py +97 -0
- unitycatalog/client/models/list_volumes_response_content.py +97 -0
- unitycatalog/client/models/model_version_info.py +114 -0
- unitycatalog/client/models/model_version_operation.py +38 -0
- unitycatalog/client/models/model_version_status.py +39 -0
- unitycatalog/client/models/path_operation.py +39 -0
- unitycatalog/client/models/permissions_change.py +92 -0
- unitycatalog/client/models/permissions_list.py +95 -0
- unitycatalog/client/models/principal_type.py +37 -0
- unitycatalog/client/models/privilege.py +47 -0
- unitycatalog/client/models/privilege_assignment.py +90 -0
- unitycatalog/client/models/registered_model_info.py +109 -0
- unitycatalog/client/models/schema_info.py +107 -0
- unitycatalog/client/models/securable_type.py +42 -0
- unitycatalog/client/models/table_dependency.py +87 -0
- unitycatalog/client/models/table_info.py +125 -0
- unitycatalog/client/models/table_operation.py +38 -0
- unitycatalog/client/models/table_type.py +37 -0
- unitycatalog/client/models/temporary_credentials.py +105 -0
- unitycatalog/client/models/update_catalog.py +91 -0
- unitycatalog/client/models/update_model_version.py +87 -0
- unitycatalog/client/models/update_permissions.py +95 -0
- unitycatalog/client/models/update_registered_model.py +89 -0
- unitycatalog/client/models/update_schema.py +91 -0
- unitycatalog/client/models/update_volume_request_content.py +90 -0
- unitycatalog/client/models/volume_info.py +113 -0
- unitycatalog/client/models/volume_operation.py +38 -0
- unitycatalog/client/models/volume_type.py +37 -0
- unitycatalog/client/py.typed +0 -0
- unitycatalog/client/rest.py +215 -0
- unitycatalog_client-0.2.1.dist-info/METADATA +199 -0
- unitycatalog_client-0.2.1.dist-info/RECORD +82 -0
- unitycatalog_client-0.2.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1421 @@
|
|
|
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 pydantic import Field, StrictStr
|
|
20
|
+
from typing import Any, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from unitycatalog.client.models.create_volume_request_content import CreateVolumeRequestContent
|
|
23
|
+
from unitycatalog.client.models.list_volumes_response_content import ListVolumesResponseContent
|
|
24
|
+
from unitycatalog.client.models.update_volume_request_content import UpdateVolumeRequestContent
|
|
25
|
+
from unitycatalog.client.models.volume_info import VolumeInfo
|
|
26
|
+
|
|
27
|
+
from unitycatalog.client.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from unitycatalog.client.api_response import ApiResponse
|
|
29
|
+
from unitycatalog.client.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class VolumesApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
async def create_volume(
|
|
47
|
+
self,
|
|
48
|
+
create_volume_request_content: CreateVolumeRequestContent,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> VolumeInfo:
|
|
62
|
+
"""Create a Volume
|
|
63
|
+
|
|
64
|
+
Creates a new volume.
|
|
65
|
+
|
|
66
|
+
:param create_volume_request_content: (required)
|
|
67
|
+
:type create_volume_request_content: CreateVolumeRequestContent
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._create_volume_serialize(
|
|
91
|
+
create_volume_request_content=create_volume_request_content,
|
|
92
|
+
_request_auth=_request_auth,
|
|
93
|
+
_content_type=_content_type,
|
|
94
|
+
_headers=_headers,
|
|
95
|
+
_host_index=_host_index
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
+
'200': "VolumeInfo",
|
|
100
|
+
}
|
|
101
|
+
response_data = await self.api_client.call_api(
|
|
102
|
+
*_param,
|
|
103
|
+
_request_timeout=_request_timeout
|
|
104
|
+
)
|
|
105
|
+
await response_data.read()
|
|
106
|
+
return self.api_client.response_deserialize(
|
|
107
|
+
response_data=response_data,
|
|
108
|
+
response_types_map=_response_types_map,
|
|
109
|
+
).data
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@validate_call
|
|
113
|
+
async def create_volume_with_http_info(
|
|
114
|
+
self,
|
|
115
|
+
create_volume_request_content: CreateVolumeRequestContent,
|
|
116
|
+
_request_timeout: Union[
|
|
117
|
+
None,
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Tuple[
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
122
|
+
]
|
|
123
|
+
] = None,
|
|
124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_content_type: Optional[StrictStr] = None,
|
|
126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
+
) -> ApiResponse[VolumeInfo]:
|
|
129
|
+
"""Create a Volume
|
|
130
|
+
|
|
131
|
+
Creates a new volume.
|
|
132
|
+
|
|
133
|
+
:param create_volume_request_content: (required)
|
|
134
|
+
:type create_volume_request_content: CreateVolumeRequestContent
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._create_volume_serialize(
|
|
158
|
+
create_volume_request_content=create_volume_request_content,
|
|
159
|
+
_request_auth=_request_auth,
|
|
160
|
+
_content_type=_content_type,
|
|
161
|
+
_headers=_headers,
|
|
162
|
+
_host_index=_host_index
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
+
'200': "VolumeInfo",
|
|
167
|
+
}
|
|
168
|
+
response_data = await self.api_client.call_api(
|
|
169
|
+
*_param,
|
|
170
|
+
_request_timeout=_request_timeout
|
|
171
|
+
)
|
|
172
|
+
await response_data.read()
|
|
173
|
+
return self.api_client.response_deserialize(
|
|
174
|
+
response_data=response_data,
|
|
175
|
+
response_types_map=_response_types_map,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
@validate_call
|
|
180
|
+
async def create_volume_without_preload_content(
|
|
181
|
+
self,
|
|
182
|
+
create_volume_request_content: CreateVolumeRequestContent,
|
|
183
|
+
_request_timeout: Union[
|
|
184
|
+
None,
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
186
|
+
Tuple[
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
189
|
+
]
|
|
190
|
+
] = None,
|
|
191
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
192
|
+
_content_type: Optional[StrictStr] = None,
|
|
193
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
194
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
195
|
+
) -> RESTResponseType:
|
|
196
|
+
"""Create a Volume
|
|
197
|
+
|
|
198
|
+
Creates a new volume.
|
|
199
|
+
|
|
200
|
+
:param create_volume_request_content: (required)
|
|
201
|
+
:type create_volume_request_content: CreateVolumeRequestContent
|
|
202
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
203
|
+
number provided, it will be total request
|
|
204
|
+
timeout. It can also be a pair (tuple) of
|
|
205
|
+
(connection, read) timeouts.
|
|
206
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
207
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
208
|
+
request; this effectively ignores the
|
|
209
|
+
authentication in the spec for a single request.
|
|
210
|
+
:type _request_auth: dict, optional
|
|
211
|
+
:param _content_type: force content-type for the request.
|
|
212
|
+
:type _content_type: str, Optional
|
|
213
|
+
:param _headers: set to override the headers for a single
|
|
214
|
+
request; this effectively ignores the headers
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _headers: dict, optional
|
|
217
|
+
:param _host_index: set to override the host_index for a single
|
|
218
|
+
request; this effectively ignores the host_index
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _host_index: int, optional
|
|
221
|
+
:return: Returns the result object.
|
|
222
|
+
""" # noqa: E501
|
|
223
|
+
|
|
224
|
+
_param = self._create_volume_serialize(
|
|
225
|
+
create_volume_request_content=create_volume_request_content,
|
|
226
|
+
_request_auth=_request_auth,
|
|
227
|
+
_content_type=_content_type,
|
|
228
|
+
_headers=_headers,
|
|
229
|
+
_host_index=_host_index
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
233
|
+
'200': "VolumeInfo",
|
|
234
|
+
}
|
|
235
|
+
response_data = await self.api_client.call_api(
|
|
236
|
+
*_param,
|
|
237
|
+
_request_timeout=_request_timeout
|
|
238
|
+
)
|
|
239
|
+
return response_data.response
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def _create_volume_serialize(
|
|
243
|
+
self,
|
|
244
|
+
create_volume_request_content,
|
|
245
|
+
_request_auth,
|
|
246
|
+
_content_type,
|
|
247
|
+
_headers,
|
|
248
|
+
_host_index,
|
|
249
|
+
) -> RequestSerialized:
|
|
250
|
+
|
|
251
|
+
_host = None
|
|
252
|
+
|
|
253
|
+
_collection_formats: Dict[str, str] = {
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
_path_params: Dict[str, str] = {}
|
|
257
|
+
_query_params: List[Tuple[str, str]] = []
|
|
258
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
259
|
+
_form_params: List[Tuple[str, str]] = []
|
|
260
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
261
|
+
_body_params: Optional[bytes] = None
|
|
262
|
+
|
|
263
|
+
# process the path parameters
|
|
264
|
+
# process the query parameters
|
|
265
|
+
# process the header parameters
|
|
266
|
+
# process the form parameters
|
|
267
|
+
# process the body parameter
|
|
268
|
+
if create_volume_request_content is not None:
|
|
269
|
+
_body_params = create_volume_request_content
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
# set the HTTP header `Accept`
|
|
273
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
274
|
+
[
|
|
275
|
+
'application/json'
|
|
276
|
+
]
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
# set the HTTP header `Content-Type`
|
|
280
|
+
if _content_type:
|
|
281
|
+
_header_params['Content-Type'] = _content_type
|
|
282
|
+
else:
|
|
283
|
+
_default_content_type = (
|
|
284
|
+
self.api_client.select_header_content_type(
|
|
285
|
+
[
|
|
286
|
+
'application/json'
|
|
287
|
+
]
|
|
288
|
+
)
|
|
289
|
+
)
|
|
290
|
+
if _default_content_type is not None:
|
|
291
|
+
_header_params['Content-Type'] = _default_content_type
|
|
292
|
+
|
|
293
|
+
# authentication setting
|
|
294
|
+
_auth_settings: List[str] = [
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
return self.api_client.param_serialize(
|
|
298
|
+
method='POST',
|
|
299
|
+
resource_path='/volumes',
|
|
300
|
+
path_params=_path_params,
|
|
301
|
+
query_params=_query_params,
|
|
302
|
+
header_params=_header_params,
|
|
303
|
+
body=_body_params,
|
|
304
|
+
post_params=_form_params,
|
|
305
|
+
files=_files,
|
|
306
|
+
auth_settings=_auth_settings,
|
|
307
|
+
collection_formats=_collection_formats,
|
|
308
|
+
_host=_host,
|
|
309
|
+
_request_auth=_request_auth
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
@validate_call
|
|
316
|
+
async def delete_volume(
|
|
317
|
+
self,
|
|
318
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
319
|
+
_request_timeout: Union[
|
|
320
|
+
None,
|
|
321
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
322
|
+
Tuple[
|
|
323
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
324
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
325
|
+
]
|
|
326
|
+
] = None,
|
|
327
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
328
|
+
_content_type: Optional[StrictStr] = None,
|
|
329
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
330
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
331
|
+
) -> object:
|
|
332
|
+
"""Delete a Volume
|
|
333
|
+
|
|
334
|
+
Deletes a volume from the specified parent catalog and schema.
|
|
335
|
+
|
|
336
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
337
|
+
:type name: str
|
|
338
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
339
|
+
number provided, it will be total request
|
|
340
|
+
timeout. It can also be a pair (tuple) of
|
|
341
|
+
(connection, read) timeouts.
|
|
342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
344
|
+
request; this effectively ignores the
|
|
345
|
+
authentication in the spec for a single request.
|
|
346
|
+
:type _request_auth: dict, optional
|
|
347
|
+
:param _content_type: force content-type for the request.
|
|
348
|
+
:type _content_type: str, Optional
|
|
349
|
+
:param _headers: set to override the headers for a single
|
|
350
|
+
request; this effectively ignores the headers
|
|
351
|
+
in the spec for a single request.
|
|
352
|
+
:type _headers: dict, optional
|
|
353
|
+
:param _host_index: set to override the host_index for a single
|
|
354
|
+
request; this effectively ignores the host_index
|
|
355
|
+
in the spec for a single request.
|
|
356
|
+
:type _host_index: int, optional
|
|
357
|
+
:return: Returns the result object.
|
|
358
|
+
""" # noqa: E501
|
|
359
|
+
|
|
360
|
+
_param = self._delete_volume_serialize(
|
|
361
|
+
name=name,
|
|
362
|
+
_request_auth=_request_auth,
|
|
363
|
+
_content_type=_content_type,
|
|
364
|
+
_headers=_headers,
|
|
365
|
+
_host_index=_host_index
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
369
|
+
'200': "object",
|
|
370
|
+
}
|
|
371
|
+
response_data = await self.api_client.call_api(
|
|
372
|
+
*_param,
|
|
373
|
+
_request_timeout=_request_timeout
|
|
374
|
+
)
|
|
375
|
+
await response_data.read()
|
|
376
|
+
return self.api_client.response_deserialize(
|
|
377
|
+
response_data=response_data,
|
|
378
|
+
response_types_map=_response_types_map,
|
|
379
|
+
).data
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
@validate_call
|
|
383
|
+
async def delete_volume_with_http_info(
|
|
384
|
+
self,
|
|
385
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
386
|
+
_request_timeout: Union[
|
|
387
|
+
None,
|
|
388
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
389
|
+
Tuple[
|
|
390
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
391
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
392
|
+
]
|
|
393
|
+
] = None,
|
|
394
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
395
|
+
_content_type: Optional[StrictStr] = None,
|
|
396
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
397
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
398
|
+
) -> ApiResponse[object]:
|
|
399
|
+
"""Delete a Volume
|
|
400
|
+
|
|
401
|
+
Deletes a volume from the specified parent catalog and schema.
|
|
402
|
+
|
|
403
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
404
|
+
:type name: str
|
|
405
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
406
|
+
number provided, it will be total request
|
|
407
|
+
timeout. It can also be a pair (tuple) of
|
|
408
|
+
(connection, read) timeouts.
|
|
409
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
410
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
411
|
+
request; this effectively ignores the
|
|
412
|
+
authentication in the spec for a single request.
|
|
413
|
+
:type _request_auth: dict, optional
|
|
414
|
+
:param _content_type: force content-type for the request.
|
|
415
|
+
:type _content_type: str, Optional
|
|
416
|
+
:param _headers: set to override the headers for a single
|
|
417
|
+
request; this effectively ignores the headers
|
|
418
|
+
in the spec for a single request.
|
|
419
|
+
:type _headers: dict, optional
|
|
420
|
+
:param _host_index: set to override the host_index for a single
|
|
421
|
+
request; this effectively ignores the host_index
|
|
422
|
+
in the spec for a single request.
|
|
423
|
+
:type _host_index: int, optional
|
|
424
|
+
:return: Returns the result object.
|
|
425
|
+
""" # noqa: E501
|
|
426
|
+
|
|
427
|
+
_param = self._delete_volume_serialize(
|
|
428
|
+
name=name,
|
|
429
|
+
_request_auth=_request_auth,
|
|
430
|
+
_content_type=_content_type,
|
|
431
|
+
_headers=_headers,
|
|
432
|
+
_host_index=_host_index
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
436
|
+
'200': "object",
|
|
437
|
+
}
|
|
438
|
+
response_data = await self.api_client.call_api(
|
|
439
|
+
*_param,
|
|
440
|
+
_request_timeout=_request_timeout
|
|
441
|
+
)
|
|
442
|
+
await response_data.read()
|
|
443
|
+
return self.api_client.response_deserialize(
|
|
444
|
+
response_data=response_data,
|
|
445
|
+
response_types_map=_response_types_map,
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
@validate_call
|
|
450
|
+
async def delete_volume_without_preload_content(
|
|
451
|
+
self,
|
|
452
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
453
|
+
_request_timeout: Union[
|
|
454
|
+
None,
|
|
455
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
456
|
+
Tuple[
|
|
457
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
458
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
459
|
+
]
|
|
460
|
+
] = None,
|
|
461
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
462
|
+
_content_type: Optional[StrictStr] = None,
|
|
463
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
464
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
465
|
+
) -> RESTResponseType:
|
|
466
|
+
"""Delete a Volume
|
|
467
|
+
|
|
468
|
+
Deletes a volume from the specified parent catalog and schema.
|
|
469
|
+
|
|
470
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
471
|
+
:type name: str
|
|
472
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
473
|
+
number provided, it will be total request
|
|
474
|
+
timeout. It can also be a pair (tuple) of
|
|
475
|
+
(connection, read) timeouts.
|
|
476
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
477
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
478
|
+
request; this effectively ignores the
|
|
479
|
+
authentication in the spec for a single request.
|
|
480
|
+
:type _request_auth: dict, optional
|
|
481
|
+
:param _content_type: force content-type for the request.
|
|
482
|
+
:type _content_type: str, Optional
|
|
483
|
+
:param _headers: set to override the headers for a single
|
|
484
|
+
request; this effectively ignores the headers
|
|
485
|
+
in the spec for a single request.
|
|
486
|
+
:type _headers: dict, optional
|
|
487
|
+
:param _host_index: set to override the host_index for a single
|
|
488
|
+
request; this effectively ignores the host_index
|
|
489
|
+
in the spec for a single request.
|
|
490
|
+
:type _host_index: int, optional
|
|
491
|
+
:return: Returns the result object.
|
|
492
|
+
""" # noqa: E501
|
|
493
|
+
|
|
494
|
+
_param = self._delete_volume_serialize(
|
|
495
|
+
name=name,
|
|
496
|
+
_request_auth=_request_auth,
|
|
497
|
+
_content_type=_content_type,
|
|
498
|
+
_headers=_headers,
|
|
499
|
+
_host_index=_host_index
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
503
|
+
'200': "object",
|
|
504
|
+
}
|
|
505
|
+
response_data = await self.api_client.call_api(
|
|
506
|
+
*_param,
|
|
507
|
+
_request_timeout=_request_timeout
|
|
508
|
+
)
|
|
509
|
+
return response_data.response
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
def _delete_volume_serialize(
|
|
513
|
+
self,
|
|
514
|
+
name,
|
|
515
|
+
_request_auth,
|
|
516
|
+
_content_type,
|
|
517
|
+
_headers,
|
|
518
|
+
_host_index,
|
|
519
|
+
) -> RequestSerialized:
|
|
520
|
+
|
|
521
|
+
_host = None
|
|
522
|
+
|
|
523
|
+
_collection_formats: Dict[str, str] = {
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
_path_params: Dict[str, str] = {}
|
|
527
|
+
_query_params: List[Tuple[str, str]] = []
|
|
528
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
529
|
+
_form_params: List[Tuple[str, str]] = []
|
|
530
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
531
|
+
_body_params: Optional[bytes] = None
|
|
532
|
+
|
|
533
|
+
# process the path parameters
|
|
534
|
+
if name is not None:
|
|
535
|
+
_path_params['name'] = name
|
|
536
|
+
# process the query parameters
|
|
537
|
+
# process the header parameters
|
|
538
|
+
# process the form parameters
|
|
539
|
+
# process the body parameter
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
# set the HTTP header `Accept`
|
|
543
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
544
|
+
[
|
|
545
|
+
'application/json'
|
|
546
|
+
]
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
# authentication setting
|
|
551
|
+
_auth_settings: List[str] = [
|
|
552
|
+
]
|
|
553
|
+
|
|
554
|
+
return self.api_client.param_serialize(
|
|
555
|
+
method='DELETE',
|
|
556
|
+
resource_path='/volumes/{name}',
|
|
557
|
+
path_params=_path_params,
|
|
558
|
+
query_params=_query_params,
|
|
559
|
+
header_params=_header_params,
|
|
560
|
+
body=_body_params,
|
|
561
|
+
post_params=_form_params,
|
|
562
|
+
files=_files,
|
|
563
|
+
auth_settings=_auth_settings,
|
|
564
|
+
collection_formats=_collection_formats,
|
|
565
|
+
_host=_host,
|
|
566
|
+
_request_auth=_request_auth
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
@validate_call
|
|
573
|
+
async def get_volume(
|
|
574
|
+
self,
|
|
575
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
576
|
+
_request_timeout: Union[
|
|
577
|
+
None,
|
|
578
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
579
|
+
Tuple[
|
|
580
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
581
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
582
|
+
]
|
|
583
|
+
] = None,
|
|
584
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
585
|
+
_content_type: Optional[StrictStr] = None,
|
|
586
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
587
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
588
|
+
) -> VolumeInfo:
|
|
589
|
+
"""Get a Volume
|
|
590
|
+
|
|
591
|
+
Gets a volume for a specific catalog and schema.
|
|
592
|
+
|
|
593
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
594
|
+
:type name: str
|
|
595
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
596
|
+
number provided, it will be total request
|
|
597
|
+
timeout. It can also be a pair (tuple) of
|
|
598
|
+
(connection, read) timeouts.
|
|
599
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
600
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
601
|
+
request; this effectively ignores the
|
|
602
|
+
authentication in the spec for a single request.
|
|
603
|
+
:type _request_auth: dict, optional
|
|
604
|
+
:param _content_type: force content-type for the request.
|
|
605
|
+
:type _content_type: str, Optional
|
|
606
|
+
:param _headers: set to override the headers for a single
|
|
607
|
+
request; this effectively ignores the headers
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _headers: dict, optional
|
|
610
|
+
:param _host_index: set to override the host_index for a single
|
|
611
|
+
request; this effectively ignores the host_index
|
|
612
|
+
in the spec for a single request.
|
|
613
|
+
:type _host_index: int, optional
|
|
614
|
+
:return: Returns the result object.
|
|
615
|
+
""" # noqa: E501
|
|
616
|
+
|
|
617
|
+
_param = self._get_volume_serialize(
|
|
618
|
+
name=name,
|
|
619
|
+
_request_auth=_request_auth,
|
|
620
|
+
_content_type=_content_type,
|
|
621
|
+
_headers=_headers,
|
|
622
|
+
_host_index=_host_index
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
626
|
+
'200': "VolumeInfo",
|
|
627
|
+
}
|
|
628
|
+
response_data = await self.api_client.call_api(
|
|
629
|
+
*_param,
|
|
630
|
+
_request_timeout=_request_timeout
|
|
631
|
+
)
|
|
632
|
+
await response_data.read()
|
|
633
|
+
return self.api_client.response_deserialize(
|
|
634
|
+
response_data=response_data,
|
|
635
|
+
response_types_map=_response_types_map,
|
|
636
|
+
).data
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
@validate_call
|
|
640
|
+
async def get_volume_with_http_info(
|
|
641
|
+
self,
|
|
642
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
643
|
+
_request_timeout: Union[
|
|
644
|
+
None,
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
646
|
+
Tuple[
|
|
647
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
648
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
649
|
+
]
|
|
650
|
+
] = None,
|
|
651
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
652
|
+
_content_type: Optional[StrictStr] = None,
|
|
653
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
654
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
655
|
+
) -> ApiResponse[VolumeInfo]:
|
|
656
|
+
"""Get a Volume
|
|
657
|
+
|
|
658
|
+
Gets a volume for a specific catalog and schema.
|
|
659
|
+
|
|
660
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
661
|
+
:type name: str
|
|
662
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
663
|
+
number provided, it will be total request
|
|
664
|
+
timeout. It can also be a pair (tuple) of
|
|
665
|
+
(connection, read) timeouts.
|
|
666
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
667
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
668
|
+
request; this effectively ignores the
|
|
669
|
+
authentication in the spec for a single request.
|
|
670
|
+
:type _request_auth: dict, optional
|
|
671
|
+
:param _content_type: force content-type for the request.
|
|
672
|
+
:type _content_type: str, Optional
|
|
673
|
+
:param _headers: set to override the headers for a single
|
|
674
|
+
request; this effectively ignores the headers
|
|
675
|
+
in the spec for a single request.
|
|
676
|
+
:type _headers: dict, optional
|
|
677
|
+
:param _host_index: set to override the host_index for a single
|
|
678
|
+
request; this effectively ignores the host_index
|
|
679
|
+
in the spec for a single request.
|
|
680
|
+
:type _host_index: int, optional
|
|
681
|
+
:return: Returns the result object.
|
|
682
|
+
""" # noqa: E501
|
|
683
|
+
|
|
684
|
+
_param = self._get_volume_serialize(
|
|
685
|
+
name=name,
|
|
686
|
+
_request_auth=_request_auth,
|
|
687
|
+
_content_type=_content_type,
|
|
688
|
+
_headers=_headers,
|
|
689
|
+
_host_index=_host_index
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
693
|
+
'200': "VolumeInfo",
|
|
694
|
+
}
|
|
695
|
+
response_data = await self.api_client.call_api(
|
|
696
|
+
*_param,
|
|
697
|
+
_request_timeout=_request_timeout
|
|
698
|
+
)
|
|
699
|
+
await response_data.read()
|
|
700
|
+
return self.api_client.response_deserialize(
|
|
701
|
+
response_data=response_data,
|
|
702
|
+
response_types_map=_response_types_map,
|
|
703
|
+
)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
@validate_call
|
|
707
|
+
async def get_volume_without_preload_content(
|
|
708
|
+
self,
|
|
709
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
710
|
+
_request_timeout: Union[
|
|
711
|
+
None,
|
|
712
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
713
|
+
Tuple[
|
|
714
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
715
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
716
|
+
]
|
|
717
|
+
] = None,
|
|
718
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
719
|
+
_content_type: Optional[StrictStr] = None,
|
|
720
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
721
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
722
|
+
) -> RESTResponseType:
|
|
723
|
+
"""Get a Volume
|
|
724
|
+
|
|
725
|
+
Gets a volume for a specific catalog and schema.
|
|
726
|
+
|
|
727
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
728
|
+
:type name: str
|
|
729
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
730
|
+
number provided, it will be total request
|
|
731
|
+
timeout. It can also be a pair (tuple) of
|
|
732
|
+
(connection, read) timeouts.
|
|
733
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
734
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
735
|
+
request; this effectively ignores the
|
|
736
|
+
authentication in the spec for a single request.
|
|
737
|
+
:type _request_auth: dict, optional
|
|
738
|
+
:param _content_type: force content-type for the request.
|
|
739
|
+
:type _content_type: str, Optional
|
|
740
|
+
:param _headers: set to override the headers for a single
|
|
741
|
+
request; this effectively ignores the headers
|
|
742
|
+
in the spec for a single request.
|
|
743
|
+
:type _headers: dict, optional
|
|
744
|
+
:param _host_index: set to override the host_index for a single
|
|
745
|
+
request; this effectively ignores the host_index
|
|
746
|
+
in the spec for a single request.
|
|
747
|
+
:type _host_index: int, optional
|
|
748
|
+
:return: Returns the result object.
|
|
749
|
+
""" # noqa: E501
|
|
750
|
+
|
|
751
|
+
_param = self._get_volume_serialize(
|
|
752
|
+
name=name,
|
|
753
|
+
_request_auth=_request_auth,
|
|
754
|
+
_content_type=_content_type,
|
|
755
|
+
_headers=_headers,
|
|
756
|
+
_host_index=_host_index
|
|
757
|
+
)
|
|
758
|
+
|
|
759
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
760
|
+
'200': "VolumeInfo",
|
|
761
|
+
}
|
|
762
|
+
response_data = await self.api_client.call_api(
|
|
763
|
+
*_param,
|
|
764
|
+
_request_timeout=_request_timeout
|
|
765
|
+
)
|
|
766
|
+
return response_data.response
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
def _get_volume_serialize(
|
|
770
|
+
self,
|
|
771
|
+
name,
|
|
772
|
+
_request_auth,
|
|
773
|
+
_content_type,
|
|
774
|
+
_headers,
|
|
775
|
+
_host_index,
|
|
776
|
+
) -> RequestSerialized:
|
|
777
|
+
|
|
778
|
+
_host = None
|
|
779
|
+
|
|
780
|
+
_collection_formats: Dict[str, str] = {
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
_path_params: Dict[str, str] = {}
|
|
784
|
+
_query_params: List[Tuple[str, str]] = []
|
|
785
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
786
|
+
_form_params: List[Tuple[str, str]] = []
|
|
787
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
788
|
+
_body_params: Optional[bytes] = None
|
|
789
|
+
|
|
790
|
+
# process the path parameters
|
|
791
|
+
if name is not None:
|
|
792
|
+
_path_params['name'] = name
|
|
793
|
+
# process the query parameters
|
|
794
|
+
# process the header parameters
|
|
795
|
+
# process the form parameters
|
|
796
|
+
# process the body parameter
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
# set the HTTP header `Accept`
|
|
800
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
801
|
+
[
|
|
802
|
+
'application/json'
|
|
803
|
+
]
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
# authentication setting
|
|
808
|
+
_auth_settings: List[str] = [
|
|
809
|
+
]
|
|
810
|
+
|
|
811
|
+
return self.api_client.param_serialize(
|
|
812
|
+
method='GET',
|
|
813
|
+
resource_path='/volumes/{name}',
|
|
814
|
+
path_params=_path_params,
|
|
815
|
+
query_params=_query_params,
|
|
816
|
+
header_params=_header_params,
|
|
817
|
+
body=_body_params,
|
|
818
|
+
post_params=_form_params,
|
|
819
|
+
files=_files,
|
|
820
|
+
auth_settings=_auth_settings,
|
|
821
|
+
collection_formats=_collection_formats,
|
|
822
|
+
_host=_host,
|
|
823
|
+
_request_auth=_request_auth
|
|
824
|
+
)
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
@validate_call
|
|
830
|
+
async def list_volumes(
|
|
831
|
+
self,
|
|
832
|
+
catalog_name: Annotated[StrictStr, Field(description="The identifier of the catalog")],
|
|
833
|
+
schema_name: Annotated[StrictStr, Field(description="The identifier of the schema")],
|
|
834
|
+
max_results: Annotated[Optional[Annotated[int, Field(le=10000, strict=True)]], Field(description="Maximum number of volumes to return (page length). If not set, the page length is set to a server configured value. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page may be smaller than this value, including 0, even if there are more pages. ")] = None,
|
|
835
|
+
page_token: Annotated[Optional[StrictStr], Field(description="Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination).")] = None,
|
|
836
|
+
_request_timeout: Union[
|
|
837
|
+
None,
|
|
838
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
839
|
+
Tuple[
|
|
840
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
841
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
842
|
+
]
|
|
843
|
+
] = None,
|
|
844
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
845
|
+
_content_type: Optional[StrictStr] = None,
|
|
846
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
847
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
848
|
+
) -> ListVolumesResponseContent:
|
|
849
|
+
"""List Volumes
|
|
850
|
+
|
|
851
|
+
Gets an array of available volumes under the parent catalog and schema. There is no guarantee of a specific ordering of the elements in the array.
|
|
852
|
+
|
|
853
|
+
:param catalog_name: The identifier of the catalog (required)
|
|
854
|
+
:type catalog_name: str
|
|
855
|
+
:param schema_name: The identifier of the schema (required)
|
|
856
|
+
:type schema_name: str
|
|
857
|
+
:param max_results: Maximum number of volumes to return (page length). If not set, the page length is set to a server configured value. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page may be smaller than this value, including 0, even if there are more pages.
|
|
858
|
+
:type max_results: int
|
|
859
|
+
:param page_token: Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination).
|
|
860
|
+
:type page_token: str
|
|
861
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
862
|
+
number provided, it will be total request
|
|
863
|
+
timeout. It can also be a pair (tuple) of
|
|
864
|
+
(connection, read) timeouts.
|
|
865
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
866
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
867
|
+
request; this effectively ignores the
|
|
868
|
+
authentication in the spec for a single request.
|
|
869
|
+
:type _request_auth: dict, optional
|
|
870
|
+
:param _content_type: force content-type for the request.
|
|
871
|
+
:type _content_type: str, Optional
|
|
872
|
+
:param _headers: set to override the headers for a single
|
|
873
|
+
request; this effectively ignores the headers
|
|
874
|
+
in the spec for a single request.
|
|
875
|
+
:type _headers: dict, optional
|
|
876
|
+
:param _host_index: set to override the host_index for a single
|
|
877
|
+
request; this effectively ignores the host_index
|
|
878
|
+
in the spec for a single request.
|
|
879
|
+
:type _host_index: int, optional
|
|
880
|
+
:return: Returns the result object.
|
|
881
|
+
""" # noqa: E501
|
|
882
|
+
|
|
883
|
+
_param = self._list_volumes_serialize(
|
|
884
|
+
catalog_name=catalog_name,
|
|
885
|
+
schema_name=schema_name,
|
|
886
|
+
max_results=max_results,
|
|
887
|
+
page_token=page_token,
|
|
888
|
+
_request_auth=_request_auth,
|
|
889
|
+
_content_type=_content_type,
|
|
890
|
+
_headers=_headers,
|
|
891
|
+
_host_index=_host_index
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
895
|
+
'200': "ListVolumesResponseContent",
|
|
896
|
+
}
|
|
897
|
+
response_data = await self.api_client.call_api(
|
|
898
|
+
*_param,
|
|
899
|
+
_request_timeout=_request_timeout
|
|
900
|
+
)
|
|
901
|
+
await response_data.read()
|
|
902
|
+
return self.api_client.response_deserialize(
|
|
903
|
+
response_data=response_data,
|
|
904
|
+
response_types_map=_response_types_map,
|
|
905
|
+
).data
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
@validate_call
|
|
909
|
+
async def list_volumes_with_http_info(
|
|
910
|
+
self,
|
|
911
|
+
catalog_name: Annotated[StrictStr, Field(description="The identifier of the catalog")],
|
|
912
|
+
schema_name: Annotated[StrictStr, Field(description="The identifier of the schema")],
|
|
913
|
+
max_results: Annotated[Optional[Annotated[int, Field(le=10000, strict=True)]], Field(description="Maximum number of volumes to return (page length). If not set, the page length is set to a server configured value. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page may be smaller than this value, including 0, even if there are more pages. ")] = None,
|
|
914
|
+
page_token: Annotated[Optional[StrictStr], Field(description="Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination).")] = 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[ListVolumesResponseContent]:
|
|
928
|
+
"""List Volumes
|
|
929
|
+
|
|
930
|
+
Gets an array of available volumes under the parent catalog and schema. There is no guarantee of a specific ordering of the elements in the array.
|
|
931
|
+
|
|
932
|
+
:param catalog_name: The identifier of the catalog (required)
|
|
933
|
+
:type catalog_name: str
|
|
934
|
+
:param schema_name: The identifier of the schema (required)
|
|
935
|
+
:type schema_name: str
|
|
936
|
+
:param max_results: Maximum number of volumes to return (page length). If not set, the page length is set to a server configured value. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page may be smaller than this value, including 0, even if there are more pages.
|
|
937
|
+
:type max_results: int
|
|
938
|
+
:param page_token: Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination).
|
|
939
|
+
:type page_token: str
|
|
940
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
941
|
+
number provided, it will be total request
|
|
942
|
+
timeout. It can also be a pair (tuple) of
|
|
943
|
+
(connection, read) timeouts.
|
|
944
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
945
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
946
|
+
request; this effectively ignores the
|
|
947
|
+
authentication in the spec for a single request.
|
|
948
|
+
:type _request_auth: dict, optional
|
|
949
|
+
:param _content_type: force content-type for the request.
|
|
950
|
+
:type _content_type: str, Optional
|
|
951
|
+
:param _headers: set to override the headers for a single
|
|
952
|
+
request; this effectively ignores the headers
|
|
953
|
+
in the spec for a single request.
|
|
954
|
+
:type _headers: dict, optional
|
|
955
|
+
:param _host_index: set to override the host_index for a single
|
|
956
|
+
request; this effectively ignores the host_index
|
|
957
|
+
in the spec for a single request.
|
|
958
|
+
:type _host_index: int, optional
|
|
959
|
+
:return: Returns the result object.
|
|
960
|
+
""" # noqa: E501
|
|
961
|
+
|
|
962
|
+
_param = self._list_volumes_serialize(
|
|
963
|
+
catalog_name=catalog_name,
|
|
964
|
+
schema_name=schema_name,
|
|
965
|
+
max_results=max_results,
|
|
966
|
+
page_token=page_token,
|
|
967
|
+
_request_auth=_request_auth,
|
|
968
|
+
_content_type=_content_type,
|
|
969
|
+
_headers=_headers,
|
|
970
|
+
_host_index=_host_index
|
|
971
|
+
)
|
|
972
|
+
|
|
973
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
974
|
+
'200': "ListVolumesResponseContent",
|
|
975
|
+
}
|
|
976
|
+
response_data = await self.api_client.call_api(
|
|
977
|
+
*_param,
|
|
978
|
+
_request_timeout=_request_timeout
|
|
979
|
+
)
|
|
980
|
+
await response_data.read()
|
|
981
|
+
return self.api_client.response_deserialize(
|
|
982
|
+
response_data=response_data,
|
|
983
|
+
response_types_map=_response_types_map,
|
|
984
|
+
)
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
@validate_call
|
|
988
|
+
async def list_volumes_without_preload_content(
|
|
989
|
+
self,
|
|
990
|
+
catalog_name: Annotated[StrictStr, Field(description="The identifier of the catalog")],
|
|
991
|
+
schema_name: Annotated[StrictStr, Field(description="The identifier of the schema")],
|
|
992
|
+
max_results: Annotated[Optional[Annotated[int, Field(le=10000, strict=True)]], Field(description="Maximum number of volumes to return (page length). If not set, the page length is set to a server configured value. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page may be smaller than this value, including 0, even if there are more pages. ")] = None,
|
|
993
|
+
page_token: Annotated[Optional[StrictStr], Field(description="Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination).")] = None,
|
|
994
|
+
_request_timeout: Union[
|
|
995
|
+
None,
|
|
996
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
997
|
+
Tuple[
|
|
998
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
999
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1000
|
+
]
|
|
1001
|
+
] = None,
|
|
1002
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1003
|
+
_content_type: Optional[StrictStr] = None,
|
|
1004
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1005
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1006
|
+
) -> RESTResponseType:
|
|
1007
|
+
"""List Volumes
|
|
1008
|
+
|
|
1009
|
+
Gets an array of available volumes under the parent catalog and schema. There is no guarantee of a specific ordering of the elements in the array.
|
|
1010
|
+
|
|
1011
|
+
:param catalog_name: The identifier of the catalog (required)
|
|
1012
|
+
:type catalog_name: str
|
|
1013
|
+
:param schema_name: The identifier of the schema (required)
|
|
1014
|
+
:type schema_name: str
|
|
1015
|
+
:param max_results: Maximum number of volumes to return (page length). If not set, the page length is set to a server configured value. - when set to a value greater than 0, the page length is the minimum of this value and a server configured value; - when set to 0, the page length is set to a server configured value; - when set to a value less than 0, an invalid parameter error is returned; Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page may be smaller than this value, including 0, even if there are more pages.
|
|
1016
|
+
:type max_results: int
|
|
1017
|
+
:param page_token: Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination).
|
|
1018
|
+
:type page_token: str
|
|
1019
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1020
|
+
number provided, it will be total request
|
|
1021
|
+
timeout. It can also be a pair (tuple) of
|
|
1022
|
+
(connection, read) timeouts.
|
|
1023
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1024
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1025
|
+
request; this effectively ignores the
|
|
1026
|
+
authentication in the spec for a single request.
|
|
1027
|
+
:type _request_auth: dict, optional
|
|
1028
|
+
:param _content_type: force content-type for the request.
|
|
1029
|
+
:type _content_type: str, Optional
|
|
1030
|
+
:param _headers: set to override the headers for a single
|
|
1031
|
+
request; this effectively ignores the headers
|
|
1032
|
+
in the spec for a single request.
|
|
1033
|
+
:type _headers: dict, optional
|
|
1034
|
+
:param _host_index: set to override the host_index for a single
|
|
1035
|
+
request; this effectively ignores the host_index
|
|
1036
|
+
in the spec for a single request.
|
|
1037
|
+
:type _host_index: int, optional
|
|
1038
|
+
:return: Returns the result object.
|
|
1039
|
+
""" # noqa: E501
|
|
1040
|
+
|
|
1041
|
+
_param = self._list_volumes_serialize(
|
|
1042
|
+
catalog_name=catalog_name,
|
|
1043
|
+
schema_name=schema_name,
|
|
1044
|
+
max_results=max_results,
|
|
1045
|
+
page_token=page_token,
|
|
1046
|
+
_request_auth=_request_auth,
|
|
1047
|
+
_content_type=_content_type,
|
|
1048
|
+
_headers=_headers,
|
|
1049
|
+
_host_index=_host_index
|
|
1050
|
+
)
|
|
1051
|
+
|
|
1052
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1053
|
+
'200': "ListVolumesResponseContent",
|
|
1054
|
+
}
|
|
1055
|
+
response_data = await self.api_client.call_api(
|
|
1056
|
+
*_param,
|
|
1057
|
+
_request_timeout=_request_timeout
|
|
1058
|
+
)
|
|
1059
|
+
return response_data.response
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
def _list_volumes_serialize(
|
|
1063
|
+
self,
|
|
1064
|
+
catalog_name,
|
|
1065
|
+
schema_name,
|
|
1066
|
+
max_results,
|
|
1067
|
+
page_token,
|
|
1068
|
+
_request_auth,
|
|
1069
|
+
_content_type,
|
|
1070
|
+
_headers,
|
|
1071
|
+
_host_index,
|
|
1072
|
+
) -> RequestSerialized:
|
|
1073
|
+
|
|
1074
|
+
_host = None
|
|
1075
|
+
|
|
1076
|
+
_collection_formats: Dict[str, str] = {
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
_path_params: Dict[str, str] = {}
|
|
1080
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1081
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1082
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1083
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1084
|
+
_body_params: Optional[bytes] = None
|
|
1085
|
+
|
|
1086
|
+
# process the path parameters
|
|
1087
|
+
# process the query parameters
|
|
1088
|
+
if catalog_name is not None:
|
|
1089
|
+
|
|
1090
|
+
_query_params.append(('catalog_name', catalog_name))
|
|
1091
|
+
|
|
1092
|
+
if schema_name is not None:
|
|
1093
|
+
|
|
1094
|
+
_query_params.append(('schema_name', schema_name))
|
|
1095
|
+
|
|
1096
|
+
if max_results is not None:
|
|
1097
|
+
|
|
1098
|
+
_query_params.append(('max_results', max_results))
|
|
1099
|
+
|
|
1100
|
+
if page_token is not None:
|
|
1101
|
+
|
|
1102
|
+
_query_params.append(('page_token', page_token))
|
|
1103
|
+
|
|
1104
|
+
# process the header parameters
|
|
1105
|
+
# process the form parameters
|
|
1106
|
+
# process the body parameter
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
# set the HTTP header `Accept`
|
|
1110
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1111
|
+
[
|
|
1112
|
+
'application/json'
|
|
1113
|
+
]
|
|
1114
|
+
)
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
# authentication setting
|
|
1118
|
+
_auth_settings: List[str] = [
|
|
1119
|
+
]
|
|
1120
|
+
|
|
1121
|
+
return self.api_client.param_serialize(
|
|
1122
|
+
method='GET',
|
|
1123
|
+
resource_path='/volumes',
|
|
1124
|
+
path_params=_path_params,
|
|
1125
|
+
query_params=_query_params,
|
|
1126
|
+
header_params=_header_params,
|
|
1127
|
+
body=_body_params,
|
|
1128
|
+
post_params=_form_params,
|
|
1129
|
+
files=_files,
|
|
1130
|
+
auth_settings=_auth_settings,
|
|
1131
|
+
collection_formats=_collection_formats,
|
|
1132
|
+
_host=_host,
|
|
1133
|
+
_request_auth=_request_auth
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
@validate_call
|
|
1140
|
+
async def update_volume(
|
|
1141
|
+
self,
|
|
1142
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
1143
|
+
update_volume_request_content: Optional[UpdateVolumeRequestContent] = None,
|
|
1144
|
+
_request_timeout: Union[
|
|
1145
|
+
None,
|
|
1146
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1147
|
+
Tuple[
|
|
1148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1149
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1150
|
+
]
|
|
1151
|
+
] = None,
|
|
1152
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1153
|
+
_content_type: Optional[StrictStr] = None,
|
|
1154
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1155
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1156
|
+
) -> VolumeInfo:
|
|
1157
|
+
"""Update a Volume
|
|
1158
|
+
|
|
1159
|
+
Updates the specified volume under the specified parent catalog and schema. Currently only the name or the comment of the volume could be updated.
|
|
1160
|
+
|
|
1161
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
1162
|
+
:type name: str
|
|
1163
|
+
:param update_volume_request_content:
|
|
1164
|
+
:type update_volume_request_content: UpdateVolumeRequestContent
|
|
1165
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1166
|
+
number provided, it will be total request
|
|
1167
|
+
timeout. It can also be a pair (tuple) of
|
|
1168
|
+
(connection, read) timeouts.
|
|
1169
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1170
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1171
|
+
request; this effectively ignores the
|
|
1172
|
+
authentication in the spec for a single request.
|
|
1173
|
+
:type _request_auth: dict, optional
|
|
1174
|
+
:param _content_type: force content-type for the request.
|
|
1175
|
+
:type _content_type: str, Optional
|
|
1176
|
+
:param _headers: set to override the headers for a single
|
|
1177
|
+
request; this effectively ignores the headers
|
|
1178
|
+
in the spec for a single request.
|
|
1179
|
+
:type _headers: dict, optional
|
|
1180
|
+
:param _host_index: set to override the host_index for a single
|
|
1181
|
+
request; this effectively ignores the host_index
|
|
1182
|
+
in the spec for a single request.
|
|
1183
|
+
:type _host_index: int, optional
|
|
1184
|
+
:return: Returns the result object.
|
|
1185
|
+
""" # noqa: E501
|
|
1186
|
+
|
|
1187
|
+
_param = self._update_volume_serialize(
|
|
1188
|
+
name=name,
|
|
1189
|
+
update_volume_request_content=update_volume_request_content,
|
|
1190
|
+
_request_auth=_request_auth,
|
|
1191
|
+
_content_type=_content_type,
|
|
1192
|
+
_headers=_headers,
|
|
1193
|
+
_host_index=_host_index
|
|
1194
|
+
)
|
|
1195
|
+
|
|
1196
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1197
|
+
'200': "VolumeInfo",
|
|
1198
|
+
}
|
|
1199
|
+
response_data = await self.api_client.call_api(
|
|
1200
|
+
*_param,
|
|
1201
|
+
_request_timeout=_request_timeout
|
|
1202
|
+
)
|
|
1203
|
+
await response_data.read()
|
|
1204
|
+
return self.api_client.response_deserialize(
|
|
1205
|
+
response_data=response_data,
|
|
1206
|
+
response_types_map=_response_types_map,
|
|
1207
|
+
).data
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
@validate_call
|
|
1211
|
+
async def update_volume_with_http_info(
|
|
1212
|
+
self,
|
|
1213
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
1214
|
+
update_volume_request_content: Optional[UpdateVolumeRequestContent] = None,
|
|
1215
|
+
_request_timeout: Union[
|
|
1216
|
+
None,
|
|
1217
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1218
|
+
Tuple[
|
|
1219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1220
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1221
|
+
]
|
|
1222
|
+
] = None,
|
|
1223
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1224
|
+
_content_type: Optional[StrictStr] = None,
|
|
1225
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1226
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1227
|
+
) -> ApiResponse[VolumeInfo]:
|
|
1228
|
+
"""Update a Volume
|
|
1229
|
+
|
|
1230
|
+
Updates the specified volume under the specified parent catalog and schema. Currently only the name or the comment of the volume could be updated.
|
|
1231
|
+
|
|
1232
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
1233
|
+
:type name: str
|
|
1234
|
+
:param update_volume_request_content:
|
|
1235
|
+
:type update_volume_request_content: UpdateVolumeRequestContent
|
|
1236
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1237
|
+
number provided, it will be total request
|
|
1238
|
+
timeout. It can also be a pair (tuple) of
|
|
1239
|
+
(connection, read) timeouts.
|
|
1240
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1241
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1242
|
+
request; this effectively ignores the
|
|
1243
|
+
authentication in the spec for a single request.
|
|
1244
|
+
:type _request_auth: dict, optional
|
|
1245
|
+
:param _content_type: force content-type for the request.
|
|
1246
|
+
:type _content_type: str, Optional
|
|
1247
|
+
:param _headers: set to override the headers for a single
|
|
1248
|
+
request; this effectively ignores the headers
|
|
1249
|
+
in the spec for a single request.
|
|
1250
|
+
:type _headers: dict, optional
|
|
1251
|
+
:param _host_index: set to override the host_index for a single
|
|
1252
|
+
request; this effectively ignores the host_index
|
|
1253
|
+
in the spec for a single request.
|
|
1254
|
+
:type _host_index: int, optional
|
|
1255
|
+
:return: Returns the result object.
|
|
1256
|
+
""" # noqa: E501
|
|
1257
|
+
|
|
1258
|
+
_param = self._update_volume_serialize(
|
|
1259
|
+
name=name,
|
|
1260
|
+
update_volume_request_content=update_volume_request_content,
|
|
1261
|
+
_request_auth=_request_auth,
|
|
1262
|
+
_content_type=_content_type,
|
|
1263
|
+
_headers=_headers,
|
|
1264
|
+
_host_index=_host_index
|
|
1265
|
+
)
|
|
1266
|
+
|
|
1267
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1268
|
+
'200': "VolumeInfo",
|
|
1269
|
+
}
|
|
1270
|
+
response_data = await self.api_client.call_api(
|
|
1271
|
+
*_param,
|
|
1272
|
+
_request_timeout=_request_timeout
|
|
1273
|
+
)
|
|
1274
|
+
await response_data.read()
|
|
1275
|
+
return self.api_client.response_deserialize(
|
|
1276
|
+
response_data=response_data,
|
|
1277
|
+
response_types_map=_response_types_map,
|
|
1278
|
+
)
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
@validate_call
|
|
1282
|
+
async def update_volume_without_preload_content(
|
|
1283
|
+
self,
|
|
1284
|
+
name: Annotated[StrictStr, Field(description="The three-level (fully qualified) name of the volume")],
|
|
1285
|
+
update_volume_request_content: Optional[UpdateVolumeRequestContent] = None,
|
|
1286
|
+
_request_timeout: Union[
|
|
1287
|
+
None,
|
|
1288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1289
|
+
Tuple[
|
|
1290
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1291
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1292
|
+
]
|
|
1293
|
+
] = None,
|
|
1294
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1295
|
+
_content_type: Optional[StrictStr] = None,
|
|
1296
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1297
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1298
|
+
) -> RESTResponseType:
|
|
1299
|
+
"""Update a Volume
|
|
1300
|
+
|
|
1301
|
+
Updates the specified volume under the specified parent catalog and schema. Currently only the name or the comment of the volume could be updated.
|
|
1302
|
+
|
|
1303
|
+
:param name: The three-level (fully qualified) name of the volume (required)
|
|
1304
|
+
:type name: str
|
|
1305
|
+
:param update_volume_request_content:
|
|
1306
|
+
:type update_volume_request_content: UpdateVolumeRequestContent
|
|
1307
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1308
|
+
number provided, it will be total request
|
|
1309
|
+
timeout. It can also be a pair (tuple) of
|
|
1310
|
+
(connection, read) timeouts.
|
|
1311
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1312
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1313
|
+
request; this effectively ignores the
|
|
1314
|
+
authentication in the spec for a single request.
|
|
1315
|
+
:type _request_auth: dict, optional
|
|
1316
|
+
:param _content_type: force content-type for the request.
|
|
1317
|
+
:type _content_type: str, Optional
|
|
1318
|
+
:param _headers: set to override the headers for a single
|
|
1319
|
+
request; this effectively ignores the headers
|
|
1320
|
+
in the spec for a single request.
|
|
1321
|
+
:type _headers: dict, optional
|
|
1322
|
+
:param _host_index: set to override the host_index for a single
|
|
1323
|
+
request; this effectively ignores the host_index
|
|
1324
|
+
in the spec for a single request.
|
|
1325
|
+
:type _host_index: int, optional
|
|
1326
|
+
:return: Returns the result object.
|
|
1327
|
+
""" # noqa: E501
|
|
1328
|
+
|
|
1329
|
+
_param = self._update_volume_serialize(
|
|
1330
|
+
name=name,
|
|
1331
|
+
update_volume_request_content=update_volume_request_content,
|
|
1332
|
+
_request_auth=_request_auth,
|
|
1333
|
+
_content_type=_content_type,
|
|
1334
|
+
_headers=_headers,
|
|
1335
|
+
_host_index=_host_index
|
|
1336
|
+
)
|
|
1337
|
+
|
|
1338
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1339
|
+
'200': "VolumeInfo",
|
|
1340
|
+
}
|
|
1341
|
+
response_data = await self.api_client.call_api(
|
|
1342
|
+
*_param,
|
|
1343
|
+
_request_timeout=_request_timeout
|
|
1344
|
+
)
|
|
1345
|
+
return response_data.response
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
def _update_volume_serialize(
|
|
1349
|
+
self,
|
|
1350
|
+
name,
|
|
1351
|
+
update_volume_request_content,
|
|
1352
|
+
_request_auth,
|
|
1353
|
+
_content_type,
|
|
1354
|
+
_headers,
|
|
1355
|
+
_host_index,
|
|
1356
|
+
) -> RequestSerialized:
|
|
1357
|
+
|
|
1358
|
+
_host = None
|
|
1359
|
+
|
|
1360
|
+
_collection_formats: Dict[str, str] = {
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
_path_params: Dict[str, str] = {}
|
|
1364
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1365
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1366
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1367
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1368
|
+
_body_params: Optional[bytes] = None
|
|
1369
|
+
|
|
1370
|
+
# process the path parameters
|
|
1371
|
+
if name is not None:
|
|
1372
|
+
_path_params['name'] = name
|
|
1373
|
+
# process the query parameters
|
|
1374
|
+
# process the header parameters
|
|
1375
|
+
# process the form parameters
|
|
1376
|
+
# process the body parameter
|
|
1377
|
+
if update_volume_request_content is not None:
|
|
1378
|
+
_body_params = update_volume_request_content
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
# set the HTTP header `Accept`
|
|
1382
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1383
|
+
[
|
|
1384
|
+
'application/json'
|
|
1385
|
+
]
|
|
1386
|
+
)
|
|
1387
|
+
|
|
1388
|
+
# set the HTTP header `Content-Type`
|
|
1389
|
+
if _content_type:
|
|
1390
|
+
_header_params['Content-Type'] = _content_type
|
|
1391
|
+
else:
|
|
1392
|
+
_default_content_type = (
|
|
1393
|
+
self.api_client.select_header_content_type(
|
|
1394
|
+
[
|
|
1395
|
+
'application/json'
|
|
1396
|
+
]
|
|
1397
|
+
)
|
|
1398
|
+
)
|
|
1399
|
+
if _default_content_type is not None:
|
|
1400
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1401
|
+
|
|
1402
|
+
# authentication setting
|
|
1403
|
+
_auth_settings: List[str] = [
|
|
1404
|
+
]
|
|
1405
|
+
|
|
1406
|
+
return self.api_client.param_serialize(
|
|
1407
|
+
method='PATCH',
|
|
1408
|
+
resource_path='/volumes/{name}',
|
|
1409
|
+
path_params=_path_params,
|
|
1410
|
+
query_params=_query_params,
|
|
1411
|
+
header_params=_header_params,
|
|
1412
|
+
body=_body_params,
|
|
1413
|
+
post_params=_form_params,
|
|
1414
|
+
files=_files,
|
|
1415
|
+
auth_settings=_auth_settings,
|
|
1416
|
+
collection_formats=_collection_formats,
|
|
1417
|
+
_host=_host,
|
|
1418
|
+
_request_auth=_request_auth
|
|
1419
|
+
)
|
|
1420
|
+
|
|
1421
|
+
|