hyperstack 1.46.2a0__py3-none-any.whl → 1.47.0a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. hyperstack/__init__.py +18 -1
  2. hyperstack/api/__init__.py +4 -0
  3. hyperstack/api/access_keys_api.py +885 -0
  4. hyperstack/api/api_key_api.py +1 -0
  5. hyperstack/api/buckets_api.py +865 -0
  6. hyperstack/api/health_api.py +282 -0
  7. hyperstack/api/partner_config_api.py +2 -0
  8. hyperstack/api/regions_api.py +282 -0
  9. hyperstack/api_client.py +1 -1
  10. hyperstack/configuration.py +1 -1
  11. hyperstack/models/__init__.py +13 -0
  12. hyperstack/models/object_storage_access_key_create_request.py +90 -0
  13. hyperstack/models/object_storage_access_key_create_response.py +101 -0
  14. hyperstack/models/object_storage_access_key_list_response.py +101 -0
  15. hyperstack/models/object_storage_access_key_response.py +99 -0
  16. hyperstack/models/object_storage_bucket_list_response.py +97 -0
  17. hyperstack/models/object_storage_bucket_response.py +101 -0
  18. hyperstack/models/object_storage_delete_response.py +87 -0
  19. hyperstack/models/object_storage_error_response.py +91 -0
  20. hyperstack/models/object_storage_health_response.py +87 -0
  21. hyperstack/models/object_storage_pagination_meta.py +91 -0
  22. hyperstack/models/object_storage_region_list_response.py +95 -0
  23. hyperstack/models/object_storage_region_response.py +87 -0
  24. hyperstack/models/object_storage_regions_enum.py +36 -0
  25. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/METADATA +1 -1
  26. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/RECORD +28 -11
  27. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/WHEEL +0 -0
  28. {hyperstack-1.46.2a0.dist-info → hyperstack-1.47.0a0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,885 @@
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_access_key_create_request import ObjectStorageAccessKeyCreateRequest
22
+ from ..models.object_storage_access_key_create_response import ObjectStorageAccessKeyCreateResponse
23
+ from ..models.object_storage_access_key_list_response import ObjectStorageAccessKeyListResponse
24
+ from ..models.object_storage_delete_response import ObjectStorageDeleteResponse
25
+
26
+ from ..api_client import ApiClient, RequestSerialized
27
+ from ..api_response import ApiResponse
28
+ from ..rest import RESTResponseType
29
+
30
+
31
+ class AccessKeysApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def create_access_key_endpoint(
46
+ self,
47
+ body: Optional[ObjectStorageAccessKeyCreateRequest] = None,
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> ObjectStorageAccessKeyCreateResponse:
61
+ """Generate a new access key
62
+
63
+
64
+ :param body:
65
+ :type body: ObjectStorageAccessKeyCreateRequest
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._create_access_key_endpoint_serialize(
89
+ body=body,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '201': "ObjectStorageAccessKeyCreateResponse",
98
+ '400': "ObjectStorageErrorResponse",
99
+ '422': None,
100
+ }
101
+ response_data = self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ 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
+ def create_access_key_endpoint_with_http_info(
114
+ self,
115
+ body: Optional[ObjectStorageAccessKeyCreateRequest] = None,
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[ObjectStorageAccessKeyCreateResponse]:
129
+ """Generate a new access key
130
+
131
+
132
+ :param body:
133
+ :type body: ObjectStorageAccessKeyCreateRequest
134
+ :param _request_timeout: timeout setting for this request. If one
135
+ number provided, it will be total request
136
+ timeout. It can also be a pair (tuple) of
137
+ (connection, read) timeouts.
138
+ :type _request_timeout: int, tuple(int, int), optional
139
+ :param _request_auth: set to override the auth_settings for an a single
140
+ request; this effectively ignores the
141
+ authentication in the spec for a single request.
142
+ :type _request_auth: dict, optional
143
+ :param _content_type: force content-type for the request.
144
+ :type _content_type: str, Optional
145
+ :param _headers: set to override the headers for a single
146
+ request; this effectively ignores the headers
147
+ in the spec for a single request.
148
+ :type _headers: dict, optional
149
+ :param _host_index: set to override the host_index for a single
150
+ request; this effectively ignores the host_index
151
+ in the spec for a single request.
152
+ :type _host_index: int, optional
153
+ :return: Returns the result object.
154
+ """ # noqa: E501
155
+
156
+ _param = self._create_access_key_endpoint_serialize(
157
+ body=body,
158
+ _request_auth=_request_auth,
159
+ _content_type=_content_type,
160
+ _headers=_headers,
161
+ _host_index=_host_index
162
+ )
163
+
164
+ _response_types_map: Dict[str, Optional[str]] = {
165
+ '201': "ObjectStorageAccessKeyCreateResponse",
166
+ '400': "ObjectStorageErrorResponse",
167
+ '422': None,
168
+ }
169
+ response_data = self.api_client.call_api(
170
+ *_param,
171
+ _request_timeout=_request_timeout
172
+ )
173
+ response_data.read()
174
+ return self.api_client.response_deserialize(
175
+ response_data=response_data,
176
+ response_types_map=_response_types_map,
177
+ )
178
+
179
+
180
+ @validate_call
181
+ def create_access_key_endpoint_without_preload_content(
182
+ self,
183
+ body: Optional[ObjectStorageAccessKeyCreateRequest] = None,
184
+ _request_timeout: Union[
185
+ None,
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Tuple[
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Annotated[StrictFloat, Field(gt=0)]
190
+ ]
191
+ ] = None,
192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
193
+ _content_type: Optional[StrictStr] = None,
194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
196
+ ) -> RESTResponseType:
197
+ """Generate a new access key
198
+
199
+
200
+ :param body:
201
+ :type body: ObjectStorageAccessKeyCreateRequest
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_access_key_endpoint_serialize(
225
+ body=body,
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
+ '201': "ObjectStorageAccessKeyCreateResponse",
234
+ '400': "ObjectStorageErrorResponse",
235
+ '422': None,
236
+ }
237
+ response_data = self.api_client.call_api(
238
+ *_param,
239
+ _request_timeout=_request_timeout
240
+ )
241
+ return response_data.response
242
+
243
+
244
+ def _create_access_key_endpoint_serialize(
245
+ self,
246
+ body,
247
+ _request_auth,
248
+ _content_type,
249
+ _headers,
250
+ _host_index,
251
+ ) -> RequestSerialized:
252
+
253
+ _host = None
254
+
255
+ _collection_formats: Dict[str, str] = {
256
+ }
257
+
258
+ _path_params: Dict[str, str] = {}
259
+ _query_params: List[Tuple[str, str]] = []
260
+ _header_params: Dict[str, Optional[str]] = _headers or {}
261
+ _form_params: List[Tuple[str, str]] = []
262
+ _files: Dict[
263
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
264
+ ] = {}
265
+ _body_params: Optional[bytes] = None
266
+
267
+ # process the path parameters
268
+ # process the query parameters
269
+ # process the header parameters
270
+ # process the form parameters
271
+ # process the body parameter
272
+ if body is not None:
273
+ _body_params = body
274
+
275
+
276
+ # set the HTTP header `Accept`
277
+ if 'Accept' not in _header_params:
278
+ _header_params['Accept'] = self.api_client.select_header_accept(
279
+ [
280
+ 'application/json'
281
+ ]
282
+ )
283
+
284
+ # set the HTTP header `Content-Type`
285
+ if _content_type:
286
+ _header_params['Content-Type'] = _content_type
287
+ else:
288
+ _default_content_type = (
289
+ self.api_client.select_header_content_type(
290
+ [
291
+ 'application/json'
292
+ ]
293
+ )
294
+ )
295
+ if _default_content_type is not None:
296
+ _header_params['Content-Type'] = _default_content_type
297
+
298
+ # authentication setting
299
+ _auth_settings: List[str] = [
300
+ 'apiKey'
301
+ ]
302
+
303
+ return self.api_client.param_serialize(
304
+ method='POST',
305
+ resource_path='/object-storage/access-keys',
306
+ path_params=_path_params,
307
+ query_params=_query_params,
308
+ header_params=_header_params,
309
+ body=_body_params,
310
+ post_params=_form_params,
311
+ files=_files,
312
+ auth_settings=_auth_settings,
313
+ collection_formats=_collection_formats,
314
+ _host=_host,
315
+ _request_auth=_request_auth
316
+ )
317
+
318
+
319
+
320
+
321
+ @validate_call
322
+ def delete_access_key_endpoint(
323
+ self,
324
+ access_key_id: StrictStr,
325
+ _request_timeout: Union[
326
+ None,
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Tuple[
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Annotated[StrictFloat, Field(gt=0)]
331
+ ]
332
+ ] = None,
333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
334
+ _content_type: Optional[StrictStr] = None,
335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
337
+ ) -> ObjectStorageDeleteResponse:
338
+ """Remove an existing access key
339
+
340
+
341
+ :param access_key_id: (required)
342
+ :type access_key_id: str
343
+ :param _request_timeout: timeout setting for this request. If one
344
+ number provided, it will be total request
345
+ timeout. It can also be a pair (tuple) of
346
+ (connection, read) timeouts.
347
+ :type _request_timeout: int, tuple(int, int), optional
348
+ :param _request_auth: set to override the auth_settings for an a single
349
+ request; this effectively ignores the
350
+ authentication in the spec for a single request.
351
+ :type _request_auth: dict, optional
352
+ :param _content_type: force content-type for the request.
353
+ :type _content_type: str, Optional
354
+ :param _headers: set to override the headers for a single
355
+ request; this effectively ignores the headers
356
+ in the spec for a single request.
357
+ :type _headers: dict, optional
358
+ :param _host_index: set to override the host_index for a single
359
+ request; this effectively ignores the host_index
360
+ in the spec for a single request.
361
+ :type _host_index: int, optional
362
+ :return: Returns the result object.
363
+ """ # noqa: E501
364
+
365
+ _param = self._delete_access_key_endpoint_serialize(
366
+ access_key_id=access_key_id,
367
+ _request_auth=_request_auth,
368
+ _content_type=_content_type,
369
+ _headers=_headers,
370
+ _host_index=_host_index
371
+ )
372
+
373
+ _response_types_map: Dict[str, Optional[str]] = {
374
+ '200': "ObjectStorageDeleteResponse",
375
+ '400': "ObjectStorageErrorResponse",
376
+ '404': "ObjectStorageErrorResponse",
377
+ '422': None,
378
+ }
379
+ response_data = self.api_client.call_api(
380
+ *_param,
381
+ _request_timeout=_request_timeout
382
+ )
383
+ response_data.read()
384
+ return self.api_client.response_deserialize(
385
+ response_data=response_data,
386
+ response_types_map=_response_types_map,
387
+ ).data
388
+
389
+
390
+ @validate_call
391
+ def delete_access_key_endpoint_with_http_info(
392
+ self,
393
+ access_key_id: StrictStr,
394
+ _request_timeout: Union[
395
+ None,
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Tuple[
398
+ Annotated[StrictFloat, Field(gt=0)],
399
+ Annotated[StrictFloat, Field(gt=0)]
400
+ ]
401
+ ] = None,
402
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
403
+ _content_type: Optional[StrictStr] = None,
404
+ _headers: Optional[Dict[StrictStr, Any]] = None,
405
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
406
+ ) -> ApiResponse[ObjectStorageDeleteResponse]:
407
+ """Remove an existing access key
408
+
409
+
410
+ :param access_key_id: (required)
411
+ :type access_key_id: str
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._delete_access_key_endpoint_serialize(
435
+ access_key_id=access_key_id,
436
+ _request_auth=_request_auth,
437
+ _content_type=_content_type,
438
+ _headers=_headers,
439
+ _host_index=_host_index
440
+ )
441
+
442
+ _response_types_map: Dict[str, Optional[str]] = {
443
+ '200': "ObjectStorageDeleteResponse",
444
+ '400': "ObjectStorageErrorResponse",
445
+ '404': "ObjectStorageErrorResponse",
446
+ '422': None,
447
+ }
448
+ response_data = self.api_client.call_api(
449
+ *_param,
450
+ _request_timeout=_request_timeout
451
+ )
452
+ response_data.read()
453
+ return self.api_client.response_deserialize(
454
+ response_data=response_data,
455
+ response_types_map=_response_types_map,
456
+ )
457
+
458
+
459
+ @validate_call
460
+ def delete_access_key_endpoint_without_preload_content(
461
+ self,
462
+ access_key_id: StrictStr,
463
+ _request_timeout: Union[
464
+ None,
465
+ Annotated[StrictFloat, Field(gt=0)],
466
+ Tuple[
467
+ Annotated[StrictFloat, Field(gt=0)],
468
+ Annotated[StrictFloat, Field(gt=0)]
469
+ ]
470
+ ] = None,
471
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
472
+ _content_type: Optional[StrictStr] = None,
473
+ _headers: Optional[Dict[StrictStr, Any]] = None,
474
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
475
+ ) -> RESTResponseType:
476
+ """Remove an existing access key
477
+
478
+
479
+ :param access_key_id: (required)
480
+ :type access_key_id: str
481
+ :param _request_timeout: timeout setting for this request. If one
482
+ number provided, it will be total request
483
+ timeout. It can also be a pair (tuple) of
484
+ (connection, read) timeouts.
485
+ :type _request_timeout: int, tuple(int, int), optional
486
+ :param _request_auth: set to override the auth_settings for an a single
487
+ request; this effectively ignores the
488
+ authentication in the spec for a single request.
489
+ :type _request_auth: dict, optional
490
+ :param _content_type: force content-type for the request.
491
+ :type _content_type: str, Optional
492
+ :param _headers: set to override the headers for a single
493
+ request; this effectively ignores the headers
494
+ in the spec for a single request.
495
+ :type _headers: dict, optional
496
+ :param _host_index: set to override the host_index for a single
497
+ request; this effectively ignores the host_index
498
+ in the spec for a single request.
499
+ :type _host_index: int, optional
500
+ :return: Returns the result object.
501
+ """ # noqa: E501
502
+
503
+ _param = self._delete_access_key_endpoint_serialize(
504
+ access_key_id=access_key_id,
505
+ _request_auth=_request_auth,
506
+ _content_type=_content_type,
507
+ _headers=_headers,
508
+ _host_index=_host_index
509
+ )
510
+
511
+ _response_types_map: Dict[str, Optional[str]] = {
512
+ '200': "ObjectStorageDeleteResponse",
513
+ '400': "ObjectStorageErrorResponse",
514
+ '404': "ObjectStorageErrorResponse",
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 _delete_access_key_endpoint_serialize(
525
+ self,
526
+ access_key_id,
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
+ if access_key_id is not None:
549
+ _path_params['access_key_id'] = access_key_id
550
+ # process the query parameters
551
+ # process the header parameters
552
+ # process the form parameters
553
+ # process the body parameter
554
+
555
+
556
+ # set the HTTP header `Accept`
557
+ if 'Accept' not in _header_params:
558
+ _header_params['Accept'] = self.api_client.select_header_accept(
559
+ [
560
+ 'application/json'
561
+ ]
562
+ )
563
+
564
+
565
+ # authentication setting
566
+ _auth_settings: List[str] = [
567
+ 'apiKey'
568
+ ]
569
+
570
+ return self.api_client.param_serialize(
571
+ method='DELETE',
572
+ resource_path='/object-storage/access-keys/{access_key_id}',
573
+ path_params=_path_params,
574
+ query_params=_query_params,
575
+ header_params=_header_params,
576
+ body=_body_params,
577
+ post_params=_form_params,
578
+ files=_files,
579
+ auth_settings=_auth_settings,
580
+ collection_formats=_collection_formats,
581
+ _host=_host,
582
+ _request_auth=_request_auth
583
+ )
584
+
585
+
586
+
587
+
588
+ @validate_call
589
+ def list_access_keys_endpoint(
590
+ self,
591
+ search: Optional[StrictStr] = None,
592
+ page: Optional[StrictStr] = None,
593
+ page_size: Optional[StrictStr] = None,
594
+ _request_timeout: Union[
595
+ None,
596
+ Annotated[StrictFloat, Field(gt=0)],
597
+ Tuple[
598
+ Annotated[StrictFloat, Field(gt=0)],
599
+ Annotated[StrictFloat, Field(gt=0)]
600
+ ]
601
+ ] = None,
602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
603
+ _content_type: Optional[StrictStr] = None,
604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
606
+ ) -> ObjectStorageAccessKeyListResponse:
607
+ """List access keys
608
+
609
+
610
+ :param search:
611
+ :type search: str
612
+ :param page:
613
+ :type page: str
614
+ :param page_size:
615
+ :type page_size: str
616
+ :param _request_timeout: timeout setting for this request. If one
617
+ number provided, it will be total request
618
+ timeout. It can also be a pair (tuple) of
619
+ (connection, read) timeouts.
620
+ :type _request_timeout: int, tuple(int, int), optional
621
+ :param _request_auth: set to override the auth_settings for an a single
622
+ request; this effectively ignores the
623
+ authentication in the spec for a single request.
624
+ :type _request_auth: dict, optional
625
+ :param _content_type: force content-type for the request.
626
+ :type _content_type: str, Optional
627
+ :param _headers: set to override the headers for a single
628
+ request; this effectively ignores the headers
629
+ in the spec for a single request.
630
+ :type _headers: dict, optional
631
+ :param _host_index: set to override the host_index for a single
632
+ request; this effectively ignores the host_index
633
+ in the spec for a single request.
634
+ :type _host_index: int, optional
635
+ :return: Returns the result object.
636
+ """ # noqa: E501
637
+
638
+ _param = self._list_access_keys_endpoint_serialize(
639
+ search=search,
640
+ page=page,
641
+ page_size=page_size,
642
+ _request_auth=_request_auth,
643
+ _content_type=_content_type,
644
+ _headers=_headers,
645
+ _host_index=_host_index
646
+ )
647
+
648
+ _response_types_map: Dict[str, Optional[str]] = {
649
+ '201': "ObjectStorageAccessKeyListResponse",
650
+ '400': "ObjectStorageErrorResponse",
651
+ '422': None,
652
+ }
653
+ response_data = self.api_client.call_api(
654
+ *_param,
655
+ _request_timeout=_request_timeout
656
+ )
657
+ response_data.read()
658
+ return self.api_client.response_deserialize(
659
+ response_data=response_data,
660
+ response_types_map=_response_types_map,
661
+ ).data
662
+
663
+
664
+ @validate_call
665
+ def list_access_keys_endpoint_with_http_info(
666
+ self,
667
+ search: Optional[StrictStr] = None,
668
+ page: Optional[StrictStr] = None,
669
+ page_size: Optional[StrictStr] = None,
670
+ _request_timeout: Union[
671
+ None,
672
+ Annotated[StrictFloat, Field(gt=0)],
673
+ Tuple[
674
+ Annotated[StrictFloat, Field(gt=0)],
675
+ Annotated[StrictFloat, Field(gt=0)]
676
+ ]
677
+ ] = None,
678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
+ _content_type: Optional[StrictStr] = None,
680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
+ ) -> ApiResponse[ObjectStorageAccessKeyListResponse]:
683
+ """List access keys
684
+
685
+
686
+ :param search:
687
+ :type search: str
688
+ :param page:
689
+ :type page: str
690
+ :param page_size:
691
+ :type page_size: str
692
+ :param _request_timeout: timeout setting for this request. If one
693
+ number provided, it will be total request
694
+ timeout. It can also be a pair (tuple) of
695
+ (connection, read) timeouts.
696
+ :type _request_timeout: int, tuple(int, int), optional
697
+ :param _request_auth: set to override the auth_settings for an a single
698
+ request; this effectively ignores the
699
+ authentication in the spec for a single request.
700
+ :type _request_auth: dict, optional
701
+ :param _content_type: force content-type for the request.
702
+ :type _content_type: str, Optional
703
+ :param _headers: set to override the headers for a single
704
+ request; this effectively ignores the headers
705
+ in the spec for a single request.
706
+ :type _headers: dict, optional
707
+ :param _host_index: set to override the host_index for a single
708
+ request; this effectively ignores the host_index
709
+ in the spec for a single request.
710
+ :type _host_index: int, optional
711
+ :return: Returns the result object.
712
+ """ # noqa: E501
713
+
714
+ _param = self._list_access_keys_endpoint_serialize(
715
+ search=search,
716
+ page=page,
717
+ page_size=page_size,
718
+ _request_auth=_request_auth,
719
+ _content_type=_content_type,
720
+ _headers=_headers,
721
+ _host_index=_host_index
722
+ )
723
+
724
+ _response_types_map: Dict[str, Optional[str]] = {
725
+ '201': "ObjectStorageAccessKeyListResponse",
726
+ '400': "ObjectStorageErrorResponse",
727
+ '422': None,
728
+ }
729
+ response_data = self.api_client.call_api(
730
+ *_param,
731
+ _request_timeout=_request_timeout
732
+ )
733
+ response_data.read()
734
+ return self.api_client.response_deserialize(
735
+ response_data=response_data,
736
+ response_types_map=_response_types_map,
737
+ )
738
+
739
+
740
+ @validate_call
741
+ def list_access_keys_endpoint_without_preload_content(
742
+ self,
743
+ search: Optional[StrictStr] = None,
744
+ page: Optional[StrictStr] = None,
745
+ page_size: Optional[StrictStr] = None,
746
+ _request_timeout: Union[
747
+ None,
748
+ Annotated[StrictFloat, Field(gt=0)],
749
+ Tuple[
750
+ Annotated[StrictFloat, Field(gt=0)],
751
+ Annotated[StrictFloat, Field(gt=0)]
752
+ ]
753
+ ] = None,
754
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
755
+ _content_type: Optional[StrictStr] = None,
756
+ _headers: Optional[Dict[StrictStr, Any]] = None,
757
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
758
+ ) -> RESTResponseType:
759
+ """List access keys
760
+
761
+
762
+ :param search:
763
+ :type search: str
764
+ :param page:
765
+ :type page: str
766
+ :param page_size:
767
+ :type page_size: str
768
+ :param _request_timeout: timeout setting for this request. If one
769
+ number provided, it will be total request
770
+ timeout. It can also be a pair (tuple) of
771
+ (connection, read) timeouts.
772
+ :type _request_timeout: int, tuple(int, int), optional
773
+ :param _request_auth: set to override the auth_settings for an a single
774
+ request; this effectively ignores the
775
+ authentication in the spec for a single request.
776
+ :type _request_auth: dict, optional
777
+ :param _content_type: force content-type for the request.
778
+ :type _content_type: str, Optional
779
+ :param _headers: set to override the headers for a single
780
+ request; this effectively ignores the headers
781
+ in the spec for a single request.
782
+ :type _headers: dict, optional
783
+ :param _host_index: set to override the host_index for a single
784
+ request; this effectively ignores the host_index
785
+ in the spec for a single request.
786
+ :type _host_index: int, optional
787
+ :return: Returns the result object.
788
+ """ # noqa: E501
789
+
790
+ _param = self._list_access_keys_endpoint_serialize(
791
+ search=search,
792
+ page=page,
793
+ page_size=page_size,
794
+ _request_auth=_request_auth,
795
+ _content_type=_content_type,
796
+ _headers=_headers,
797
+ _host_index=_host_index
798
+ )
799
+
800
+ _response_types_map: Dict[str, Optional[str]] = {
801
+ '201': "ObjectStorageAccessKeyListResponse",
802
+ '400': "ObjectStorageErrorResponse",
803
+ '422': None,
804
+ }
805
+ response_data = self.api_client.call_api(
806
+ *_param,
807
+ _request_timeout=_request_timeout
808
+ )
809
+ return response_data.response
810
+
811
+
812
+ def _list_access_keys_endpoint_serialize(
813
+ self,
814
+ search,
815
+ page,
816
+ page_size,
817
+ _request_auth,
818
+ _content_type,
819
+ _headers,
820
+ _host_index,
821
+ ) -> RequestSerialized:
822
+
823
+ _host = None
824
+
825
+ _collection_formats: Dict[str, str] = {
826
+ }
827
+
828
+ _path_params: Dict[str, str] = {}
829
+ _query_params: List[Tuple[str, str]] = []
830
+ _header_params: Dict[str, Optional[str]] = _headers or {}
831
+ _form_params: List[Tuple[str, str]] = []
832
+ _files: Dict[
833
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
834
+ ] = {}
835
+ _body_params: Optional[bytes] = None
836
+
837
+ # process the path parameters
838
+ # process the query parameters
839
+ if search is not None:
840
+
841
+ _query_params.append(('search', search))
842
+
843
+ if page is not None:
844
+
845
+ _query_params.append(('page', page))
846
+
847
+ if page_size is not None:
848
+
849
+ _query_params.append(('page_size', page_size))
850
+
851
+ # process the header parameters
852
+ # process the form parameters
853
+ # process the body parameter
854
+
855
+
856
+ # set the HTTP header `Accept`
857
+ if 'Accept' not in _header_params:
858
+ _header_params['Accept'] = self.api_client.select_header_accept(
859
+ [
860
+ 'application/json'
861
+ ]
862
+ )
863
+
864
+
865
+ # authentication setting
866
+ _auth_settings: List[str] = [
867
+ 'apiKey'
868
+ ]
869
+
870
+ return self.api_client.param_serialize(
871
+ method='GET',
872
+ resource_path='/object-storage/access-keys',
873
+ path_params=_path_params,
874
+ query_params=_query_params,
875
+ header_params=_header_params,
876
+ body=_body_params,
877
+ post_params=_form_params,
878
+ files=_files,
879
+ auth_settings=_auth_settings,
880
+ collection_formats=_collection_formats,
881
+ _host=_host,
882
+ _request_auth=_request_auth
883
+ )
884
+
885
+