stackit-dremio 0.1.0__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.
@@ -0,0 +1,2642 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Dremio API
5
+
6
+ This API provides endpoints for managing Dremio instances and users.
7
+
8
+ The version of the OpenAPI document: 1beta.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from typing import Any, Dict, List, Optional, Tuple, Union
15
+ from uuid import UUID
16
+
17
+ from pydantic import (
18
+ Field,
19
+ StrictFloat,
20
+ StrictInt,
21
+ StrictStr,
22
+ validate_call,
23
+ )
24
+ from stackit.core.configuration import Configuration
25
+ from typing_extensions import Annotated
26
+
27
+ from stackit.dremio.api_client import ApiClient, RequestSerialized
28
+ from stackit.dremio.api_response import ApiResponse
29
+ from stackit.dremio.models.create_dremio_instance_payload import (
30
+ CreateDremioInstancePayload,
31
+ )
32
+ from stackit.dremio.models.create_dremio_user_payload import CreateDremioUserPayload
33
+ from stackit.dremio.models.dremio_response import DremioResponse
34
+ from stackit.dremio.models.dremio_user_response import DremioUserResponse
35
+ from stackit.dremio.models.list_dremio_users_response import ListDremioUsersResponse
36
+ from stackit.dremio.models.list_dremios_response import ListDremiosResponse
37
+ from stackit.dremio.models.update_dremio_instance_payload import (
38
+ UpdateDremioInstancePayload,
39
+ )
40
+ from stackit.dremio.rest import RESTResponseType
41
+
42
+
43
+ class DefaultApi:
44
+ """NOTE: This class is auto generated by OpenAPI Generator
45
+ Ref: https://openapi-generator.tech
46
+
47
+ Do not edit the class manually.
48
+ """
49
+
50
+ def __init__(self, configuration: Configuration = None) -> None:
51
+ if configuration is None:
52
+ configuration = Configuration()
53
+ self.configuration = configuration
54
+ self.api_client = ApiClient(self.configuration)
55
+
56
+ @validate_call
57
+ def create_dremio_instance(
58
+ self,
59
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
60
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
61
+ create_dremio_instance_payload: CreateDremioInstancePayload,
62
+ _request_timeout: Union[
63
+ None,
64
+ Annotated[StrictFloat, Field(gt=0)],
65
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
66
+ ] = None,
67
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
68
+ _content_type: Optional[StrictStr] = None,
69
+ _headers: Optional[Dict[StrictStr, Any]] = None,
70
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
71
+ ) -> DremioResponse:
72
+ """create_dremio_instance
73
+
74
+ Creates a new Dremio instance within the project.
75
+
76
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
77
+ :type project_id: UUID
78
+ :param region_id: The STACKIT region name the resource is located in. (required)
79
+ :type region_id: str
80
+ :param create_dremio_instance_payload: (required)
81
+ :type create_dremio_instance_payload: CreateDremioInstancePayload
82
+ :param _request_timeout: timeout setting for this request. If one
83
+ number provided, it will be total request
84
+ timeout. It can also be a pair (tuple) of
85
+ (connection, read) timeouts.
86
+ :type _request_timeout: int, tuple(int, int), optional
87
+ :param _request_auth: set to override the auth_settings for an a single
88
+ request; this effectively ignores the
89
+ authentication in the spec for a single request.
90
+ :type _request_auth: dict, optional
91
+ :param _content_type: force content-type for the request.
92
+ :type _content_type: str, Optional
93
+ :param _headers: set to override the headers for a single
94
+ request; this effectively ignores the headers
95
+ in the spec for a single request.
96
+ :type _headers: dict, optional
97
+ :param _host_index: set to override the host_index for a single
98
+ request; this effectively ignores the host_index
99
+ in the spec for a single request.
100
+ :type _host_index: int, optional
101
+ :return: Returns the result object.
102
+ """ # noqa: E501
103
+
104
+ _param = self._create_dremio_instance_serialize(
105
+ project_id=project_id,
106
+ region_id=region_id,
107
+ create_dremio_instance_payload=create_dremio_instance_payload,
108
+ _request_auth=_request_auth,
109
+ _content_type=_content_type,
110
+ _headers=_headers,
111
+ _host_index=_host_index,
112
+ )
113
+
114
+ _response_types_map: Dict[str, Optional[str]] = {
115
+ "202": "DremioResponse",
116
+ "400": "Error",
117
+ "401": "Error",
118
+ "409": None,
119
+ "500": None,
120
+ }
121
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
122
+ response_data.read()
123
+ return self.api_client.response_deserialize(
124
+ response_data=response_data,
125
+ response_types_map=_response_types_map,
126
+ ).data
127
+
128
+ @validate_call
129
+ def create_dremio_instance_with_http_info(
130
+ self,
131
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
132
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
133
+ create_dremio_instance_payload: CreateDremioInstancePayload,
134
+ _request_timeout: Union[
135
+ None,
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[DremioResponse]:
144
+ """create_dremio_instance
145
+
146
+ Creates a new Dremio instance within the project.
147
+
148
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
149
+ :type project_id: UUID
150
+ :param region_id: The STACKIT region name the resource is located in. (required)
151
+ :type region_id: str
152
+ :param create_dremio_instance_payload: (required)
153
+ :type create_dremio_instance_payload: CreateDremioInstancePayload
154
+ :param _request_timeout: timeout setting for this request. If one
155
+ number provided, it will be total request
156
+ timeout. It can also be a pair (tuple) of
157
+ (connection, read) timeouts.
158
+ :type _request_timeout: int, tuple(int, int), optional
159
+ :param _request_auth: set to override the auth_settings for an a single
160
+ request; this effectively ignores the
161
+ authentication in the spec for a single request.
162
+ :type _request_auth: dict, optional
163
+ :param _content_type: force content-type for the request.
164
+ :type _content_type: str, Optional
165
+ :param _headers: set to override the headers for a single
166
+ request; this effectively ignores the headers
167
+ in the spec for a single request.
168
+ :type _headers: dict, optional
169
+ :param _host_index: set to override the host_index for a single
170
+ request; this effectively ignores the host_index
171
+ in the spec for a single request.
172
+ :type _host_index: int, optional
173
+ :return: Returns the result object.
174
+ """ # noqa: E501
175
+
176
+ _param = self._create_dremio_instance_serialize(
177
+ project_id=project_id,
178
+ region_id=region_id,
179
+ create_dremio_instance_payload=create_dremio_instance_payload,
180
+ _request_auth=_request_auth,
181
+ _content_type=_content_type,
182
+ _headers=_headers,
183
+ _host_index=_host_index,
184
+ )
185
+
186
+ _response_types_map: Dict[str, Optional[str]] = {
187
+ "202": "DremioResponse",
188
+ "400": "Error",
189
+ "401": "Error",
190
+ "409": None,
191
+ "500": None,
192
+ }
193
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
194
+ response_data.read()
195
+ return self.api_client.response_deserialize(
196
+ response_data=response_data,
197
+ response_types_map=_response_types_map,
198
+ )
199
+
200
+ @validate_call
201
+ def create_dremio_instance_without_preload_content(
202
+ self,
203
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
204
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
205
+ create_dremio_instance_payload: CreateDremioInstancePayload,
206
+ _request_timeout: Union[
207
+ None,
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
210
+ ] = None,
211
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
212
+ _content_type: Optional[StrictStr] = None,
213
+ _headers: Optional[Dict[StrictStr, Any]] = None,
214
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
215
+ ) -> RESTResponseType:
216
+ """create_dremio_instance
217
+
218
+ Creates a new Dremio instance within the project.
219
+
220
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
221
+ :type project_id: UUID
222
+ :param region_id: The STACKIT region name the resource is located in. (required)
223
+ :type region_id: str
224
+ :param create_dremio_instance_payload: (required)
225
+ :type create_dremio_instance_payload: CreateDremioInstancePayload
226
+ :param _request_timeout: timeout setting for this request. If one
227
+ number provided, it will be total request
228
+ timeout. It can also be a pair (tuple) of
229
+ (connection, read) timeouts.
230
+ :type _request_timeout: int, tuple(int, int), optional
231
+ :param _request_auth: set to override the auth_settings for an a single
232
+ request; this effectively ignores the
233
+ authentication in the spec for a single request.
234
+ :type _request_auth: dict, optional
235
+ :param _content_type: force content-type for the request.
236
+ :type _content_type: str, Optional
237
+ :param _headers: set to override the headers for a single
238
+ request; this effectively ignores the headers
239
+ in the spec for a single request.
240
+ :type _headers: dict, optional
241
+ :param _host_index: set to override the host_index for a single
242
+ request; this effectively ignores the host_index
243
+ in the spec for a single request.
244
+ :type _host_index: int, optional
245
+ :return: Returns the result object.
246
+ """ # noqa: E501
247
+
248
+ _param = self._create_dremio_instance_serialize(
249
+ project_id=project_id,
250
+ region_id=region_id,
251
+ create_dremio_instance_payload=create_dremio_instance_payload,
252
+ _request_auth=_request_auth,
253
+ _content_type=_content_type,
254
+ _headers=_headers,
255
+ _host_index=_host_index,
256
+ )
257
+
258
+ _response_types_map: Dict[str, Optional[str]] = {
259
+ "202": "DremioResponse",
260
+ "400": "Error",
261
+ "401": "Error",
262
+ "409": None,
263
+ "500": None,
264
+ }
265
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
266
+ return response_data.response
267
+
268
+ def _create_dremio_instance_serialize(
269
+ self,
270
+ project_id,
271
+ region_id,
272
+ create_dremio_instance_payload,
273
+ _request_auth,
274
+ _content_type,
275
+ _headers,
276
+ _host_index,
277
+ ) -> RequestSerialized:
278
+
279
+ _host = None
280
+
281
+ _collection_formats: Dict[str, str] = {}
282
+
283
+ _path_params: Dict[str, str] = {}
284
+ _query_params: List[Tuple[str, str]] = []
285
+ _header_params: Dict[str, Optional[str]] = _headers or {}
286
+ _form_params: List[Tuple[str, str]] = []
287
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
288
+ _body_params: Optional[bytes] = None
289
+
290
+ # process the path parameters
291
+ if project_id is not None:
292
+ _path_params["projectId"] = project_id
293
+ if region_id is not None:
294
+ _path_params["regionId"] = region_id
295
+ # process the query parameters
296
+ # process the header parameters
297
+ # process the form parameters
298
+ # process the body parameter
299
+ if create_dremio_instance_payload is not None:
300
+ _body_params = create_dremio_instance_payload
301
+
302
+ # set the HTTP header `Accept`
303
+ if "Accept" not in _header_params:
304
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
305
+
306
+ # set the HTTP header `Content-Type`
307
+ if _content_type:
308
+ _header_params["Content-Type"] = _content_type
309
+ else:
310
+ _default_content_type = self.api_client.select_header_content_type(["application/json"])
311
+ if _default_content_type is not None:
312
+ _header_params["Content-Type"] = _default_content_type
313
+
314
+ # authentication setting
315
+ _auth_settings: List[str] = []
316
+
317
+ return self.api_client.param_serialize(
318
+ method="POST",
319
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios",
320
+ path_params=_path_params,
321
+ query_params=_query_params,
322
+ header_params=_header_params,
323
+ body=_body_params,
324
+ post_params=_form_params,
325
+ files=_files,
326
+ auth_settings=_auth_settings,
327
+ collection_formats=_collection_formats,
328
+ _host=_host,
329
+ _request_auth=_request_auth,
330
+ )
331
+
332
+ @validate_call
333
+ def create_dremio_user(
334
+ self,
335
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
336
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
337
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
338
+ create_dremio_user_payload: CreateDremioUserPayload,
339
+ _request_timeout: Union[
340
+ None,
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
343
+ ] = None,
344
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
345
+ _content_type: Optional[StrictStr] = None,
346
+ _headers: Optional[Dict[StrictStr, Any]] = None,
347
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
+ ) -> DremioUserResponse:
349
+ """create_dremio_user
350
+
351
+ Creates a new Dremio admin user for the given Dremio instance.
352
+
353
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
354
+ :type project_id: UUID
355
+ :param region_id: The STACKIT region name the resource is located in. (required)
356
+ :type region_id: str
357
+ :param dremio_id: The Dremio instance UUID. (required)
358
+ :type dremio_id: UUID
359
+ :param create_dremio_user_payload: (required)
360
+ :type create_dremio_user_payload: CreateDremioUserPayload
361
+ :param _request_timeout: timeout setting for this request. If one
362
+ number provided, it will be total request
363
+ timeout. It can also be a pair (tuple) of
364
+ (connection, read) timeouts.
365
+ :type _request_timeout: int, tuple(int, int), optional
366
+ :param _request_auth: set to override the auth_settings for an a single
367
+ request; this effectively ignores the
368
+ authentication in the spec for a single request.
369
+ :type _request_auth: dict, optional
370
+ :param _content_type: force content-type for the request.
371
+ :type _content_type: str, Optional
372
+ :param _headers: set to override the headers for a single
373
+ request; this effectively ignores the headers
374
+ in the spec for a single request.
375
+ :type _headers: dict, optional
376
+ :param _host_index: set to override the host_index for a single
377
+ request; this effectively ignores the host_index
378
+ in the spec for a single request.
379
+ :type _host_index: int, optional
380
+ :return: Returns the result object.
381
+ """ # noqa: E501
382
+
383
+ _param = self._create_dremio_user_serialize(
384
+ project_id=project_id,
385
+ region_id=region_id,
386
+ dremio_id=dremio_id,
387
+ create_dremio_user_payload=create_dremio_user_payload,
388
+ _request_auth=_request_auth,
389
+ _content_type=_content_type,
390
+ _headers=_headers,
391
+ _host_index=_host_index,
392
+ )
393
+
394
+ _response_types_map: Dict[str, Optional[str]] = {
395
+ "202": "DremioUserResponse",
396
+ "400": "Error",
397
+ "401": "Error",
398
+ "409": None,
399
+ "500": None,
400
+ }
401
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
402
+ response_data.read()
403
+ return self.api_client.response_deserialize(
404
+ response_data=response_data,
405
+ response_types_map=_response_types_map,
406
+ ).data
407
+
408
+ @validate_call
409
+ def create_dremio_user_with_http_info(
410
+ self,
411
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
412
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
413
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
414
+ create_dremio_user_payload: CreateDremioUserPayload,
415
+ _request_timeout: Union[
416
+ None,
417
+ Annotated[StrictFloat, Field(gt=0)],
418
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
419
+ ] = None,
420
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
421
+ _content_type: Optional[StrictStr] = None,
422
+ _headers: Optional[Dict[StrictStr, Any]] = None,
423
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424
+ ) -> ApiResponse[DremioUserResponse]:
425
+ """create_dremio_user
426
+
427
+ Creates a new Dremio admin user for the given Dremio instance.
428
+
429
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
430
+ :type project_id: UUID
431
+ :param region_id: The STACKIT region name the resource is located in. (required)
432
+ :type region_id: str
433
+ :param dremio_id: The Dremio instance UUID. (required)
434
+ :type dremio_id: UUID
435
+ :param create_dremio_user_payload: (required)
436
+ :type create_dremio_user_payload: CreateDremioUserPayload
437
+ :param _request_timeout: timeout setting for this request. If one
438
+ number provided, it will be total request
439
+ timeout. It can also be a pair (tuple) of
440
+ (connection, read) timeouts.
441
+ :type _request_timeout: int, tuple(int, int), optional
442
+ :param _request_auth: set to override the auth_settings for an a single
443
+ request; this effectively ignores the
444
+ authentication in the spec for a single request.
445
+ :type _request_auth: dict, optional
446
+ :param _content_type: force content-type for the request.
447
+ :type _content_type: str, Optional
448
+ :param _headers: set to override the headers for a single
449
+ request; this effectively ignores the headers
450
+ in the spec for a single request.
451
+ :type _headers: dict, optional
452
+ :param _host_index: set to override the host_index for a single
453
+ request; this effectively ignores the host_index
454
+ in the spec for a single request.
455
+ :type _host_index: int, optional
456
+ :return: Returns the result object.
457
+ """ # noqa: E501
458
+
459
+ _param = self._create_dremio_user_serialize(
460
+ project_id=project_id,
461
+ region_id=region_id,
462
+ dremio_id=dremio_id,
463
+ create_dremio_user_payload=create_dremio_user_payload,
464
+ _request_auth=_request_auth,
465
+ _content_type=_content_type,
466
+ _headers=_headers,
467
+ _host_index=_host_index,
468
+ )
469
+
470
+ _response_types_map: Dict[str, Optional[str]] = {
471
+ "202": "DremioUserResponse",
472
+ "400": "Error",
473
+ "401": "Error",
474
+ "409": None,
475
+ "500": None,
476
+ }
477
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
478
+ response_data.read()
479
+ return self.api_client.response_deserialize(
480
+ response_data=response_data,
481
+ response_types_map=_response_types_map,
482
+ )
483
+
484
+ @validate_call
485
+ def create_dremio_user_without_preload_content(
486
+ self,
487
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
488
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
489
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
490
+ create_dremio_user_payload: CreateDremioUserPayload,
491
+ _request_timeout: Union[
492
+ None,
493
+ Annotated[StrictFloat, Field(gt=0)],
494
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
495
+ ] = None,
496
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
497
+ _content_type: Optional[StrictStr] = None,
498
+ _headers: Optional[Dict[StrictStr, Any]] = None,
499
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
500
+ ) -> RESTResponseType:
501
+ """create_dremio_user
502
+
503
+ Creates a new Dremio admin user for the given Dremio instance.
504
+
505
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
506
+ :type project_id: UUID
507
+ :param region_id: The STACKIT region name the resource is located in. (required)
508
+ :type region_id: str
509
+ :param dremio_id: The Dremio instance UUID. (required)
510
+ :type dremio_id: UUID
511
+ :param create_dremio_user_payload: (required)
512
+ :type create_dremio_user_payload: CreateDremioUserPayload
513
+ :param _request_timeout: timeout setting for this request. If one
514
+ number provided, it will be total request
515
+ timeout. It can also be a pair (tuple) of
516
+ (connection, read) timeouts.
517
+ :type _request_timeout: int, tuple(int, int), optional
518
+ :param _request_auth: set to override the auth_settings for an a single
519
+ request; this effectively ignores the
520
+ authentication in the spec for a single request.
521
+ :type _request_auth: dict, optional
522
+ :param _content_type: force content-type for the request.
523
+ :type _content_type: str, Optional
524
+ :param _headers: set to override the headers for a single
525
+ request; this effectively ignores the headers
526
+ in the spec for a single request.
527
+ :type _headers: dict, optional
528
+ :param _host_index: set to override the host_index for a single
529
+ request; this effectively ignores the host_index
530
+ in the spec for a single request.
531
+ :type _host_index: int, optional
532
+ :return: Returns the result object.
533
+ """ # noqa: E501
534
+
535
+ _param = self._create_dremio_user_serialize(
536
+ project_id=project_id,
537
+ region_id=region_id,
538
+ dremio_id=dremio_id,
539
+ create_dremio_user_payload=create_dremio_user_payload,
540
+ _request_auth=_request_auth,
541
+ _content_type=_content_type,
542
+ _headers=_headers,
543
+ _host_index=_host_index,
544
+ )
545
+
546
+ _response_types_map: Dict[str, Optional[str]] = {
547
+ "202": "DremioUserResponse",
548
+ "400": "Error",
549
+ "401": "Error",
550
+ "409": None,
551
+ "500": None,
552
+ }
553
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
554
+ return response_data.response
555
+
556
+ def _create_dremio_user_serialize(
557
+ self,
558
+ project_id,
559
+ region_id,
560
+ dremio_id,
561
+ create_dremio_user_payload,
562
+ _request_auth,
563
+ _content_type,
564
+ _headers,
565
+ _host_index,
566
+ ) -> RequestSerialized:
567
+
568
+ _host = None
569
+
570
+ _collection_formats: Dict[str, str] = {}
571
+
572
+ _path_params: Dict[str, str] = {}
573
+ _query_params: List[Tuple[str, str]] = []
574
+ _header_params: Dict[str, Optional[str]] = _headers or {}
575
+ _form_params: List[Tuple[str, str]] = []
576
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
577
+ _body_params: Optional[bytes] = None
578
+
579
+ # process the path parameters
580
+ if project_id is not None:
581
+ _path_params["projectId"] = project_id
582
+ if region_id is not None:
583
+ _path_params["regionId"] = region_id
584
+ if dremio_id is not None:
585
+ _path_params["dremioId"] = dremio_id
586
+ # process the query parameters
587
+ # process the header parameters
588
+ # process the form parameters
589
+ # process the body parameter
590
+ if create_dremio_user_payload is not None:
591
+ _body_params = create_dremio_user_payload
592
+
593
+ # set the HTTP header `Accept`
594
+ if "Accept" not in _header_params:
595
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
596
+
597
+ # set the HTTP header `Content-Type`
598
+ if _content_type:
599
+ _header_params["Content-Type"] = _content_type
600
+ else:
601
+ _default_content_type = self.api_client.select_header_content_type(["application/json"])
602
+ if _default_content_type is not None:
603
+ _header_params["Content-Type"] = _default_content_type
604
+
605
+ # authentication setting
606
+ _auth_settings: List[str] = []
607
+
608
+ return self.api_client.param_serialize(
609
+ method="POST",
610
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}/users",
611
+ path_params=_path_params,
612
+ query_params=_query_params,
613
+ header_params=_header_params,
614
+ body=_body_params,
615
+ post_params=_form_params,
616
+ files=_files,
617
+ auth_settings=_auth_settings,
618
+ collection_formats=_collection_formats,
619
+ _host=_host,
620
+ _request_auth=_request_auth,
621
+ )
622
+
623
+ @validate_call
624
+ def delete_dremio_instance(
625
+ self,
626
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
627
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
628
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
629
+ _request_timeout: Union[
630
+ None,
631
+ Annotated[StrictFloat, Field(gt=0)],
632
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
633
+ ] = None,
634
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
635
+ _content_type: Optional[StrictStr] = None,
636
+ _headers: Optional[Dict[StrictStr, Any]] = None,
637
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
638
+ ) -> None:
639
+ """delete_dremio_instance
640
+
641
+ Deletes the given Dremio instance.
642
+
643
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
644
+ :type project_id: UUID
645
+ :param region_id: The STACKIT region name the resource is located in. (required)
646
+ :type region_id: str
647
+ :param dremio_id: The Dremio instance UUID. (required)
648
+ :type dremio_id: UUID
649
+ :param _request_timeout: timeout setting for this request. If one
650
+ number provided, it will be total request
651
+ timeout. It can also be a pair (tuple) of
652
+ (connection, read) timeouts.
653
+ :type _request_timeout: int, tuple(int, int), optional
654
+ :param _request_auth: set to override the auth_settings for an a single
655
+ request; this effectively ignores the
656
+ authentication in the spec for a single request.
657
+ :type _request_auth: dict, optional
658
+ :param _content_type: force content-type for the request.
659
+ :type _content_type: str, Optional
660
+ :param _headers: set to override the headers for a single
661
+ request; this effectively ignores the headers
662
+ in the spec for a single request.
663
+ :type _headers: dict, optional
664
+ :param _host_index: set to override the host_index for a single
665
+ request; this effectively ignores the host_index
666
+ in the spec for a single request.
667
+ :type _host_index: int, optional
668
+ :return: Returns the result object.
669
+ """ # noqa: E501
670
+
671
+ _param = self._delete_dremio_instance_serialize(
672
+ project_id=project_id,
673
+ region_id=region_id,
674
+ dremio_id=dremio_id,
675
+ _request_auth=_request_auth,
676
+ _content_type=_content_type,
677
+ _headers=_headers,
678
+ _host_index=_host_index,
679
+ )
680
+
681
+ _response_types_map: Dict[str, Optional[str]] = {
682
+ "202": None,
683
+ "400": "Error",
684
+ "401": "Error",
685
+ "404": None,
686
+ "409": None,
687
+ "500": None,
688
+ }
689
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
690
+ response_data.read()
691
+ return self.api_client.response_deserialize(
692
+ response_data=response_data,
693
+ response_types_map=_response_types_map,
694
+ ).data
695
+
696
+ @validate_call
697
+ def delete_dremio_instance_with_http_info(
698
+ self,
699
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
700
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
701
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
702
+ _request_timeout: Union[
703
+ None,
704
+ Annotated[StrictFloat, Field(gt=0)],
705
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
706
+ ] = None,
707
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
708
+ _content_type: Optional[StrictStr] = None,
709
+ _headers: Optional[Dict[StrictStr, Any]] = None,
710
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
711
+ ) -> ApiResponse[None]:
712
+ """delete_dremio_instance
713
+
714
+ Deletes the given Dremio instance.
715
+
716
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
717
+ :type project_id: UUID
718
+ :param region_id: The STACKIT region name the resource is located in. (required)
719
+ :type region_id: str
720
+ :param dremio_id: The Dremio instance UUID. (required)
721
+ :type dremio_id: UUID
722
+ :param _request_timeout: timeout setting for this request. If one
723
+ number provided, it will be total request
724
+ timeout. It can also be a pair (tuple) of
725
+ (connection, read) timeouts.
726
+ :type _request_timeout: int, tuple(int, int), optional
727
+ :param _request_auth: set to override the auth_settings for an a single
728
+ request; this effectively ignores the
729
+ authentication in the spec for a single request.
730
+ :type _request_auth: dict, optional
731
+ :param _content_type: force content-type for the request.
732
+ :type _content_type: str, Optional
733
+ :param _headers: set to override the headers for a single
734
+ request; this effectively ignores the headers
735
+ in the spec for a single request.
736
+ :type _headers: dict, optional
737
+ :param _host_index: set to override the host_index for a single
738
+ request; this effectively ignores the host_index
739
+ in the spec for a single request.
740
+ :type _host_index: int, optional
741
+ :return: Returns the result object.
742
+ """ # noqa: E501
743
+
744
+ _param = self._delete_dremio_instance_serialize(
745
+ project_id=project_id,
746
+ region_id=region_id,
747
+ dremio_id=dremio_id,
748
+ _request_auth=_request_auth,
749
+ _content_type=_content_type,
750
+ _headers=_headers,
751
+ _host_index=_host_index,
752
+ )
753
+
754
+ _response_types_map: Dict[str, Optional[str]] = {
755
+ "202": None,
756
+ "400": "Error",
757
+ "401": "Error",
758
+ "404": None,
759
+ "409": None,
760
+ "500": None,
761
+ }
762
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
763
+ response_data.read()
764
+ return self.api_client.response_deserialize(
765
+ response_data=response_data,
766
+ response_types_map=_response_types_map,
767
+ )
768
+
769
+ @validate_call
770
+ def delete_dremio_instance_without_preload_content(
771
+ self,
772
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
773
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
774
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
775
+ _request_timeout: Union[
776
+ None,
777
+ Annotated[StrictFloat, Field(gt=0)],
778
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
779
+ ] = None,
780
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
781
+ _content_type: Optional[StrictStr] = None,
782
+ _headers: Optional[Dict[StrictStr, Any]] = None,
783
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
784
+ ) -> RESTResponseType:
785
+ """delete_dremio_instance
786
+
787
+ Deletes the given Dremio instance.
788
+
789
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
790
+ :type project_id: UUID
791
+ :param region_id: The STACKIT region name the resource is located in. (required)
792
+ :type region_id: str
793
+ :param dremio_id: The Dremio instance UUID. (required)
794
+ :type dremio_id: UUID
795
+ :param _request_timeout: timeout setting for this request. If one
796
+ number provided, it will be total request
797
+ timeout. It can also be a pair (tuple) of
798
+ (connection, read) timeouts.
799
+ :type _request_timeout: int, tuple(int, int), optional
800
+ :param _request_auth: set to override the auth_settings for an a single
801
+ request; this effectively ignores the
802
+ authentication in the spec for a single request.
803
+ :type _request_auth: dict, optional
804
+ :param _content_type: force content-type for the request.
805
+ :type _content_type: str, Optional
806
+ :param _headers: set to override the headers for a single
807
+ request; this effectively ignores the headers
808
+ in the spec for a single request.
809
+ :type _headers: dict, optional
810
+ :param _host_index: set to override the host_index for a single
811
+ request; this effectively ignores the host_index
812
+ in the spec for a single request.
813
+ :type _host_index: int, optional
814
+ :return: Returns the result object.
815
+ """ # noqa: E501
816
+
817
+ _param = self._delete_dremio_instance_serialize(
818
+ project_id=project_id,
819
+ region_id=region_id,
820
+ dremio_id=dremio_id,
821
+ _request_auth=_request_auth,
822
+ _content_type=_content_type,
823
+ _headers=_headers,
824
+ _host_index=_host_index,
825
+ )
826
+
827
+ _response_types_map: Dict[str, Optional[str]] = {
828
+ "202": None,
829
+ "400": "Error",
830
+ "401": "Error",
831
+ "404": None,
832
+ "409": None,
833
+ "500": None,
834
+ }
835
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
836
+ return response_data.response
837
+
838
+ def _delete_dremio_instance_serialize(
839
+ self,
840
+ project_id,
841
+ region_id,
842
+ dremio_id,
843
+ _request_auth,
844
+ _content_type,
845
+ _headers,
846
+ _host_index,
847
+ ) -> RequestSerialized:
848
+
849
+ _host = None
850
+
851
+ _collection_formats: Dict[str, str] = {}
852
+
853
+ _path_params: Dict[str, str] = {}
854
+ _query_params: List[Tuple[str, str]] = []
855
+ _header_params: Dict[str, Optional[str]] = _headers or {}
856
+ _form_params: List[Tuple[str, str]] = []
857
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
858
+ _body_params: Optional[bytes] = None
859
+
860
+ # process the path parameters
861
+ if project_id is not None:
862
+ _path_params["projectId"] = project_id
863
+ if region_id is not None:
864
+ _path_params["regionId"] = region_id
865
+ if dremio_id is not None:
866
+ _path_params["dremioId"] = dremio_id
867
+ # process the query parameters
868
+ # process the header parameters
869
+ # process the form parameters
870
+ # process the body parameter
871
+
872
+ # set the HTTP header `Accept`
873
+ if "Accept" not in _header_params:
874
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
875
+
876
+ # authentication setting
877
+ _auth_settings: List[str] = []
878
+
879
+ return self.api_client.param_serialize(
880
+ method="DELETE",
881
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}",
882
+ path_params=_path_params,
883
+ query_params=_query_params,
884
+ header_params=_header_params,
885
+ body=_body_params,
886
+ post_params=_form_params,
887
+ files=_files,
888
+ auth_settings=_auth_settings,
889
+ collection_formats=_collection_formats,
890
+ _host=_host,
891
+ _request_auth=_request_auth,
892
+ )
893
+
894
+ @validate_call
895
+ def delete_dremio_user(
896
+ self,
897
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
898
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
899
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
900
+ dremio_user_id: Annotated[UUID, Field(description="The Dremio user UUID.")],
901
+ _request_timeout: Union[
902
+ None,
903
+ Annotated[StrictFloat, Field(gt=0)],
904
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
905
+ ] = None,
906
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
907
+ _content_type: Optional[StrictStr] = None,
908
+ _headers: Optional[Dict[StrictStr, Any]] = None,
909
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
910
+ ) -> None:
911
+ """delete_dremio_user
912
+
913
+ Deletes the given dremio admin user.
914
+
915
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
916
+ :type project_id: UUID
917
+ :param region_id: The STACKIT region name the resource is located in. (required)
918
+ :type region_id: str
919
+ :param dremio_id: The Dremio instance UUID. (required)
920
+ :type dremio_id: UUID
921
+ :param dremio_user_id: The Dremio user UUID. (required)
922
+ :type dremio_user_id: UUID
923
+ :param _request_timeout: timeout setting for this request. If one
924
+ number provided, it will be total request
925
+ timeout. It can also be a pair (tuple) of
926
+ (connection, read) timeouts.
927
+ :type _request_timeout: int, tuple(int, int), optional
928
+ :param _request_auth: set to override the auth_settings for an a single
929
+ request; this effectively ignores the
930
+ authentication in the spec for a single request.
931
+ :type _request_auth: dict, optional
932
+ :param _content_type: force content-type for the request.
933
+ :type _content_type: str, Optional
934
+ :param _headers: set to override the headers for a single
935
+ request; this effectively ignores the headers
936
+ in the spec for a single request.
937
+ :type _headers: dict, optional
938
+ :param _host_index: set to override the host_index for a single
939
+ request; this effectively ignores the host_index
940
+ in the spec for a single request.
941
+ :type _host_index: int, optional
942
+ :return: Returns the result object.
943
+ """ # noqa: E501
944
+
945
+ _param = self._delete_dremio_user_serialize(
946
+ project_id=project_id,
947
+ region_id=region_id,
948
+ dremio_id=dremio_id,
949
+ dremio_user_id=dremio_user_id,
950
+ _request_auth=_request_auth,
951
+ _content_type=_content_type,
952
+ _headers=_headers,
953
+ _host_index=_host_index,
954
+ )
955
+
956
+ _response_types_map: Dict[str, Optional[str]] = {
957
+ "202": None,
958
+ "400": "Error",
959
+ "401": "Error",
960
+ "404": None,
961
+ "409": None,
962
+ "500": None,
963
+ }
964
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
965
+ response_data.read()
966
+ return self.api_client.response_deserialize(
967
+ response_data=response_data,
968
+ response_types_map=_response_types_map,
969
+ ).data
970
+
971
+ @validate_call
972
+ def delete_dremio_user_with_http_info(
973
+ self,
974
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
975
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
976
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
977
+ dremio_user_id: Annotated[UUID, Field(description="The Dremio user UUID.")],
978
+ _request_timeout: Union[
979
+ None,
980
+ Annotated[StrictFloat, Field(gt=0)],
981
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
982
+ ] = None,
983
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
984
+ _content_type: Optional[StrictStr] = None,
985
+ _headers: Optional[Dict[StrictStr, Any]] = None,
986
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
987
+ ) -> ApiResponse[None]:
988
+ """delete_dremio_user
989
+
990
+ Deletes the given dremio admin user.
991
+
992
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
993
+ :type project_id: UUID
994
+ :param region_id: The STACKIT region name the resource is located in. (required)
995
+ :type region_id: str
996
+ :param dremio_id: The Dremio instance UUID. (required)
997
+ :type dremio_id: UUID
998
+ :param dremio_user_id: The Dremio user UUID. (required)
999
+ :type dremio_user_id: UUID
1000
+ :param _request_timeout: timeout setting for this request. If one
1001
+ number provided, it will be total request
1002
+ timeout. It can also be a pair (tuple) of
1003
+ (connection, read) timeouts.
1004
+ :type _request_timeout: int, tuple(int, int), optional
1005
+ :param _request_auth: set to override the auth_settings for an a single
1006
+ request; this effectively ignores the
1007
+ authentication in the spec for a single request.
1008
+ :type _request_auth: dict, optional
1009
+ :param _content_type: force content-type for the request.
1010
+ :type _content_type: str, Optional
1011
+ :param _headers: set to override the headers for a single
1012
+ request; this effectively ignores the headers
1013
+ in the spec for a single request.
1014
+ :type _headers: dict, optional
1015
+ :param _host_index: set to override the host_index for a single
1016
+ request; this effectively ignores the host_index
1017
+ in the spec for a single request.
1018
+ :type _host_index: int, optional
1019
+ :return: Returns the result object.
1020
+ """ # noqa: E501
1021
+
1022
+ _param = self._delete_dremio_user_serialize(
1023
+ project_id=project_id,
1024
+ region_id=region_id,
1025
+ dremio_id=dremio_id,
1026
+ dremio_user_id=dremio_user_id,
1027
+ _request_auth=_request_auth,
1028
+ _content_type=_content_type,
1029
+ _headers=_headers,
1030
+ _host_index=_host_index,
1031
+ )
1032
+
1033
+ _response_types_map: Dict[str, Optional[str]] = {
1034
+ "202": None,
1035
+ "400": "Error",
1036
+ "401": "Error",
1037
+ "404": None,
1038
+ "409": None,
1039
+ "500": None,
1040
+ }
1041
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1042
+ response_data.read()
1043
+ return self.api_client.response_deserialize(
1044
+ response_data=response_data,
1045
+ response_types_map=_response_types_map,
1046
+ )
1047
+
1048
+ @validate_call
1049
+ def delete_dremio_user_without_preload_content(
1050
+ self,
1051
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1052
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1053
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1054
+ dremio_user_id: Annotated[UUID, Field(description="The Dremio user UUID.")],
1055
+ _request_timeout: Union[
1056
+ None,
1057
+ Annotated[StrictFloat, Field(gt=0)],
1058
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1059
+ ] = None,
1060
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1061
+ _content_type: Optional[StrictStr] = None,
1062
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1063
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1064
+ ) -> RESTResponseType:
1065
+ """delete_dremio_user
1066
+
1067
+ Deletes the given dremio admin user.
1068
+
1069
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1070
+ :type project_id: UUID
1071
+ :param region_id: The STACKIT region name the resource is located in. (required)
1072
+ :type region_id: str
1073
+ :param dremio_id: The Dremio instance UUID. (required)
1074
+ :type dremio_id: UUID
1075
+ :param dremio_user_id: The Dremio user UUID. (required)
1076
+ :type dremio_user_id: UUID
1077
+ :param _request_timeout: timeout setting for this request. If one
1078
+ number provided, it will be total request
1079
+ timeout. It can also be a pair (tuple) of
1080
+ (connection, read) timeouts.
1081
+ :type _request_timeout: int, tuple(int, int), optional
1082
+ :param _request_auth: set to override the auth_settings for an a single
1083
+ request; this effectively ignores the
1084
+ authentication in the spec for a single request.
1085
+ :type _request_auth: dict, optional
1086
+ :param _content_type: force content-type for the request.
1087
+ :type _content_type: str, Optional
1088
+ :param _headers: set to override the headers for a single
1089
+ request; this effectively ignores the headers
1090
+ in the spec for a single request.
1091
+ :type _headers: dict, optional
1092
+ :param _host_index: set to override the host_index for a single
1093
+ request; this effectively ignores the host_index
1094
+ in the spec for a single request.
1095
+ :type _host_index: int, optional
1096
+ :return: Returns the result object.
1097
+ """ # noqa: E501
1098
+
1099
+ _param = self._delete_dremio_user_serialize(
1100
+ project_id=project_id,
1101
+ region_id=region_id,
1102
+ dremio_id=dremio_id,
1103
+ dremio_user_id=dremio_user_id,
1104
+ _request_auth=_request_auth,
1105
+ _content_type=_content_type,
1106
+ _headers=_headers,
1107
+ _host_index=_host_index,
1108
+ )
1109
+
1110
+ _response_types_map: Dict[str, Optional[str]] = {
1111
+ "202": None,
1112
+ "400": "Error",
1113
+ "401": "Error",
1114
+ "404": None,
1115
+ "409": None,
1116
+ "500": None,
1117
+ }
1118
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1119
+ return response_data.response
1120
+
1121
+ def _delete_dremio_user_serialize(
1122
+ self,
1123
+ project_id,
1124
+ region_id,
1125
+ dremio_id,
1126
+ dremio_user_id,
1127
+ _request_auth,
1128
+ _content_type,
1129
+ _headers,
1130
+ _host_index,
1131
+ ) -> RequestSerialized:
1132
+
1133
+ _host = None
1134
+
1135
+ _collection_formats: Dict[str, str] = {}
1136
+
1137
+ _path_params: Dict[str, str] = {}
1138
+ _query_params: List[Tuple[str, str]] = []
1139
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1140
+ _form_params: List[Tuple[str, str]] = []
1141
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1142
+ _body_params: Optional[bytes] = None
1143
+
1144
+ # process the path parameters
1145
+ if project_id is not None:
1146
+ _path_params["projectId"] = project_id
1147
+ if region_id is not None:
1148
+ _path_params["regionId"] = region_id
1149
+ if dremio_id is not None:
1150
+ _path_params["dremioId"] = dremio_id
1151
+ if dremio_user_id is not None:
1152
+ _path_params["dremioUserId"] = dremio_user_id
1153
+ # process the query parameters
1154
+ # process the header parameters
1155
+ # process the form parameters
1156
+ # process the body parameter
1157
+
1158
+ # set the HTTP header `Accept`
1159
+ if "Accept" not in _header_params:
1160
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1161
+
1162
+ # authentication setting
1163
+ _auth_settings: List[str] = []
1164
+
1165
+ return self.api_client.param_serialize(
1166
+ method="DELETE",
1167
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}/users/{dremioUserId}",
1168
+ path_params=_path_params,
1169
+ query_params=_query_params,
1170
+ header_params=_header_params,
1171
+ body=_body_params,
1172
+ post_params=_form_params,
1173
+ files=_files,
1174
+ auth_settings=_auth_settings,
1175
+ collection_formats=_collection_formats,
1176
+ _host=_host,
1177
+ _request_auth=_request_auth,
1178
+ )
1179
+
1180
+ @validate_call
1181
+ def get_dremio_instance(
1182
+ self,
1183
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1184
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1185
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1186
+ _request_timeout: Union[
1187
+ None,
1188
+ Annotated[StrictFloat, Field(gt=0)],
1189
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1190
+ ] = None,
1191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1192
+ _content_type: Optional[StrictStr] = None,
1193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1195
+ ) -> DremioResponse:
1196
+ """get_dremio_instance
1197
+
1198
+ Returns the details for the given Dremio instance.
1199
+
1200
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1201
+ :type project_id: UUID
1202
+ :param region_id: The STACKIT region name the resource is located in. (required)
1203
+ :type region_id: str
1204
+ :param dremio_id: The Dremio instance UUID. (required)
1205
+ :type dremio_id: UUID
1206
+ :param _request_timeout: timeout setting for this request. If one
1207
+ number provided, it will be total request
1208
+ timeout. It can also be a pair (tuple) of
1209
+ (connection, read) timeouts.
1210
+ :type _request_timeout: int, tuple(int, int), optional
1211
+ :param _request_auth: set to override the auth_settings for an a single
1212
+ request; this effectively ignores the
1213
+ authentication in the spec for a single request.
1214
+ :type _request_auth: dict, optional
1215
+ :param _content_type: force content-type for the request.
1216
+ :type _content_type: str, Optional
1217
+ :param _headers: set to override the headers for a single
1218
+ request; this effectively ignores the headers
1219
+ in the spec for a single request.
1220
+ :type _headers: dict, optional
1221
+ :param _host_index: set to override the host_index for a single
1222
+ request; this effectively ignores the host_index
1223
+ in the spec for a single request.
1224
+ :type _host_index: int, optional
1225
+ :return: Returns the result object.
1226
+ """ # noqa: E501
1227
+
1228
+ _param = self._get_dremio_instance_serialize(
1229
+ project_id=project_id,
1230
+ region_id=region_id,
1231
+ dremio_id=dremio_id,
1232
+ _request_auth=_request_auth,
1233
+ _content_type=_content_type,
1234
+ _headers=_headers,
1235
+ _host_index=_host_index,
1236
+ )
1237
+
1238
+ _response_types_map: Dict[str, Optional[str]] = {
1239
+ "200": "DremioResponse",
1240
+ "400": "Error",
1241
+ "401": "Error",
1242
+ "404": None,
1243
+ "500": None,
1244
+ }
1245
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1246
+ response_data.read()
1247
+ return self.api_client.response_deserialize(
1248
+ response_data=response_data,
1249
+ response_types_map=_response_types_map,
1250
+ ).data
1251
+
1252
+ @validate_call
1253
+ def get_dremio_instance_with_http_info(
1254
+ self,
1255
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1256
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1257
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1258
+ _request_timeout: Union[
1259
+ None,
1260
+ Annotated[StrictFloat, Field(gt=0)],
1261
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1262
+ ] = None,
1263
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1264
+ _content_type: Optional[StrictStr] = None,
1265
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1266
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1267
+ ) -> ApiResponse[DremioResponse]:
1268
+ """get_dremio_instance
1269
+
1270
+ Returns the details for the given Dremio instance.
1271
+
1272
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1273
+ :type project_id: UUID
1274
+ :param region_id: The STACKIT region name the resource is located in. (required)
1275
+ :type region_id: str
1276
+ :param dremio_id: The Dremio instance UUID. (required)
1277
+ :type dremio_id: UUID
1278
+ :param _request_timeout: timeout setting for this request. If one
1279
+ number provided, it will be total request
1280
+ timeout. It can also be a pair (tuple) of
1281
+ (connection, read) timeouts.
1282
+ :type _request_timeout: int, tuple(int, int), optional
1283
+ :param _request_auth: set to override the auth_settings for an a single
1284
+ request; this effectively ignores the
1285
+ authentication in the spec for a single request.
1286
+ :type _request_auth: dict, optional
1287
+ :param _content_type: force content-type for the request.
1288
+ :type _content_type: str, Optional
1289
+ :param _headers: set to override the headers for a single
1290
+ request; this effectively ignores the headers
1291
+ in the spec for a single request.
1292
+ :type _headers: dict, optional
1293
+ :param _host_index: set to override the host_index for a single
1294
+ request; this effectively ignores the host_index
1295
+ in the spec for a single request.
1296
+ :type _host_index: int, optional
1297
+ :return: Returns the result object.
1298
+ """ # noqa: E501
1299
+
1300
+ _param = self._get_dremio_instance_serialize(
1301
+ project_id=project_id,
1302
+ region_id=region_id,
1303
+ dremio_id=dremio_id,
1304
+ _request_auth=_request_auth,
1305
+ _content_type=_content_type,
1306
+ _headers=_headers,
1307
+ _host_index=_host_index,
1308
+ )
1309
+
1310
+ _response_types_map: Dict[str, Optional[str]] = {
1311
+ "200": "DremioResponse",
1312
+ "400": "Error",
1313
+ "401": "Error",
1314
+ "404": None,
1315
+ "500": None,
1316
+ }
1317
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1318
+ response_data.read()
1319
+ return self.api_client.response_deserialize(
1320
+ response_data=response_data,
1321
+ response_types_map=_response_types_map,
1322
+ )
1323
+
1324
+ @validate_call
1325
+ def get_dremio_instance_without_preload_content(
1326
+ self,
1327
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1328
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1329
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1330
+ _request_timeout: Union[
1331
+ None,
1332
+ Annotated[StrictFloat, Field(gt=0)],
1333
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1334
+ ] = None,
1335
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1336
+ _content_type: Optional[StrictStr] = None,
1337
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1338
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1339
+ ) -> RESTResponseType:
1340
+ """get_dremio_instance
1341
+
1342
+ Returns the details for the given Dremio instance.
1343
+
1344
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1345
+ :type project_id: UUID
1346
+ :param region_id: The STACKIT region name the resource is located in. (required)
1347
+ :type region_id: str
1348
+ :param dremio_id: The Dremio instance UUID. (required)
1349
+ :type dremio_id: UUID
1350
+ :param _request_timeout: timeout setting for this request. If one
1351
+ number provided, it will be total request
1352
+ timeout. It can also be a pair (tuple) of
1353
+ (connection, read) timeouts.
1354
+ :type _request_timeout: int, tuple(int, int), optional
1355
+ :param _request_auth: set to override the auth_settings for an a single
1356
+ request; this effectively ignores the
1357
+ authentication in the spec for a single request.
1358
+ :type _request_auth: dict, optional
1359
+ :param _content_type: force content-type for the request.
1360
+ :type _content_type: str, Optional
1361
+ :param _headers: set to override the headers for a single
1362
+ request; this effectively ignores the headers
1363
+ in the spec for a single request.
1364
+ :type _headers: dict, optional
1365
+ :param _host_index: set to override the host_index for a single
1366
+ request; this effectively ignores the host_index
1367
+ in the spec for a single request.
1368
+ :type _host_index: int, optional
1369
+ :return: Returns the result object.
1370
+ """ # noqa: E501
1371
+
1372
+ _param = self._get_dremio_instance_serialize(
1373
+ project_id=project_id,
1374
+ region_id=region_id,
1375
+ dremio_id=dremio_id,
1376
+ _request_auth=_request_auth,
1377
+ _content_type=_content_type,
1378
+ _headers=_headers,
1379
+ _host_index=_host_index,
1380
+ )
1381
+
1382
+ _response_types_map: Dict[str, Optional[str]] = {
1383
+ "200": "DremioResponse",
1384
+ "400": "Error",
1385
+ "401": "Error",
1386
+ "404": None,
1387
+ "500": None,
1388
+ }
1389
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1390
+ return response_data.response
1391
+
1392
+ def _get_dremio_instance_serialize(
1393
+ self,
1394
+ project_id,
1395
+ region_id,
1396
+ dremio_id,
1397
+ _request_auth,
1398
+ _content_type,
1399
+ _headers,
1400
+ _host_index,
1401
+ ) -> RequestSerialized:
1402
+
1403
+ _host = None
1404
+
1405
+ _collection_formats: Dict[str, str] = {}
1406
+
1407
+ _path_params: Dict[str, str] = {}
1408
+ _query_params: List[Tuple[str, str]] = []
1409
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1410
+ _form_params: List[Tuple[str, str]] = []
1411
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1412
+ _body_params: Optional[bytes] = None
1413
+
1414
+ # process the path parameters
1415
+ if project_id is not None:
1416
+ _path_params["projectId"] = project_id
1417
+ if region_id is not None:
1418
+ _path_params["regionId"] = region_id
1419
+ if dremio_id is not None:
1420
+ _path_params["dremioId"] = dremio_id
1421
+ # process the query parameters
1422
+ # process the header parameters
1423
+ # process the form parameters
1424
+ # process the body parameter
1425
+
1426
+ # set the HTTP header `Accept`
1427
+ if "Accept" not in _header_params:
1428
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1429
+
1430
+ # authentication setting
1431
+ _auth_settings: List[str] = []
1432
+
1433
+ return self.api_client.param_serialize(
1434
+ method="GET",
1435
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}",
1436
+ path_params=_path_params,
1437
+ query_params=_query_params,
1438
+ header_params=_header_params,
1439
+ body=_body_params,
1440
+ post_params=_form_params,
1441
+ files=_files,
1442
+ auth_settings=_auth_settings,
1443
+ collection_formats=_collection_formats,
1444
+ _host=_host,
1445
+ _request_auth=_request_auth,
1446
+ )
1447
+
1448
+ @validate_call
1449
+ def get_dremio_user(
1450
+ self,
1451
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1452
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1453
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1454
+ dremio_user_id: Annotated[UUID, Field(description="The Dremio user UUID.")],
1455
+ _request_timeout: Union[
1456
+ None,
1457
+ Annotated[StrictFloat, Field(gt=0)],
1458
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1459
+ ] = None,
1460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1461
+ _content_type: Optional[StrictStr] = None,
1462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1464
+ ) -> DremioUserResponse:
1465
+ """get_dremio_user
1466
+
1467
+ Returns the details for the given dremio admin user
1468
+
1469
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1470
+ :type project_id: UUID
1471
+ :param region_id: The STACKIT region name the resource is located in. (required)
1472
+ :type region_id: str
1473
+ :param dremio_id: The Dremio instance UUID. (required)
1474
+ :type dremio_id: UUID
1475
+ :param dremio_user_id: The Dremio user UUID. (required)
1476
+ :type dremio_user_id: UUID
1477
+ :param _request_timeout: timeout setting for this request. If one
1478
+ number provided, it will be total request
1479
+ timeout. It can also be a pair (tuple) of
1480
+ (connection, read) timeouts.
1481
+ :type _request_timeout: int, tuple(int, int), optional
1482
+ :param _request_auth: set to override the auth_settings for an a single
1483
+ request; this effectively ignores the
1484
+ authentication in the spec for a single request.
1485
+ :type _request_auth: dict, optional
1486
+ :param _content_type: force content-type for the request.
1487
+ :type _content_type: str, Optional
1488
+ :param _headers: set to override the headers for a single
1489
+ request; this effectively ignores the headers
1490
+ in the spec for a single request.
1491
+ :type _headers: dict, optional
1492
+ :param _host_index: set to override the host_index for a single
1493
+ request; this effectively ignores the host_index
1494
+ in the spec for a single request.
1495
+ :type _host_index: int, optional
1496
+ :return: Returns the result object.
1497
+ """ # noqa: E501
1498
+
1499
+ _param = self._get_dremio_user_serialize(
1500
+ project_id=project_id,
1501
+ region_id=region_id,
1502
+ dremio_id=dremio_id,
1503
+ dremio_user_id=dremio_user_id,
1504
+ _request_auth=_request_auth,
1505
+ _content_type=_content_type,
1506
+ _headers=_headers,
1507
+ _host_index=_host_index,
1508
+ )
1509
+
1510
+ _response_types_map: Dict[str, Optional[str]] = {
1511
+ "200": "DremioUserResponse",
1512
+ "400": "Error",
1513
+ "401": "Error",
1514
+ "404": None,
1515
+ "500": None,
1516
+ }
1517
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1518
+ response_data.read()
1519
+ return self.api_client.response_deserialize(
1520
+ response_data=response_data,
1521
+ response_types_map=_response_types_map,
1522
+ ).data
1523
+
1524
+ @validate_call
1525
+ def get_dremio_user_with_http_info(
1526
+ self,
1527
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1528
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1529
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1530
+ dremio_user_id: Annotated[UUID, Field(description="The Dremio user UUID.")],
1531
+ _request_timeout: Union[
1532
+ None,
1533
+ Annotated[StrictFloat, Field(gt=0)],
1534
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1535
+ ] = None,
1536
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1537
+ _content_type: Optional[StrictStr] = None,
1538
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1539
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1540
+ ) -> ApiResponse[DremioUserResponse]:
1541
+ """get_dremio_user
1542
+
1543
+ Returns the details for the given dremio admin user
1544
+
1545
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1546
+ :type project_id: UUID
1547
+ :param region_id: The STACKIT region name the resource is located in. (required)
1548
+ :type region_id: str
1549
+ :param dremio_id: The Dremio instance UUID. (required)
1550
+ :type dremio_id: UUID
1551
+ :param dremio_user_id: The Dremio user UUID. (required)
1552
+ :type dremio_user_id: UUID
1553
+ :param _request_timeout: timeout setting for this request. If one
1554
+ number provided, it will be total request
1555
+ timeout. It can also be a pair (tuple) of
1556
+ (connection, read) timeouts.
1557
+ :type _request_timeout: int, tuple(int, int), optional
1558
+ :param _request_auth: set to override the auth_settings for an a single
1559
+ request; this effectively ignores the
1560
+ authentication in the spec for a single request.
1561
+ :type _request_auth: dict, optional
1562
+ :param _content_type: force content-type for the request.
1563
+ :type _content_type: str, Optional
1564
+ :param _headers: set to override the headers for a single
1565
+ request; this effectively ignores the headers
1566
+ in the spec for a single request.
1567
+ :type _headers: dict, optional
1568
+ :param _host_index: set to override the host_index for a single
1569
+ request; this effectively ignores the host_index
1570
+ in the spec for a single request.
1571
+ :type _host_index: int, optional
1572
+ :return: Returns the result object.
1573
+ """ # noqa: E501
1574
+
1575
+ _param = self._get_dremio_user_serialize(
1576
+ project_id=project_id,
1577
+ region_id=region_id,
1578
+ dremio_id=dremio_id,
1579
+ dremio_user_id=dremio_user_id,
1580
+ _request_auth=_request_auth,
1581
+ _content_type=_content_type,
1582
+ _headers=_headers,
1583
+ _host_index=_host_index,
1584
+ )
1585
+
1586
+ _response_types_map: Dict[str, Optional[str]] = {
1587
+ "200": "DremioUserResponse",
1588
+ "400": "Error",
1589
+ "401": "Error",
1590
+ "404": None,
1591
+ "500": None,
1592
+ }
1593
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1594
+ response_data.read()
1595
+ return self.api_client.response_deserialize(
1596
+ response_data=response_data,
1597
+ response_types_map=_response_types_map,
1598
+ )
1599
+
1600
+ @validate_call
1601
+ def get_dremio_user_without_preload_content(
1602
+ self,
1603
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1604
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1605
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
1606
+ dremio_user_id: Annotated[UUID, Field(description="The Dremio user UUID.")],
1607
+ _request_timeout: Union[
1608
+ None,
1609
+ Annotated[StrictFloat, Field(gt=0)],
1610
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1611
+ ] = None,
1612
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1613
+ _content_type: Optional[StrictStr] = None,
1614
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1615
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1616
+ ) -> RESTResponseType:
1617
+ """get_dremio_user
1618
+
1619
+ Returns the details for the given dremio admin user
1620
+
1621
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1622
+ :type project_id: UUID
1623
+ :param region_id: The STACKIT region name the resource is located in. (required)
1624
+ :type region_id: str
1625
+ :param dremio_id: The Dremio instance UUID. (required)
1626
+ :type dremio_id: UUID
1627
+ :param dremio_user_id: The Dremio user UUID. (required)
1628
+ :type dremio_user_id: UUID
1629
+ :param _request_timeout: timeout setting for this request. If one
1630
+ number provided, it will be total request
1631
+ timeout. It can also be a pair (tuple) of
1632
+ (connection, read) timeouts.
1633
+ :type _request_timeout: int, tuple(int, int), optional
1634
+ :param _request_auth: set to override the auth_settings for an a single
1635
+ request; this effectively ignores the
1636
+ authentication in the spec for a single request.
1637
+ :type _request_auth: dict, optional
1638
+ :param _content_type: force content-type for the request.
1639
+ :type _content_type: str, Optional
1640
+ :param _headers: set to override the headers for a single
1641
+ request; this effectively ignores the headers
1642
+ in the spec for a single request.
1643
+ :type _headers: dict, optional
1644
+ :param _host_index: set to override the host_index for a single
1645
+ request; this effectively ignores the host_index
1646
+ in the spec for a single request.
1647
+ :type _host_index: int, optional
1648
+ :return: Returns the result object.
1649
+ """ # noqa: E501
1650
+
1651
+ _param = self._get_dremio_user_serialize(
1652
+ project_id=project_id,
1653
+ region_id=region_id,
1654
+ dremio_id=dremio_id,
1655
+ dremio_user_id=dremio_user_id,
1656
+ _request_auth=_request_auth,
1657
+ _content_type=_content_type,
1658
+ _headers=_headers,
1659
+ _host_index=_host_index,
1660
+ )
1661
+
1662
+ _response_types_map: Dict[str, Optional[str]] = {
1663
+ "200": "DremioUserResponse",
1664
+ "400": "Error",
1665
+ "401": "Error",
1666
+ "404": None,
1667
+ "500": None,
1668
+ }
1669
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1670
+ return response_data.response
1671
+
1672
+ def _get_dremio_user_serialize(
1673
+ self,
1674
+ project_id,
1675
+ region_id,
1676
+ dremio_id,
1677
+ dremio_user_id,
1678
+ _request_auth,
1679
+ _content_type,
1680
+ _headers,
1681
+ _host_index,
1682
+ ) -> RequestSerialized:
1683
+
1684
+ _host = None
1685
+
1686
+ _collection_formats: Dict[str, str] = {}
1687
+
1688
+ _path_params: Dict[str, str] = {}
1689
+ _query_params: List[Tuple[str, str]] = []
1690
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1691
+ _form_params: List[Tuple[str, str]] = []
1692
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1693
+ _body_params: Optional[bytes] = None
1694
+
1695
+ # process the path parameters
1696
+ if project_id is not None:
1697
+ _path_params["projectId"] = project_id
1698
+ if region_id is not None:
1699
+ _path_params["regionId"] = region_id
1700
+ if dremio_id is not None:
1701
+ _path_params["dremioId"] = dremio_id
1702
+ if dremio_user_id is not None:
1703
+ _path_params["dremioUserId"] = dremio_user_id
1704
+ # process the query parameters
1705
+ # process the header parameters
1706
+ # process the form parameters
1707
+ # process the body parameter
1708
+
1709
+ # set the HTTP header `Accept`
1710
+ if "Accept" not in _header_params:
1711
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1712
+
1713
+ # authentication setting
1714
+ _auth_settings: List[str] = []
1715
+
1716
+ return self.api_client.param_serialize(
1717
+ method="GET",
1718
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}/users/{dremioUserId}",
1719
+ path_params=_path_params,
1720
+ query_params=_query_params,
1721
+ header_params=_header_params,
1722
+ body=_body_params,
1723
+ post_params=_form_params,
1724
+ files=_files,
1725
+ auth_settings=_auth_settings,
1726
+ collection_formats=_collection_formats,
1727
+ _host=_host,
1728
+ _request_auth=_request_auth,
1729
+ )
1730
+
1731
+ @validate_call
1732
+ def list_dremio_instances(
1733
+ self,
1734
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1735
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1736
+ page_token: Annotated[
1737
+ Optional[Annotated[str, Field(strict=True, max_length=1024)]],
1738
+ Field(description="A token to retrieve the next page of results."),
1739
+ ] = None,
1740
+ page_size: Annotated[
1741
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1742
+ Field(description="Maximum number of items to return."),
1743
+ ] = None,
1744
+ _request_timeout: Union[
1745
+ None,
1746
+ Annotated[StrictFloat, Field(gt=0)],
1747
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1748
+ ] = None,
1749
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1750
+ _content_type: Optional[StrictStr] = None,
1751
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1752
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1753
+ ) -> ListDremiosResponse:
1754
+ """list_dremio_instances
1755
+
1756
+ Returns a list of all Dremio instances within the project.
1757
+
1758
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1759
+ :type project_id: UUID
1760
+ :param region_id: The STACKIT region name the resource is located in. (required)
1761
+ :type region_id: str
1762
+ :param page_token: A token to retrieve the next page of results.
1763
+ :type page_token: str
1764
+ :param page_size: Maximum number of items to return.
1765
+ :type page_size: int
1766
+ :param _request_timeout: timeout setting for this request. If one
1767
+ number provided, it will be total request
1768
+ timeout. It can also be a pair (tuple) of
1769
+ (connection, read) timeouts.
1770
+ :type _request_timeout: int, tuple(int, int), optional
1771
+ :param _request_auth: set to override the auth_settings for an a single
1772
+ request; this effectively ignores the
1773
+ authentication in the spec for a single request.
1774
+ :type _request_auth: dict, optional
1775
+ :param _content_type: force content-type for the request.
1776
+ :type _content_type: str, Optional
1777
+ :param _headers: set to override the headers for a single
1778
+ request; this effectively ignores the headers
1779
+ in the spec for a single request.
1780
+ :type _headers: dict, optional
1781
+ :param _host_index: set to override the host_index for a single
1782
+ request; this effectively ignores the host_index
1783
+ in the spec for a single request.
1784
+ :type _host_index: int, optional
1785
+ :return: Returns the result object.
1786
+ """ # noqa: E501
1787
+
1788
+ _param = self._list_dremio_instances_serialize(
1789
+ project_id=project_id,
1790
+ region_id=region_id,
1791
+ page_token=page_token,
1792
+ page_size=page_size,
1793
+ _request_auth=_request_auth,
1794
+ _content_type=_content_type,
1795
+ _headers=_headers,
1796
+ _host_index=_host_index,
1797
+ )
1798
+
1799
+ _response_types_map: Dict[str, Optional[str]] = {
1800
+ "200": "ListDremiosResponse",
1801
+ "400": "Error",
1802
+ "401": "Error",
1803
+ "500": None,
1804
+ }
1805
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1806
+ response_data.read()
1807
+ return self.api_client.response_deserialize(
1808
+ response_data=response_data,
1809
+ response_types_map=_response_types_map,
1810
+ ).data
1811
+
1812
+ @validate_call
1813
+ def list_dremio_instances_with_http_info(
1814
+ self,
1815
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1816
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1817
+ page_token: Annotated[
1818
+ Optional[Annotated[str, Field(strict=True, max_length=1024)]],
1819
+ Field(description="A token to retrieve the next page of results."),
1820
+ ] = None,
1821
+ page_size: Annotated[
1822
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1823
+ Field(description="Maximum number of items to return."),
1824
+ ] = None,
1825
+ _request_timeout: Union[
1826
+ None,
1827
+ Annotated[StrictFloat, Field(gt=0)],
1828
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1829
+ ] = None,
1830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1831
+ _content_type: Optional[StrictStr] = None,
1832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1834
+ ) -> ApiResponse[ListDremiosResponse]:
1835
+ """list_dremio_instances
1836
+
1837
+ Returns a list of all Dremio instances within the project.
1838
+
1839
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1840
+ :type project_id: UUID
1841
+ :param region_id: The STACKIT region name the resource is located in. (required)
1842
+ :type region_id: str
1843
+ :param page_token: A token to retrieve the next page of results.
1844
+ :type page_token: str
1845
+ :param page_size: Maximum number of items to return.
1846
+ :type page_size: int
1847
+ :param _request_timeout: timeout setting for this request. If one
1848
+ number provided, it will be total request
1849
+ timeout. It can also be a pair (tuple) of
1850
+ (connection, read) timeouts.
1851
+ :type _request_timeout: int, tuple(int, int), optional
1852
+ :param _request_auth: set to override the auth_settings for an a single
1853
+ request; this effectively ignores the
1854
+ authentication in the spec for a single request.
1855
+ :type _request_auth: dict, optional
1856
+ :param _content_type: force content-type for the request.
1857
+ :type _content_type: str, Optional
1858
+ :param _headers: set to override the headers for a single
1859
+ request; this effectively ignores the headers
1860
+ in the spec for a single request.
1861
+ :type _headers: dict, optional
1862
+ :param _host_index: set to override the host_index for a single
1863
+ request; this effectively ignores the host_index
1864
+ in the spec for a single request.
1865
+ :type _host_index: int, optional
1866
+ :return: Returns the result object.
1867
+ """ # noqa: E501
1868
+
1869
+ _param = self._list_dremio_instances_serialize(
1870
+ project_id=project_id,
1871
+ region_id=region_id,
1872
+ page_token=page_token,
1873
+ page_size=page_size,
1874
+ _request_auth=_request_auth,
1875
+ _content_type=_content_type,
1876
+ _headers=_headers,
1877
+ _host_index=_host_index,
1878
+ )
1879
+
1880
+ _response_types_map: Dict[str, Optional[str]] = {
1881
+ "200": "ListDremiosResponse",
1882
+ "400": "Error",
1883
+ "401": "Error",
1884
+ "500": None,
1885
+ }
1886
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1887
+ response_data.read()
1888
+ return self.api_client.response_deserialize(
1889
+ response_data=response_data,
1890
+ response_types_map=_response_types_map,
1891
+ )
1892
+
1893
+ @validate_call
1894
+ def list_dremio_instances_without_preload_content(
1895
+ self,
1896
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
1897
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
1898
+ page_token: Annotated[
1899
+ Optional[Annotated[str, Field(strict=True, max_length=1024)]],
1900
+ Field(description="A token to retrieve the next page of results."),
1901
+ ] = None,
1902
+ page_size: Annotated[
1903
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1904
+ Field(description="Maximum number of items to return."),
1905
+ ] = None,
1906
+ _request_timeout: Union[
1907
+ None,
1908
+ Annotated[StrictFloat, Field(gt=0)],
1909
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1910
+ ] = None,
1911
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1912
+ _content_type: Optional[StrictStr] = None,
1913
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1914
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1915
+ ) -> RESTResponseType:
1916
+ """list_dremio_instances
1917
+
1918
+ Returns a list of all Dremio instances within the project.
1919
+
1920
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
1921
+ :type project_id: UUID
1922
+ :param region_id: The STACKIT region name the resource is located in. (required)
1923
+ :type region_id: str
1924
+ :param page_token: A token to retrieve the next page of results.
1925
+ :type page_token: str
1926
+ :param page_size: Maximum number of items to return.
1927
+ :type page_size: int
1928
+ :param _request_timeout: timeout setting for this request. If one
1929
+ number provided, it will be total request
1930
+ timeout. It can also be a pair (tuple) of
1931
+ (connection, read) timeouts.
1932
+ :type _request_timeout: int, tuple(int, int), optional
1933
+ :param _request_auth: set to override the auth_settings for an a single
1934
+ request; this effectively ignores the
1935
+ authentication in the spec for a single request.
1936
+ :type _request_auth: dict, optional
1937
+ :param _content_type: force content-type for the request.
1938
+ :type _content_type: str, Optional
1939
+ :param _headers: set to override the headers for a single
1940
+ request; this effectively ignores the headers
1941
+ in the spec for a single request.
1942
+ :type _headers: dict, optional
1943
+ :param _host_index: set to override the host_index for a single
1944
+ request; this effectively ignores the host_index
1945
+ in the spec for a single request.
1946
+ :type _host_index: int, optional
1947
+ :return: Returns the result object.
1948
+ """ # noqa: E501
1949
+
1950
+ _param = self._list_dremio_instances_serialize(
1951
+ project_id=project_id,
1952
+ region_id=region_id,
1953
+ page_token=page_token,
1954
+ page_size=page_size,
1955
+ _request_auth=_request_auth,
1956
+ _content_type=_content_type,
1957
+ _headers=_headers,
1958
+ _host_index=_host_index,
1959
+ )
1960
+
1961
+ _response_types_map: Dict[str, Optional[str]] = {
1962
+ "200": "ListDremiosResponse",
1963
+ "400": "Error",
1964
+ "401": "Error",
1965
+ "500": None,
1966
+ }
1967
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1968
+ return response_data.response
1969
+
1970
+ def _list_dremio_instances_serialize(
1971
+ self,
1972
+ project_id,
1973
+ region_id,
1974
+ page_token,
1975
+ page_size,
1976
+ _request_auth,
1977
+ _content_type,
1978
+ _headers,
1979
+ _host_index,
1980
+ ) -> RequestSerialized:
1981
+
1982
+ _host = None
1983
+
1984
+ _collection_formats: Dict[str, str] = {}
1985
+
1986
+ _path_params: Dict[str, str] = {}
1987
+ _query_params: List[Tuple[str, str]] = []
1988
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1989
+ _form_params: List[Tuple[str, str]] = []
1990
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1991
+ _body_params: Optional[bytes] = None
1992
+
1993
+ # process the path parameters
1994
+ if project_id is not None:
1995
+ _path_params["projectId"] = project_id
1996
+ if region_id is not None:
1997
+ _path_params["regionId"] = region_id
1998
+ # process the query parameters
1999
+ if page_token is not None:
2000
+
2001
+ _query_params.append(("pageToken", page_token))
2002
+
2003
+ if page_size is not None:
2004
+
2005
+ _query_params.append(("pageSize", page_size))
2006
+
2007
+ # process the header parameters
2008
+ # process the form parameters
2009
+ # process the body parameter
2010
+
2011
+ # set the HTTP header `Accept`
2012
+ if "Accept" not in _header_params:
2013
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2014
+
2015
+ # authentication setting
2016
+ _auth_settings: List[str] = []
2017
+
2018
+ return self.api_client.param_serialize(
2019
+ method="GET",
2020
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios",
2021
+ path_params=_path_params,
2022
+ query_params=_query_params,
2023
+ header_params=_header_params,
2024
+ body=_body_params,
2025
+ post_params=_form_params,
2026
+ files=_files,
2027
+ auth_settings=_auth_settings,
2028
+ collection_formats=_collection_formats,
2029
+ _host=_host,
2030
+ _request_auth=_request_auth,
2031
+ )
2032
+
2033
+ @validate_call
2034
+ def list_dremio_users(
2035
+ self,
2036
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
2037
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
2038
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
2039
+ page_token: Annotated[
2040
+ Optional[Annotated[str, Field(strict=True, max_length=1024)]],
2041
+ Field(description="A token to retrieve the next page of results."),
2042
+ ] = None,
2043
+ page_size: Annotated[
2044
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
2045
+ Field(description="Maximum number of items to return."),
2046
+ ] = None,
2047
+ _request_timeout: Union[
2048
+ None,
2049
+ Annotated[StrictFloat, Field(gt=0)],
2050
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2051
+ ] = None,
2052
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2053
+ _content_type: Optional[StrictStr] = None,
2054
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2055
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2056
+ ) -> ListDremioUsersResponse:
2057
+ """list_dremio_users
2058
+
2059
+ Returns a list of all Dremio admin users for the given dremio instance.
2060
+
2061
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
2062
+ :type project_id: UUID
2063
+ :param region_id: The STACKIT region name the resource is located in. (required)
2064
+ :type region_id: str
2065
+ :param dremio_id: The Dremio instance UUID. (required)
2066
+ :type dremio_id: UUID
2067
+ :param page_token: A token to retrieve the next page of results.
2068
+ :type page_token: str
2069
+ :param page_size: Maximum number of items to return.
2070
+ :type page_size: int
2071
+ :param _request_timeout: timeout setting for this request. If one
2072
+ number provided, it will be total request
2073
+ timeout. It can also be a pair (tuple) of
2074
+ (connection, read) timeouts.
2075
+ :type _request_timeout: int, tuple(int, int), optional
2076
+ :param _request_auth: set to override the auth_settings for an a single
2077
+ request; this effectively ignores the
2078
+ authentication in the spec for a single request.
2079
+ :type _request_auth: dict, optional
2080
+ :param _content_type: force content-type for the request.
2081
+ :type _content_type: str, Optional
2082
+ :param _headers: set to override the headers for a single
2083
+ request; this effectively ignores the headers
2084
+ in the spec for a single request.
2085
+ :type _headers: dict, optional
2086
+ :param _host_index: set to override the host_index for a single
2087
+ request; this effectively ignores the host_index
2088
+ in the spec for a single request.
2089
+ :type _host_index: int, optional
2090
+ :return: Returns the result object.
2091
+ """ # noqa: E501
2092
+
2093
+ _param = self._list_dremio_users_serialize(
2094
+ project_id=project_id,
2095
+ region_id=region_id,
2096
+ dremio_id=dremio_id,
2097
+ page_token=page_token,
2098
+ page_size=page_size,
2099
+ _request_auth=_request_auth,
2100
+ _content_type=_content_type,
2101
+ _headers=_headers,
2102
+ _host_index=_host_index,
2103
+ )
2104
+
2105
+ _response_types_map: Dict[str, Optional[str]] = {
2106
+ "200": "ListDremioUsersResponse",
2107
+ "400": "Error",
2108
+ "401": "Error",
2109
+ "500": None,
2110
+ }
2111
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2112
+ response_data.read()
2113
+ return self.api_client.response_deserialize(
2114
+ response_data=response_data,
2115
+ response_types_map=_response_types_map,
2116
+ ).data
2117
+
2118
+ @validate_call
2119
+ def list_dremio_users_with_http_info(
2120
+ self,
2121
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
2122
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
2123
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
2124
+ page_token: Annotated[
2125
+ Optional[Annotated[str, Field(strict=True, max_length=1024)]],
2126
+ Field(description="A token to retrieve the next page of results."),
2127
+ ] = None,
2128
+ page_size: Annotated[
2129
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
2130
+ Field(description="Maximum number of items to return."),
2131
+ ] = None,
2132
+ _request_timeout: Union[
2133
+ None,
2134
+ Annotated[StrictFloat, Field(gt=0)],
2135
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2136
+ ] = None,
2137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2138
+ _content_type: Optional[StrictStr] = None,
2139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2141
+ ) -> ApiResponse[ListDremioUsersResponse]:
2142
+ """list_dremio_users
2143
+
2144
+ Returns a list of all Dremio admin users for the given dremio instance.
2145
+
2146
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
2147
+ :type project_id: UUID
2148
+ :param region_id: The STACKIT region name the resource is located in. (required)
2149
+ :type region_id: str
2150
+ :param dremio_id: The Dremio instance UUID. (required)
2151
+ :type dremio_id: UUID
2152
+ :param page_token: A token to retrieve the next page of results.
2153
+ :type page_token: str
2154
+ :param page_size: Maximum number of items to return.
2155
+ :type page_size: int
2156
+ :param _request_timeout: timeout setting for this request. If one
2157
+ number provided, it will be total request
2158
+ timeout. It can also be a pair (tuple) of
2159
+ (connection, read) timeouts.
2160
+ :type _request_timeout: int, tuple(int, int), optional
2161
+ :param _request_auth: set to override the auth_settings for an a single
2162
+ request; this effectively ignores the
2163
+ authentication in the spec for a single request.
2164
+ :type _request_auth: dict, optional
2165
+ :param _content_type: force content-type for the request.
2166
+ :type _content_type: str, Optional
2167
+ :param _headers: set to override the headers for a single
2168
+ request; this effectively ignores the headers
2169
+ in the spec for a single request.
2170
+ :type _headers: dict, optional
2171
+ :param _host_index: set to override the host_index for a single
2172
+ request; this effectively ignores the host_index
2173
+ in the spec for a single request.
2174
+ :type _host_index: int, optional
2175
+ :return: Returns the result object.
2176
+ """ # noqa: E501
2177
+
2178
+ _param = self._list_dremio_users_serialize(
2179
+ project_id=project_id,
2180
+ region_id=region_id,
2181
+ dremio_id=dremio_id,
2182
+ page_token=page_token,
2183
+ page_size=page_size,
2184
+ _request_auth=_request_auth,
2185
+ _content_type=_content_type,
2186
+ _headers=_headers,
2187
+ _host_index=_host_index,
2188
+ )
2189
+
2190
+ _response_types_map: Dict[str, Optional[str]] = {
2191
+ "200": "ListDremioUsersResponse",
2192
+ "400": "Error",
2193
+ "401": "Error",
2194
+ "500": None,
2195
+ }
2196
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2197
+ response_data.read()
2198
+ return self.api_client.response_deserialize(
2199
+ response_data=response_data,
2200
+ response_types_map=_response_types_map,
2201
+ )
2202
+
2203
+ @validate_call
2204
+ def list_dremio_users_without_preload_content(
2205
+ self,
2206
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
2207
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
2208
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
2209
+ page_token: Annotated[
2210
+ Optional[Annotated[str, Field(strict=True, max_length=1024)]],
2211
+ Field(description="A token to retrieve the next page of results."),
2212
+ ] = None,
2213
+ page_size: Annotated[
2214
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
2215
+ Field(description="Maximum number of items to return."),
2216
+ ] = None,
2217
+ _request_timeout: Union[
2218
+ None,
2219
+ Annotated[StrictFloat, Field(gt=0)],
2220
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2221
+ ] = None,
2222
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2223
+ _content_type: Optional[StrictStr] = None,
2224
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2225
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2226
+ ) -> RESTResponseType:
2227
+ """list_dremio_users
2228
+
2229
+ Returns a list of all Dremio admin users for the given dremio instance.
2230
+
2231
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
2232
+ :type project_id: UUID
2233
+ :param region_id: The STACKIT region name the resource is located in. (required)
2234
+ :type region_id: str
2235
+ :param dremio_id: The Dremio instance UUID. (required)
2236
+ :type dremio_id: UUID
2237
+ :param page_token: A token to retrieve the next page of results.
2238
+ :type page_token: str
2239
+ :param page_size: Maximum number of items to return.
2240
+ :type page_size: int
2241
+ :param _request_timeout: timeout setting for this request. If one
2242
+ number provided, it will be total request
2243
+ timeout. It can also be a pair (tuple) of
2244
+ (connection, read) timeouts.
2245
+ :type _request_timeout: int, tuple(int, int), optional
2246
+ :param _request_auth: set to override the auth_settings for an a single
2247
+ request; this effectively ignores the
2248
+ authentication in the spec for a single request.
2249
+ :type _request_auth: dict, optional
2250
+ :param _content_type: force content-type for the request.
2251
+ :type _content_type: str, Optional
2252
+ :param _headers: set to override the headers for a single
2253
+ request; this effectively ignores the headers
2254
+ in the spec for a single request.
2255
+ :type _headers: dict, optional
2256
+ :param _host_index: set to override the host_index for a single
2257
+ request; this effectively ignores the host_index
2258
+ in the spec for a single request.
2259
+ :type _host_index: int, optional
2260
+ :return: Returns the result object.
2261
+ """ # noqa: E501
2262
+
2263
+ _param = self._list_dremio_users_serialize(
2264
+ project_id=project_id,
2265
+ region_id=region_id,
2266
+ dremio_id=dremio_id,
2267
+ page_token=page_token,
2268
+ page_size=page_size,
2269
+ _request_auth=_request_auth,
2270
+ _content_type=_content_type,
2271
+ _headers=_headers,
2272
+ _host_index=_host_index,
2273
+ )
2274
+
2275
+ _response_types_map: Dict[str, Optional[str]] = {
2276
+ "200": "ListDremioUsersResponse",
2277
+ "400": "Error",
2278
+ "401": "Error",
2279
+ "500": None,
2280
+ }
2281
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2282
+ return response_data.response
2283
+
2284
+ def _list_dremio_users_serialize(
2285
+ self,
2286
+ project_id,
2287
+ region_id,
2288
+ dremio_id,
2289
+ page_token,
2290
+ page_size,
2291
+ _request_auth,
2292
+ _content_type,
2293
+ _headers,
2294
+ _host_index,
2295
+ ) -> RequestSerialized:
2296
+
2297
+ _host = None
2298
+
2299
+ _collection_formats: Dict[str, str] = {}
2300
+
2301
+ _path_params: Dict[str, str] = {}
2302
+ _query_params: List[Tuple[str, str]] = []
2303
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2304
+ _form_params: List[Tuple[str, str]] = []
2305
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
2306
+ _body_params: Optional[bytes] = None
2307
+
2308
+ # process the path parameters
2309
+ if project_id is not None:
2310
+ _path_params["projectId"] = project_id
2311
+ if region_id is not None:
2312
+ _path_params["regionId"] = region_id
2313
+ if dremio_id is not None:
2314
+ _path_params["dremioId"] = dremio_id
2315
+ # process the query parameters
2316
+ if page_token is not None:
2317
+
2318
+ _query_params.append(("pageToken", page_token))
2319
+
2320
+ if page_size is not None:
2321
+
2322
+ _query_params.append(("pageSize", page_size))
2323
+
2324
+ # process the header parameters
2325
+ # process the form parameters
2326
+ # process the body parameter
2327
+
2328
+ # set the HTTP header `Accept`
2329
+ if "Accept" not in _header_params:
2330
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2331
+
2332
+ # authentication setting
2333
+ _auth_settings: List[str] = []
2334
+
2335
+ return self.api_client.param_serialize(
2336
+ method="GET",
2337
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}/users",
2338
+ path_params=_path_params,
2339
+ query_params=_query_params,
2340
+ header_params=_header_params,
2341
+ body=_body_params,
2342
+ post_params=_form_params,
2343
+ files=_files,
2344
+ auth_settings=_auth_settings,
2345
+ collection_formats=_collection_formats,
2346
+ _host=_host,
2347
+ _request_auth=_request_auth,
2348
+ )
2349
+
2350
+ @validate_call
2351
+ def update_dremio_instance(
2352
+ self,
2353
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
2354
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
2355
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
2356
+ update_dremio_instance_payload: UpdateDremioInstancePayload,
2357
+ _request_timeout: Union[
2358
+ None,
2359
+ Annotated[StrictFloat, Field(gt=0)],
2360
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2361
+ ] = None,
2362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2363
+ _content_type: Optional[StrictStr] = None,
2364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2366
+ ) -> DremioResponse:
2367
+ """update_dremio_instance
2368
+
2369
+ Updates the given Dremio instance. Please note that changing certain fields will trigger a Dremio restart and will incur downtime. See the request body information for more details.
2370
+
2371
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
2372
+ :type project_id: UUID
2373
+ :param region_id: The STACKIT region name the resource is located in. (required)
2374
+ :type region_id: str
2375
+ :param dremio_id: The Dremio instance UUID. (required)
2376
+ :type dremio_id: UUID
2377
+ :param update_dremio_instance_payload: (required)
2378
+ :type update_dremio_instance_payload: UpdateDremioInstancePayload
2379
+ :param _request_timeout: timeout setting for this request. If one
2380
+ number provided, it will be total request
2381
+ timeout. It can also be a pair (tuple) of
2382
+ (connection, read) timeouts.
2383
+ :type _request_timeout: int, tuple(int, int), optional
2384
+ :param _request_auth: set to override the auth_settings for an a single
2385
+ request; this effectively ignores the
2386
+ authentication in the spec for a single request.
2387
+ :type _request_auth: dict, optional
2388
+ :param _content_type: force content-type for the request.
2389
+ :type _content_type: str, Optional
2390
+ :param _headers: set to override the headers for a single
2391
+ request; this effectively ignores the headers
2392
+ in the spec for a single request.
2393
+ :type _headers: dict, optional
2394
+ :param _host_index: set to override the host_index for a single
2395
+ request; this effectively ignores the host_index
2396
+ in the spec for a single request.
2397
+ :type _host_index: int, optional
2398
+ :return: Returns the result object.
2399
+ """ # noqa: E501
2400
+
2401
+ _param = self._update_dremio_instance_serialize(
2402
+ project_id=project_id,
2403
+ region_id=region_id,
2404
+ dremio_id=dremio_id,
2405
+ update_dremio_instance_payload=update_dremio_instance_payload,
2406
+ _request_auth=_request_auth,
2407
+ _content_type=_content_type,
2408
+ _headers=_headers,
2409
+ _host_index=_host_index,
2410
+ )
2411
+
2412
+ _response_types_map: Dict[str, Optional[str]] = {
2413
+ "202": "DremioResponse",
2414
+ "400": "Error",
2415
+ "401": "Error",
2416
+ "404": None,
2417
+ "409": None,
2418
+ "500": None,
2419
+ }
2420
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2421
+ response_data.read()
2422
+ return self.api_client.response_deserialize(
2423
+ response_data=response_data,
2424
+ response_types_map=_response_types_map,
2425
+ ).data
2426
+
2427
+ @validate_call
2428
+ def update_dremio_instance_with_http_info(
2429
+ self,
2430
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
2431
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
2432
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
2433
+ update_dremio_instance_payload: UpdateDremioInstancePayload,
2434
+ _request_timeout: Union[
2435
+ None,
2436
+ Annotated[StrictFloat, Field(gt=0)],
2437
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2438
+ ] = None,
2439
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2440
+ _content_type: Optional[StrictStr] = None,
2441
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2442
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2443
+ ) -> ApiResponse[DremioResponse]:
2444
+ """update_dremio_instance
2445
+
2446
+ Updates the given Dremio instance. Please note that changing certain fields will trigger a Dremio restart and will incur downtime. See the request body information for more details.
2447
+
2448
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
2449
+ :type project_id: UUID
2450
+ :param region_id: The STACKIT region name the resource is located in. (required)
2451
+ :type region_id: str
2452
+ :param dremio_id: The Dremio instance UUID. (required)
2453
+ :type dremio_id: UUID
2454
+ :param update_dremio_instance_payload: (required)
2455
+ :type update_dremio_instance_payload: UpdateDremioInstancePayload
2456
+ :param _request_timeout: timeout setting for this request. If one
2457
+ number provided, it will be total request
2458
+ timeout. It can also be a pair (tuple) of
2459
+ (connection, read) timeouts.
2460
+ :type _request_timeout: int, tuple(int, int), optional
2461
+ :param _request_auth: set to override the auth_settings for an a single
2462
+ request; this effectively ignores the
2463
+ authentication in the spec for a single request.
2464
+ :type _request_auth: dict, optional
2465
+ :param _content_type: force content-type for the request.
2466
+ :type _content_type: str, Optional
2467
+ :param _headers: set to override the headers for a single
2468
+ request; this effectively ignores the headers
2469
+ in the spec for a single request.
2470
+ :type _headers: dict, optional
2471
+ :param _host_index: set to override the host_index for a single
2472
+ request; this effectively ignores the host_index
2473
+ in the spec for a single request.
2474
+ :type _host_index: int, optional
2475
+ :return: Returns the result object.
2476
+ """ # noqa: E501
2477
+
2478
+ _param = self._update_dremio_instance_serialize(
2479
+ project_id=project_id,
2480
+ region_id=region_id,
2481
+ dremio_id=dremio_id,
2482
+ update_dremio_instance_payload=update_dremio_instance_payload,
2483
+ _request_auth=_request_auth,
2484
+ _content_type=_content_type,
2485
+ _headers=_headers,
2486
+ _host_index=_host_index,
2487
+ )
2488
+
2489
+ _response_types_map: Dict[str, Optional[str]] = {
2490
+ "202": "DremioResponse",
2491
+ "400": "Error",
2492
+ "401": "Error",
2493
+ "404": None,
2494
+ "409": None,
2495
+ "500": None,
2496
+ }
2497
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2498
+ response_data.read()
2499
+ return self.api_client.response_deserialize(
2500
+ response_data=response_data,
2501
+ response_types_map=_response_types_map,
2502
+ )
2503
+
2504
+ @validate_call
2505
+ def update_dremio_instance_without_preload_content(
2506
+ self,
2507
+ project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")],
2508
+ region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")],
2509
+ dremio_id: Annotated[UUID, Field(description="The Dremio instance UUID.")],
2510
+ update_dremio_instance_payload: UpdateDremioInstancePayload,
2511
+ _request_timeout: Union[
2512
+ None,
2513
+ Annotated[StrictFloat, Field(gt=0)],
2514
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
2515
+ ] = None,
2516
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2517
+ _content_type: Optional[StrictStr] = None,
2518
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2519
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2520
+ ) -> RESTResponseType:
2521
+ """update_dremio_instance
2522
+
2523
+ Updates the given Dremio instance. Please note that changing certain fields will trigger a Dremio restart and will incur downtime. See the request body information for more details.
2524
+
2525
+ :param project_id: The STACKIT portal project UUID the resource is located in. (required)
2526
+ :type project_id: UUID
2527
+ :param region_id: The STACKIT region name the resource is located in. (required)
2528
+ :type region_id: str
2529
+ :param dremio_id: The Dremio instance UUID. (required)
2530
+ :type dremio_id: UUID
2531
+ :param update_dremio_instance_payload: (required)
2532
+ :type update_dremio_instance_payload: UpdateDremioInstancePayload
2533
+ :param _request_timeout: timeout setting for this request. If one
2534
+ number provided, it will be total request
2535
+ timeout. It can also be a pair (tuple) of
2536
+ (connection, read) timeouts.
2537
+ :type _request_timeout: int, tuple(int, int), optional
2538
+ :param _request_auth: set to override the auth_settings for an a single
2539
+ request; this effectively ignores the
2540
+ authentication in the spec for a single request.
2541
+ :type _request_auth: dict, optional
2542
+ :param _content_type: force content-type for the request.
2543
+ :type _content_type: str, Optional
2544
+ :param _headers: set to override the headers for a single
2545
+ request; this effectively ignores the headers
2546
+ in the spec for a single request.
2547
+ :type _headers: dict, optional
2548
+ :param _host_index: set to override the host_index for a single
2549
+ request; this effectively ignores the host_index
2550
+ in the spec for a single request.
2551
+ :type _host_index: int, optional
2552
+ :return: Returns the result object.
2553
+ """ # noqa: E501
2554
+
2555
+ _param = self._update_dremio_instance_serialize(
2556
+ project_id=project_id,
2557
+ region_id=region_id,
2558
+ dremio_id=dremio_id,
2559
+ update_dremio_instance_payload=update_dremio_instance_payload,
2560
+ _request_auth=_request_auth,
2561
+ _content_type=_content_type,
2562
+ _headers=_headers,
2563
+ _host_index=_host_index,
2564
+ )
2565
+
2566
+ _response_types_map: Dict[str, Optional[str]] = {
2567
+ "202": "DremioResponse",
2568
+ "400": "Error",
2569
+ "401": "Error",
2570
+ "404": None,
2571
+ "409": None,
2572
+ "500": None,
2573
+ }
2574
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
2575
+ return response_data.response
2576
+
2577
+ def _update_dremio_instance_serialize(
2578
+ self,
2579
+ project_id,
2580
+ region_id,
2581
+ dremio_id,
2582
+ update_dremio_instance_payload,
2583
+ _request_auth,
2584
+ _content_type,
2585
+ _headers,
2586
+ _host_index,
2587
+ ) -> RequestSerialized:
2588
+
2589
+ _host = None
2590
+
2591
+ _collection_formats: Dict[str, str] = {}
2592
+
2593
+ _path_params: Dict[str, str] = {}
2594
+ _query_params: List[Tuple[str, str]] = []
2595
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2596
+ _form_params: List[Tuple[str, str]] = []
2597
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
2598
+ _body_params: Optional[bytes] = None
2599
+
2600
+ # process the path parameters
2601
+ if project_id is not None:
2602
+ _path_params["projectId"] = project_id
2603
+ if region_id is not None:
2604
+ _path_params["regionId"] = region_id
2605
+ if dremio_id is not None:
2606
+ _path_params["dremioId"] = dremio_id
2607
+ # process the query parameters
2608
+ # process the header parameters
2609
+ # process the form parameters
2610
+ # process the body parameter
2611
+ if update_dremio_instance_payload is not None:
2612
+ _body_params = update_dremio_instance_payload
2613
+
2614
+ # set the HTTP header `Accept`
2615
+ if "Accept" not in _header_params:
2616
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
2617
+
2618
+ # set the HTTP header `Content-Type`
2619
+ if _content_type:
2620
+ _header_params["Content-Type"] = _content_type
2621
+ else:
2622
+ _default_content_type = self.api_client.select_header_content_type(["application/json"])
2623
+ if _default_content_type is not None:
2624
+ _header_params["Content-Type"] = _default_content_type
2625
+
2626
+ # authentication setting
2627
+ _auth_settings: List[str] = []
2628
+
2629
+ return self.api_client.param_serialize(
2630
+ method="PUT",
2631
+ resource_path="/v1beta/projects/{projectId}/regions/{regionId}/dremios/{dremioId}",
2632
+ path_params=_path_params,
2633
+ query_params=_query_params,
2634
+ header_params=_header_params,
2635
+ body=_body_params,
2636
+ post_params=_form_params,
2637
+ files=_files,
2638
+ auth_settings=_auth_settings,
2639
+ collection_formats=_collection_formats,
2640
+ _host=_host,
2641
+ _request_auth=_request_auth,
2642
+ )