hyperstack 1.46.2a0__py3-none-any.whl → 1.46.4a0__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.
- hyperstack/__init__.py +18 -1
- hyperstack/api/__init__.py +4 -0
- hyperstack/api/access_keys_api.py +885 -0
- hyperstack/api/api_key_api.py +1 -0
- hyperstack/api/buckets_api.py +865 -0
- hyperstack/api/health_api.py +282 -0
- hyperstack/api/partner_config_api.py +2 -0
- hyperstack/api/regions_api.py +282 -0
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -1
- hyperstack/models/__init__.py +13 -0
- hyperstack/models/object_storage_access_key_create_request.py +90 -0
- hyperstack/models/object_storage_access_key_create_response.py +101 -0
- hyperstack/models/object_storage_access_key_list_response.py +101 -0
- hyperstack/models/object_storage_access_key_response.py +99 -0
- hyperstack/models/object_storage_bucket_list_response.py +95 -0
- hyperstack/models/object_storage_bucket_response.py +101 -0
- hyperstack/models/object_storage_delete_response.py +87 -0
- hyperstack/models/object_storage_error_response.py +91 -0
- hyperstack/models/object_storage_health_response.py +87 -0
- hyperstack/models/object_storage_pagination_meta.py +91 -0
- hyperstack/models/object_storage_region_list_response.py +95 -0
- hyperstack/models/object_storage_region_response.py +87 -0
- hyperstack/models/object_storage_regions_enum.py +36 -0
- {hyperstack-1.46.2a0.dist-info → hyperstack-1.46.4a0.dist-info}/METADATA +1 -1
- {hyperstack-1.46.2a0.dist-info → hyperstack-1.46.4a0.dist-info}/RECORD +28 -11
- {hyperstack-1.46.2a0.dist-info → hyperstack-1.46.4a0.dist-info}/WHEEL +0 -0
- {hyperstack-1.46.2a0.dist-info → hyperstack-1.46.4a0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Infrahub-API
|
|
5
|
+
|
|
6
|
+
Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
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 StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from ..models.object_storage_bucket_list_response import ObjectStorageBucketListResponse
|
|
22
|
+
from ..models.object_storage_bucket_response import ObjectStorageBucketResponse
|
|
23
|
+
from ..models.object_storage_delete_response import ObjectStorageDeleteResponse
|
|
24
|
+
|
|
25
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
26
|
+
from ..api_response import ApiResponse
|
|
27
|
+
from ..rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class BucketsApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def delete_bucket_endpoint(
|
|
45
|
+
self,
|
|
46
|
+
bucket_name: StrictStr,
|
|
47
|
+
region: StrictStr,
|
|
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
|
+
) -> ObjectStorageDeleteResponse:
|
|
61
|
+
"""Delete a bucket
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param bucket_name: (required)
|
|
65
|
+
:type bucket_name: str
|
|
66
|
+
:param region: (required)
|
|
67
|
+
:type region: str
|
|
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._delete_bucket_endpoint_serialize(
|
|
91
|
+
bucket_name=bucket_name,
|
|
92
|
+
region=region,
|
|
93
|
+
_request_auth=_request_auth,
|
|
94
|
+
_content_type=_content_type,
|
|
95
|
+
_headers=_headers,
|
|
96
|
+
_host_index=_host_index
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
'200': "ObjectStorageDeleteResponse",
|
|
101
|
+
'400': "ObjectStorageErrorResponse",
|
|
102
|
+
'404': "ObjectStorageErrorResponse",
|
|
103
|
+
'422': None,
|
|
104
|
+
}
|
|
105
|
+
response_data = self.api_client.call_api(
|
|
106
|
+
*_param,
|
|
107
|
+
_request_timeout=_request_timeout
|
|
108
|
+
)
|
|
109
|
+
response_data.read()
|
|
110
|
+
return self.api_client.response_deserialize(
|
|
111
|
+
response_data=response_data,
|
|
112
|
+
response_types_map=_response_types_map,
|
|
113
|
+
).data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@validate_call
|
|
117
|
+
def delete_bucket_endpoint_with_http_info(
|
|
118
|
+
self,
|
|
119
|
+
bucket_name: StrictStr,
|
|
120
|
+
region: StrictStr,
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[ObjectStorageDeleteResponse]:
|
|
134
|
+
"""Delete a bucket
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param bucket_name: (required)
|
|
138
|
+
:type bucket_name: str
|
|
139
|
+
:param region: (required)
|
|
140
|
+
:type region: str
|
|
141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
142
|
+
number provided, it will be total request
|
|
143
|
+
timeout. It can also be a pair (tuple) of
|
|
144
|
+
(connection, read) timeouts.
|
|
145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
147
|
+
request; this effectively ignores the
|
|
148
|
+
authentication in the spec for a single request.
|
|
149
|
+
:type _request_auth: dict, optional
|
|
150
|
+
:param _content_type: force content-type for the request.
|
|
151
|
+
:type _content_type: str, Optional
|
|
152
|
+
:param _headers: set to override the headers for a single
|
|
153
|
+
request; this effectively ignores the headers
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _headers: dict, optional
|
|
156
|
+
:param _host_index: set to override the host_index for a single
|
|
157
|
+
request; this effectively ignores the host_index
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _host_index: int, optional
|
|
160
|
+
:return: Returns the result object.
|
|
161
|
+
""" # noqa: E501
|
|
162
|
+
|
|
163
|
+
_param = self._delete_bucket_endpoint_serialize(
|
|
164
|
+
bucket_name=bucket_name,
|
|
165
|
+
region=region,
|
|
166
|
+
_request_auth=_request_auth,
|
|
167
|
+
_content_type=_content_type,
|
|
168
|
+
_headers=_headers,
|
|
169
|
+
_host_index=_host_index
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
173
|
+
'200': "ObjectStorageDeleteResponse",
|
|
174
|
+
'400': "ObjectStorageErrorResponse",
|
|
175
|
+
'404': "ObjectStorageErrorResponse",
|
|
176
|
+
'422': None,
|
|
177
|
+
}
|
|
178
|
+
response_data = self.api_client.call_api(
|
|
179
|
+
*_param,
|
|
180
|
+
_request_timeout=_request_timeout
|
|
181
|
+
)
|
|
182
|
+
response_data.read()
|
|
183
|
+
return self.api_client.response_deserialize(
|
|
184
|
+
response_data=response_data,
|
|
185
|
+
response_types_map=_response_types_map,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@validate_call
|
|
190
|
+
def delete_bucket_endpoint_without_preload_content(
|
|
191
|
+
self,
|
|
192
|
+
bucket_name: StrictStr,
|
|
193
|
+
region: StrictStr,
|
|
194
|
+
_request_timeout: Union[
|
|
195
|
+
None,
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Tuple[
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
200
|
+
]
|
|
201
|
+
] = None,
|
|
202
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_content_type: Optional[StrictStr] = None,
|
|
204
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
205
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
206
|
+
) -> RESTResponseType:
|
|
207
|
+
"""Delete a bucket
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
:param bucket_name: (required)
|
|
211
|
+
:type bucket_name: str
|
|
212
|
+
:param region: (required)
|
|
213
|
+
:type region: str
|
|
214
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
215
|
+
number provided, it will be total request
|
|
216
|
+
timeout. It can also be a pair (tuple) of
|
|
217
|
+
(connection, read) timeouts.
|
|
218
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
219
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
220
|
+
request; this effectively ignores the
|
|
221
|
+
authentication in the spec for a single request.
|
|
222
|
+
:type _request_auth: dict, optional
|
|
223
|
+
:param _content_type: force content-type for the request.
|
|
224
|
+
:type _content_type: str, Optional
|
|
225
|
+
:param _headers: set to override the headers for a single
|
|
226
|
+
request; this effectively ignores the headers
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _headers: dict, optional
|
|
229
|
+
:param _host_index: set to override the host_index for a single
|
|
230
|
+
request; this effectively ignores the host_index
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _host_index: int, optional
|
|
233
|
+
:return: Returns the result object.
|
|
234
|
+
""" # noqa: E501
|
|
235
|
+
|
|
236
|
+
_param = self._delete_bucket_endpoint_serialize(
|
|
237
|
+
bucket_name=bucket_name,
|
|
238
|
+
region=region,
|
|
239
|
+
_request_auth=_request_auth,
|
|
240
|
+
_content_type=_content_type,
|
|
241
|
+
_headers=_headers,
|
|
242
|
+
_host_index=_host_index
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
246
|
+
'200': "ObjectStorageDeleteResponse",
|
|
247
|
+
'400': "ObjectStorageErrorResponse",
|
|
248
|
+
'404': "ObjectStorageErrorResponse",
|
|
249
|
+
'422': None,
|
|
250
|
+
}
|
|
251
|
+
response_data = self.api_client.call_api(
|
|
252
|
+
*_param,
|
|
253
|
+
_request_timeout=_request_timeout
|
|
254
|
+
)
|
|
255
|
+
return response_data.response
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def _delete_bucket_endpoint_serialize(
|
|
259
|
+
self,
|
|
260
|
+
bucket_name,
|
|
261
|
+
region,
|
|
262
|
+
_request_auth,
|
|
263
|
+
_content_type,
|
|
264
|
+
_headers,
|
|
265
|
+
_host_index,
|
|
266
|
+
) -> RequestSerialized:
|
|
267
|
+
|
|
268
|
+
_host = None
|
|
269
|
+
|
|
270
|
+
_collection_formats: Dict[str, str] = {
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
_path_params: Dict[str, str] = {}
|
|
274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
277
|
+
_files: Dict[
|
|
278
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
279
|
+
] = {}
|
|
280
|
+
_body_params: Optional[bytes] = None
|
|
281
|
+
|
|
282
|
+
# process the path parameters
|
|
283
|
+
if bucket_name is not None:
|
|
284
|
+
_path_params['bucket_name'] = bucket_name
|
|
285
|
+
# process the query parameters
|
|
286
|
+
if region is not None:
|
|
287
|
+
|
|
288
|
+
_query_params.append(('region', region))
|
|
289
|
+
|
|
290
|
+
# process the header parameters
|
|
291
|
+
# process the form parameters
|
|
292
|
+
# process the body parameter
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
# set the HTTP header `Accept`
|
|
296
|
+
if 'Accept' not in _header_params:
|
|
297
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
298
|
+
[
|
|
299
|
+
'application/json'
|
|
300
|
+
]
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
# authentication setting
|
|
305
|
+
_auth_settings: List[str] = [
|
|
306
|
+
'apiKey'
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
return self.api_client.param_serialize(
|
|
310
|
+
method='DELETE',
|
|
311
|
+
resource_path='/object-storage/buckets/{bucket_name}',
|
|
312
|
+
path_params=_path_params,
|
|
313
|
+
query_params=_query_params,
|
|
314
|
+
header_params=_header_params,
|
|
315
|
+
body=_body_params,
|
|
316
|
+
post_params=_form_params,
|
|
317
|
+
files=_files,
|
|
318
|
+
auth_settings=_auth_settings,
|
|
319
|
+
collection_formats=_collection_formats,
|
|
320
|
+
_host=_host,
|
|
321
|
+
_request_auth=_request_auth
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
@validate_call
|
|
328
|
+
def list_buckets_endpoint(
|
|
329
|
+
self,
|
|
330
|
+
search: Optional[StrictStr] = None,
|
|
331
|
+
_request_timeout: Union[
|
|
332
|
+
None,
|
|
333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
334
|
+
Tuple[
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
337
|
+
]
|
|
338
|
+
] = None,
|
|
339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
340
|
+
_content_type: Optional[StrictStr] = None,
|
|
341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
343
|
+
) -> ObjectStorageBucketListResponse:
|
|
344
|
+
"""List buckets
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
:param search:
|
|
348
|
+
:type search: str
|
|
349
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
350
|
+
number provided, it will be total request
|
|
351
|
+
timeout. It can also be a pair (tuple) of
|
|
352
|
+
(connection, read) timeouts.
|
|
353
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
354
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
355
|
+
request; this effectively ignores the
|
|
356
|
+
authentication in the spec for a single request.
|
|
357
|
+
:type _request_auth: dict, optional
|
|
358
|
+
:param _content_type: force content-type for the request.
|
|
359
|
+
:type _content_type: str, Optional
|
|
360
|
+
:param _headers: set to override the headers for a single
|
|
361
|
+
request; this effectively ignores the headers
|
|
362
|
+
in the spec for a single request.
|
|
363
|
+
:type _headers: dict, optional
|
|
364
|
+
:param _host_index: set to override the host_index for a single
|
|
365
|
+
request; this effectively ignores the host_index
|
|
366
|
+
in the spec for a single request.
|
|
367
|
+
:type _host_index: int, optional
|
|
368
|
+
:return: Returns the result object.
|
|
369
|
+
""" # noqa: E501
|
|
370
|
+
|
|
371
|
+
_param = self._list_buckets_endpoint_serialize(
|
|
372
|
+
search=search,
|
|
373
|
+
_request_auth=_request_auth,
|
|
374
|
+
_content_type=_content_type,
|
|
375
|
+
_headers=_headers,
|
|
376
|
+
_host_index=_host_index
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
380
|
+
'200': "ObjectStorageBucketListResponse",
|
|
381
|
+
'422': None,
|
|
382
|
+
}
|
|
383
|
+
response_data = self.api_client.call_api(
|
|
384
|
+
*_param,
|
|
385
|
+
_request_timeout=_request_timeout
|
|
386
|
+
)
|
|
387
|
+
response_data.read()
|
|
388
|
+
return self.api_client.response_deserialize(
|
|
389
|
+
response_data=response_data,
|
|
390
|
+
response_types_map=_response_types_map,
|
|
391
|
+
).data
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
@validate_call
|
|
395
|
+
def list_buckets_endpoint_with_http_info(
|
|
396
|
+
self,
|
|
397
|
+
search: Optional[StrictStr] = None,
|
|
398
|
+
_request_timeout: Union[
|
|
399
|
+
None,
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
401
|
+
Tuple[
|
|
402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
404
|
+
]
|
|
405
|
+
] = None,
|
|
406
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
407
|
+
_content_type: Optional[StrictStr] = None,
|
|
408
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
409
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
410
|
+
) -> ApiResponse[ObjectStorageBucketListResponse]:
|
|
411
|
+
"""List buckets
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
:param search:
|
|
415
|
+
:type search: str
|
|
416
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
417
|
+
number provided, it will be total request
|
|
418
|
+
timeout. It can also be a pair (tuple) of
|
|
419
|
+
(connection, read) timeouts.
|
|
420
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
421
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
422
|
+
request; this effectively ignores the
|
|
423
|
+
authentication in the spec for a single request.
|
|
424
|
+
:type _request_auth: dict, optional
|
|
425
|
+
:param _content_type: force content-type for the request.
|
|
426
|
+
:type _content_type: str, Optional
|
|
427
|
+
:param _headers: set to override the headers for a single
|
|
428
|
+
request; this effectively ignores the headers
|
|
429
|
+
in the spec for a single request.
|
|
430
|
+
:type _headers: dict, optional
|
|
431
|
+
:param _host_index: set to override the host_index for a single
|
|
432
|
+
request; this effectively ignores the host_index
|
|
433
|
+
in the spec for a single request.
|
|
434
|
+
:type _host_index: int, optional
|
|
435
|
+
:return: Returns the result object.
|
|
436
|
+
""" # noqa: E501
|
|
437
|
+
|
|
438
|
+
_param = self._list_buckets_endpoint_serialize(
|
|
439
|
+
search=search,
|
|
440
|
+
_request_auth=_request_auth,
|
|
441
|
+
_content_type=_content_type,
|
|
442
|
+
_headers=_headers,
|
|
443
|
+
_host_index=_host_index
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
447
|
+
'200': "ObjectStorageBucketListResponse",
|
|
448
|
+
'422': None,
|
|
449
|
+
}
|
|
450
|
+
response_data = self.api_client.call_api(
|
|
451
|
+
*_param,
|
|
452
|
+
_request_timeout=_request_timeout
|
|
453
|
+
)
|
|
454
|
+
response_data.read()
|
|
455
|
+
return self.api_client.response_deserialize(
|
|
456
|
+
response_data=response_data,
|
|
457
|
+
response_types_map=_response_types_map,
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
@validate_call
|
|
462
|
+
def list_buckets_endpoint_without_preload_content(
|
|
463
|
+
self,
|
|
464
|
+
search: Optional[StrictStr] = None,
|
|
465
|
+
_request_timeout: Union[
|
|
466
|
+
None,
|
|
467
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
468
|
+
Tuple[
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
470
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
471
|
+
]
|
|
472
|
+
] = None,
|
|
473
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
474
|
+
_content_type: Optional[StrictStr] = None,
|
|
475
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
476
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
477
|
+
) -> RESTResponseType:
|
|
478
|
+
"""List buckets
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
:param search:
|
|
482
|
+
:type search: str
|
|
483
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
484
|
+
number provided, it will be total request
|
|
485
|
+
timeout. It can also be a pair (tuple) of
|
|
486
|
+
(connection, read) timeouts.
|
|
487
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
488
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
489
|
+
request; this effectively ignores the
|
|
490
|
+
authentication in the spec for a single request.
|
|
491
|
+
:type _request_auth: dict, optional
|
|
492
|
+
:param _content_type: force content-type for the request.
|
|
493
|
+
:type _content_type: str, Optional
|
|
494
|
+
:param _headers: set to override the headers for a single
|
|
495
|
+
request; this effectively ignores the headers
|
|
496
|
+
in the spec for a single request.
|
|
497
|
+
:type _headers: dict, optional
|
|
498
|
+
:param _host_index: set to override the host_index for a single
|
|
499
|
+
request; this effectively ignores the host_index
|
|
500
|
+
in the spec for a single request.
|
|
501
|
+
:type _host_index: int, optional
|
|
502
|
+
:return: Returns the result object.
|
|
503
|
+
""" # noqa: E501
|
|
504
|
+
|
|
505
|
+
_param = self._list_buckets_endpoint_serialize(
|
|
506
|
+
search=search,
|
|
507
|
+
_request_auth=_request_auth,
|
|
508
|
+
_content_type=_content_type,
|
|
509
|
+
_headers=_headers,
|
|
510
|
+
_host_index=_host_index
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
514
|
+
'200': "ObjectStorageBucketListResponse",
|
|
515
|
+
'422': None,
|
|
516
|
+
}
|
|
517
|
+
response_data = self.api_client.call_api(
|
|
518
|
+
*_param,
|
|
519
|
+
_request_timeout=_request_timeout
|
|
520
|
+
)
|
|
521
|
+
return response_data.response
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
def _list_buckets_endpoint_serialize(
|
|
525
|
+
self,
|
|
526
|
+
search,
|
|
527
|
+
_request_auth,
|
|
528
|
+
_content_type,
|
|
529
|
+
_headers,
|
|
530
|
+
_host_index,
|
|
531
|
+
) -> RequestSerialized:
|
|
532
|
+
|
|
533
|
+
_host = None
|
|
534
|
+
|
|
535
|
+
_collection_formats: Dict[str, str] = {
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
_path_params: Dict[str, str] = {}
|
|
539
|
+
_query_params: List[Tuple[str, str]] = []
|
|
540
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
541
|
+
_form_params: List[Tuple[str, str]] = []
|
|
542
|
+
_files: Dict[
|
|
543
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
544
|
+
] = {}
|
|
545
|
+
_body_params: Optional[bytes] = None
|
|
546
|
+
|
|
547
|
+
# process the path parameters
|
|
548
|
+
# process the query parameters
|
|
549
|
+
if search is not None:
|
|
550
|
+
|
|
551
|
+
_query_params.append(('search', search))
|
|
552
|
+
|
|
553
|
+
# process the header parameters
|
|
554
|
+
# process the form parameters
|
|
555
|
+
# process the body parameter
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
# set the HTTP header `Accept`
|
|
559
|
+
if 'Accept' not in _header_params:
|
|
560
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
561
|
+
[
|
|
562
|
+
'application/json'
|
|
563
|
+
]
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
# authentication setting
|
|
568
|
+
_auth_settings: List[str] = [
|
|
569
|
+
'apiKey'
|
|
570
|
+
]
|
|
571
|
+
|
|
572
|
+
return self.api_client.param_serialize(
|
|
573
|
+
method='GET',
|
|
574
|
+
resource_path='/object-storage/buckets',
|
|
575
|
+
path_params=_path_params,
|
|
576
|
+
query_params=_query_params,
|
|
577
|
+
header_params=_header_params,
|
|
578
|
+
body=_body_params,
|
|
579
|
+
post_params=_form_params,
|
|
580
|
+
files=_files,
|
|
581
|
+
auth_settings=_auth_settings,
|
|
582
|
+
collection_formats=_collection_formats,
|
|
583
|
+
_host=_host,
|
|
584
|
+
_request_auth=_request_auth
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
@validate_call
|
|
591
|
+
def retrieve_bucket_endpoint(
|
|
592
|
+
self,
|
|
593
|
+
bucket_name: StrictStr,
|
|
594
|
+
region: StrictStr,
|
|
595
|
+
_request_timeout: Union[
|
|
596
|
+
None,
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
598
|
+
Tuple[
|
|
599
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
600
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
601
|
+
]
|
|
602
|
+
] = None,
|
|
603
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_content_type: Optional[StrictStr] = None,
|
|
605
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
607
|
+
) -> ObjectStorageBucketResponse:
|
|
608
|
+
"""Retrieve a bucket
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
:param bucket_name: (required)
|
|
612
|
+
:type bucket_name: str
|
|
613
|
+
:param region: (required)
|
|
614
|
+
:type region: str
|
|
615
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
616
|
+
number provided, it will be total request
|
|
617
|
+
timeout. It can also be a pair (tuple) of
|
|
618
|
+
(connection, read) timeouts.
|
|
619
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
620
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
621
|
+
request; this effectively ignores the
|
|
622
|
+
authentication in the spec for a single request.
|
|
623
|
+
:type _request_auth: dict, optional
|
|
624
|
+
:param _content_type: force content-type for the request.
|
|
625
|
+
:type _content_type: str, Optional
|
|
626
|
+
:param _headers: set to override the headers for a single
|
|
627
|
+
request; this effectively ignores the headers
|
|
628
|
+
in the spec for a single request.
|
|
629
|
+
:type _headers: dict, optional
|
|
630
|
+
:param _host_index: set to override the host_index for a single
|
|
631
|
+
request; this effectively ignores the host_index
|
|
632
|
+
in the spec for a single request.
|
|
633
|
+
:type _host_index: int, optional
|
|
634
|
+
:return: Returns the result object.
|
|
635
|
+
""" # noqa: E501
|
|
636
|
+
|
|
637
|
+
_param = self._retrieve_bucket_endpoint_serialize(
|
|
638
|
+
bucket_name=bucket_name,
|
|
639
|
+
region=region,
|
|
640
|
+
_request_auth=_request_auth,
|
|
641
|
+
_content_type=_content_type,
|
|
642
|
+
_headers=_headers,
|
|
643
|
+
_host_index=_host_index
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
647
|
+
'200': "ObjectStorageBucketResponse",
|
|
648
|
+
'422': None,
|
|
649
|
+
}
|
|
650
|
+
response_data = self.api_client.call_api(
|
|
651
|
+
*_param,
|
|
652
|
+
_request_timeout=_request_timeout
|
|
653
|
+
)
|
|
654
|
+
response_data.read()
|
|
655
|
+
return self.api_client.response_deserialize(
|
|
656
|
+
response_data=response_data,
|
|
657
|
+
response_types_map=_response_types_map,
|
|
658
|
+
).data
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
@validate_call
|
|
662
|
+
def retrieve_bucket_endpoint_with_http_info(
|
|
663
|
+
self,
|
|
664
|
+
bucket_name: StrictStr,
|
|
665
|
+
region: StrictStr,
|
|
666
|
+
_request_timeout: Union[
|
|
667
|
+
None,
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
669
|
+
Tuple[
|
|
670
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
671
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
672
|
+
]
|
|
673
|
+
] = None,
|
|
674
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
675
|
+
_content_type: Optional[StrictStr] = None,
|
|
676
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
677
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
678
|
+
) -> ApiResponse[ObjectStorageBucketResponse]:
|
|
679
|
+
"""Retrieve a bucket
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
:param bucket_name: (required)
|
|
683
|
+
:type bucket_name: str
|
|
684
|
+
:param region: (required)
|
|
685
|
+
:type region: str
|
|
686
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
687
|
+
number provided, it will be total request
|
|
688
|
+
timeout. It can also be a pair (tuple) of
|
|
689
|
+
(connection, read) timeouts.
|
|
690
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
691
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
692
|
+
request; this effectively ignores the
|
|
693
|
+
authentication in the spec for a single request.
|
|
694
|
+
:type _request_auth: dict, optional
|
|
695
|
+
:param _content_type: force content-type for the request.
|
|
696
|
+
:type _content_type: str, Optional
|
|
697
|
+
:param _headers: set to override the headers for a single
|
|
698
|
+
request; this effectively ignores the headers
|
|
699
|
+
in the spec for a single request.
|
|
700
|
+
:type _headers: dict, optional
|
|
701
|
+
:param _host_index: set to override the host_index for a single
|
|
702
|
+
request; this effectively ignores the host_index
|
|
703
|
+
in the spec for a single request.
|
|
704
|
+
:type _host_index: int, optional
|
|
705
|
+
:return: Returns the result object.
|
|
706
|
+
""" # noqa: E501
|
|
707
|
+
|
|
708
|
+
_param = self._retrieve_bucket_endpoint_serialize(
|
|
709
|
+
bucket_name=bucket_name,
|
|
710
|
+
region=region,
|
|
711
|
+
_request_auth=_request_auth,
|
|
712
|
+
_content_type=_content_type,
|
|
713
|
+
_headers=_headers,
|
|
714
|
+
_host_index=_host_index
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
718
|
+
'200': "ObjectStorageBucketResponse",
|
|
719
|
+
'422': None,
|
|
720
|
+
}
|
|
721
|
+
response_data = self.api_client.call_api(
|
|
722
|
+
*_param,
|
|
723
|
+
_request_timeout=_request_timeout
|
|
724
|
+
)
|
|
725
|
+
response_data.read()
|
|
726
|
+
return self.api_client.response_deserialize(
|
|
727
|
+
response_data=response_data,
|
|
728
|
+
response_types_map=_response_types_map,
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
@validate_call
|
|
733
|
+
def retrieve_bucket_endpoint_without_preload_content(
|
|
734
|
+
self,
|
|
735
|
+
bucket_name: StrictStr,
|
|
736
|
+
region: StrictStr,
|
|
737
|
+
_request_timeout: Union[
|
|
738
|
+
None,
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Tuple[
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
743
|
+
]
|
|
744
|
+
] = None,
|
|
745
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
746
|
+
_content_type: Optional[StrictStr] = None,
|
|
747
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
748
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
749
|
+
) -> RESTResponseType:
|
|
750
|
+
"""Retrieve a bucket
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
:param bucket_name: (required)
|
|
754
|
+
:type bucket_name: str
|
|
755
|
+
:param region: (required)
|
|
756
|
+
:type region: str
|
|
757
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
758
|
+
number provided, it will be total request
|
|
759
|
+
timeout. It can also be a pair (tuple) of
|
|
760
|
+
(connection, read) timeouts.
|
|
761
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
762
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
763
|
+
request; this effectively ignores the
|
|
764
|
+
authentication in the spec for a single request.
|
|
765
|
+
:type _request_auth: dict, optional
|
|
766
|
+
:param _content_type: force content-type for the request.
|
|
767
|
+
:type _content_type: str, Optional
|
|
768
|
+
:param _headers: set to override the headers for a single
|
|
769
|
+
request; this effectively ignores the headers
|
|
770
|
+
in the spec for a single request.
|
|
771
|
+
:type _headers: dict, optional
|
|
772
|
+
:param _host_index: set to override the host_index for a single
|
|
773
|
+
request; this effectively ignores the host_index
|
|
774
|
+
in the spec for a single request.
|
|
775
|
+
:type _host_index: int, optional
|
|
776
|
+
:return: Returns the result object.
|
|
777
|
+
""" # noqa: E501
|
|
778
|
+
|
|
779
|
+
_param = self._retrieve_bucket_endpoint_serialize(
|
|
780
|
+
bucket_name=bucket_name,
|
|
781
|
+
region=region,
|
|
782
|
+
_request_auth=_request_auth,
|
|
783
|
+
_content_type=_content_type,
|
|
784
|
+
_headers=_headers,
|
|
785
|
+
_host_index=_host_index
|
|
786
|
+
)
|
|
787
|
+
|
|
788
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
789
|
+
'200': "ObjectStorageBucketResponse",
|
|
790
|
+
'422': None,
|
|
791
|
+
}
|
|
792
|
+
response_data = self.api_client.call_api(
|
|
793
|
+
*_param,
|
|
794
|
+
_request_timeout=_request_timeout
|
|
795
|
+
)
|
|
796
|
+
return response_data.response
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
def _retrieve_bucket_endpoint_serialize(
|
|
800
|
+
self,
|
|
801
|
+
bucket_name,
|
|
802
|
+
region,
|
|
803
|
+
_request_auth,
|
|
804
|
+
_content_type,
|
|
805
|
+
_headers,
|
|
806
|
+
_host_index,
|
|
807
|
+
) -> RequestSerialized:
|
|
808
|
+
|
|
809
|
+
_host = None
|
|
810
|
+
|
|
811
|
+
_collection_formats: Dict[str, str] = {
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
_path_params: Dict[str, str] = {}
|
|
815
|
+
_query_params: List[Tuple[str, str]] = []
|
|
816
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
817
|
+
_form_params: List[Tuple[str, str]] = []
|
|
818
|
+
_files: Dict[
|
|
819
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
820
|
+
] = {}
|
|
821
|
+
_body_params: Optional[bytes] = None
|
|
822
|
+
|
|
823
|
+
# process the path parameters
|
|
824
|
+
if bucket_name is not None:
|
|
825
|
+
_path_params['bucket_name'] = bucket_name
|
|
826
|
+
# process the query parameters
|
|
827
|
+
if region is not None:
|
|
828
|
+
|
|
829
|
+
_query_params.append(('region', region))
|
|
830
|
+
|
|
831
|
+
# process the header parameters
|
|
832
|
+
# process the form parameters
|
|
833
|
+
# process the body parameter
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
# set the HTTP header `Accept`
|
|
837
|
+
if 'Accept' not in _header_params:
|
|
838
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
839
|
+
[
|
|
840
|
+
'application/json'
|
|
841
|
+
]
|
|
842
|
+
)
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
# authentication setting
|
|
846
|
+
_auth_settings: List[str] = [
|
|
847
|
+
'apiKey'
|
|
848
|
+
]
|
|
849
|
+
|
|
850
|
+
return self.api_client.param_serialize(
|
|
851
|
+
method='GET',
|
|
852
|
+
resource_path='/object-storage/buckets/{bucket_name}',
|
|
853
|
+
path_params=_path_params,
|
|
854
|
+
query_params=_query_params,
|
|
855
|
+
header_params=_header_params,
|
|
856
|
+
body=_body_params,
|
|
857
|
+
post_params=_form_params,
|
|
858
|
+
files=_files,
|
|
859
|
+
auth_settings=_auth_settings,
|
|
860
|
+
collection_formats=_collection_formats,
|
|
861
|
+
_host=_host,
|
|
862
|
+
_request_auth=_request_auth
|
|
863
|
+
)
|
|
864
|
+
|
|
865
|
+
|