stackit-edge 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.
- stackit/edge/__init__.py +79 -0
- stackit/edge/api/__init__.py +4 -0
- stackit/edge/api/default_api.py +3930 -0
- stackit/edge/api_client.py +639 -0
- stackit/edge/api_response.py +23 -0
- stackit/edge/configuration.py +163 -0
- stackit/edge/exceptions.py +217 -0
- stackit/edge/models/__init__.py +30 -0
- stackit/edge/models/bad_request.py +82 -0
- stackit/edge/models/create_instance_payload.py +89 -0
- stackit/edge/models/instance.py +133 -0
- stackit/edge/models/instance_list.py +98 -0
- stackit/edge/models/kubeconfig.py +81 -0
- stackit/edge/models/plan.py +93 -0
- stackit/edge/models/plan_list.py +98 -0
- stackit/edge/models/token.py +81 -0
- stackit/edge/models/unauthorized_request.py +82 -0
- stackit/edge/models/update_instance_by_name_payload.py +86 -0
- stackit/edge/models/update_instance_payload.py +86 -0
- stackit/edge/models/user.py +82 -0
- stackit/edge/py.typed +0 -0
- stackit/edge/rest.py +148 -0
- stackit_edge-0.1.0.dist-info/METADATA +48 -0
- stackit_edge-0.1.0.dist-info/RECORD +27 -0
- stackit_edge-0.1.0.dist-info/WHEEL +4 -0
- stackit_edge-0.1.0.dist-info/licenses/LICENSE.md +201 -0
- stackit_edge-0.1.0.dist-info/licenses/NOTICE.txt +2 -0
|
@@ -0,0 +1,3930 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Edge Cloud API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing STACKIT Edge Cloud instances.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
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.edge.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from stackit.edge.api_response import ApiResponse
|
|
29
|
+
from stackit.edge.models.create_instance_payload import CreateInstancePayload
|
|
30
|
+
from stackit.edge.models.instance import Instance
|
|
31
|
+
from stackit.edge.models.instance_list import InstanceList
|
|
32
|
+
from stackit.edge.models.kubeconfig import Kubeconfig
|
|
33
|
+
from stackit.edge.models.plan_list import PlanList
|
|
34
|
+
from stackit.edge.models.token import Token
|
|
35
|
+
from stackit.edge.models.update_instance_by_name_payload import (
|
|
36
|
+
UpdateInstanceByNamePayload,
|
|
37
|
+
)
|
|
38
|
+
from stackit.edge.models.update_instance_payload import UpdateInstancePayload
|
|
39
|
+
from stackit.edge.rest import RESTResponseType
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DefaultApi:
|
|
43
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
44
|
+
Ref: https://openapi-generator.tech
|
|
45
|
+
|
|
46
|
+
Do not edit the class manually.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def __init__(self, configuration: Configuration = None) -> None:
|
|
50
|
+
if configuration is None:
|
|
51
|
+
configuration = Configuration()
|
|
52
|
+
self.configuration = configuration
|
|
53
|
+
self.api_client = ApiClient(self.configuration)
|
|
54
|
+
|
|
55
|
+
@validate_call
|
|
56
|
+
def create_instance(
|
|
57
|
+
self,
|
|
58
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
59
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
60
|
+
create_instance_payload: CreateInstancePayload,
|
|
61
|
+
_request_timeout: Union[
|
|
62
|
+
None,
|
|
63
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
64
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
65
|
+
] = None,
|
|
66
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
67
|
+
_content_type: Optional[StrictStr] = None,
|
|
68
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
69
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
70
|
+
) -> Instance:
|
|
71
|
+
"""create_instance
|
|
72
|
+
|
|
73
|
+
Creates a new instance within the project.
|
|
74
|
+
|
|
75
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
76
|
+
:type project_id: str
|
|
77
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
78
|
+
:type region_id: str
|
|
79
|
+
:param create_instance_payload: (required)
|
|
80
|
+
:type create_instance_payload: CreateInstancePayload
|
|
81
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
82
|
+
number provided, it will be total request
|
|
83
|
+
timeout. It can also be a pair (tuple) of
|
|
84
|
+
(connection, read) timeouts.
|
|
85
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
86
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
87
|
+
request; this effectively ignores the
|
|
88
|
+
authentication in the spec for a single request.
|
|
89
|
+
:type _request_auth: dict, optional
|
|
90
|
+
:param _content_type: force content-type for the request.
|
|
91
|
+
:type _content_type: str, Optional
|
|
92
|
+
:param _headers: set to override the headers for a single
|
|
93
|
+
request; this effectively ignores the headers
|
|
94
|
+
in the spec for a single request.
|
|
95
|
+
:type _headers: dict, optional
|
|
96
|
+
:param _host_index: set to override the host_index for a single
|
|
97
|
+
request; this effectively ignores the host_index
|
|
98
|
+
in the spec for a single request.
|
|
99
|
+
:type _host_index: int, optional
|
|
100
|
+
:return: Returns the result object.
|
|
101
|
+
""" # noqa: E501
|
|
102
|
+
|
|
103
|
+
_param = self._create_instance_serialize(
|
|
104
|
+
project_id=project_id,
|
|
105
|
+
region_id=region_id,
|
|
106
|
+
create_instance_payload=create_instance_payload,
|
|
107
|
+
_request_auth=_request_auth,
|
|
108
|
+
_content_type=_content_type,
|
|
109
|
+
_headers=_headers,
|
|
110
|
+
_host_index=_host_index,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
114
|
+
"201": "Instance",
|
|
115
|
+
"400": None,
|
|
116
|
+
"401": "UnauthorizedRequest",
|
|
117
|
+
"409": None,
|
|
118
|
+
"500": None,
|
|
119
|
+
}
|
|
120
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
121
|
+
response_data.read()
|
|
122
|
+
return self.api_client.response_deserialize(
|
|
123
|
+
response_data=response_data,
|
|
124
|
+
response_types_map=_response_types_map,
|
|
125
|
+
).data
|
|
126
|
+
|
|
127
|
+
@validate_call
|
|
128
|
+
def create_instance_with_http_info(
|
|
129
|
+
self,
|
|
130
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
131
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
132
|
+
create_instance_payload: CreateInstancePayload,
|
|
133
|
+
_request_timeout: Union[
|
|
134
|
+
None,
|
|
135
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
136
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
137
|
+
] = None,
|
|
138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
+
_content_type: Optional[StrictStr] = None,
|
|
140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
142
|
+
) -> ApiResponse[Instance]:
|
|
143
|
+
"""create_instance
|
|
144
|
+
|
|
145
|
+
Creates a new instance within the project.
|
|
146
|
+
|
|
147
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
148
|
+
:type project_id: str
|
|
149
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
150
|
+
:type region_id: str
|
|
151
|
+
:param create_instance_payload: (required)
|
|
152
|
+
:type create_instance_payload: CreateInstancePayload
|
|
153
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
154
|
+
number provided, it will be total request
|
|
155
|
+
timeout. It can also be a pair (tuple) of
|
|
156
|
+
(connection, read) timeouts.
|
|
157
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
158
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
159
|
+
request; this effectively ignores the
|
|
160
|
+
authentication in the spec for a single request.
|
|
161
|
+
:type _request_auth: dict, optional
|
|
162
|
+
:param _content_type: force content-type for the request.
|
|
163
|
+
:type _content_type: str, Optional
|
|
164
|
+
:param _headers: set to override the headers for a single
|
|
165
|
+
request; this effectively ignores the headers
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _headers: dict, optional
|
|
168
|
+
:param _host_index: set to override the host_index for a single
|
|
169
|
+
request; this effectively ignores the host_index
|
|
170
|
+
in the spec for a single request.
|
|
171
|
+
:type _host_index: int, optional
|
|
172
|
+
:return: Returns the result object.
|
|
173
|
+
""" # noqa: E501
|
|
174
|
+
|
|
175
|
+
_param = self._create_instance_serialize(
|
|
176
|
+
project_id=project_id,
|
|
177
|
+
region_id=region_id,
|
|
178
|
+
create_instance_payload=create_instance_payload,
|
|
179
|
+
_request_auth=_request_auth,
|
|
180
|
+
_content_type=_content_type,
|
|
181
|
+
_headers=_headers,
|
|
182
|
+
_host_index=_host_index,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
186
|
+
"201": "Instance",
|
|
187
|
+
"400": None,
|
|
188
|
+
"401": "UnauthorizedRequest",
|
|
189
|
+
"409": None,
|
|
190
|
+
"500": None,
|
|
191
|
+
}
|
|
192
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
193
|
+
response_data.read()
|
|
194
|
+
return self.api_client.response_deserialize(
|
|
195
|
+
response_data=response_data,
|
|
196
|
+
response_types_map=_response_types_map,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
@validate_call
|
|
200
|
+
def create_instance_without_preload_content(
|
|
201
|
+
self,
|
|
202
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
203
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
204
|
+
create_instance_payload: CreateInstancePayload,
|
|
205
|
+
_request_timeout: Union[
|
|
206
|
+
None,
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
208
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
209
|
+
] = None,
|
|
210
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
211
|
+
_content_type: Optional[StrictStr] = None,
|
|
212
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
213
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
214
|
+
) -> RESTResponseType:
|
|
215
|
+
"""create_instance
|
|
216
|
+
|
|
217
|
+
Creates a new instance within the project.
|
|
218
|
+
|
|
219
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
220
|
+
:type project_id: str
|
|
221
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
222
|
+
:type region_id: str
|
|
223
|
+
:param create_instance_payload: (required)
|
|
224
|
+
:type create_instance_payload: CreateInstancePayload
|
|
225
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
226
|
+
number provided, it will be total request
|
|
227
|
+
timeout. It can also be a pair (tuple) of
|
|
228
|
+
(connection, read) timeouts.
|
|
229
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
230
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
231
|
+
request; this effectively ignores the
|
|
232
|
+
authentication in the spec for a single request.
|
|
233
|
+
:type _request_auth: dict, optional
|
|
234
|
+
:param _content_type: force content-type for the request.
|
|
235
|
+
:type _content_type: str, Optional
|
|
236
|
+
:param _headers: set to override the headers for a single
|
|
237
|
+
request; this effectively ignores the headers
|
|
238
|
+
in the spec for a single request.
|
|
239
|
+
:type _headers: dict, optional
|
|
240
|
+
:param _host_index: set to override the host_index for a single
|
|
241
|
+
request; this effectively ignores the host_index
|
|
242
|
+
in the spec for a single request.
|
|
243
|
+
:type _host_index: int, optional
|
|
244
|
+
:return: Returns the result object.
|
|
245
|
+
""" # noqa: E501
|
|
246
|
+
|
|
247
|
+
_param = self._create_instance_serialize(
|
|
248
|
+
project_id=project_id,
|
|
249
|
+
region_id=region_id,
|
|
250
|
+
create_instance_payload=create_instance_payload,
|
|
251
|
+
_request_auth=_request_auth,
|
|
252
|
+
_content_type=_content_type,
|
|
253
|
+
_headers=_headers,
|
|
254
|
+
_host_index=_host_index,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
258
|
+
"201": "Instance",
|
|
259
|
+
"400": None,
|
|
260
|
+
"401": "UnauthorizedRequest",
|
|
261
|
+
"409": None,
|
|
262
|
+
"500": None,
|
|
263
|
+
}
|
|
264
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
265
|
+
return response_data.response
|
|
266
|
+
|
|
267
|
+
def _create_instance_serialize(
|
|
268
|
+
self,
|
|
269
|
+
project_id,
|
|
270
|
+
region_id,
|
|
271
|
+
create_instance_payload,
|
|
272
|
+
_request_auth,
|
|
273
|
+
_content_type,
|
|
274
|
+
_headers,
|
|
275
|
+
_host_index,
|
|
276
|
+
) -> RequestSerialized:
|
|
277
|
+
|
|
278
|
+
_host = None
|
|
279
|
+
|
|
280
|
+
_collection_formats: Dict[str, str] = {}
|
|
281
|
+
|
|
282
|
+
_path_params: Dict[str, str] = {}
|
|
283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
286
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
287
|
+
_body_params: Optional[bytes] = None
|
|
288
|
+
|
|
289
|
+
# process the path parameters
|
|
290
|
+
if project_id is not None:
|
|
291
|
+
_path_params["projectId"] = project_id
|
|
292
|
+
if region_id is not None:
|
|
293
|
+
_path_params["regionId"] = region_id
|
|
294
|
+
# process the query parameters
|
|
295
|
+
# process the header parameters
|
|
296
|
+
# process the form parameters
|
|
297
|
+
# process the body parameter
|
|
298
|
+
if create_instance_payload is not None:
|
|
299
|
+
_body_params = create_instance_payload
|
|
300
|
+
|
|
301
|
+
# set the HTTP header `Accept`
|
|
302
|
+
if "Accept" not in _header_params:
|
|
303
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
304
|
+
|
|
305
|
+
# set the HTTP header `Content-Type`
|
|
306
|
+
if _content_type:
|
|
307
|
+
_header_params["Content-Type"] = _content_type
|
|
308
|
+
else:
|
|
309
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
310
|
+
if _default_content_type is not None:
|
|
311
|
+
_header_params["Content-Type"] = _default_content_type
|
|
312
|
+
|
|
313
|
+
# authentication setting
|
|
314
|
+
_auth_settings: List[str] = []
|
|
315
|
+
|
|
316
|
+
return self.api_client.param_serialize(
|
|
317
|
+
method="POST",
|
|
318
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances",
|
|
319
|
+
path_params=_path_params,
|
|
320
|
+
query_params=_query_params,
|
|
321
|
+
header_params=_header_params,
|
|
322
|
+
body=_body_params,
|
|
323
|
+
post_params=_form_params,
|
|
324
|
+
files=_files,
|
|
325
|
+
auth_settings=_auth_settings,
|
|
326
|
+
collection_formats=_collection_formats,
|
|
327
|
+
_host=_host,
|
|
328
|
+
_request_auth=_request_auth,
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
@validate_call
|
|
332
|
+
def delete_instance(
|
|
333
|
+
self,
|
|
334
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
335
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
336
|
+
instance_id: Annotated[
|
|
337
|
+
str,
|
|
338
|
+
Field(
|
|
339
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
340
|
+
),
|
|
341
|
+
],
|
|
342
|
+
_request_timeout: Union[
|
|
343
|
+
None,
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
345
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
346
|
+
] = None,
|
|
347
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
348
|
+
_content_type: Optional[StrictStr] = None,
|
|
349
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
350
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
351
|
+
) -> None:
|
|
352
|
+
"""delete_instance
|
|
353
|
+
|
|
354
|
+
Deletes the given instance.
|
|
355
|
+
|
|
356
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
357
|
+
:type project_id: str
|
|
358
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
359
|
+
:type region_id: str
|
|
360
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
361
|
+
:type instance_id: str
|
|
362
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
363
|
+
number provided, it will be total request
|
|
364
|
+
timeout. It can also be a pair (tuple) of
|
|
365
|
+
(connection, read) timeouts.
|
|
366
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
367
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
368
|
+
request; this effectively ignores the
|
|
369
|
+
authentication in the spec for a single request.
|
|
370
|
+
:type _request_auth: dict, optional
|
|
371
|
+
:param _content_type: force content-type for the request.
|
|
372
|
+
:type _content_type: str, Optional
|
|
373
|
+
:param _headers: set to override the headers for a single
|
|
374
|
+
request; this effectively ignores the headers
|
|
375
|
+
in the spec for a single request.
|
|
376
|
+
:type _headers: dict, optional
|
|
377
|
+
:param _host_index: set to override the host_index for a single
|
|
378
|
+
request; this effectively ignores the host_index
|
|
379
|
+
in the spec for a single request.
|
|
380
|
+
:type _host_index: int, optional
|
|
381
|
+
:return: Returns the result object.
|
|
382
|
+
""" # noqa: E501
|
|
383
|
+
|
|
384
|
+
_param = self._delete_instance_serialize(
|
|
385
|
+
project_id=project_id,
|
|
386
|
+
region_id=region_id,
|
|
387
|
+
instance_id=instance_id,
|
|
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
|
+
"204": None,
|
|
396
|
+
"400": "BadRequest",
|
|
397
|
+
"401": "UnauthorizedRequest",
|
|
398
|
+
"404": None,
|
|
399
|
+
"409": None,
|
|
400
|
+
"500": None,
|
|
401
|
+
}
|
|
402
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
403
|
+
response_data.read()
|
|
404
|
+
return self.api_client.response_deserialize(
|
|
405
|
+
response_data=response_data,
|
|
406
|
+
response_types_map=_response_types_map,
|
|
407
|
+
).data
|
|
408
|
+
|
|
409
|
+
@validate_call
|
|
410
|
+
def delete_instance_with_http_info(
|
|
411
|
+
self,
|
|
412
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
413
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
414
|
+
instance_id: Annotated[
|
|
415
|
+
str,
|
|
416
|
+
Field(
|
|
417
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
418
|
+
),
|
|
419
|
+
],
|
|
420
|
+
_request_timeout: Union[
|
|
421
|
+
None,
|
|
422
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
423
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
424
|
+
] = None,
|
|
425
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
426
|
+
_content_type: Optional[StrictStr] = None,
|
|
427
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
429
|
+
) -> ApiResponse[None]:
|
|
430
|
+
"""delete_instance
|
|
431
|
+
|
|
432
|
+
Deletes the given instance.
|
|
433
|
+
|
|
434
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
435
|
+
:type project_id: str
|
|
436
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
437
|
+
:type region_id: str
|
|
438
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
439
|
+
:type instance_id: str
|
|
440
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
441
|
+
number provided, it will be total request
|
|
442
|
+
timeout. It can also be a pair (tuple) of
|
|
443
|
+
(connection, read) timeouts.
|
|
444
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
445
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
446
|
+
request; this effectively ignores the
|
|
447
|
+
authentication in the spec for a single request.
|
|
448
|
+
:type _request_auth: dict, optional
|
|
449
|
+
:param _content_type: force content-type for the request.
|
|
450
|
+
:type _content_type: str, Optional
|
|
451
|
+
:param _headers: set to override the headers for a single
|
|
452
|
+
request; this effectively ignores the headers
|
|
453
|
+
in the spec for a single request.
|
|
454
|
+
:type _headers: dict, optional
|
|
455
|
+
:param _host_index: set to override the host_index for a single
|
|
456
|
+
request; this effectively ignores the host_index
|
|
457
|
+
in the spec for a single request.
|
|
458
|
+
:type _host_index: int, optional
|
|
459
|
+
:return: Returns the result object.
|
|
460
|
+
""" # noqa: E501
|
|
461
|
+
|
|
462
|
+
_param = self._delete_instance_serialize(
|
|
463
|
+
project_id=project_id,
|
|
464
|
+
region_id=region_id,
|
|
465
|
+
instance_id=instance_id,
|
|
466
|
+
_request_auth=_request_auth,
|
|
467
|
+
_content_type=_content_type,
|
|
468
|
+
_headers=_headers,
|
|
469
|
+
_host_index=_host_index,
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
473
|
+
"204": None,
|
|
474
|
+
"400": "BadRequest",
|
|
475
|
+
"401": "UnauthorizedRequest",
|
|
476
|
+
"404": None,
|
|
477
|
+
"409": None,
|
|
478
|
+
"500": None,
|
|
479
|
+
}
|
|
480
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
481
|
+
response_data.read()
|
|
482
|
+
return self.api_client.response_deserialize(
|
|
483
|
+
response_data=response_data,
|
|
484
|
+
response_types_map=_response_types_map,
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
@validate_call
|
|
488
|
+
def delete_instance_without_preload_content(
|
|
489
|
+
self,
|
|
490
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
491
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
492
|
+
instance_id: Annotated[
|
|
493
|
+
str,
|
|
494
|
+
Field(
|
|
495
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
496
|
+
),
|
|
497
|
+
],
|
|
498
|
+
_request_timeout: Union[
|
|
499
|
+
None,
|
|
500
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
501
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
502
|
+
] = None,
|
|
503
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
504
|
+
_content_type: Optional[StrictStr] = None,
|
|
505
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
506
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
507
|
+
) -> RESTResponseType:
|
|
508
|
+
"""delete_instance
|
|
509
|
+
|
|
510
|
+
Deletes the given instance.
|
|
511
|
+
|
|
512
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
513
|
+
:type project_id: str
|
|
514
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
515
|
+
:type region_id: str
|
|
516
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
517
|
+
:type instance_id: str
|
|
518
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
519
|
+
number provided, it will be total request
|
|
520
|
+
timeout. It can also be a pair (tuple) of
|
|
521
|
+
(connection, read) timeouts.
|
|
522
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
523
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
524
|
+
request; this effectively ignores the
|
|
525
|
+
authentication in the spec for a single request.
|
|
526
|
+
:type _request_auth: dict, optional
|
|
527
|
+
:param _content_type: force content-type for the request.
|
|
528
|
+
:type _content_type: str, Optional
|
|
529
|
+
:param _headers: set to override the headers for a single
|
|
530
|
+
request; this effectively ignores the headers
|
|
531
|
+
in the spec for a single request.
|
|
532
|
+
:type _headers: dict, optional
|
|
533
|
+
:param _host_index: set to override the host_index for a single
|
|
534
|
+
request; this effectively ignores the host_index
|
|
535
|
+
in the spec for a single request.
|
|
536
|
+
:type _host_index: int, optional
|
|
537
|
+
:return: Returns the result object.
|
|
538
|
+
""" # noqa: E501
|
|
539
|
+
|
|
540
|
+
_param = self._delete_instance_serialize(
|
|
541
|
+
project_id=project_id,
|
|
542
|
+
region_id=region_id,
|
|
543
|
+
instance_id=instance_id,
|
|
544
|
+
_request_auth=_request_auth,
|
|
545
|
+
_content_type=_content_type,
|
|
546
|
+
_headers=_headers,
|
|
547
|
+
_host_index=_host_index,
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
551
|
+
"204": None,
|
|
552
|
+
"400": "BadRequest",
|
|
553
|
+
"401": "UnauthorizedRequest",
|
|
554
|
+
"404": None,
|
|
555
|
+
"409": None,
|
|
556
|
+
"500": None,
|
|
557
|
+
}
|
|
558
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
559
|
+
return response_data.response
|
|
560
|
+
|
|
561
|
+
def _delete_instance_serialize(
|
|
562
|
+
self,
|
|
563
|
+
project_id,
|
|
564
|
+
region_id,
|
|
565
|
+
instance_id,
|
|
566
|
+
_request_auth,
|
|
567
|
+
_content_type,
|
|
568
|
+
_headers,
|
|
569
|
+
_host_index,
|
|
570
|
+
) -> RequestSerialized:
|
|
571
|
+
|
|
572
|
+
_host = None
|
|
573
|
+
|
|
574
|
+
_collection_formats: Dict[str, str] = {}
|
|
575
|
+
|
|
576
|
+
_path_params: Dict[str, str] = {}
|
|
577
|
+
_query_params: List[Tuple[str, str]] = []
|
|
578
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
579
|
+
_form_params: List[Tuple[str, str]] = []
|
|
580
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
581
|
+
_body_params: Optional[bytes] = None
|
|
582
|
+
|
|
583
|
+
# process the path parameters
|
|
584
|
+
if project_id is not None:
|
|
585
|
+
_path_params["projectId"] = project_id
|
|
586
|
+
if region_id is not None:
|
|
587
|
+
_path_params["regionId"] = region_id
|
|
588
|
+
if instance_id is not None:
|
|
589
|
+
_path_params["instanceId"] = instance_id
|
|
590
|
+
# process the query parameters
|
|
591
|
+
# process the header parameters
|
|
592
|
+
# process the form parameters
|
|
593
|
+
# process the body parameter
|
|
594
|
+
|
|
595
|
+
# set the HTTP header `Accept`
|
|
596
|
+
if "Accept" not in _header_params:
|
|
597
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
598
|
+
|
|
599
|
+
# authentication setting
|
|
600
|
+
_auth_settings: List[str] = []
|
|
601
|
+
|
|
602
|
+
return self.api_client.param_serialize(
|
|
603
|
+
method="DELETE",
|
|
604
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}",
|
|
605
|
+
path_params=_path_params,
|
|
606
|
+
query_params=_query_params,
|
|
607
|
+
header_params=_header_params,
|
|
608
|
+
body=_body_params,
|
|
609
|
+
post_params=_form_params,
|
|
610
|
+
files=_files,
|
|
611
|
+
auth_settings=_auth_settings,
|
|
612
|
+
collection_formats=_collection_formats,
|
|
613
|
+
_host=_host,
|
|
614
|
+
_request_auth=_request_auth,
|
|
615
|
+
)
|
|
616
|
+
|
|
617
|
+
@validate_call
|
|
618
|
+
def delete_instance_by_name(
|
|
619
|
+
self,
|
|
620
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
621
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
622
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
623
|
+
_request_timeout: Union[
|
|
624
|
+
None,
|
|
625
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
626
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
627
|
+
] = None,
|
|
628
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
629
|
+
_content_type: Optional[StrictStr] = None,
|
|
630
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
631
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
632
|
+
) -> None:
|
|
633
|
+
"""delete_instance_by_name
|
|
634
|
+
|
|
635
|
+
Deletes the given instance by name.
|
|
636
|
+
|
|
637
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
638
|
+
:type project_id: str
|
|
639
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
640
|
+
:type region_id: str
|
|
641
|
+
:param display_name: The instance display name. (required)
|
|
642
|
+
:type display_name: str
|
|
643
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
644
|
+
number provided, it will be total request
|
|
645
|
+
timeout. It can also be a pair (tuple) of
|
|
646
|
+
(connection, read) timeouts.
|
|
647
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
648
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
649
|
+
request; this effectively ignores the
|
|
650
|
+
authentication in the spec for a single request.
|
|
651
|
+
:type _request_auth: dict, optional
|
|
652
|
+
:param _content_type: force content-type for the request.
|
|
653
|
+
:type _content_type: str, Optional
|
|
654
|
+
:param _headers: set to override the headers for a single
|
|
655
|
+
request; this effectively ignores the headers
|
|
656
|
+
in the spec for a single request.
|
|
657
|
+
:type _headers: dict, optional
|
|
658
|
+
:param _host_index: set to override the host_index for a single
|
|
659
|
+
request; this effectively ignores the host_index
|
|
660
|
+
in the spec for a single request.
|
|
661
|
+
:type _host_index: int, optional
|
|
662
|
+
:return: Returns the result object.
|
|
663
|
+
""" # noqa: E501
|
|
664
|
+
|
|
665
|
+
_param = self._delete_instance_by_name_serialize(
|
|
666
|
+
project_id=project_id,
|
|
667
|
+
region_id=region_id,
|
|
668
|
+
display_name=display_name,
|
|
669
|
+
_request_auth=_request_auth,
|
|
670
|
+
_content_type=_content_type,
|
|
671
|
+
_headers=_headers,
|
|
672
|
+
_host_index=_host_index,
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
676
|
+
"204": None,
|
|
677
|
+
"400": "BadRequest",
|
|
678
|
+
"401": "UnauthorizedRequest",
|
|
679
|
+
"404": None,
|
|
680
|
+
"409": None,
|
|
681
|
+
"500": None,
|
|
682
|
+
}
|
|
683
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
684
|
+
response_data.read()
|
|
685
|
+
return self.api_client.response_deserialize(
|
|
686
|
+
response_data=response_data,
|
|
687
|
+
response_types_map=_response_types_map,
|
|
688
|
+
).data
|
|
689
|
+
|
|
690
|
+
@validate_call
|
|
691
|
+
def delete_instance_by_name_with_http_info(
|
|
692
|
+
self,
|
|
693
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
694
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
695
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
696
|
+
_request_timeout: Union[
|
|
697
|
+
None,
|
|
698
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
699
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
700
|
+
] = None,
|
|
701
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
702
|
+
_content_type: Optional[StrictStr] = None,
|
|
703
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
704
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
705
|
+
) -> ApiResponse[None]:
|
|
706
|
+
"""delete_instance_by_name
|
|
707
|
+
|
|
708
|
+
Deletes the given instance by name.
|
|
709
|
+
|
|
710
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
711
|
+
:type project_id: str
|
|
712
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
713
|
+
:type region_id: str
|
|
714
|
+
:param display_name: The instance display name. (required)
|
|
715
|
+
:type display_name: str
|
|
716
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
717
|
+
number provided, it will be total request
|
|
718
|
+
timeout. It can also be a pair (tuple) of
|
|
719
|
+
(connection, read) timeouts.
|
|
720
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
721
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
722
|
+
request; this effectively ignores the
|
|
723
|
+
authentication in the spec for a single request.
|
|
724
|
+
:type _request_auth: dict, optional
|
|
725
|
+
:param _content_type: force content-type for the request.
|
|
726
|
+
:type _content_type: str, Optional
|
|
727
|
+
:param _headers: set to override the headers for a single
|
|
728
|
+
request; this effectively ignores the headers
|
|
729
|
+
in the spec for a single request.
|
|
730
|
+
:type _headers: dict, optional
|
|
731
|
+
:param _host_index: set to override the host_index for a single
|
|
732
|
+
request; this effectively ignores the host_index
|
|
733
|
+
in the spec for a single request.
|
|
734
|
+
:type _host_index: int, optional
|
|
735
|
+
:return: Returns the result object.
|
|
736
|
+
""" # noqa: E501
|
|
737
|
+
|
|
738
|
+
_param = self._delete_instance_by_name_serialize(
|
|
739
|
+
project_id=project_id,
|
|
740
|
+
region_id=region_id,
|
|
741
|
+
display_name=display_name,
|
|
742
|
+
_request_auth=_request_auth,
|
|
743
|
+
_content_type=_content_type,
|
|
744
|
+
_headers=_headers,
|
|
745
|
+
_host_index=_host_index,
|
|
746
|
+
)
|
|
747
|
+
|
|
748
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
749
|
+
"204": None,
|
|
750
|
+
"400": "BadRequest",
|
|
751
|
+
"401": "UnauthorizedRequest",
|
|
752
|
+
"404": None,
|
|
753
|
+
"409": None,
|
|
754
|
+
"500": None,
|
|
755
|
+
}
|
|
756
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
757
|
+
response_data.read()
|
|
758
|
+
return self.api_client.response_deserialize(
|
|
759
|
+
response_data=response_data,
|
|
760
|
+
response_types_map=_response_types_map,
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
@validate_call
|
|
764
|
+
def delete_instance_by_name_without_preload_content(
|
|
765
|
+
self,
|
|
766
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
767
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
768
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
769
|
+
_request_timeout: Union[
|
|
770
|
+
None,
|
|
771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
772
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
773
|
+
] = None,
|
|
774
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
775
|
+
_content_type: Optional[StrictStr] = None,
|
|
776
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
777
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
778
|
+
) -> RESTResponseType:
|
|
779
|
+
"""delete_instance_by_name
|
|
780
|
+
|
|
781
|
+
Deletes the given instance by name.
|
|
782
|
+
|
|
783
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
784
|
+
:type project_id: str
|
|
785
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
786
|
+
:type region_id: str
|
|
787
|
+
:param display_name: The instance display name. (required)
|
|
788
|
+
:type display_name: str
|
|
789
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
790
|
+
number provided, it will be total request
|
|
791
|
+
timeout. It can also be a pair (tuple) of
|
|
792
|
+
(connection, read) timeouts.
|
|
793
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
794
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
795
|
+
request; this effectively ignores the
|
|
796
|
+
authentication in the spec for a single request.
|
|
797
|
+
:type _request_auth: dict, optional
|
|
798
|
+
:param _content_type: force content-type for the request.
|
|
799
|
+
:type _content_type: str, Optional
|
|
800
|
+
:param _headers: set to override the headers for a single
|
|
801
|
+
request; this effectively ignores the headers
|
|
802
|
+
in the spec for a single request.
|
|
803
|
+
:type _headers: dict, optional
|
|
804
|
+
:param _host_index: set to override the host_index for a single
|
|
805
|
+
request; this effectively ignores the host_index
|
|
806
|
+
in the spec for a single request.
|
|
807
|
+
:type _host_index: int, optional
|
|
808
|
+
:return: Returns the result object.
|
|
809
|
+
""" # noqa: E501
|
|
810
|
+
|
|
811
|
+
_param = self._delete_instance_by_name_serialize(
|
|
812
|
+
project_id=project_id,
|
|
813
|
+
region_id=region_id,
|
|
814
|
+
display_name=display_name,
|
|
815
|
+
_request_auth=_request_auth,
|
|
816
|
+
_content_type=_content_type,
|
|
817
|
+
_headers=_headers,
|
|
818
|
+
_host_index=_host_index,
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
822
|
+
"204": None,
|
|
823
|
+
"400": "BadRequest",
|
|
824
|
+
"401": "UnauthorizedRequest",
|
|
825
|
+
"404": None,
|
|
826
|
+
"409": None,
|
|
827
|
+
"500": None,
|
|
828
|
+
}
|
|
829
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
830
|
+
return response_data.response
|
|
831
|
+
|
|
832
|
+
def _delete_instance_by_name_serialize(
|
|
833
|
+
self,
|
|
834
|
+
project_id,
|
|
835
|
+
region_id,
|
|
836
|
+
display_name,
|
|
837
|
+
_request_auth,
|
|
838
|
+
_content_type,
|
|
839
|
+
_headers,
|
|
840
|
+
_host_index,
|
|
841
|
+
) -> RequestSerialized:
|
|
842
|
+
|
|
843
|
+
_host = None
|
|
844
|
+
|
|
845
|
+
_collection_formats: Dict[str, str] = {}
|
|
846
|
+
|
|
847
|
+
_path_params: Dict[str, str] = {}
|
|
848
|
+
_query_params: List[Tuple[str, str]] = []
|
|
849
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
850
|
+
_form_params: List[Tuple[str, str]] = []
|
|
851
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
852
|
+
_body_params: Optional[bytes] = None
|
|
853
|
+
|
|
854
|
+
# process the path parameters
|
|
855
|
+
if project_id is not None:
|
|
856
|
+
_path_params["projectId"] = project_id
|
|
857
|
+
if region_id is not None:
|
|
858
|
+
_path_params["regionId"] = region_id
|
|
859
|
+
if display_name is not None:
|
|
860
|
+
_path_params["displayName"] = display_name
|
|
861
|
+
# process the query parameters
|
|
862
|
+
# process the header parameters
|
|
863
|
+
# process the form parameters
|
|
864
|
+
# process the body parameter
|
|
865
|
+
|
|
866
|
+
# set the HTTP header `Accept`
|
|
867
|
+
if "Accept" not in _header_params:
|
|
868
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
869
|
+
|
|
870
|
+
# authentication setting
|
|
871
|
+
_auth_settings: List[str] = []
|
|
872
|
+
|
|
873
|
+
return self.api_client.param_serialize(
|
|
874
|
+
method="DELETE",
|
|
875
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}",
|
|
876
|
+
path_params=_path_params,
|
|
877
|
+
query_params=_query_params,
|
|
878
|
+
header_params=_header_params,
|
|
879
|
+
body=_body_params,
|
|
880
|
+
post_params=_form_params,
|
|
881
|
+
files=_files,
|
|
882
|
+
auth_settings=_auth_settings,
|
|
883
|
+
collection_formats=_collection_formats,
|
|
884
|
+
_host=_host,
|
|
885
|
+
_request_auth=_request_auth,
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
@validate_call
|
|
889
|
+
def get_instance(
|
|
890
|
+
self,
|
|
891
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
892
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
893
|
+
instance_id: Annotated[
|
|
894
|
+
str,
|
|
895
|
+
Field(
|
|
896
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
897
|
+
),
|
|
898
|
+
],
|
|
899
|
+
_request_timeout: Union[
|
|
900
|
+
None,
|
|
901
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
902
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
903
|
+
] = None,
|
|
904
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
905
|
+
_content_type: Optional[StrictStr] = None,
|
|
906
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
907
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
908
|
+
) -> Instance:
|
|
909
|
+
"""get_instance
|
|
910
|
+
|
|
911
|
+
Returns the details for the given instance.
|
|
912
|
+
|
|
913
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
914
|
+
:type project_id: str
|
|
915
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
916
|
+
:type region_id: str
|
|
917
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
918
|
+
:type instance_id: str
|
|
919
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
920
|
+
number provided, it will be total request
|
|
921
|
+
timeout. It can also be a pair (tuple) of
|
|
922
|
+
(connection, read) timeouts.
|
|
923
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
924
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
925
|
+
request; this effectively ignores the
|
|
926
|
+
authentication in the spec for a single request.
|
|
927
|
+
:type _request_auth: dict, optional
|
|
928
|
+
:param _content_type: force content-type for the request.
|
|
929
|
+
:type _content_type: str, Optional
|
|
930
|
+
:param _headers: set to override the headers for a single
|
|
931
|
+
request; this effectively ignores the headers
|
|
932
|
+
in the spec for a single request.
|
|
933
|
+
:type _headers: dict, optional
|
|
934
|
+
:param _host_index: set to override the host_index for a single
|
|
935
|
+
request; this effectively ignores the host_index
|
|
936
|
+
in the spec for a single request.
|
|
937
|
+
:type _host_index: int, optional
|
|
938
|
+
:return: Returns the result object.
|
|
939
|
+
""" # noqa: E501
|
|
940
|
+
|
|
941
|
+
_param = self._get_instance_serialize(
|
|
942
|
+
project_id=project_id,
|
|
943
|
+
region_id=region_id,
|
|
944
|
+
instance_id=instance_id,
|
|
945
|
+
_request_auth=_request_auth,
|
|
946
|
+
_content_type=_content_type,
|
|
947
|
+
_headers=_headers,
|
|
948
|
+
_host_index=_host_index,
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
952
|
+
"200": "Instance",
|
|
953
|
+
"400": "BadRequest",
|
|
954
|
+
"401": "UnauthorizedRequest",
|
|
955
|
+
"404": None,
|
|
956
|
+
"500": None,
|
|
957
|
+
}
|
|
958
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
959
|
+
response_data.read()
|
|
960
|
+
return self.api_client.response_deserialize(
|
|
961
|
+
response_data=response_data,
|
|
962
|
+
response_types_map=_response_types_map,
|
|
963
|
+
).data
|
|
964
|
+
|
|
965
|
+
@validate_call
|
|
966
|
+
def get_instance_with_http_info(
|
|
967
|
+
self,
|
|
968
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
969
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
970
|
+
instance_id: Annotated[
|
|
971
|
+
str,
|
|
972
|
+
Field(
|
|
973
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
974
|
+
),
|
|
975
|
+
],
|
|
976
|
+
_request_timeout: Union[
|
|
977
|
+
None,
|
|
978
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
979
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
980
|
+
] = None,
|
|
981
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
982
|
+
_content_type: Optional[StrictStr] = None,
|
|
983
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
984
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
985
|
+
) -> ApiResponse[Instance]:
|
|
986
|
+
"""get_instance
|
|
987
|
+
|
|
988
|
+
Returns the details for the given instance.
|
|
989
|
+
|
|
990
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
991
|
+
:type project_id: str
|
|
992
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
993
|
+
:type region_id: str
|
|
994
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
995
|
+
:type instance_id: str
|
|
996
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
997
|
+
number provided, it will be total request
|
|
998
|
+
timeout. It can also be a pair (tuple) of
|
|
999
|
+
(connection, read) timeouts.
|
|
1000
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1001
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1002
|
+
request; this effectively ignores the
|
|
1003
|
+
authentication in the spec for a single request.
|
|
1004
|
+
:type _request_auth: dict, optional
|
|
1005
|
+
:param _content_type: force content-type for the request.
|
|
1006
|
+
:type _content_type: str, Optional
|
|
1007
|
+
:param _headers: set to override the headers for a single
|
|
1008
|
+
request; this effectively ignores the headers
|
|
1009
|
+
in the spec for a single request.
|
|
1010
|
+
:type _headers: dict, optional
|
|
1011
|
+
:param _host_index: set to override the host_index for a single
|
|
1012
|
+
request; this effectively ignores the host_index
|
|
1013
|
+
in the spec for a single request.
|
|
1014
|
+
:type _host_index: int, optional
|
|
1015
|
+
:return: Returns the result object.
|
|
1016
|
+
""" # noqa: E501
|
|
1017
|
+
|
|
1018
|
+
_param = self._get_instance_serialize(
|
|
1019
|
+
project_id=project_id,
|
|
1020
|
+
region_id=region_id,
|
|
1021
|
+
instance_id=instance_id,
|
|
1022
|
+
_request_auth=_request_auth,
|
|
1023
|
+
_content_type=_content_type,
|
|
1024
|
+
_headers=_headers,
|
|
1025
|
+
_host_index=_host_index,
|
|
1026
|
+
)
|
|
1027
|
+
|
|
1028
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1029
|
+
"200": "Instance",
|
|
1030
|
+
"400": "BadRequest",
|
|
1031
|
+
"401": "UnauthorizedRequest",
|
|
1032
|
+
"404": None,
|
|
1033
|
+
"500": None,
|
|
1034
|
+
}
|
|
1035
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1036
|
+
response_data.read()
|
|
1037
|
+
return self.api_client.response_deserialize(
|
|
1038
|
+
response_data=response_data,
|
|
1039
|
+
response_types_map=_response_types_map,
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
@validate_call
|
|
1043
|
+
def get_instance_without_preload_content(
|
|
1044
|
+
self,
|
|
1045
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1046
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1047
|
+
instance_id: Annotated[
|
|
1048
|
+
str,
|
|
1049
|
+
Field(
|
|
1050
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
1051
|
+
),
|
|
1052
|
+
],
|
|
1053
|
+
_request_timeout: Union[
|
|
1054
|
+
None,
|
|
1055
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1056
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1057
|
+
] = None,
|
|
1058
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1059
|
+
_content_type: Optional[StrictStr] = None,
|
|
1060
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1061
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1062
|
+
) -> RESTResponseType:
|
|
1063
|
+
"""get_instance
|
|
1064
|
+
|
|
1065
|
+
Returns the details for the given instance.
|
|
1066
|
+
|
|
1067
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1068
|
+
:type project_id: str
|
|
1069
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1070
|
+
:type region_id: str
|
|
1071
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
1072
|
+
:type instance_id: str
|
|
1073
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1074
|
+
number provided, it will be total request
|
|
1075
|
+
timeout. It can also be a pair (tuple) of
|
|
1076
|
+
(connection, read) timeouts.
|
|
1077
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1078
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1079
|
+
request; this effectively ignores the
|
|
1080
|
+
authentication in the spec for a single request.
|
|
1081
|
+
:type _request_auth: dict, optional
|
|
1082
|
+
:param _content_type: force content-type for the request.
|
|
1083
|
+
:type _content_type: str, Optional
|
|
1084
|
+
:param _headers: set to override the headers for a single
|
|
1085
|
+
request; this effectively ignores the headers
|
|
1086
|
+
in the spec for a single request.
|
|
1087
|
+
:type _headers: dict, optional
|
|
1088
|
+
:param _host_index: set to override the host_index for a single
|
|
1089
|
+
request; this effectively ignores the host_index
|
|
1090
|
+
in the spec for a single request.
|
|
1091
|
+
:type _host_index: int, optional
|
|
1092
|
+
:return: Returns the result object.
|
|
1093
|
+
""" # noqa: E501
|
|
1094
|
+
|
|
1095
|
+
_param = self._get_instance_serialize(
|
|
1096
|
+
project_id=project_id,
|
|
1097
|
+
region_id=region_id,
|
|
1098
|
+
instance_id=instance_id,
|
|
1099
|
+
_request_auth=_request_auth,
|
|
1100
|
+
_content_type=_content_type,
|
|
1101
|
+
_headers=_headers,
|
|
1102
|
+
_host_index=_host_index,
|
|
1103
|
+
)
|
|
1104
|
+
|
|
1105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1106
|
+
"200": "Instance",
|
|
1107
|
+
"400": "BadRequest",
|
|
1108
|
+
"401": "UnauthorizedRequest",
|
|
1109
|
+
"404": None,
|
|
1110
|
+
"500": None,
|
|
1111
|
+
}
|
|
1112
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1113
|
+
return response_data.response
|
|
1114
|
+
|
|
1115
|
+
def _get_instance_serialize(
|
|
1116
|
+
self,
|
|
1117
|
+
project_id,
|
|
1118
|
+
region_id,
|
|
1119
|
+
instance_id,
|
|
1120
|
+
_request_auth,
|
|
1121
|
+
_content_type,
|
|
1122
|
+
_headers,
|
|
1123
|
+
_host_index,
|
|
1124
|
+
) -> RequestSerialized:
|
|
1125
|
+
|
|
1126
|
+
_host = None
|
|
1127
|
+
|
|
1128
|
+
_collection_formats: Dict[str, str] = {}
|
|
1129
|
+
|
|
1130
|
+
_path_params: Dict[str, str] = {}
|
|
1131
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1132
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1133
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1134
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1135
|
+
_body_params: Optional[bytes] = None
|
|
1136
|
+
|
|
1137
|
+
# process the path parameters
|
|
1138
|
+
if project_id is not None:
|
|
1139
|
+
_path_params["projectId"] = project_id
|
|
1140
|
+
if region_id is not None:
|
|
1141
|
+
_path_params["regionId"] = region_id
|
|
1142
|
+
if instance_id is not None:
|
|
1143
|
+
_path_params["instanceId"] = instance_id
|
|
1144
|
+
# process the query parameters
|
|
1145
|
+
# process the header parameters
|
|
1146
|
+
# process the form parameters
|
|
1147
|
+
# process the body parameter
|
|
1148
|
+
|
|
1149
|
+
# set the HTTP header `Accept`
|
|
1150
|
+
if "Accept" not in _header_params:
|
|
1151
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1152
|
+
|
|
1153
|
+
# authentication setting
|
|
1154
|
+
_auth_settings: List[str] = []
|
|
1155
|
+
|
|
1156
|
+
return self.api_client.param_serialize(
|
|
1157
|
+
method="GET",
|
|
1158
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}",
|
|
1159
|
+
path_params=_path_params,
|
|
1160
|
+
query_params=_query_params,
|
|
1161
|
+
header_params=_header_params,
|
|
1162
|
+
body=_body_params,
|
|
1163
|
+
post_params=_form_params,
|
|
1164
|
+
files=_files,
|
|
1165
|
+
auth_settings=_auth_settings,
|
|
1166
|
+
collection_formats=_collection_formats,
|
|
1167
|
+
_host=_host,
|
|
1168
|
+
_request_auth=_request_auth,
|
|
1169
|
+
)
|
|
1170
|
+
|
|
1171
|
+
@validate_call
|
|
1172
|
+
def get_instance_by_name(
|
|
1173
|
+
self,
|
|
1174
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1175
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1176
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
1177
|
+
_request_timeout: Union[
|
|
1178
|
+
None,
|
|
1179
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1180
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1181
|
+
] = None,
|
|
1182
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1183
|
+
_content_type: Optional[StrictStr] = None,
|
|
1184
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1185
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1186
|
+
) -> Instance:
|
|
1187
|
+
"""get_instance_by_name
|
|
1188
|
+
|
|
1189
|
+
Returns the details for the given instance by name.
|
|
1190
|
+
|
|
1191
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1192
|
+
:type project_id: str
|
|
1193
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1194
|
+
:type region_id: str
|
|
1195
|
+
:param display_name: The instance display name. (required)
|
|
1196
|
+
:type display_name: str
|
|
1197
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1198
|
+
number provided, it will be total request
|
|
1199
|
+
timeout. It can also be a pair (tuple) of
|
|
1200
|
+
(connection, read) timeouts.
|
|
1201
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1202
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1203
|
+
request; this effectively ignores the
|
|
1204
|
+
authentication in the spec for a single request.
|
|
1205
|
+
:type _request_auth: dict, optional
|
|
1206
|
+
:param _content_type: force content-type for the request.
|
|
1207
|
+
:type _content_type: str, Optional
|
|
1208
|
+
:param _headers: set to override the headers for a single
|
|
1209
|
+
request; this effectively ignores the headers
|
|
1210
|
+
in the spec for a single request.
|
|
1211
|
+
:type _headers: dict, optional
|
|
1212
|
+
:param _host_index: set to override the host_index for a single
|
|
1213
|
+
request; this effectively ignores the host_index
|
|
1214
|
+
in the spec for a single request.
|
|
1215
|
+
:type _host_index: int, optional
|
|
1216
|
+
:return: Returns the result object.
|
|
1217
|
+
""" # noqa: E501
|
|
1218
|
+
|
|
1219
|
+
_param = self._get_instance_by_name_serialize(
|
|
1220
|
+
project_id=project_id,
|
|
1221
|
+
region_id=region_id,
|
|
1222
|
+
display_name=display_name,
|
|
1223
|
+
_request_auth=_request_auth,
|
|
1224
|
+
_content_type=_content_type,
|
|
1225
|
+
_headers=_headers,
|
|
1226
|
+
_host_index=_host_index,
|
|
1227
|
+
)
|
|
1228
|
+
|
|
1229
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1230
|
+
"200": "Instance",
|
|
1231
|
+
"400": "BadRequest",
|
|
1232
|
+
"401": "UnauthorizedRequest",
|
|
1233
|
+
"404": None,
|
|
1234
|
+
"500": None,
|
|
1235
|
+
}
|
|
1236
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1237
|
+
response_data.read()
|
|
1238
|
+
return self.api_client.response_deserialize(
|
|
1239
|
+
response_data=response_data,
|
|
1240
|
+
response_types_map=_response_types_map,
|
|
1241
|
+
).data
|
|
1242
|
+
|
|
1243
|
+
@validate_call
|
|
1244
|
+
def get_instance_by_name_with_http_info(
|
|
1245
|
+
self,
|
|
1246
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1247
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1248
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
1249
|
+
_request_timeout: Union[
|
|
1250
|
+
None,
|
|
1251
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1252
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1253
|
+
] = None,
|
|
1254
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1255
|
+
_content_type: Optional[StrictStr] = None,
|
|
1256
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1257
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1258
|
+
) -> ApiResponse[Instance]:
|
|
1259
|
+
"""get_instance_by_name
|
|
1260
|
+
|
|
1261
|
+
Returns the details for the given instance by name.
|
|
1262
|
+
|
|
1263
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1264
|
+
:type project_id: str
|
|
1265
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1266
|
+
:type region_id: str
|
|
1267
|
+
:param display_name: The instance display name. (required)
|
|
1268
|
+
:type display_name: str
|
|
1269
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1270
|
+
number provided, it will be total request
|
|
1271
|
+
timeout. It can also be a pair (tuple) of
|
|
1272
|
+
(connection, read) timeouts.
|
|
1273
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1274
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1275
|
+
request; this effectively ignores the
|
|
1276
|
+
authentication in the spec for a single request.
|
|
1277
|
+
:type _request_auth: dict, optional
|
|
1278
|
+
:param _content_type: force content-type for the request.
|
|
1279
|
+
:type _content_type: str, Optional
|
|
1280
|
+
:param _headers: set to override the headers for a single
|
|
1281
|
+
request; this effectively ignores the headers
|
|
1282
|
+
in the spec for a single request.
|
|
1283
|
+
:type _headers: dict, optional
|
|
1284
|
+
:param _host_index: set to override the host_index for a single
|
|
1285
|
+
request; this effectively ignores the host_index
|
|
1286
|
+
in the spec for a single request.
|
|
1287
|
+
:type _host_index: int, optional
|
|
1288
|
+
:return: Returns the result object.
|
|
1289
|
+
""" # noqa: E501
|
|
1290
|
+
|
|
1291
|
+
_param = self._get_instance_by_name_serialize(
|
|
1292
|
+
project_id=project_id,
|
|
1293
|
+
region_id=region_id,
|
|
1294
|
+
display_name=display_name,
|
|
1295
|
+
_request_auth=_request_auth,
|
|
1296
|
+
_content_type=_content_type,
|
|
1297
|
+
_headers=_headers,
|
|
1298
|
+
_host_index=_host_index,
|
|
1299
|
+
)
|
|
1300
|
+
|
|
1301
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1302
|
+
"200": "Instance",
|
|
1303
|
+
"400": "BadRequest",
|
|
1304
|
+
"401": "UnauthorizedRequest",
|
|
1305
|
+
"404": None,
|
|
1306
|
+
"500": None,
|
|
1307
|
+
}
|
|
1308
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1309
|
+
response_data.read()
|
|
1310
|
+
return self.api_client.response_deserialize(
|
|
1311
|
+
response_data=response_data,
|
|
1312
|
+
response_types_map=_response_types_map,
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
@validate_call
|
|
1316
|
+
def get_instance_by_name_without_preload_content(
|
|
1317
|
+
self,
|
|
1318
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1319
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1320
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
1321
|
+
_request_timeout: Union[
|
|
1322
|
+
None,
|
|
1323
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1324
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1325
|
+
] = None,
|
|
1326
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1327
|
+
_content_type: Optional[StrictStr] = None,
|
|
1328
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1329
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1330
|
+
) -> RESTResponseType:
|
|
1331
|
+
"""get_instance_by_name
|
|
1332
|
+
|
|
1333
|
+
Returns the details for the given instance by name.
|
|
1334
|
+
|
|
1335
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1336
|
+
:type project_id: str
|
|
1337
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1338
|
+
:type region_id: str
|
|
1339
|
+
:param display_name: The instance display name. (required)
|
|
1340
|
+
:type display_name: str
|
|
1341
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1342
|
+
number provided, it will be total request
|
|
1343
|
+
timeout. It can also be a pair (tuple) of
|
|
1344
|
+
(connection, read) timeouts.
|
|
1345
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1346
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1347
|
+
request; this effectively ignores the
|
|
1348
|
+
authentication in the spec for a single request.
|
|
1349
|
+
:type _request_auth: dict, optional
|
|
1350
|
+
:param _content_type: force content-type for the request.
|
|
1351
|
+
:type _content_type: str, Optional
|
|
1352
|
+
:param _headers: set to override the headers for a single
|
|
1353
|
+
request; this effectively ignores the headers
|
|
1354
|
+
in the spec for a single request.
|
|
1355
|
+
:type _headers: dict, optional
|
|
1356
|
+
:param _host_index: set to override the host_index for a single
|
|
1357
|
+
request; this effectively ignores the host_index
|
|
1358
|
+
in the spec for a single request.
|
|
1359
|
+
:type _host_index: int, optional
|
|
1360
|
+
:return: Returns the result object.
|
|
1361
|
+
""" # noqa: E501
|
|
1362
|
+
|
|
1363
|
+
_param = self._get_instance_by_name_serialize(
|
|
1364
|
+
project_id=project_id,
|
|
1365
|
+
region_id=region_id,
|
|
1366
|
+
display_name=display_name,
|
|
1367
|
+
_request_auth=_request_auth,
|
|
1368
|
+
_content_type=_content_type,
|
|
1369
|
+
_headers=_headers,
|
|
1370
|
+
_host_index=_host_index,
|
|
1371
|
+
)
|
|
1372
|
+
|
|
1373
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1374
|
+
"200": "Instance",
|
|
1375
|
+
"400": "BadRequest",
|
|
1376
|
+
"401": "UnauthorizedRequest",
|
|
1377
|
+
"404": None,
|
|
1378
|
+
"500": None,
|
|
1379
|
+
}
|
|
1380
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1381
|
+
return response_data.response
|
|
1382
|
+
|
|
1383
|
+
def _get_instance_by_name_serialize(
|
|
1384
|
+
self,
|
|
1385
|
+
project_id,
|
|
1386
|
+
region_id,
|
|
1387
|
+
display_name,
|
|
1388
|
+
_request_auth,
|
|
1389
|
+
_content_type,
|
|
1390
|
+
_headers,
|
|
1391
|
+
_host_index,
|
|
1392
|
+
) -> RequestSerialized:
|
|
1393
|
+
|
|
1394
|
+
_host = None
|
|
1395
|
+
|
|
1396
|
+
_collection_formats: Dict[str, str] = {}
|
|
1397
|
+
|
|
1398
|
+
_path_params: Dict[str, str] = {}
|
|
1399
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1400
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1401
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1402
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1403
|
+
_body_params: Optional[bytes] = None
|
|
1404
|
+
|
|
1405
|
+
# process the path parameters
|
|
1406
|
+
if project_id is not None:
|
|
1407
|
+
_path_params["projectId"] = project_id
|
|
1408
|
+
if region_id is not None:
|
|
1409
|
+
_path_params["regionId"] = region_id
|
|
1410
|
+
if display_name is not None:
|
|
1411
|
+
_path_params["displayName"] = display_name
|
|
1412
|
+
# process the query parameters
|
|
1413
|
+
# process the header parameters
|
|
1414
|
+
# process the form parameters
|
|
1415
|
+
# process the body parameter
|
|
1416
|
+
|
|
1417
|
+
# set the HTTP header `Accept`
|
|
1418
|
+
if "Accept" not in _header_params:
|
|
1419
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1420
|
+
|
|
1421
|
+
# authentication setting
|
|
1422
|
+
_auth_settings: List[str] = []
|
|
1423
|
+
|
|
1424
|
+
return self.api_client.param_serialize(
|
|
1425
|
+
method="GET",
|
|
1426
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}",
|
|
1427
|
+
path_params=_path_params,
|
|
1428
|
+
query_params=_query_params,
|
|
1429
|
+
header_params=_header_params,
|
|
1430
|
+
body=_body_params,
|
|
1431
|
+
post_params=_form_params,
|
|
1432
|
+
files=_files,
|
|
1433
|
+
auth_settings=_auth_settings,
|
|
1434
|
+
collection_formats=_collection_formats,
|
|
1435
|
+
_host=_host,
|
|
1436
|
+
_request_auth=_request_auth,
|
|
1437
|
+
)
|
|
1438
|
+
|
|
1439
|
+
@validate_call
|
|
1440
|
+
def get_kubeconfig_by_instance_id(
|
|
1441
|
+
self,
|
|
1442
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1443
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1444
|
+
instance_id: Annotated[
|
|
1445
|
+
str,
|
|
1446
|
+
Field(
|
|
1447
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
1448
|
+
),
|
|
1449
|
+
],
|
|
1450
|
+
expiration_seconds: Annotated[
|
|
1451
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
1452
|
+
Field(description="Expiration of the included token in seconds"),
|
|
1453
|
+
] = None,
|
|
1454
|
+
_request_timeout: Union[
|
|
1455
|
+
None,
|
|
1456
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1457
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1458
|
+
] = None,
|
|
1459
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1460
|
+
_content_type: Optional[StrictStr] = None,
|
|
1461
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1462
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1463
|
+
) -> Kubeconfig:
|
|
1464
|
+
"""get_kubeconfig_by_instance_id
|
|
1465
|
+
|
|
1466
|
+
Returns the kubeconfig for the given instance.
|
|
1467
|
+
|
|
1468
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1469
|
+
:type project_id: str
|
|
1470
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1471
|
+
:type region_id: str
|
|
1472
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
1473
|
+
:type instance_id: str
|
|
1474
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
1475
|
+
:type expiration_seconds: int
|
|
1476
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1477
|
+
number provided, it will be total request
|
|
1478
|
+
timeout. It can also be a pair (tuple) of
|
|
1479
|
+
(connection, read) timeouts.
|
|
1480
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1481
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1482
|
+
request; this effectively ignores the
|
|
1483
|
+
authentication in the spec for a single request.
|
|
1484
|
+
:type _request_auth: dict, optional
|
|
1485
|
+
:param _content_type: force content-type for the request.
|
|
1486
|
+
:type _content_type: str, Optional
|
|
1487
|
+
:param _headers: set to override the headers for a single
|
|
1488
|
+
request; this effectively ignores the headers
|
|
1489
|
+
in the spec for a single request.
|
|
1490
|
+
:type _headers: dict, optional
|
|
1491
|
+
:param _host_index: set to override the host_index for a single
|
|
1492
|
+
request; this effectively ignores the host_index
|
|
1493
|
+
in the spec for a single request.
|
|
1494
|
+
:type _host_index: int, optional
|
|
1495
|
+
:return: Returns the result object.
|
|
1496
|
+
""" # noqa: E501
|
|
1497
|
+
|
|
1498
|
+
_param = self._get_kubeconfig_by_instance_id_serialize(
|
|
1499
|
+
project_id=project_id,
|
|
1500
|
+
region_id=region_id,
|
|
1501
|
+
instance_id=instance_id,
|
|
1502
|
+
expiration_seconds=expiration_seconds,
|
|
1503
|
+
_request_auth=_request_auth,
|
|
1504
|
+
_content_type=_content_type,
|
|
1505
|
+
_headers=_headers,
|
|
1506
|
+
_host_index=_host_index,
|
|
1507
|
+
)
|
|
1508
|
+
|
|
1509
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1510
|
+
"200": "Kubeconfig",
|
|
1511
|
+
"400": "BadRequest",
|
|
1512
|
+
"401": "UnauthorizedRequest",
|
|
1513
|
+
"404": None,
|
|
1514
|
+
"500": None,
|
|
1515
|
+
}
|
|
1516
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1517
|
+
response_data.read()
|
|
1518
|
+
return self.api_client.response_deserialize(
|
|
1519
|
+
response_data=response_data,
|
|
1520
|
+
response_types_map=_response_types_map,
|
|
1521
|
+
).data
|
|
1522
|
+
|
|
1523
|
+
@validate_call
|
|
1524
|
+
def get_kubeconfig_by_instance_id_with_http_info(
|
|
1525
|
+
self,
|
|
1526
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1527
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1528
|
+
instance_id: Annotated[
|
|
1529
|
+
str,
|
|
1530
|
+
Field(
|
|
1531
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
1532
|
+
),
|
|
1533
|
+
],
|
|
1534
|
+
expiration_seconds: Annotated[
|
|
1535
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
1536
|
+
Field(description="Expiration of the included token in seconds"),
|
|
1537
|
+
] = None,
|
|
1538
|
+
_request_timeout: Union[
|
|
1539
|
+
None,
|
|
1540
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1541
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1542
|
+
] = None,
|
|
1543
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1544
|
+
_content_type: Optional[StrictStr] = None,
|
|
1545
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1546
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1547
|
+
) -> ApiResponse[Kubeconfig]:
|
|
1548
|
+
"""get_kubeconfig_by_instance_id
|
|
1549
|
+
|
|
1550
|
+
Returns the kubeconfig for the given instance.
|
|
1551
|
+
|
|
1552
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1553
|
+
:type project_id: str
|
|
1554
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1555
|
+
:type region_id: str
|
|
1556
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
1557
|
+
:type instance_id: str
|
|
1558
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
1559
|
+
:type expiration_seconds: int
|
|
1560
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1561
|
+
number provided, it will be total request
|
|
1562
|
+
timeout. It can also be a pair (tuple) of
|
|
1563
|
+
(connection, read) timeouts.
|
|
1564
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1565
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1566
|
+
request; this effectively ignores the
|
|
1567
|
+
authentication in the spec for a single request.
|
|
1568
|
+
:type _request_auth: dict, optional
|
|
1569
|
+
:param _content_type: force content-type for the request.
|
|
1570
|
+
:type _content_type: str, Optional
|
|
1571
|
+
:param _headers: set to override the headers for a single
|
|
1572
|
+
request; this effectively ignores the headers
|
|
1573
|
+
in the spec for a single request.
|
|
1574
|
+
:type _headers: dict, optional
|
|
1575
|
+
:param _host_index: set to override the host_index for a single
|
|
1576
|
+
request; this effectively ignores the host_index
|
|
1577
|
+
in the spec for a single request.
|
|
1578
|
+
:type _host_index: int, optional
|
|
1579
|
+
:return: Returns the result object.
|
|
1580
|
+
""" # noqa: E501
|
|
1581
|
+
|
|
1582
|
+
_param = self._get_kubeconfig_by_instance_id_serialize(
|
|
1583
|
+
project_id=project_id,
|
|
1584
|
+
region_id=region_id,
|
|
1585
|
+
instance_id=instance_id,
|
|
1586
|
+
expiration_seconds=expiration_seconds,
|
|
1587
|
+
_request_auth=_request_auth,
|
|
1588
|
+
_content_type=_content_type,
|
|
1589
|
+
_headers=_headers,
|
|
1590
|
+
_host_index=_host_index,
|
|
1591
|
+
)
|
|
1592
|
+
|
|
1593
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1594
|
+
"200": "Kubeconfig",
|
|
1595
|
+
"400": "BadRequest",
|
|
1596
|
+
"401": "UnauthorizedRequest",
|
|
1597
|
+
"404": None,
|
|
1598
|
+
"500": None,
|
|
1599
|
+
}
|
|
1600
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1601
|
+
response_data.read()
|
|
1602
|
+
return self.api_client.response_deserialize(
|
|
1603
|
+
response_data=response_data,
|
|
1604
|
+
response_types_map=_response_types_map,
|
|
1605
|
+
)
|
|
1606
|
+
|
|
1607
|
+
@validate_call
|
|
1608
|
+
def get_kubeconfig_by_instance_id_without_preload_content(
|
|
1609
|
+
self,
|
|
1610
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1611
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1612
|
+
instance_id: Annotated[
|
|
1613
|
+
str,
|
|
1614
|
+
Field(
|
|
1615
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
1616
|
+
),
|
|
1617
|
+
],
|
|
1618
|
+
expiration_seconds: Annotated[
|
|
1619
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
1620
|
+
Field(description="Expiration of the included token in seconds"),
|
|
1621
|
+
] = None,
|
|
1622
|
+
_request_timeout: Union[
|
|
1623
|
+
None,
|
|
1624
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1625
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1626
|
+
] = None,
|
|
1627
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1628
|
+
_content_type: Optional[StrictStr] = None,
|
|
1629
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1630
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1631
|
+
) -> RESTResponseType:
|
|
1632
|
+
"""get_kubeconfig_by_instance_id
|
|
1633
|
+
|
|
1634
|
+
Returns the kubeconfig for the given instance.
|
|
1635
|
+
|
|
1636
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1637
|
+
:type project_id: str
|
|
1638
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1639
|
+
:type region_id: str
|
|
1640
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
1641
|
+
:type instance_id: str
|
|
1642
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
1643
|
+
:type expiration_seconds: int
|
|
1644
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1645
|
+
number provided, it will be total request
|
|
1646
|
+
timeout. It can also be a pair (tuple) of
|
|
1647
|
+
(connection, read) timeouts.
|
|
1648
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1649
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1650
|
+
request; this effectively ignores the
|
|
1651
|
+
authentication in the spec for a single request.
|
|
1652
|
+
:type _request_auth: dict, optional
|
|
1653
|
+
:param _content_type: force content-type for the request.
|
|
1654
|
+
:type _content_type: str, Optional
|
|
1655
|
+
:param _headers: set to override the headers for a single
|
|
1656
|
+
request; this effectively ignores the headers
|
|
1657
|
+
in the spec for a single request.
|
|
1658
|
+
:type _headers: dict, optional
|
|
1659
|
+
:param _host_index: set to override the host_index for a single
|
|
1660
|
+
request; this effectively ignores the host_index
|
|
1661
|
+
in the spec for a single request.
|
|
1662
|
+
:type _host_index: int, optional
|
|
1663
|
+
:return: Returns the result object.
|
|
1664
|
+
""" # noqa: E501
|
|
1665
|
+
|
|
1666
|
+
_param = self._get_kubeconfig_by_instance_id_serialize(
|
|
1667
|
+
project_id=project_id,
|
|
1668
|
+
region_id=region_id,
|
|
1669
|
+
instance_id=instance_id,
|
|
1670
|
+
expiration_seconds=expiration_seconds,
|
|
1671
|
+
_request_auth=_request_auth,
|
|
1672
|
+
_content_type=_content_type,
|
|
1673
|
+
_headers=_headers,
|
|
1674
|
+
_host_index=_host_index,
|
|
1675
|
+
)
|
|
1676
|
+
|
|
1677
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1678
|
+
"200": "Kubeconfig",
|
|
1679
|
+
"400": "BadRequest",
|
|
1680
|
+
"401": "UnauthorizedRequest",
|
|
1681
|
+
"404": None,
|
|
1682
|
+
"500": None,
|
|
1683
|
+
}
|
|
1684
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1685
|
+
return response_data.response
|
|
1686
|
+
|
|
1687
|
+
def _get_kubeconfig_by_instance_id_serialize(
|
|
1688
|
+
self,
|
|
1689
|
+
project_id,
|
|
1690
|
+
region_id,
|
|
1691
|
+
instance_id,
|
|
1692
|
+
expiration_seconds,
|
|
1693
|
+
_request_auth,
|
|
1694
|
+
_content_type,
|
|
1695
|
+
_headers,
|
|
1696
|
+
_host_index,
|
|
1697
|
+
) -> RequestSerialized:
|
|
1698
|
+
|
|
1699
|
+
_host = None
|
|
1700
|
+
|
|
1701
|
+
_collection_formats: Dict[str, str] = {}
|
|
1702
|
+
|
|
1703
|
+
_path_params: Dict[str, str] = {}
|
|
1704
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1705
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1706
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1707
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1708
|
+
_body_params: Optional[bytes] = None
|
|
1709
|
+
|
|
1710
|
+
# process the path parameters
|
|
1711
|
+
if project_id is not None:
|
|
1712
|
+
_path_params["projectId"] = project_id
|
|
1713
|
+
if region_id is not None:
|
|
1714
|
+
_path_params["regionId"] = region_id
|
|
1715
|
+
if instance_id is not None:
|
|
1716
|
+
_path_params["instanceId"] = instance_id
|
|
1717
|
+
# process the query parameters
|
|
1718
|
+
if expiration_seconds is not None:
|
|
1719
|
+
|
|
1720
|
+
_query_params.append(("expirationSeconds", expiration_seconds))
|
|
1721
|
+
|
|
1722
|
+
# process the header parameters
|
|
1723
|
+
# process the form parameters
|
|
1724
|
+
# process the body parameter
|
|
1725
|
+
|
|
1726
|
+
# set the HTTP header `Accept`
|
|
1727
|
+
if "Accept" not in _header_params:
|
|
1728
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1729
|
+
|
|
1730
|
+
# authentication setting
|
|
1731
|
+
_auth_settings: List[str] = []
|
|
1732
|
+
|
|
1733
|
+
return self.api_client.param_serialize(
|
|
1734
|
+
method="GET",
|
|
1735
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}/kubeconfig",
|
|
1736
|
+
path_params=_path_params,
|
|
1737
|
+
query_params=_query_params,
|
|
1738
|
+
header_params=_header_params,
|
|
1739
|
+
body=_body_params,
|
|
1740
|
+
post_params=_form_params,
|
|
1741
|
+
files=_files,
|
|
1742
|
+
auth_settings=_auth_settings,
|
|
1743
|
+
collection_formats=_collection_formats,
|
|
1744
|
+
_host=_host,
|
|
1745
|
+
_request_auth=_request_auth,
|
|
1746
|
+
)
|
|
1747
|
+
|
|
1748
|
+
@validate_call
|
|
1749
|
+
def get_kubeconfig_by_instance_name(
|
|
1750
|
+
self,
|
|
1751
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1752
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1753
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
1754
|
+
expiration_seconds: Annotated[
|
|
1755
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
1756
|
+
Field(description="Expiration of the included token in seconds"),
|
|
1757
|
+
] = None,
|
|
1758
|
+
_request_timeout: Union[
|
|
1759
|
+
None,
|
|
1760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1761
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1762
|
+
] = None,
|
|
1763
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1764
|
+
_content_type: Optional[StrictStr] = None,
|
|
1765
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1766
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1767
|
+
) -> Kubeconfig:
|
|
1768
|
+
"""get_kubeconfig_by_instance_name
|
|
1769
|
+
|
|
1770
|
+
Returns the kubeconfig for the given instance.
|
|
1771
|
+
|
|
1772
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1773
|
+
:type project_id: str
|
|
1774
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1775
|
+
:type region_id: str
|
|
1776
|
+
:param display_name: The instance display name. (required)
|
|
1777
|
+
:type display_name: str
|
|
1778
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
1779
|
+
:type expiration_seconds: int
|
|
1780
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1781
|
+
number provided, it will be total request
|
|
1782
|
+
timeout. It can also be a pair (tuple) of
|
|
1783
|
+
(connection, read) timeouts.
|
|
1784
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1785
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1786
|
+
request; this effectively ignores the
|
|
1787
|
+
authentication in the spec for a single request.
|
|
1788
|
+
:type _request_auth: dict, optional
|
|
1789
|
+
:param _content_type: force content-type for the request.
|
|
1790
|
+
:type _content_type: str, Optional
|
|
1791
|
+
:param _headers: set to override the headers for a single
|
|
1792
|
+
request; this effectively ignores the headers
|
|
1793
|
+
in the spec for a single request.
|
|
1794
|
+
:type _headers: dict, optional
|
|
1795
|
+
:param _host_index: set to override the host_index for a single
|
|
1796
|
+
request; this effectively ignores the host_index
|
|
1797
|
+
in the spec for a single request.
|
|
1798
|
+
:type _host_index: int, optional
|
|
1799
|
+
:return: Returns the result object.
|
|
1800
|
+
""" # noqa: E501
|
|
1801
|
+
|
|
1802
|
+
_param = self._get_kubeconfig_by_instance_name_serialize(
|
|
1803
|
+
project_id=project_id,
|
|
1804
|
+
region_id=region_id,
|
|
1805
|
+
display_name=display_name,
|
|
1806
|
+
expiration_seconds=expiration_seconds,
|
|
1807
|
+
_request_auth=_request_auth,
|
|
1808
|
+
_content_type=_content_type,
|
|
1809
|
+
_headers=_headers,
|
|
1810
|
+
_host_index=_host_index,
|
|
1811
|
+
)
|
|
1812
|
+
|
|
1813
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1814
|
+
"200": "Kubeconfig",
|
|
1815
|
+
"400": "BadRequest",
|
|
1816
|
+
"401": "UnauthorizedRequest",
|
|
1817
|
+
"404": None,
|
|
1818
|
+
"500": None,
|
|
1819
|
+
}
|
|
1820
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1821
|
+
response_data.read()
|
|
1822
|
+
return self.api_client.response_deserialize(
|
|
1823
|
+
response_data=response_data,
|
|
1824
|
+
response_types_map=_response_types_map,
|
|
1825
|
+
).data
|
|
1826
|
+
|
|
1827
|
+
@validate_call
|
|
1828
|
+
def get_kubeconfig_by_instance_name_with_http_info(
|
|
1829
|
+
self,
|
|
1830
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1831
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1832
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
1833
|
+
expiration_seconds: Annotated[
|
|
1834
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
1835
|
+
Field(description="Expiration of the included token in seconds"),
|
|
1836
|
+
] = None,
|
|
1837
|
+
_request_timeout: Union[
|
|
1838
|
+
None,
|
|
1839
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1840
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1841
|
+
] = None,
|
|
1842
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1843
|
+
_content_type: Optional[StrictStr] = None,
|
|
1844
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1845
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1846
|
+
) -> ApiResponse[Kubeconfig]:
|
|
1847
|
+
"""get_kubeconfig_by_instance_name
|
|
1848
|
+
|
|
1849
|
+
Returns the kubeconfig for the given instance.
|
|
1850
|
+
|
|
1851
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1852
|
+
:type project_id: str
|
|
1853
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1854
|
+
:type region_id: str
|
|
1855
|
+
:param display_name: The instance display name. (required)
|
|
1856
|
+
:type display_name: str
|
|
1857
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
1858
|
+
:type expiration_seconds: int
|
|
1859
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1860
|
+
number provided, it will be total request
|
|
1861
|
+
timeout. It can also be a pair (tuple) of
|
|
1862
|
+
(connection, read) timeouts.
|
|
1863
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1864
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1865
|
+
request; this effectively ignores the
|
|
1866
|
+
authentication in the spec for a single request.
|
|
1867
|
+
:type _request_auth: dict, optional
|
|
1868
|
+
:param _content_type: force content-type for the request.
|
|
1869
|
+
:type _content_type: str, Optional
|
|
1870
|
+
:param _headers: set to override the headers for a single
|
|
1871
|
+
request; this effectively ignores the headers
|
|
1872
|
+
in the spec for a single request.
|
|
1873
|
+
:type _headers: dict, optional
|
|
1874
|
+
:param _host_index: set to override the host_index for a single
|
|
1875
|
+
request; this effectively ignores the host_index
|
|
1876
|
+
in the spec for a single request.
|
|
1877
|
+
:type _host_index: int, optional
|
|
1878
|
+
:return: Returns the result object.
|
|
1879
|
+
""" # noqa: E501
|
|
1880
|
+
|
|
1881
|
+
_param = self._get_kubeconfig_by_instance_name_serialize(
|
|
1882
|
+
project_id=project_id,
|
|
1883
|
+
region_id=region_id,
|
|
1884
|
+
display_name=display_name,
|
|
1885
|
+
expiration_seconds=expiration_seconds,
|
|
1886
|
+
_request_auth=_request_auth,
|
|
1887
|
+
_content_type=_content_type,
|
|
1888
|
+
_headers=_headers,
|
|
1889
|
+
_host_index=_host_index,
|
|
1890
|
+
)
|
|
1891
|
+
|
|
1892
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1893
|
+
"200": "Kubeconfig",
|
|
1894
|
+
"400": "BadRequest",
|
|
1895
|
+
"401": "UnauthorizedRequest",
|
|
1896
|
+
"404": None,
|
|
1897
|
+
"500": None,
|
|
1898
|
+
}
|
|
1899
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1900
|
+
response_data.read()
|
|
1901
|
+
return self.api_client.response_deserialize(
|
|
1902
|
+
response_data=response_data,
|
|
1903
|
+
response_types_map=_response_types_map,
|
|
1904
|
+
)
|
|
1905
|
+
|
|
1906
|
+
@validate_call
|
|
1907
|
+
def get_kubeconfig_by_instance_name_without_preload_content(
|
|
1908
|
+
self,
|
|
1909
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
1910
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
1911
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
1912
|
+
expiration_seconds: Annotated[
|
|
1913
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
1914
|
+
Field(description="Expiration of the included token in seconds"),
|
|
1915
|
+
] = None,
|
|
1916
|
+
_request_timeout: Union[
|
|
1917
|
+
None,
|
|
1918
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1919
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1920
|
+
] = None,
|
|
1921
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1922
|
+
_content_type: Optional[StrictStr] = None,
|
|
1923
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1924
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1925
|
+
) -> RESTResponseType:
|
|
1926
|
+
"""get_kubeconfig_by_instance_name
|
|
1927
|
+
|
|
1928
|
+
Returns the kubeconfig for the given instance.
|
|
1929
|
+
|
|
1930
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
1931
|
+
:type project_id: str
|
|
1932
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
1933
|
+
:type region_id: str
|
|
1934
|
+
:param display_name: The instance display name. (required)
|
|
1935
|
+
:type display_name: str
|
|
1936
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
1937
|
+
:type expiration_seconds: int
|
|
1938
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1939
|
+
number provided, it will be total request
|
|
1940
|
+
timeout. It can also be a pair (tuple) of
|
|
1941
|
+
(connection, read) timeouts.
|
|
1942
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1943
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1944
|
+
request; this effectively ignores the
|
|
1945
|
+
authentication in the spec for a single request.
|
|
1946
|
+
:type _request_auth: dict, optional
|
|
1947
|
+
:param _content_type: force content-type for the request.
|
|
1948
|
+
:type _content_type: str, Optional
|
|
1949
|
+
:param _headers: set to override the headers for a single
|
|
1950
|
+
request; this effectively ignores the headers
|
|
1951
|
+
in the spec for a single request.
|
|
1952
|
+
:type _headers: dict, optional
|
|
1953
|
+
:param _host_index: set to override the host_index for a single
|
|
1954
|
+
request; this effectively ignores the host_index
|
|
1955
|
+
in the spec for a single request.
|
|
1956
|
+
:type _host_index: int, optional
|
|
1957
|
+
:return: Returns the result object.
|
|
1958
|
+
""" # noqa: E501
|
|
1959
|
+
|
|
1960
|
+
_param = self._get_kubeconfig_by_instance_name_serialize(
|
|
1961
|
+
project_id=project_id,
|
|
1962
|
+
region_id=region_id,
|
|
1963
|
+
display_name=display_name,
|
|
1964
|
+
expiration_seconds=expiration_seconds,
|
|
1965
|
+
_request_auth=_request_auth,
|
|
1966
|
+
_content_type=_content_type,
|
|
1967
|
+
_headers=_headers,
|
|
1968
|
+
_host_index=_host_index,
|
|
1969
|
+
)
|
|
1970
|
+
|
|
1971
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1972
|
+
"200": "Kubeconfig",
|
|
1973
|
+
"400": "BadRequest",
|
|
1974
|
+
"401": "UnauthorizedRequest",
|
|
1975
|
+
"404": None,
|
|
1976
|
+
"500": None,
|
|
1977
|
+
}
|
|
1978
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1979
|
+
return response_data.response
|
|
1980
|
+
|
|
1981
|
+
def _get_kubeconfig_by_instance_name_serialize(
|
|
1982
|
+
self,
|
|
1983
|
+
project_id,
|
|
1984
|
+
region_id,
|
|
1985
|
+
display_name,
|
|
1986
|
+
expiration_seconds,
|
|
1987
|
+
_request_auth,
|
|
1988
|
+
_content_type,
|
|
1989
|
+
_headers,
|
|
1990
|
+
_host_index,
|
|
1991
|
+
) -> RequestSerialized:
|
|
1992
|
+
|
|
1993
|
+
_host = None
|
|
1994
|
+
|
|
1995
|
+
_collection_formats: Dict[str, str] = {}
|
|
1996
|
+
|
|
1997
|
+
_path_params: Dict[str, str] = {}
|
|
1998
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1999
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2000
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2001
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2002
|
+
_body_params: Optional[bytes] = None
|
|
2003
|
+
|
|
2004
|
+
# process the path parameters
|
|
2005
|
+
if project_id is not None:
|
|
2006
|
+
_path_params["projectId"] = project_id
|
|
2007
|
+
if region_id is not None:
|
|
2008
|
+
_path_params["regionId"] = region_id
|
|
2009
|
+
if display_name is not None:
|
|
2010
|
+
_path_params["displayName"] = display_name
|
|
2011
|
+
# process the query parameters
|
|
2012
|
+
if expiration_seconds is not None:
|
|
2013
|
+
|
|
2014
|
+
_query_params.append(("expirationSeconds", expiration_seconds))
|
|
2015
|
+
|
|
2016
|
+
# process the header parameters
|
|
2017
|
+
# process the form parameters
|
|
2018
|
+
# process the body parameter
|
|
2019
|
+
|
|
2020
|
+
# set the HTTP header `Accept`
|
|
2021
|
+
if "Accept" not in _header_params:
|
|
2022
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2023
|
+
|
|
2024
|
+
# authentication setting
|
|
2025
|
+
_auth_settings: List[str] = []
|
|
2026
|
+
|
|
2027
|
+
return self.api_client.param_serialize(
|
|
2028
|
+
method="GET",
|
|
2029
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}/kubeconfig",
|
|
2030
|
+
path_params=_path_params,
|
|
2031
|
+
query_params=_query_params,
|
|
2032
|
+
header_params=_header_params,
|
|
2033
|
+
body=_body_params,
|
|
2034
|
+
post_params=_form_params,
|
|
2035
|
+
files=_files,
|
|
2036
|
+
auth_settings=_auth_settings,
|
|
2037
|
+
collection_formats=_collection_formats,
|
|
2038
|
+
_host=_host,
|
|
2039
|
+
_request_auth=_request_auth,
|
|
2040
|
+
)
|
|
2041
|
+
|
|
2042
|
+
@validate_call
|
|
2043
|
+
def get_token_by_instance_id(
|
|
2044
|
+
self,
|
|
2045
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2046
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2047
|
+
instance_id: Annotated[str, Field(strict=True, max_length=16, description="The instance UUID.")],
|
|
2048
|
+
expiration_seconds: Annotated[
|
|
2049
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
2050
|
+
Field(description="Expiration of the token in seconds"),
|
|
2051
|
+
] = None,
|
|
2052
|
+
_request_timeout: Union[
|
|
2053
|
+
None,
|
|
2054
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2055
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2056
|
+
] = None,
|
|
2057
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2058
|
+
_content_type: Optional[StrictStr] = None,
|
|
2059
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2060
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2061
|
+
) -> Token:
|
|
2062
|
+
"""get_token_by_instance_id
|
|
2063
|
+
|
|
2064
|
+
Returns an ServiceAccount token.
|
|
2065
|
+
|
|
2066
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2067
|
+
:type project_id: str
|
|
2068
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2069
|
+
:type region_id: str
|
|
2070
|
+
:param instance_id: The instance UUID. (required)
|
|
2071
|
+
:type instance_id: str
|
|
2072
|
+
:param expiration_seconds: Expiration of the token in seconds
|
|
2073
|
+
:type expiration_seconds: int
|
|
2074
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2075
|
+
number provided, it will be total request
|
|
2076
|
+
timeout. It can also be a pair (tuple) of
|
|
2077
|
+
(connection, read) timeouts.
|
|
2078
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2079
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2080
|
+
request; this effectively ignores the
|
|
2081
|
+
authentication in the spec for a single request.
|
|
2082
|
+
:type _request_auth: dict, optional
|
|
2083
|
+
:param _content_type: force content-type for the request.
|
|
2084
|
+
:type _content_type: str, Optional
|
|
2085
|
+
:param _headers: set to override the headers for a single
|
|
2086
|
+
request; this effectively ignores the headers
|
|
2087
|
+
in the spec for a single request.
|
|
2088
|
+
:type _headers: dict, optional
|
|
2089
|
+
:param _host_index: set to override the host_index for a single
|
|
2090
|
+
request; this effectively ignores the host_index
|
|
2091
|
+
in the spec for a single request.
|
|
2092
|
+
:type _host_index: int, optional
|
|
2093
|
+
:return: Returns the result object.
|
|
2094
|
+
""" # noqa: E501
|
|
2095
|
+
|
|
2096
|
+
_param = self._get_token_by_instance_id_serialize(
|
|
2097
|
+
project_id=project_id,
|
|
2098
|
+
region_id=region_id,
|
|
2099
|
+
instance_id=instance_id,
|
|
2100
|
+
expiration_seconds=expiration_seconds,
|
|
2101
|
+
_request_auth=_request_auth,
|
|
2102
|
+
_content_type=_content_type,
|
|
2103
|
+
_headers=_headers,
|
|
2104
|
+
_host_index=_host_index,
|
|
2105
|
+
)
|
|
2106
|
+
|
|
2107
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2108
|
+
"200": "Token",
|
|
2109
|
+
"400": "BadRequest",
|
|
2110
|
+
"401": "UnauthorizedRequest",
|
|
2111
|
+
"404": None,
|
|
2112
|
+
"500": None,
|
|
2113
|
+
}
|
|
2114
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2115
|
+
response_data.read()
|
|
2116
|
+
return self.api_client.response_deserialize(
|
|
2117
|
+
response_data=response_data,
|
|
2118
|
+
response_types_map=_response_types_map,
|
|
2119
|
+
).data
|
|
2120
|
+
|
|
2121
|
+
@validate_call
|
|
2122
|
+
def get_token_by_instance_id_with_http_info(
|
|
2123
|
+
self,
|
|
2124
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2125
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2126
|
+
instance_id: Annotated[str, Field(strict=True, max_length=16, description="The instance UUID.")],
|
|
2127
|
+
expiration_seconds: Annotated[
|
|
2128
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
2129
|
+
Field(description="Expiration of the token in seconds"),
|
|
2130
|
+
] = None,
|
|
2131
|
+
_request_timeout: Union[
|
|
2132
|
+
None,
|
|
2133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2134
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2135
|
+
] = None,
|
|
2136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2137
|
+
_content_type: Optional[StrictStr] = None,
|
|
2138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2140
|
+
) -> ApiResponse[Token]:
|
|
2141
|
+
"""get_token_by_instance_id
|
|
2142
|
+
|
|
2143
|
+
Returns an ServiceAccount token.
|
|
2144
|
+
|
|
2145
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2146
|
+
:type project_id: str
|
|
2147
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2148
|
+
:type region_id: str
|
|
2149
|
+
:param instance_id: The instance UUID. (required)
|
|
2150
|
+
:type instance_id: str
|
|
2151
|
+
:param expiration_seconds: Expiration of the token in seconds
|
|
2152
|
+
:type expiration_seconds: int
|
|
2153
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2154
|
+
number provided, it will be total request
|
|
2155
|
+
timeout. It can also be a pair (tuple) of
|
|
2156
|
+
(connection, read) timeouts.
|
|
2157
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2158
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2159
|
+
request; this effectively ignores the
|
|
2160
|
+
authentication in the spec for a single request.
|
|
2161
|
+
:type _request_auth: dict, optional
|
|
2162
|
+
:param _content_type: force content-type for the request.
|
|
2163
|
+
:type _content_type: str, Optional
|
|
2164
|
+
:param _headers: set to override the headers for a single
|
|
2165
|
+
request; this effectively ignores the headers
|
|
2166
|
+
in the spec for a single request.
|
|
2167
|
+
:type _headers: dict, optional
|
|
2168
|
+
:param _host_index: set to override the host_index for a single
|
|
2169
|
+
request; this effectively ignores the host_index
|
|
2170
|
+
in the spec for a single request.
|
|
2171
|
+
:type _host_index: int, optional
|
|
2172
|
+
:return: Returns the result object.
|
|
2173
|
+
""" # noqa: E501
|
|
2174
|
+
|
|
2175
|
+
_param = self._get_token_by_instance_id_serialize(
|
|
2176
|
+
project_id=project_id,
|
|
2177
|
+
region_id=region_id,
|
|
2178
|
+
instance_id=instance_id,
|
|
2179
|
+
expiration_seconds=expiration_seconds,
|
|
2180
|
+
_request_auth=_request_auth,
|
|
2181
|
+
_content_type=_content_type,
|
|
2182
|
+
_headers=_headers,
|
|
2183
|
+
_host_index=_host_index,
|
|
2184
|
+
)
|
|
2185
|
+
|
|
2186
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2187
|
+
"200": "Token",
|
|
2188
|
+
"400": "BadRequest",
|
|
2189
|
+
"401": "UnauthorizedRequest",
|
|
2190
|
+
"404": None,
|
|
2191
|
+
"500": None,
|
|
2192
|
+
}
|
|
2193
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2194
|
+
response_data.read()
|
|
2195
|
+
return self.api_client.response_deserialize(
|
|
2196
|
+
response_data=response_data,
|
|
2197
|
+
response_types_map=_response_types_map,
|
|
2198
|
+
)
|
|
2199
|
+
|
|
2200
|
+
@validate_call
|
|
2201
|
+
def get_token_by_instance_id_without_preload_content(
|
|
2202
|
+
self,
|
|
2203
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2204
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2205
|
+
instance_id: Annotated[str, Field(strict=True, max_length=16, description="The instance UUID.")],
|
|
2206
|
+
expiration_seconds: Annotated[
|
|
2207
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
2208
|
+
Field(description="Expiration of the token in seconds"),
|
|
2209
|
+
] = None,
|
|
2210
|
+
_request_timeout: Union[
|
|
2211
|
+
None,
|
|
2212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2213
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2214
|
+
] = None,
|
|
2215
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2216
|
+
_content_type: Optional[StrictStr] = None,
|
|
2217
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2218
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2219
|
+
) -> RESTResponseType:
|
|
2220
|
+
"""get_token_by_instance_id
|
|
2221
|
+
|
|
2222
|
+
Returns an ServiceAccount token.
|
|
2223
|
+
|
|
2224
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2225
|
+
:type project_id: str
|
|
2226
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2227
|
+
:type region_id: str
|
|
2228
|
+
:param instance_id: The instance UUID. (required)
|
|
2229
|
+
:type instance_id: str
|
|
2230
|
+
:param expiration_seconds: Expiration of the token in seconds
|
|
2231
|
+
:type expiration_seconds: int
|
|
2232
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2233
|
+
number provided, it will be total request
|
|
2234
|
+
timeout. It can also be a pair (tuple) of
|
|
2235
|
+
(connection, read) timeouts.
|
|
2236
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2237
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2238
|
+
request; this effectively ignores the
|
|
2239
|
+
authentication in the spec for a single request.
|
|
2240
|
+
:type _request_auth: dict, optional
|
|
2241
|
+
:param _content_type: force content-type for the request.
|
|
2242
|
+
:type _content_type: str, Optional
|
|
2243
|
+
:param _headers: set to override the headers for a single
|
|
2244
|
+
request; this effectively ignores the headers
|
|
2245
|
+
in the spec for a single request.
|
|
2246
|
+
:type _headers: dict, optional
|
|
2247
|
+
:param _host_index: set to override the host_index for a single
|
|
2248
|
+
request; this effectively ignores the host_index
|
|
2249
|
+
in the spec for a single request.
|
|
2250
|
+
:type _host_index: int, optional
|
|
2251
|
+
:return: Returns the result object.
|
|
2252
|
+
""" # noqa: E501
|
|
2253
|
+
|
|
2254
|
+
_param = self._get_token_by_instance_id_serialize(
|
|
2255
|
+
project_id=project_id,
|
|
2256
|
+
region_id=region_id,
|
|
2257
|
+
instance_id=instance_id,
|
|
2258
|
+
expiration_seconds=expiration_seconds,
|
|
2259
|
+
_request_auth=_request_auth,
|
|
2260
|
+
_content_type=_content_type,
|
|
2261
|
+
_headers=_headers,
|
|
2262
|
+
_host_index=_host_index,
|
|
2263
|
+
)
|
|
2264
|
+
|
|
2265
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2266
|
+
"200": "Token",
|
|
2267
|
+
"400": "BadRequest",
|
|
2268
|
+
"401": "UnauthorizedRequest",
|
|
2269
|
+
"404": None,
|
|
2270
|
+
"500": None,
|
|
2271
|
+
}
|
|
2272
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2273
|
+
return response_data.response
|
|
2274
|
+
|
|
2275
|
+
def _get_token_by_instance_id_serialize(
|
|
2276
|
+
self,
|
|
2277
|
+
project_id,
|
|
2278
|
+
region_id,
|
|
2279
|
+
instance_id,
|
|
2280
|
+
expiration_seconds,
|
|
2281
|
+
_request_auth,
|
|
2282
|
+
_content_type,
|
|
2283
|
+
_headers,
|
|
2284
|
+
_host_index,
|
|
2285
|
+
) -> RequestSerialized:
|
|
2286
|
+
|
|
2287
|
+
_host = None
|
|
2288
|
+
|
|
2289
|
+
_collection_formats: Dict[str, str] = {}
|
|
2290
|
+
|
|
2291
|
+
_path_params: Dict[str, str] = {}
|
|
2292
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2293
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2294
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2295
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2296
|
+
_body_params: Optional[bytes] = None
|
|
2297
|
+
|
|
2298
|
+
# process the path parameters
|
|
2299
|
+
if project_id is not None:
|
|
2300
|
+
_path_params["projectId"] = project_id
|
|
2301
|
+
if region_id is not None:
|
|
2302
|
+
_path_params["regionId"] = region_id
|
|
2303
|
+
if instance_id is not None:
|
|
2304
|
+
_path_params["instanceId"] = instance_id
|
|
2305
|
+
# process the query parameters
|
|
2306
|
+
if expiration_seconds is not None:
|
|
2307
|
+
|
|
2308
|
+
_query_params.append(("expirationSeconds", expiration_seconds))
|
|
2309
|
+
|
|
2310
|
+
# process the header parameters
|
|
2311
|
+
# process the form parameters
|
|
2312
|
+
# process the body parameter
|
|
2313
|
+
|
|
2314
|
+
# set the HTTP header `Accept`
|
|
2315
|
+
if "Accept" not in _header_params:
|
|
2316
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2317
|
+
|
|
2318
|
+
# authentication setting
|
|
2319
|
+
_auth_settings: List[str] = []
|
|
2320
|
+
|
|
2321
|
+
return self.api_client.param_serialize(
|
|
2322
|
+
method="GET",
|
|
2323
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}/token",
|
|
2324
|
+
path_params=_path_params,
|
|
2325
|
+
query_params=_query_params,
|
|
2326
|
+
header_params=_header_params,
|
|
2327
|
+
body=_body_params,
|
|
2328
|
+
post_params=_form_params,
|
|
2329
|
+
files=_files,
|
|
2330
|
+
auth_settings=_auth_settings,
|
|
2331
|
+
collection_formats=_collection_formats,
|
|
2332
|
+
_host=_host,
|
|
2333
|
+
_request_auth=_request_auth,
|
|
2334
|
+
)
|
|
2335
|
+
|
|
2336
|
+
@validate_call
|
|
2337
|
+
def get_token_by_instance_name(
|
|
2338
|
+
self,
|
|
2339
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2340
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2341
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
2342
|
+
expiration_seconds: Annotated[
|
|
2343
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
2344
|
+
Field(description="Expiration of the included token in seconds"),
|
|
2345
|
+
] = None,
|
|
2346
|
+
_request_timeout: Union[
|
|
2347
|
+
None,
|
|
2348
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2349
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2350
|
+
] = None,
|
|
2351
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2352
|
+
_content_type: Optional[StrictStr] = None,
|
|
2353
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2354
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2355
|
+
) -> Token:
|
|
2356
|
+
"""get_token_by_instance_name
|
|
2357
|
+
|
|
2358
|
+
Returns an ServiceAccount token.
|
|
2359
|
+
|
|
2360
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2361
|
+
:type project_id: str
|
|
2362
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2363
|
+
:type region_id: str
|
|
2364
|
+
:param display_name: The instance display name. (required)
|
|
2365
|
+
:type display_name: str
|
|
2366
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
2367
|
+
:type expiration_seconds: int
|
|
2368
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2369
|
+
number provided, it will be total request
|
|
2370
|
+
timeout. It can also be a pair (tuple) of
|
|
2371
|
+
(connection, read) timeouts.
|
|
2372
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2373
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2374
|
+
request; this effectively ignores the
|
|
2375
|
+
authentication in the spec for a single request.
|
|
2376
|
+
:type _request_auth: dict, optional
|
|
2377
|
+
:param _content_type: force content-type for the request.
|
|
2378
|
+
:type _content_type: str, Optional
|
|
2379
|
+
:param _headers: set to override the headers for a single
|
|
2380
|
+
request; this effectively ignores the headers
|
|
2381
|
+
in the spec for a single request.
|
|
2382
|
+
:type _headers: dict, optional
|
|
2383
|
+
:param _host_index: set to override the host_index for a single
|
|
2384
|
+
request; this effectively ignores the host_index
|
|
2385
|
+
in the spec for a single request.
|
|
2386
|
+
:type _host_index: int, optional
|
|
2387
|
+
:return: Returns the result object.
|
|
2388
|
+
""" # noqa: E501
|
|
2389
|
+
|
|
2390
|
+
_param = self._get_token_by_instance_name_serialize(
|
|
2391
|
+
project_id=project_id,
|
|
2392
|
+
region_id=region_id,
|
|
2393
|
+
display_name=display_name,
|
|
2394
|
+
expiration_seconds=expiration_seconds,
|
|
2395
|
+
_request_auth=_request_auth,
|
|
2396
|
+
_content_type=_content_type,
|
|
2397
|
+
_headers=_headers,
|
|
2398
|
+
_host_index=_host_index,
|
|
2399
|
+
)
|
|
2400
|
+
|
|
2401
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2402
|
+
"200": "Token",
|
|
2403
|
+
"400": "BadRequest",
|
|
2404
|
+
"401": "UnauthorizedRequest",
|
|
2405
|
+
"404": None,
|
|
2406
|
+
"500": None,
|
|
2407
|
+
}
|
|
2408
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2409
|
+
response_data.read()
|
|
2410
|
+
return self.api_client.response_deserialize(
|
|
2411
|
+
response_data=response_data,
|
|
2412
|
+
response_types_map=_response_types_map,
|
|
2413
|
+
).data
|
|
2414
|
+
|
|
2415
|
+
@validate_call
|
|
2416
|
+
def get_token_by_instance_name_with_http_info(
|
|
2417
|
+
self,
|
|
2418
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2419
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2420
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
2421
|
+
expiration_seconds: Annotated[
|
|
2422
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
2423
|
+
Field(description="Expiration of the included token in seconds"),
|
|
2424
|
+
] = None,
|
|
2425
|
+
_request_timeout: Union[
|
|
2426
|
+
None,
|
|
2427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2428
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2429
|
+
] = None,
|
|
2430
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2431
|
+
_content_type: Optional[StrictStr] = None,
|
|
2432
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2433
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2434
|
+
) -> ApiResponse[Token]:
|
|
2435
|
+
"""get_token_by_instance_name
|
|
2436
|
+
|
|
2437
|
+
Returns an ServiceAccount token.
|
|
2438
|
+
|
|
2439
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2440
|
+
:type project_id: str
|
|
2441
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2442
|
+
:type region_id: str
|
|
2443
|
+
:param display_name: The instance display name. (required)
|
|
2444
|
+
:type display_name: str
|
|
2445
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
2446
|
+
:type expiration_seconds: int
|
|
2447
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2448
|
+
number provided, it will be total request
|
|
2449
|
+
timeout. It can also be a pair (tuple) of
|
|
2450
|
+
(connection, read) timeouts.
|
|
2451
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2452
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2453
|
+
request; this effectively ignores the
|
|
2454
|
+
authentication in the spec for a single request.
|
|
2455
|
+
:type _request_auth: dict, optional
|
|
2456
|
+
:param _content_type: force content-type for the request.
|
|
2457
|
+
:type _content_type: str, Optional
|
|
2458
|
+
:param _headers: set to override the headers for a single
|
|
2459
|
+
request; this effectively ignores the headers
|
|
2460
|
+
in the spec for a single request.
|
|
2461
|
+
:type _headers: dict, optional
|
|
2462
|
+
:param _host_index: set to override the host_index for a single
|
|
2463
|
+
request; this effectively ignores the host_index
|
|
2464
|
+
in the spec for a single request.
|
|
2465
|
+
:type _host_index: int, optional
|
|
2466
|
+
:return: Returns the result object.
|
|
2467
|
+
""" # noqa: E501
|
|
2468
|
+
|
|
2469
|
+
_param = self._get_token_by_instance_name_serialize(
|
|
2470
|
+
project_id=project_id,
|
|
2471
|
+
region_id=region_id,
|
|
2472
|
+
display_name=display_name,
|
|
2473
|
+
expiration_seconds=expiration_seconds,
|
|
2474
|
+
_request_auth=_request_auth,
|
|
2475
|
+
_content_type=_content_type,
|
|
2476
|
+
_headers=_headers,
|
|
2477
|
+
_host_index=_host_index,
|
|
2478
|
+
)
|
|
2479
|
+
|
|
2480
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2481
|
+
"200": "Token",
|
|
2482
|
+
"400": "BadRequest",
|
|
2483
|
+
"401": "UnauthorizedRequest",
|
|
2484
|
+
"404": None,
|
|
2485
|
+
"500": None,
|
|
2486
|
+
}
|
|
2487
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2488
|
+
response_data.read()
|
|
2489
|
+
return self.api_client.response_deserialize(
|
|
2490
|
+
response_data=response_data,
|
|
2491
|
+
response_types_map=_response_types_map,
|
|
2492
|
+
)
|
|
2493
|
+
|
|
2494
|
+
@validate_call
|
|
2495
|
+
def get_token_by_instance_name_without_preload_content(
|
|
2496
|
+
self,
|
|
2497
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2498
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2499
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
2500
|
+
expiration_seconds: Annotated[
|
|
2501
|
+
Optional[Annotated[int, Field(le=15552000, strict=True, ge=600)]],
|
|
2502
|
+
Field(description="Expiration of the included token in seconds"),
|
|
2503
|
+
] = None,
|
|
2504
|
+
_request_timeout: Union[
|
|
2505
|
+
None,
|
|
2506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2507
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2508
|
+
] = None,
|
|
2509
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2510
|
+
_content_type: Optional[StrictStr] = None,
|
|
2511
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2512
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2513
|
+
) -> RESTResponseType:
|
|
2514
|
+
"""get_token_by_instance_name
|
|
2515
|
+
|
|
2516
|
+
Returns an ServiceAccount token.
|
|
2517
|
+
|
|
2518
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2519
|
+
:type project_id: str
|
|
2520
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2521
|
+
:type region_id: str
|
|
2522
|
+
:param display_name: The instance display name. (required)
|
|
2523
|
+
:type display_name: str
|
|
2524
|
+
:param expiration_seconds: Expiration of the included token in seconds
|
|
2525
|
+
:type expiration_seconds: int
|
|
2526
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2527
|
+
number provided, it will be total request
|
|
2528
|
+
timeout. It can also be a pair (tuple) of
|
|
2529
|
+
(connection, read) timeouts.
|
|
2530
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2531
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2532
|
+
request; this effectively ignores the
|
|
2533
|
+
authentication in the spec for a single request.
|
|
2534
|
+
:type _request_auth: dict, optional
|
|
2535
|
+
:param _content_type: force content-type for the request.
|
|
2536
|
+
:type _content_type: str, Optional
|
|
2537
|
+
:param _headers: set to override the headers for a single
|
|
2538
|
+
request; this effectively ignores the headers
|
|
2539
|
+
in the spec for a single request.
|
|
2540
|
+
:type _headers: dict, optional
|
|
2541
|
+
:param _host_index: set to override the host_index for a single
|
|
2542
|
+
request; this effectively ignores the host_index
|
|
2543
|
+
in the spec for a single request.
|
|
2544
|
+
:type _host_index: int, optional
|
|
2545
|
+
:return: Returns the result object.
|
|
2546
|
+
""" # noqa: E501
|
|
2547
|
+
|
|
2548
|
+
_param = self._get_token_by_instance_name_serialize(
|
|
2549
|
+
project_id=project_id,
|
|
2550
|
+
region_id=region_id,
|
|
2551
|
+
display_name=display_name,
|
|
2552
|
+
expiration_seconds=expiration_seconds,
|
|
2553
|
+
_request_auth=_request_auth,
|
|
2554
|
+
_content_type=_content_type,
|
|
2555
|
+
_headers=_headers,
|
|
2556
|
+
_host_index=_host_index,
|
|
2557
|
+
)
|
|
2558
|
+
|
|
2559
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2560
|
+
"200": "Token",
|
|
2561
|
+
"400": "BadRequest",
|
|
2562
|
+
"401": "UnauthorizedRequest",
|
|
2563
|
+
"404": None,
|
|
2564
|
+
"500": None,
|
|
2565
|
+
}
|
|
2566
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2567
|
+
return response_data.response
|
|
2568
|
+
|
|
2569
|
+
def _get_token_by_instance_name_serialize(
|
|
2570
|
+
self,
|
|
2571
|
+
project_id,
|
|
2572
|
+
region_id,
|
|
2573
|
+
display_name,
|
|
2574
|
+
expiration_seconds,
|
|
2575
|
+
_request_auth,
|
|
2576
|
+
_content_type,
|
|
2577
|
+
_headers,
|
|
2578
|
+
_host_index,
|
|
2579
|
+
) -> RequestSerialized:
|
|
2580
|
+
|
|
2581
|
+
_host = None
|
|
2582
|
+
|
|
2583
|
+
_collection_formats: Dict[str, str] = {}
|
|
2584
|
+
|
|
2585
|
+
_path_params: Dict[str, str] = {}
|
|
2586
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2587
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2588
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2589
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2590
|
+
_body_params: Optional[bytes] = None
|
|
2591
|
+
|
|
2592
|
+
# process the path parameters
|
|
2593
|
+
if project_id is not None:
|
|
2594
|
+
_path_params["projectId"] = project_id
|
|
2595
|
+
if region_id is not None:
|
|
2596
|
+
_path_params["regionId"] = region_id
|
|
2597
|
+
if display_name is not None:
|
|
2598
|
+
_path_params["displayName"] = display_name
|
|
2599
|
+
# process the query parameters
|
|
2600
|
+
if expiration_seconds is not None:
|
|
2601
|
+
|
|
2602
|
+
_query_params.append(("expirationSeconds", expiration_seconds))
|
|
2603
|
+
|
|
2604
|
+
# process the header parameters
|
|
2605
|
+
# process the form parameters
|
|
2606
|
+
# process the body parameter
|
|
2607
|
+
|
|
2608
|
+
# set the HTTP header `Accept`
|
|
2609
|
+
if "Accept" not in _header_params:
|
|
2610
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2611
|
+
|
|
2612
|
+
# authentication setting
|
|
2613
|
+
_auth_settings: List[str] = []
|
|
2614
|
+
|
|
2615
|
+
return self.api_client.param_serialize(
|
|
2616
|
+
method="GET",
|
|
2617
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}/token",
|
|
2618
|
+
path_params=_path_params,
|
|
2619
|
+
query_params=_query_params,
|
|
2620
|
+
header_params=_header_params,
|
|
2621
|
+
body=_body_params,
|
|
2622
|
+
post_params=_form_params,
|
|
2623
|
+
files=_files,
|
|
2624
|
+
auth_settings=_auth_settings,
|
|
2625
|
+
collection_formats=_collection_formats,
|
|
2626
|
+
_host=_host,
|
|
2627
|
+
_request_auth=_request_auth,
|
|
2628
|
+
)
|
|
2629
|
+
|
|
2630
|
+
@validate_call
|
|
2631
|
+
def list_instances(
|
|
2632
|
+
self,
|
|
2633
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2634
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2635
|
+
_request_timeout: Union[
|
|
2636
|
+
None,
|
|
2637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2638
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2639
|
+
] = None,
|
|
2640
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2641
|
+
_content_type: Optional[StrictStr] = None,
|
|
2642
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2643
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2644
|
+
) -> InstanceList:
|
|
2645
|
+
"""list_instances
|
|
2646
|
+
|
|
2647
|
+
Returns a list of all instances within the project.
|
|
2648
|
+
|
|
2649
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2650
|
+
:type project_id: str
|
|
2651
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2652
|
+
:type region_id: str
|
|
2653
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2654
|
+
number provided, it will be total request
|
|
2655
|
+
timeout. It can also be a pair (tuple) of
|
|
2656
|
+
(connection, read) timeouts.
|
|
2657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2659
|
+
request; this effectively ignores the
|
|
2660
|
+
authentication in the spec for a single request.
|
|
2661
|
+
:type _request_auth: dict, optional
|
|
2662
|
+
:param _content_type: force content-type for the request.
|
|
2663
|
+
:type _content_type: str, Optional
|
|
2664
|
+
:param _headers: set to override the headers for a single
|
|
2665
|
+
request; this effectively ignores the headers
|
|
2666
|
+
in the spec for a single request.
|
|
2667
|
+
:type _headers: dict, optional
|
|
2668
|
+
:param _host_index: set to override the host_index for a single
|
|
2669
|
+
request; this effectively ignores the host_index
|
|
2670
|
+
in the spec for a single request.
|
|
2671
|
+
:type _host_index: int, optional
|
|
2672
|
+
:return: Returns the result object.
|
|
2673
|
+
""" # noqa: E501
|
|
2674
|
+
|
|
2675
|
+
_param = self._list_instances_serialize(
|
|
2676
|
+
project_id=project_id,
|
|
2677
|
+
region_id=region_id,
|
|
2678
|
+
_request_auth=_request_auth,
|
|
2679
|
+
_content_type=_content_type,
|
|
2680
|
+
_headers=_headers,
|
|
2681
|
+
_host_index=_host_index,
|
|
2682
|
+
)
|
|
2683
|
+
|
|
2684
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2685
|
+
"200": "InstanceList",
|
|
2686
|
+
"400": "BadRequest",
|
|
2687
|
+
"401": "UnauthorizedRequest",
|
|
2688
|
+
"500": None,
|
|
2689
|
+
}
|
|
2690
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2691
|
+
response_data.read()
|
|
2692
|
+
return self.api_client.response_deserialize(
|
|
2693
|
+
response_data=response_data,
|
|
2694
|
+
response_types_map=_response_types_map,
|
|
2695
|
+
).data
|
|
2696
|
+
|
|
2697
|
+
@validate_call
|
|
2698
|
+
def list_instances_with_http_info(
|
|
2699
|
+
self,
|
|
2700
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2701
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2702
|
+
_request_timeout: Union[
|
|
2703
|
+
None,
|
|
2704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2705
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2706
|
+
] = None,
|
|
2707
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2708
|
+
_content_type: Optional[StrictStr] = None,
|
|
2709
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2710
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2711
|
+
) -> ApiResponse[InstanceList]:
|
|
2712
|
+
"""list_instances
|
|
2713
|
+
|
|
2714
|
+
Returns a list of all instances within the project.
|
|
2715
|
+
|
|
2716
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2717
|
+
:type project_id: str
|
|
2718
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2719
|
+
:type region_id: str
|
|
2720
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2721
|
+
number provided, it will be total request
|
|
2722
|
+
timeout. It can also be a pair (tuple) of
|
|
2723
|
+
(connection, read) timeouts.
|
|
2724
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2725
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2726
|
+
request; this effectively ignores the
|
|
2727
|
+
authentication in the spec for a single request.
|
|
2728
|
+
:type _request_auth: dict, optional
|
|
2729
|
+
:param _content_type: force content-type for the request.
|
|
2730
|
+
:type _content_type: str, Optional
|
|
2731
|
+
:param _headers: set to override the headers for a single
|
|
2732
|
+
request; this effectively ignores the headers
|
|
2733
|
+
in the spec for a single request.
|
|
2734
|
+
:type _headers: dict, optional
|
|
2735
|
+
:param _host_index: set to override the host_index for a single
|
|
2736
|
+
request; this effectively ignores the host_index
|
|
2737
|
+
in the spec for a single request.
|
|
2738
|
+
:type _host_index: int, optional
|
|
2739
|
+
:return: Returns the result object.
|
|
2740
|
+
""" # noqa: E501
|
|
2741
|
+
|
|
2742
|
+
_param = self._list_instances_serialize(
|
|
2743
|
+
project_id=project_id,
|
|
2744
|
+
region_id=region_id,
|
|
2745
|
+
_request_auth=_request_auth,
|
|
2746
|
+
_content_type=_content_type,
|
|
2747
|
+
_headers=_headers,
|
|
2748
|
+
_host_index=_host_index,
|
|
2749
|
+
)
|
|
2750
|
+
|
|
2751
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2752
|
+
"200": "InstanceList",
|
|
2753
|
+
"400": "BadRequest",
|
|
2754
|
+
"401": "UnauthorizedRequest",
|
|
2755
|
+
"500": None,
|
|
2756
|
+
}
|
|
2757
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2758
|
+
response_data.read()
|
|
2759
|
+
return self.api_client.response_deserialize(
|
|
2760
|
+
response_data=response_data,
|
|
2761
|
+
response_types_map=_response_types_map,
|
|
2762
|
+
)
|
|
2763
|
+
|
|
2764
|
+
@validate_call
|
|
2765
|
+
def list_instances_without_preload_content(
|
|
2766
|
+
self,
|
|
2767
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
2768
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
2769
|
+
_request_timeout: Union[
|
|
2770
|
+
None,
|
|
2771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2772
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2773
|
+
] = None,
|
|
2774
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2775
|
+
_content_type: Optional[StrictStr] = None,
|
|
2776
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2777
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2778
|
+
) -> RESTResponseType:
|
|
2779
|
+
"""list_instances
|
|
2780
|
+
|
|
2781
|
+
Returns a list of all instances within the project.
|
|
2782
|
+
|
|
2783
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
2784
|
+
:type project_id: str
|
|
2785
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
2786
|
+
:type region_id: str
|
|
2787
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2788
|
+
number provided, it will be total request
|
|
2789
|
+
timeout. It can also be a pair (tuple) of
|
|
2790
|
+
(connection, read) timeouts.
|
|
2791
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2792
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2793
|
+
request; this effectively ignores the
|
|
2794
|
+
authentication in the spec for a single request.
|
|
2795
|
+
:type _request_auth: dict, optional
|
|
2796
|
+
:param _content_type: force content-type for the request.
|
|
2797
|
+
:type _content_type: str, Optional
|
|
2798
|
+
:param _headers: set to override the headers for a single
|
|
2799
|
+
request; this effectively ignores the headers
|
|
2800
|
+
in the spec for a single request.
|
|
2801
|
+
:type _headers: dict, optional
|
|
2802
|
+
:param _host_index: set to override the host_index for a single
|
|
2803
|
+
request; this effectively ignores the host_index
|
|
2804
|
+
in the spec for a single request.
|
|
2805
|
+
:type _host_index: int, optional
|
|
2806
|
+
:return: Returns the result object.
|
|
2807
|
+
""" # noqa: E501
|
|
2808
|
+
|
|
2809
|
+
_param = self._list_instances_serialize(
|
|
2810
|
+
project_id=project_id,
|
|
2811
|
+
region_id=region_id,
|
|
2812
|
+
_request_auth=_request_auth,
|
|
2813
|
+
_content_type=_content_type,
|
|
2814
|
+
_headers=_headers,
|
|
2815
|
+
_host_index=_host_index,
|
|
2816
|
+
)
|
|
2817
|
+
|
|
2818
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2819
|
+
"200": "InstanceList",
|
|
2820
|
+
"400": "BadRequest",
|
|
2821
|
+
"401": "UnauthorizedRequest",
|
|
2822
|
+
"500": None,
|
|
2823
|
+
}
|
|
2824
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2825
|
+
return response_data.response
|
|
2826
|
+
|
|
2827
|
+
def _list_instances_serialize(
|
|
2828
|
+
self,
|
|
2829
|
+
project_id,
|
|
2830
|
+
region_id,
|
|
2831
|
+
_request_auth,
|
|
2832
|
+
_content_type,
|
|
2833
|
+
_headers,
|
|
2834
|
+
_host_index,
|
|
2835
|
+
) -> RequestSerialized:
|
|
2836
|
+
|
|
2837
|
+
_host = None
|
|
2838
|
+
|
|
2839
|
+
_collection_formats: Dict[str, str] = {}
|
|
2840
|
+
|
|
2841
|
+
_path_params: Dict[str, str] = {}
|
|
2842
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2843
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2844
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2845
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2846
|
+
_body_params: Optional[bytes] = None
|
|
2847
|
+
|
|
2848
|
+
# process the path parameters
|
|
2849
|
+
if project_id is not None:
|
|
2850
|
+
_path_params["projectId"] = project_id
|
|
2851
|
+
if region_id is not None:
|
|
2852
|
+
_path_params["regionId"] = region_id
|
|
2853
|
+
# process the query parameters
|
|
2854
|
+
# process the header parameters
|
|
2855
|
+
# process the form parameters
|
|
2856
|
+
# process the body parameter
|
|
2857
|
+
|
|
2858
|
+
# set the HTTP header `Accept`
|
|
2859
|
+
if "Accept" not in _header_params:
|
|
2860
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2861
|
+
|
|
2862
|
+
# authentication setting
|
|
2863
|
+
_auth_settings: List[str] = []
|
|
2864
|
+
|
|
2865
|
+
return self.api_client.param_serialize(
|
|
2866
|
+
method="GET",
|
|
2867
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances",
|
|
2868
|
+
path_params=_path_params,
|
|
2869
|
+
query_params=_query_params,
|
|
2870
|
+
header_params=_header_params,
|
|
2871
|
+
body=_body_params,
|
|
2872
|
+
post_params=_form_params,
|
|
2873
|
+
files=_files,
|
|
2874
|
+
auth_settings=_auth_settings,
|
|
2875
|
+
collection_formats=_collection_formats,
|
|
2876
|
+
_host=_host,
|
|
2877
|
+
_request_auth=_request_auth,
|
|
2878
|
+
)
|
|
2879
|
+
|
|
2880
|
+
@validate_call
|
|
2881
|
+
def list_plans_global(
|
|
2882
|
+
self,
|
|
2883
|
+
_request_timeout: Union[
|
|
2884
|
+
None,
|
|
2885
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2886
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2887
|
+
] = None,
|
|
2888
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2889
|
+
_content_type: Optional[StrictStr] = None,
|
|
2890
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2891
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2892
|
+
) -> PlanList:
|
|
2893
|
+
"""(Deprecated) list_plans_global
|
|
2894
|
+
|
|
2895
|
+
DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead.
|
|
2896
|
+
|
|
2897
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2898
|
+
number provided, it will be total request
|
|
2899
|
+
timeout. It can also be a pair (tuple) of
|
|
2900
|
+
(connection, read) timeouts.
|
|
2901
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2902
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2903
|
+
request; this effectively ignores the
|
|
2904
|
+
authentication in the spec for a single request.
|
|
2905
|
+
:type _request_auth: dict, optional
|
|
2906
|
+
:param _content_type: force content-type for the request.
|
|
2907
|
+
:type _content_type: str, Optional
|
|
2908
|
+
:param _headers: set to override the headers for a single
|
|
2909
|
+
request; this effectively ignores the headers
|
|
2910
|
+
in the spec for a single request.
|
|
2911
|
+
:type _headers: dict, optional
|
|
2912
|
+
:param _host_index: set to override the host_index for a single
|
|
2913
|
+
request; this effectively ignores the host_index
|
|
2914
|
+
in the spec for a single request.
|
|
2915
|
+
:type _host_index: int, optional
|
|
2916
|
+
:return: Returns the result object.
|
|
2917
|
+
""" # noqa: E501
|
|
2918
|
+
warnings.warn("GET /v1beta1/plans is deprecated.", DeprecationWarning)
|
|
2919
|
+
|
|
2920
|
+
_param = self._list_plans_global_serialize(
|
|
2921
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
2922
|
+
)
|
|
2923
|
+
|
|
2924
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2925
|
+
"200": "PlanList",
|
|
2926
|
+
"400": "BadRequest",
|
|
2927
|
+
"401": "UnauthorizedRequest",
|
|
2928
|
+
"500": None,
|
|
2929
|
+
}
|
|
2930
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2931
|
+
response_data.read()
|
|
2932
|
+
return self.api_client.response_deserialize(
|
|
2933
|
+
response_data=response_data,
|
|
2934
|
+
response_types_map=_response_types_map,
|
|
2935
|
+
).data
|
|
2936
|
+
|
|
2937
|
+
@validate_call
|
|
2938
|
+
def list_plans_global_with_http_info(
|
|
2939
|
+
self,
|
|
2940
|
+
_request_timeout: Union[
|
|
2941
|
+
None,
|
|
2942
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2943
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2944
|
+
] = None,
|
|
2945
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2946
|
+
_content_type: Optional[StrictStr] = None,
|
|
2947
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2948
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2949
|
+
) -> ApiResponse[PlanList]:
|
|
2950
|
+
"""(Deprecated) list_plans_global
|
|
2951
|
+
|
|
2952
|
+
DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead.
|
|
2953
|
+
|
|
2954
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2955
|
+
number provided, it will be total request
|
|
2956
|
+
timeout. It can also be a pair (tuple) of
|
|
2957
|
+
(connection, read) timeouts.
|
|
2958
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2959
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2960
|
+
request; this effectively ignores the
|
|
2961
|
+
authentication in the spec for a single request.
|
|
2962
|
+
:type _request_auth: dict, optional
|
|
2963
|
+
:param _content_type: force content-type for the request.
|
|
2964
|
+
:type _content_type: str, Optional
|
|
2965
|
+
:param _headers: set to override the headers for a single
|
|
2966
|
+
request; this effectively ignores the headers
|
|
2967
|
+
in the spec for a single request.
|
|
2968
|
+
:type _headers: dict, optional
|
|
2969
|
+
:param _host_index: set to override the host_index for a single
|
|
2970
|
+
request; this effectively ignores the host_index
|
|
2971
|
+
in the spec for a single request.
|
|
2972
|
+
:type _host_index: int, optional
|
|
2973
|
+
:return: Returns the result object.
|
|
2974
|
+
""" # noqa: E501
|
|
2975
|
+
warnings.warn("GET /v1beta1/plans is deprecated.", DeprecationWarning)
|
|
2976
|
+
|
|
2977
|
+
_param = self._list_plans_global_serialize(
|
|
2978
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
2979
|
+
)
|
|
2980
|
+
|
|
2981
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2982
|
+
"200": "PlanList",
|
|
2983
|
+
"400": "BadRequest",
|
|
2984
|
+
"401": "UnauthorizedRequest",
|
|
2985
|
+
"500": None,
|
|
2986
|
+
}
|
|
2987
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2988
|
+
response_data.read()
|
|
2989
|
+
return self.api_client.response_deserialize(
|
|
2990
|
+
response_data=response_data,
|
|
2991
|
+
response_types_map=_response_types_map,
|
|
2992
|
+
)
|
|
2993
|
+
|
|
2994
|
+
@validate_call
|
|
2995
|
+
def list_plans_global_without_preload_content(
|
|
2996
|
+
self,
|
|
2997
|
+
_request_timeout: Union[
|
|
2998
|
+
None,
|
|
2999
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3000
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3001
|
+
] = None,
|
|
3002
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3003
|
+
_content_type: Optional[StrictStr] = None,
|
|
3004
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3005
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3006
|
+
) -> RESTResponseType:
|
|
3007
|
+
"""(Deprecated) list_plans_global
|
|
3008
|
+
|
|
3009
|
+
DEPRECATED: Will be removed at the 28 of february 2026. Use list-plans-project instead.
|
|
3010
|
+
|
|
3011
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3012
|
+
number provided, it will be total request
|
|
3013
|
+
timeout. It can also be a pair (tuple) of
|
|
3014
|
+
(connection, read) timeouts.
|
|
3015
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3016
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3017
|
+
request; this effectively ignores the
|
|
3018
|
+
authentication in the spec for a single request.
|
|
3019
|
+
:type _request_auth: dict, optional
|
|
3020
|
+
:param _content_type: force content-type for the request.
|
|
3021
|
+
:type _content_type: str, Optional
|
|
3022
|
+
:param _headers: set to override the headers for a single
|
|
3023
|
+
request; this effectively ignores the headers
|
|
3024
|
+
in the spec for a single request.
|
|
3025
|
+
:type _headers: dict, optional
|
|
3026
|
+
:param _host_index: set to override the host_index for a single
|
|
3027
|
+
request; this effectively ignores the host_index
|
|
3028
|
+
in the spec for a single request.
|
|
3029
|
+
:type _host_index: int, optional
|
|
3030
|
+
:return: Returns the result object.
|
|
3031
|
+
""" # noqa: E501
|
|
3032
|
+
warnings.warn("GET /v1beta1/plans is deprecated.", DeprecationWarning)
|
|
3033
|
+
|
|
3034
|
+
_param = self._list_plans_global_serialize(
|
|
3035
|
+
_request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
3036
|
+
)
|
|
3037
|
+
|
|
3038
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3039
|
+
"200": "PlanList",
|
|
3040
|
+
"400": "BadRequest",
|
|
3041
|
+
"401": "UnauthorizedRequest",
|
|
3042
|
+
"500": None,
|
|
3043
|
+
}
|
|
3044
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3045
|
+
return response_data.response
|
|
3046
|
+
|
|
3047
|
+
def _list_plans_global_serialize(
|
|
3048
|
+
self,
|
|
3049
|
+
_request_auth,
|
|
3050
|
+
_content_type,
|
|
3051
|
+
_headers,
|
|
3052
|
+
_host_index,
|
|
3053
|
+
) -> RequestSerialized:
|
|
3054
|
+
|
|
3055
|
+
_host = None
|
|
3056
|
+
|
|
3057
|
+
_collection_formats: Dict[str, str] = {}
|
|
3058
|
+
|
|
3059
|
+
_path_params: Dict[str, str] = {}
|
|
3060
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3061
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3062
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3063
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
3064
|
+
_body_params: Optional[bytes] = None
|
|
3065
|
+
|
|
3066
|
+
# process the path parameters
|
|
3067
|
+
# process the query parameters
|
|
3068
|
+
# process the header parameters
|
|
3069
|
+
# process the form parameters
|
|
3070
|
+
# process the body parameter
|
|
3071
|
+
|
|
3072
|
+
# set the HTTP header `Accept`
|
|
3073
|
+
if "Accept" not in _header_params:
|
|
3074
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3075
|
+
|
|
3076
|
+
# authentication setting
|
|
3077
|
+
_auth_settings: List[str] = []
|
|
3078
|
+
|
|
3079
|
+
return self.api_client.param_serialize(
|
|
3080
|
+
method="GET",
|
|
3081
|
+
resource_path="/v1beta1/plans",
|
|
3082
|
+
path_params=_path_params,
|
|
3083
|
+
query_params=_query_params,
|
|
3084
|
+
header_params=_header_params,
|
|
3085
|
+
body=_body_params,
|
|
3086
|
+
post_params=_form_params,
|
|
3087
|
+
files=_files,
|
|
3088
|
+
auth_settings=_auth_settings,
|
|
3089
|
+
collection_formats=_collection_formats,
|
|
3090
|
+
_host=_host,
|
|
3091
|
+
_request_auth=_request_auth,
|
|
3092
|
+
)
|
|
3093
|
+
|
|
3094
|
+
@validate_call
|
|
3095
|
+
def list_plans_project(
|
|
3096
|
+
self,
|
|
3097
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the plan is part of.")],
|
|
3098
|
+
_request_timeout: Union[
|
|
3099
|
+
None,
|
|
3100
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3101
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3102
|
+
] = None,
|
|
3103
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3104
|
+
_content_type: Optional[StrictStr] = None,
|
|
3105
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3106
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3107
|
+
) -> PlanList:
|
|
3108
|
+
"""list_plans_project
|
|
3109
|
+
|
|
3110
|
+
List all possible plans for the project.
|
|
3111
|
+
|
|
3112
|
+
:param project_id: The STACKIT portal project UUID the plan is part of. (required)
|
|
3113
|
+
:type project_id: str
|
|
3114
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3115
|
+
number provided, it will be total request
|
|
3116
|
+
timeout. It can also be a pair (tuple) of
|
|
3117
|
+
(connection, read) timeouts.
|
|
3118
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3119
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3120
|
+
request; this effectively ignores the
|
|
3121
|
+
authentication in the spec for a single request.
|
|
3122
|
+
:type _request_auth: dict, optional
|
|
3123
|
+
:param _content_type: force content-type for the request.
|
|
3124
|
+
:type _content_type: str, Optional
|
|
3125
|
+
:param _headers: set to override the headers for a single
|
|
3126
|
+
request; this effectively ignores the headers
|
|
3127
|
+
in the spec for a single request.
|
|
3128
|
+
:type _headers: dict, optional
|
|
3129
|
+
:param _host_index: set to override the host_index for a single
|
|
3130
|
+
request; this effectively ignores the host_index
|
|
3131
|
+
in the spec for a single request.
|
|
3132
|
+
:type _host_index: int, optional
|
|
3133
|
+
:return: Returns the result object.
|
|
3134
|
+
""" # noqa: E501
|
|
3135
|
+
|
|
3136
|
+
_param = self._list_plans_project_serialize(
|
|
3137
|
+
project_id=project_id,
|
|
3138
|
+
_request_auth=_request_auth,
|
|
3139
|
+
_content_type=_content_type,
|
|
3140
|
+
_headers=_headers,
|
|
3141
|
+
_host_index=_host_index,
|
|
3142
|
+
)
|
|
3143
|
+
|
|
3144
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3145
|
+
"200": "PlanList",
|
|
3146
|
+
"400": "BadRequest",
|
|
3147
|
+
"401": "UnauthorizedRequest",
|
|
3148
|
+
"500": None,
|
|
3149
|
+
}
|
|
3150
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3151
|
+
response_data.read()
|
|
3152
|
+
return self.api_client.response_deserialize(
|
|
3153
|
+
response_data=response_data,
|
|
3154
|
+
response_types_map=_response_types_map,
|
|
3155
|
+
).data
|
|
3156
|
+
|
|
3157
|
+
@validate_call
|
|
3158
|
+
def list_plans_project_with_http_info(
|
|
3159
|
+
self,
|
|
3160
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the plan is part of.")],
|
|
3161
|
+
_request_timeout: Union[
|
|
3162
|
+
None,
|
|
3163
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3164
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3165
|
+
] = None,
|
|
3166
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3167
|
+
_content_type: Optional[StrictStr] = None,
|
|
3168
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3169
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3170
|
+
) -> ApiResponse[PlanList]:
|
|
3171
|
+
"""list_plans_project
|
|
3172
|
+
|
|
3173
|
+
List all possible plans for the project.
|
|
3174
|
+
|
|
3175
|
+
:param project_id: The STACKIT portal project UUID the plan is part of. (required)
|
|
3176
|
+
:type project_id: str
|
|
3177
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3178
|
+
number provided, it will be total request
|
|
3179
|
+
timeout. It can also be a pair (tuple) of
|
|
3180
|
+
(connection, read) timeouts.
|
|
3181
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3182
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3183
|
+
request; this effectively ignores the
|
|
3184
|
+
authentication in the spec for a single request.
|
|
3185
|
+
:type _request_auth: dict, optional
|
|
3186
|
+
:param _content_type: force content-type for the request.
|
|
3187
|
+
:type _content_type: str, Optional
|
|
3188
|
+
:param _headers: set to override the headers for a single
|
|
3189
|
+
request; this effectively ignores the headers
|
|
3190
|
+
in the spec for a single request.
|
|
3191
|
+
:type _headers: dict, optional
|
|
3192
|
+
:param _host_index: set to override the host_index for a single
|
|
3193
|
+
request; this effectively ignores the host_index
|
|
3194
|
+
in the spec for a single request.
|
|
3195
|
+
:type _host_index: int, optional
|
|
3196
|
+
:return: Returns the result object.
|
|
3197
|
+
""" # noqa: E501
|
|
3198
|
+
|
|
3199
|
+
_param = self._list_plans_project_serialize(
|
|
3200
|
+
project_id=project_id,
|
|
3201
|
+
_request_auth=_request_auth,
|
|
3202
|
+
_content_type=_content_type,
|
|
3203
|
+
_headers=_headers,
|
|
3204
|
+
_host_index=_host_index,
|
|
3205
|
+
)
|
|
3206
|
+
|
|
3207
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3208
|
+
"200": "PlanList",
|
|
3209
|
+
"400": "BadRequest",
|
|
3210
|
+
"401": "UnauthorizedRequest",
|
|
3211
|
+
"500": None,
|
|
3212
|
+
}
|
|
3213
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3214
|
+
response_data.read()
|
|
3215
|
+
return self.api_client.response_deserialize(
|
|
3216
|
+
response_data=response_data,
|
|
3217
|
+
response_types_map=_response_types_map,
|
|
3218
|
+
)
|
|
3219
|
+
|
|
3220
|
+
@validate_call
|
|
3221
|
+
def list_plans_project_without_preload_content(
|
|
3222
|
+
self,
|
|
3223
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the plan is part of.")],
|
|
3224
|
+
_request_timeout: Union[
|
|
3225
|
+
None,
|
|
3226
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3227
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3228
|
+
] = None,
|
|
3229
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3230
|
+
_content_type: Optional[StrictStr] = None,
|
|
3231
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3232
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3233
|
+
) -> RESTResponseType:
|
|
3234
|
+
"""list_plans_project
|
|
3235
|
+
|
|
3236
|
+
List all possible plans for the project.
|
|
3237
|
+
|
|
3238
|
+
:param project_id: The STACKIT portal project UUID the plan is part of. (required)
|
|
3239
|
+
:type project_id: str
|
|
3240
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3241
|
+
number provided, it will be total request
|
|
3242
|
+
timeout. It can also be a pair (tuple) of
|
|
3243
|
+
(connection, read) timeouts.
|
|
3244
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3245
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3246
|
+
request; this effectively ignores the
|
|
3247
|
+
authentication in the spec for a single request.
|
|
3248
|
+
:type _request_auth: dict, optional
|
|
3249
|
+
:param _content_type: force content-type for the request.
|
|
3250
|
+
:type _content_type: str, Optional
|
|
3251
|
+
:param _headers: set to override the headers for a single
|
|
3252
|
+
request; this effectively ignores the headers
|
|
3253
|
+
in the spec for a single request.
|
|
3254
|
+
:type _headers: dict, optional
|
|
3255
|
+
:param _host_index: set to override the host_index for a single
|
|
3256
|
+
request; this effectively ignores the host_index
|
|
3257
|
+
in the spec for a single request.
|
|
3258
|
+
:type _host_index: int, optional
|
|
3259
|
+
:return: Returns the result object.
|
|
3260
|
+
""" # noqa: E501
|
|
3261
|
+
|
|
3262
|
+
_param = self._list_plans_project_serialize(
|
|
3263
|
+
project_id=project_id,
|
|
3264
|
+
_request_auth=_request_auth,
|
|
3265
|
+
_content_type=_content_type,
|
|
3266
|
+
_headers=_headers,
|
|
3267
|
+
_host_index=_host_index,
|
|
3268
|
+
)
|
|
3269
|
+
|
|
3270
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3271
|
+
"200": "PlanList",
|
|
3272
|
+
"400": "BadRequest",
|
|
3273
|
+
"401": "UnauthorizedRequest",
|
|
3274
|
+
"500": None,
|
|
3275
|
+
}
|
|
3276
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3277
|
+
return response_data.response
|
|
3278
|
+
|
|
3279
|
+
def _list_plans_project_serialize(
|
|
3280
|
+
self,
|
|
3281
|
+
project_id,
|
|
3282
|
+
_request_auth,
|
|
3283
|
+
_content_type,
|
|
3284
|
+
_headers,
|
|
3285
|
+
_host_index,
|
|
3286
|
+
) -> RequestSerialized:
|
|
3287
|
+
|
|
3288
|
+
_host = None
|
|
3289
|
+
|
|
3290
|
+
_collection_formats: Dict[str, str] = {}
|
|
3291
|
+
|
|
3292
|
+
_path_params: Dict[str, str] = {}
|
|
3293
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3294
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3295
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3296
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
3297
|
+
_body_params: Optional[bytes] = None
|
|
3298
|
+
|
|
3299
|
+
# process the path parameters
|
|
3300
|
+
if project_id is not None:
|
|
3301
|
+
_path_params["projectId"] = project_id
|
|
3302
|
+
# process the query parameters
|
|
3303
|
+
# process the header parameters
|
|
3304
|
+
# process the form parameters
|
|
3305
|
+
# process the body parameter
|
|
3306
|
+
|
|
3307
|
+
# set the HTTP header `Accept`
|
|
3308
|
+
if "Accept" not in _header_params:
|
|
3309
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3310
|
+
|
|
3311
|
+
# authentication setting
|
|
3312
|
+
_auth_settings: List[str] = []
|
|
3313
|
+
|
|
3314
|
+
return self.api_client.param_serialize(
|
|
3315
|
+
method="GET",
|
|
3316
|
+
resource_path="/v1beta1/projects/{projectId}/plans",
|
|
3317
|
+
path_params=_path_params,
|
|
3318
|
+
query_params=_query_params,
|
|
3319
|
+
header_params=_header_params,
|
|
3320
|
+
body=_body_params,
|
|
3321
|
+
post_params=_form_params,
|
|
3322
|
+
files=_files,
|
|
3323
|
+
auth_settings=_auth_settings,
|
|
3324
|
+
collection_formats=_collection_formats,
|
|
3325
|
+
_host=_host,
|
|
3326
|
+
_request_auth=_request_auth,
|
|
3327
|
+
)
|
|
3328
|
+
|
|
3329
|
+
@validate_call
|
|
3330
|
+
def update_instance(
|
|
3331
|
+
self,
|
|
3332
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
3333
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
3334
|
+
instance_id: Annotated[
|
|
3335
|
+
str,
|
|
3336
|
+
Field(
|
|
3337
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
3338
|
+
),
|
|
3339
|
+
],
|
|
3340
|
+
update_instance_payload: UpdateInstancePayload,
|
|
3341
|
+
_request_timeout: Union[
|
|
3342
|
+
None,
|
|
3343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3344
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3345
|
+
] = None,
|
|
3346
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3347
|
+
_content_type: Optional[StrictStr] = None,
|
|
3348
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3349
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3350
|
+
) -> None:
|
|
3351
|
+
"""update_instance
|
|
3352
|
+
|
|
3353
|
+
Updates the given instance.
|
|
3354
|
+
|
|
3355
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
3356
|
+
:type project_id: str
|
|
3357
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
3358
|
+
:type region_id: str
|
|
3359
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
3360
|
+
:type instance_id: str
|
|
3361
|
+
:param update_instance_payload: (required)
|
|
3362
|
+
:type update_instance_payload: UpdateInstancePayload
|
|
3363
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3364
|
+
number provided, it will be total request
|
|
3365
|
+
timeout. It can also be a pair (tuple) of
|
|
3366
|
+
(connection, read) timeouts.
|
|
3367
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3368
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3369
|
+
request; this effectively ignores the
|
|
3370
|
+
authentication in the spec for a single request.
|
|
3371
|
+
:type _request_auth: dict, optional
|
|
3372
|
+
:param _content_type: force content-type for the request.
|
|
3373
|
+
:type _content_type: str, Optional
|
|
3374
|
+
:param _headers: set to override the headers for a single
|
|
3375
|
+
request; this effectively ignores the headers
|
|
3376
|
+
in the spec for a single request.
|
|
3377
|
+
:type _headers: dict, optional
|
|
3378
|
+
:param _host_index: set to override the host_index for a single
|
|
3379
|
+
request; this effectively ignores the host_index
|
|
3380
|
+
in the spec for a single request.
|
|
3381
|
+
:type _host_index: int, optional
|
|
3382
|
+
:return: Returns the result object.
|
|
3383
|
+
""" # noqa: E501
|
|
3384
|
+
|
|
3385
|
+
_param = self._update_instance_serialize(
|
|
3386
|
+
project_id=project_id,
|
|
3387
|
+
region_id=region_id,
|
|
3388
|
+
instance_id=instance_id,
|
|
3389
|
+
update_instance_payload=update_instance_payload,
|
|
3390
|
+
_request_auth=_request_auth,
|
|
3391
|
+
_content_type=_content_type,
|
|
3392
|
+
_headers=_headers,
|
|
3393
|
+
_host_index=_host_index,
|
|
3394
|
+
)
|
|
3395
|
+
|
|
3396
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3397
|
+
"204": None,
|
|
3398
|
+
"400": "BadRequest",
|
|
3399
|
+
"401": "UnauthorizedRequest",
|
|
3400
|
+
"404": None,
|
|
3401
|
+
"409": None,
|
|
3402
|
+
"500": None,
|
|
3403
|
+
}
|
|
3404
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3405
|
+
response_data.read()
|
|
3406
|
+
return self.api_client.response_deserialize(
|
|
3407
|
+
response_data=response_data,
|
|
3408
|
+
response_types_map=_response_types_map,
|
|
3409
|
+
).data
|
|
3410
|
+
|
|
3411
|
+
@validate_call
|
|
3412
|
+
def update_instance_with_http_info(
|
|
3413
|
+
self,
|
|
3414
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
3415
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
3416
|
+
instance_id: Annotated[
|
|
3417
|
+
str,
|
|
3418
|
+
Field(
|
|
3419
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
3420
|
+
),
|
|
3421
|
+
],
|
|
3422
|
+
update_instance_payload: UpdateInstancePayload,
|
|
3423
|
+
_request_timeout: Union[
|
|
3424
|
+
None,
|
|
3425
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3426
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3427
|
+
] = None,
|
|
3428
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3429
|
+
_content_type: Optional[StrictStr] = None,
|
|
3430
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3431
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3432
|
+
) -> ApiResponse[None]:
|
|
3433
|
+
"""update_instance
|
|
3434
|
+
|
|
3435
|
+
Updates the given instance.
|
|
3436
|
+
|
|
3437
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
3438
|
+
:type project_id: str
|
|
3439
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
3440
|
+
:type region_id: str
|
|
3441
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
3442
|
+
:type instance_id: str
|
|
3443
|
+
:param update_instance_payload: (required)
|
|
3444
|
+
:type update_instance_payload: UpdateInstancePayload
|
|
3445
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3446
|
+
number provided, it will be total request
|
|
3447
|
+
timeout. It can also be a pair (tuple) of
|
|
3448
|
+
(connection, read) timeouts.
|
|
3449
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3450
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3451
|
+
request; this effectively ignores the
|
|
3452
|
+
authentication in the spec for a single request.
|
|
3453
|
+
:type _request_auth: dict, optional
|
|
3454
|
+
:param _content_type: force content-type for the request.
|
|
3455
|
+
:type _content_type: str, Optional
|
|
3456
|
+
:param _headers: set to override the headers for a single
|
|
3457
|
+
request; this effectively ignores the headers
|
|
3458
|
+
in the spec for a single request.
|
|
3459
|
+
:type _headers: dict, optional
|
|
3460
|
+
:param _host_index: set to override the host_index for a single
|
|
3461
|
+
request; this effectively ignores the host_index
|
|
3462
|
+
in the spec for a single request.
|
|
3463
|
+
:type _host_index: int, optional
|
|
3464
|
+
:return: Returns the result object.
|
|
3465
|
+
""" # noqa: E501
|
|
3466
|
+
|
|
3467
|
+
_param = self._update_instance_serialize(
|
|
3468
|
+
project_id=project_id,
|
|
3469
|
+
region_id=region_id,
|
|
3470
|
+
instance_id=instance_id,
|
|
3471
|
+
update_instance_payload=update_instance_payload,
|
|
3472
|
+
_request_auth=_request_auth,
|
|
3473
|
+
_content_type=_content_type,
|
|
3474
|
+
_headers=_headers,
|
|
3475
|
+
_host_index=_host_index,
|
|
3476
|
+
)
|
|
3477
|
+
|
|
3478
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3479
|
+
"204": None,
|
|
3480
|
+
"400": "BadRequest",
|
|
3481
|
+
"401": "UnauthorizedRequest",
|
|
3482
|
+
"404": None,
|
|
3483
|
+
"409": None,
|
|
3484
|
+
"500": None,
|
|
3485
|
+
}
|
|
3486
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3487
|
+
response_data.read()
|
|
3488
|
+
return self.api_client.response_deserialize(
|
|
3489
|
+
response_data=response_data,
|
|
3490
|
+
response_types_map=_response_types_map,
|
|
3491
|
+
)
|
|
3492
|
+
|
|
3493
|
+
@validate_call
|
|
3494
|
+
def update_instance_without_preload_content(
|
|
3495
|
+
self,
|
|
3496
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
3497
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
3498
|
+
instance_id: Annotated[
|
|
3499
|
+
str,
|
|
3500
|
+
Field(
|
|
3501
|
+
strict=True, max_length=16, description="The full ID of the instance, <display_name>-<project_hash>."
|
|
3502
|
+
),
|
|
3503
|
+
],
|
|
3504
|
+
update_instance_payload: UpdateInstancePayload,
|
|
3505
|
+
_request_timeout: Union[
|
|
3506
|
+
None,
|
|
3507
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3508
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3509
|
+
] = None,
|
|
3510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3511
|
+
_content_type: Optional[StrictStr] = None,
|
|
3512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3514
|
+
) -> RESTResponseType:
|
|
3515
|
+
"""update_instance
|
|
3516
|
+
|
|
3517
|
+
Updates the given instance.
|
|
3518
|
+
|
|
3519
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
3520
|
+
:type project_id: str
|
|
3521
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
3522
|
+
:type region_id: str
|
|
3523
|
+
:param instance_id: The full ID of the instance, <display_name>-<project_hash>. (required)
|
|
3524
|
+
:type instance_id: str
|
|
3525
|
+
:param update_instance_payload: (required)
|
|
3526
|
+
:type update_instance_payload: UpdateInstancePayload
|
|
3527
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3528
|
+
number provided, it will be total request
|
|
3529
|
+
timeout. It can also be a pair (tuple) of
|
|
3530
|
+
(connection, read) timeouts.
|
|
3531
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3532
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3533
|
+
request; this effectively ignores the
|
|
3534
|
+
authentication in the spec for a single request.
|
|
3535
|
+
:type _request_auth: dict, optional
|
|
3536
|
+
:param _content_type: force content-type for the request.
|
|
3537
|
+
:type _content_type: str, Optional
|
|
3538
|
+
:param _headers: set to override the headers for a single
|
|
3539
|
+
request; this effectively ignores the headers
|
|
3540
|
+
in the spec for a single request.
|
|
3541
|
+
:type _headers: dict, optional
|
|
3542
|
+
:param _host_index: set to override the host_index for a single
|
|
3543
|
+
request; this effectively ignores the host_index
|
|
3544
|
+
in the spec for a single request.
|
|
3545
|
+
:type _host_index: int, optional
|
|
3546
|
+
:return: Returns the result object.
|
|
3547
|
+
""" # noqa: E501
|
|
3548
|
+
|
|
3549
|
+
_param = self._update_instance_serialize(
|
|
3550
|
+
project_id=project_id,
|
|
3551
|
+
region_id=region_id,
|
|
3552
|
+
instance_id=instance_id,
|
|
3553
|
+
update_instance_payload=update_instance_payload,
|
|
3554
|
+
_request_auth=_request_auth,
|
|
3555
|
+
_content_type=_content_type,
|
|
3556
|
+
_headers=_headers,
|
|
3557
|
+
_host_index=_host_index,
|
|
3558
|
+
)
|
|
3559
|
+
|
|
3560
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3561
|
+
"204": None,
|
|
3562
|
+
"400": "BadRequest",
|
|
3563
|
+
"401": "UnauthorizedRequest",
|
|
3564
|
+
"404": None,
|
|
3565
|
+
"409": None,
|
|
3566
|
+
"500": None,
|
|
3567
|
+
}
|
|
3568
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3569
|
+
return response_data.response
|
|
3570
|
+
|
|
3571
|
+
def _update_instance_serialize(
|
|
3572
|
+
self,
|
|
3573
|
+
project_id,
|
|
3574
|
+
region_id,
|
|
3575
|
+
instance_id,
|
|
3576
|
+
update_instance_payload,
|
|
3577
|
+
_request_auth,
|
|
3578
|
+
_content_type,
|
|
3579
|
+
_headers,
|
|
3580
|
+
_host_index,
|
|
3581
|
+
) -> RequestSerialized:
|
|
3582
|
+
|
|
3583
|
+
_host = None
|
|
3584
|
+
|
|
3585
|
+
_collection_formats: Dict[str, str] = {}
|
|
3586
|
+
|
|
3587
|
+
_path_params: Dict[str, str] = {}
|
|
3588
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3589
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3590
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3591
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
3592
|
+
_body_params: Optional[bytes] = None
|
|
3593
|
+
|
|
3594
|
+
# process the path parameters
|
|
3595
|
+
if project_id is not None:
|
|
3596
|
+
_path_params["projectId"] = project_id
|
|
3597
|
+
if region_id is not None:
|
|
3598
|
+
_path_params["regionId"] = region_id
|
|
3599
|
+
if instance_id is not None:
|
|
3600
|
+
_path_params["instanceId"] = instance_id
|
|
3601
|
+
# process the query parameters
|
|
3602
|
+
# process the header parameters
|
|
3603
|
+
# process the form parameters
|
|
3604
|
+
# process the body parameter
|
|
3605
|
+
if update_instance_payload is not None:
|
|
3606
|
+
_body_params = update_instance_payload
|
|
3607
|
+
|
|
3608
|
+
# set the HTTP header `Accept`
|
|
3609
|
+
if "Accept" not in _header_params:
|
|
3610
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3611
|
+
|
|
3612
|
+
# set the HTTP header `Content-Type`
|
|
3613
|
+
if _content_type:
|
|
3614
|
+
_header_params["Content-Type"] = _content_type
|
|
3615
|
+
else:
|
|
3616
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
3617
|
+
if _default_content_type is not None:
|
|
3618
|
+
_header_params["Content-Type"] = _default_content_type
|
|
3619
|
+
|
|
3620
|
+
# authentication setting
|
|
3621
|
+
_auth_settings: List[str] = []
|
|
3622
|
+
|
|
3623
|
+
return self.api_client.param_serialize(
|
|
3624
|
+
method="PUT",
|
|
3625
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instances/{instanceId}",
|
|
3626
|
+
path_params=_path_params,
|
|
3627
|
+
query_params=_query_params,
|
|
3628
|
+
header_params=_header_params,
|
|
3629
|
+
body=_body_params,
|
|
3630
|
+
post_params=_form_params,
|
|
3631
|
+
files=_files,
|
|
3632
|
+
auth_settings=_auth_settings,
|
|
3633
|
+
collection_formats=_collection_formats,
|
|
3634
|
+
_host=_host,
|
|
3635
|
+
_request_auth=_request_auth,
|
|
3636
|
+
)
|
|
3637
|
+
|
|
3638
|
+
@validate_call
|
|
3639
|
+
def update_instance_by_name(
|
|
3640
|
+
self,
|
|
3641
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
3642
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
3643
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
3644
|
+
update_instance_by_name_payload: UpdateInstanceByNamePayload,
|
|
3645
|
+
_request_timeout: Union[
|
|
3646
|
+
None,
|
|
3647
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3648
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3649
|
+
] = None,
|
|
3650
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3651
|
+
_content_type: Optional[StrictStr] = None,
|
|
3652
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3653
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3654
|
+
) -> None:
|
|
3655
|
+
"""update_instance_by_name
|
|
3656
|
+
|
|
3657
|
+
Updates the given instance.
|
|
3658
|
+
|
|
3659
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
3660
|
+
:type project_id: str
|
|
3661
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
3662
|
+
:type region_id: str
|
|
3663
|
+
:param display_name: The instance display name. (required)
|
|
3664
|
+
:type display_name: str
|
|
3665
|
+
:param update_instance_by_name_payload: (required)
|
|
3666
|
+
:type update_instance_by_name_payload: UpdateInstanceByNamePayload
|
|
3667
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3668
|
+
number provided, it will be total request
|
|
3669
|
+
timeout. It can also be a pair (tuple) of
|
|
3670
|
+
(connection, read) timeouts.
|
|
3671
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3672
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3673
|
+
request; this effectively ignores the
|
|
3674
|
+
authentication in the spec for a single request.
|
|
3675
|
+
:type _request_auth: dict, optional
|
|
3676
|
+
:param _content_type: force content-type for the request.
|
|
3677
|
+
:type _content_type: str, Optional
|
|
3678
|
+
:param _headers: set to override the headers for a single
|
|
3679
|
+
request; this effectively ignores the headers
|
|
3680
|
+
in the spec for a single request.
|
|
3681
|
+
:type _headers: dict, optional
|
|
3682
|
+
:param _host_index: set to override the host_index for a single
|
|
3683
|
+
request; this effectively ignores the host_index
|
|
3684
|
+
in the spec for a single request.
|
|
3685
|
+
:type _host_index: int, optional
|
|
3686
|
+
:return: Returns the result object.
|
|
3687
|
+
""" # noqa: E501
|
|
3688
|
+
|
|
3689
|
+
_param = self._update_instance_by_name_serialize(
|
|
3690
|
+
project_id=project_id,
|
|
3691
|
+
region_id=region_id,
|
|
3692
|
+
display_name=display_name,
|
|
3693
|
+
update_instance_by_name_payload=update_instance_by_name_payload,
|
|
3694
|
+
_request_auth=_request_auth,
|
|
3695
|
+
_content_type=_content_type,
|
|
3696
|
+
_headers=_headers,
|
|
3697
|
+
_host_index=_host_index,
|
|
3698
|
+
)
|
|
3699
|
+
|
|
3700
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3701
|
+
"204": None,
|
|
3702
|
+
"400": "BadRequest",
|
|
3703
|
+
"401": "UnauthorizedRequest",
|
|
3704
|
+
"404": None,
|
|
3705
|
+
"409": None,
|
|
3706
|
+
"500": None,
|
|
3707
|
+
}
|
|
3708
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3709
|
+
response_data.read()
|
|
3710
|
+
return self.api_client.response_deserialize(
|
|
3711
|
+
response_data=response_data,
|
|
3712
|
+
response_types_map=_response_types_map,
|
|
3713
|
+
).data
|
|
3714
|
+
|
|
3715
|
+
@validate_call
|
|
3716
|
+
def update_instance_by_name_with_http_info(
|
|
3717
|
+
self,
|
|
3718
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
3719
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
3720
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
3721
|
+
update_instance_by_name_payload: UpdateInstanceByNamePayload,
|
|
3722
|
+
_request_timeout: Union[
|
|
3723
|
+
None,
|
|
3724
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3725
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3726
|
+
] = None,
|
|
3727
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3728
|
+
_content_type: Optional[StrictStr] = None,
|
|
3729
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3730
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3731
|
+
) -> ApiResponse[None]:
|
|
3732
|
+
"""update_instance_by_name
|
|
3733
|
+
|
|
3734
|
+
Updates the given instance.
|
|
3735
|
+
|
|
3736
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
3737
|
+
:type project_id: str
|
|
3738
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
3739
|
+
:type region_id: str
|
|
3740
|
+
:param display_name: The instance display name. (required)
|
|
3741
|
+
:type display_name: str
|
|
3742
|
+
:param update_instance_by_name_payload: (required)
|
|
3743
|
+
:type update_instance_by_name_payload: UpdateInstanceByNamePayload
|
|
3744
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3745
|
+
number provided, it will be total request
|
|
3746
|
+
timeout. It can also be a pair (tuple) of
|
|
3747
|
+
(connection, read) timeouts.
|
|
3748
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3749
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3750
|
+
request; this effectively ignores the
|
|
3751
|
+
authentication in the spec for a single request.
|
|
3752
|
+
:type _request_auth: dict, optional
|
|
3753
|
+
:param _content_type: force content-type for the request.
|
|
3754
|
+
:type _content_type: str, Optional
|
|
3755
|
+
:param _headers: set to override the headers for a single
|
|
3756
|
+
request; this effectively ignores the headers
|
|
3757
|
+
in the spec for a single request.
|
|
3758
|
+
:type _headers: dict, optional
|
|
3759
|
+
:param _host_index: set to override the host_index for a single
|
|
3760
|
+
request; this effectively ignores the host_index
|
|
3761
|
+
in the spec for a single request.
|
|
3762
|
+
:type _host_index: int, optional
|
|
3763
|
+
:return: Returns the result object.
|
|
3764
|
+
""" # noqa: E501
|
|
3765
|
+
|
|
3766
|
+
_param = self._update_instance_by_name_serialize(
|
|
3767
|
+
project_id=project_id,
|
|
3768
|
+
region_id=region_id,
|
|
3769
|
+
display_name=display_name,
|
|
3770
|
+
update_instance_by_name_payload=update_instance_by_name_payload,
|
|
3771
|
+
_request_auth=_request_auth,
|
|
3772
|
+
_content_type=_content_type,
|
|
3773
|
+
_headers=_headers,
|
|
3774
|
+
_host_index=_host_index,
|
|
3775
|
+
)
|
|
3776
|
+
|
|
3777
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3778
|
+
"204": None,
|
|
3779
|
+
"400": "BadRequest",
|
|
3780
|
+
"401": "UnauthorizedRequest",
|
|
3781
|
+
"404": None,
|
|
3782
|
+
"409": None,
|
|
3783
|
+
"500": None,
|
|
3784
|
+
}
|
|
3785
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3786
|
+
response_data.read()
|
|
3787
|
+
return self.api_client.response_deserialize(
|
|
3788
|
+
response_data=response_data,
|
|
3789
|
+
response_types_map=_response_types_map,
|
|
3790
|
+
)
|
|
3791
|
+
|
|
3792
|
+
@validate_call
|
|
3793
|
+
def update_instance_by_name_without_preload_content(
|
|
3794
|
+
self,
|
|
3795
|
+
project_id: Annotated[StrictStr, Field(description="The STACKIT portal project UUID the instance is part of.")],
|
|
3796
|
+
region_id: Annotated[StrictStr, Field(description="The STACKIT region the instance is part of.")],
|
|
3797
|
+
display_name: Annotated[str, Field(strict=True, max_length=8, description="The instance display name.")],
|
|
3798
|
+
update_instance_by_name_payload: UpdateInstanceByNamePayload,
|
|
3799
|
+
_request_timeout: Union[
|
|
3800
|
+
None,
|
|
3801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3802
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
3803
|
+
] = None,
|
|
3804
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3805
|
+
_content_type: Optional[StrictStr] = None,
|
|
3806
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3807
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3808
|
+
) -> RESTResponseType:
|
|
3809
|
+
"""update_instance_by_name
|
|
3810
|
+
|
|
3811
|
+
Updates the given instance.
|
|
3812
|
+
|
|
3813
|
+
:param project_id: The STACKIT portal project UUID the instance is part of. (required)
|
|
3814
|
+
:type project_id: str
|
|
3815
|
+
:param region_id: The STACKIT region the instance is part of. (required)
|
|
3816
|
+
:type region_id: str
|
|
3817
|
+
:param display_name: The instance display name. (required)
|
|
3818
|
+
:type display_name: str
|
|
3819
|
+
:param update_instance_by_name_payload: (required)
|
|
3820
|
+
:type update_instance_by_name_payload: UpdateInstanceByNamePayload
|
|
3821
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3822
|
+
number provided, it will be total request
|
|
3823
|
+
timeout. It can also be a pair (tuple) of
|
|
3824
|
+
(connection, read) timeouts.
|
|
3825
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3826
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3827
|
+
request; this effectively ignores the
|
|
3828
|
+
authentication in the spec for a single request.
|
|
3829
|
+
:type _request_auth: dict, optional
|
|
3830
|
+
:param _content_type: force content-type for the request.
|
|
3831
|
+
:type _content_type: str, Optional
|
|
3832
|
+
:param _headers: set to override the headers for a single
|
|
3833
|
+
request; this effectively ignores the headers
|
|
3834
|
+
in the spec for a single request.
|
|
3835
|
+
:type _headers: dict, optional
|
|
3836
|
+
:param _host_index: set to override the host_index for a single
|
|
3837
|
+
request; this effectively ignores the host_index
|
|
3838
|
+
in the spec for a single request.
|
|
3839
|
+
:type _host_index: int, optional
|
|
3840
|
+
:return: Returns the result object.
|
|
3841
|
+
""" # noqa: E501
|
|
3842
|
+
|
|
3843
|
+
_param = self._update_instance_by_name_serialize(
|
|
3844
|
+
project_id=project_id,
|
|
3845
|
+
region_id=region_id,
|
|
3846
|
+
display_name=display_name,
|
|
3847
|
+
update_instance_by_name_payload=update_instance_by_name_payload,
|
|
3848
|
+
_request_auth=_request_auth,
|
|
3849
|
+
_content_type=_content_type,
|
|
3850
|
+
_headers=_headers,
|
|
3851
|
+
_host_index=_host_index,
|
|
3852
|
+
)
|
|
3853
|
+
|
|
3854
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3855
|
+
"204": None,
|
|
3856
|
+
"400": "BadRequest",
|
|
3857
|
+
"401": "UnauthorizedRequest",
|
|
3858
|
+
"404": None,
|
|
3859
|
+
"409": None,
|
|
3860
|
+
"500": None,
|
|
3861
|
+
}
|
|
3862
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
3863
|
+
return response_data.response
|
|
3864
|
+
|
|
3865
|
+
def _update_instance_by_name_serialize(
|
|
3866
|
+
self,
|
|
3867
|
+
project_id,
|
|
3868
|
+
region_id,
|
|
3869
|
+
display_name,
|
|
3870
|
+
update_instance_by_name_payload,
|
|
3871
|
+
_request_auth,
|
|
3872
|
+
_content_type,
|
|
3873
|
+
_headers,
|
|
3874
|
+
_host_index,
|
|
3875
|
+
) -> RequestSerialized:
|
|
3876
|
+
|
|
3877
|
+
_host = None
|
|
3878
|
+
|
|
3879
|
+
_collection_formats: Dict[str, str] = {}
|
|
3880
|
+
|
|
3881
|
+
_path_params: Dict[str, str] = {}
|
|
3882
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3883
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3884
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3885
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
3886
|
+
_body_params: Optional[bytes] = None
|
|
3887
|
+
|
|
3888
|
+
# process the path parameters
|
|
3889
|
+
if project_id is not None:
|
|
3890
|
+
_path_params["projectId"] = project_id
|
|
3891
|
+
if region_id is not None:
|
|
3892
|
+
_path_params["regionId"] = region_id
|
|
3893
|
+
if display_name is not None:
|
|
3894
|
+
_path_params["displayName"] = display_name
|
|
3895
|
+
# process the query parameters
|
|
3896
|
+
# process the header parameters
|
|
3897
|
+
# process the form parameters
|
|
3898
|
+
# process the body parameter
|
|
3899
|
+
if update_instance_by_name_payload is not None:
|
|
3900
|
+
_body_params = update_instance_by_name_payload
|
|
3901
|
+
|
|
3902
|
+
# set the HTTP header `Accept`
|
|
3903
|
+
if "Accept" not in _header_params:
|
|
3904
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
3905
|
+
|
|
3906
|
+
# set the HTTP header `Content-Type`
|
|
3907
|
+
if _content_type:
|
|
3908
|
+
_header_params["Content-Type"] = _content_type
|
|
3909
|
+
else:
|
|
3910
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
3911
|
+
if _default_content_type is not None:
|
|
3912
|
+
_header_params["Content-Type"] = _default_content_type
|
|
3913
|
+
|
|
3914
|
+
# authentication setting
|
|
3915
|
+
_auth_settings: List[str] = []
|
|
3916
|
+
|
|
3917
|
+
return self.api_client.param_serialize(
|
|
3918
|
+
method="PUT",
|
|
3919
|
+
resource_path="/v1beta1/projects/{projectId}/regions/{regionId}/instancesbyname/{displayName}",
|
|
3920
|
+
path_params=_path_params,
|
|
3921
|
+
query_params=_query_params,
|
|
3922
|
+
header_params=_header_params,
|
|
3923
|
+
body=_body_params,
|
|
3924
|
+
post_params=_form_params,
|
|
3925
|
+
files=_files,
|
|
3926
|
+
auth_settings=_auth_settings,
|
|
3927
|
+
collection_formats=_collection_formats,
|
|
3928
|
+
_host=_host,
|
|
3929
|
+
_request_auth=_request_auth,
|
|
3930
|
+
)
|