stackit-git 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/git/__init__.py +43 -0
- stackit/git/api/__init__.py +4 -0
- stackit/git/api/default_api.py +1135 -0
- stackit/git/api_client.py +627 -0
- stackit/git/api_response.py +23 -0
- stackit/git/configuration.py +138 -0
- stackit/git/exceptions.py +199 -0
- stackit/git/models/__init__.py +24 -0
- stackit/git/models/create_instance_payload.py +92 -0
- stackit/git/models/instance.py +116 -0
- stackit/git/models/internal_server_error_response.py +82 -0
- stackit/git/models/list_instances.py +99 -0
- stackit/git/models/unauthorized_response.py +82 -0
- stackit/git/py.typed +0 -0
- stackit/git/rest.py +149 -0
- stackit_git-0.1.0.dist-info/LICENSE.md +201 -0
- stackit_git-0.1.0.dist-info/METADATA +45 -0
- stackit_git-0.1.0.dist-info/NOTICE.txt +2 -0
- stackit_git-0.1.0.dist-info/RECORD +20 -0
- stackit_git-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1135 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
Manage STACKIT Git instances.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.3
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501 docstring might be too long
|
|
14
|
+
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
|
|
17
|
+
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
|
|
18
|
+
from stackit.core.configuration import Configuration
|
|
19
|
+
from typing_extensions import Annotated
|
|
20
|
+
|
|
21
|
+
from stackit.git.api_client import ApiClient, RequestSerialized
|
|
22
|
+
from stackit.git.api_response import ApiResponse
|
|
23
|
+
from stackit.git.models.create_instance_payload import CreateInstancePayload
|
|
24
|
+
from stackit.git.models.instance import Instance
|
|
25
|
+
from stackit.git.models.list_instances import ListInstances
|
|
26
|
+
from stackit.git.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DefaultApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, configuration: Configuration = None) -> None:
|
|
37
|
+
if configuration is None:
|
|
38
|
+
configuration = Configuration()
|
|
39
|
+
self.configuration = configuration
|
|
40
|
+
self.api_client = ApiClient(self.configuration)
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def create_instance(
|
|
44
|
+
self,
|
|
45
|
+
project_id: Annotated[
|
|
46
|
+
str,
|
|
47
|
+
Field(
|
|
48
|
+
strict=True,
|
|
49
|
+
max_length=36,
|
|
50
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
51
|
+
),
|
|
52
|
+
],
|
|
53
|
+
create_instance_payload: Annotated[
|
|
54
|
+
CreateInstancePayload, Field(description="Provides the options to use when creating the instance.")
|
|
55
|
+
],
|
|
56
|
+
_request_timeout: Union[
|
|
57
|
+
None,
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> Instance:
|
|
66
|
+
"""Users with write-access to a project may create a new STACKIT Git instance by posting the instance creation request to this endpoint, which will schedule the creation of a new STACKIT Git instance within that project.
|
|
67
|
+
|
|
68
|
+
Creates a new STACKIT Git instance within the project.
|
|
69
|
+
|
|
70
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
71
|
+
:type project_id: str
|
|
72
|
+
:param create_instance_payload: Provides the options to use when creating the instance. (required)
|
|
73
|
+
:type create_instance_payload: CreateInstancePayload
|
|
74
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
75
|
+
number provided, it will be total request
|
|
76
|
+
timeout. It can also be a pair (tuple) of
|
|
77
|
+
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
93
|
+
:return: Returns the result object.
|
|
94
|
+
""" # noqa: E501 docstring might be too long
|
|
95
|
+
|
|
96
|
+
_param = self._create_instance_serialize(
|
|
97
|
+
project_id=project_id,
|
|
98
|
+
create_instance_payload=create_instance_payload,
|
|
99
|
+
_request_auth=_request_auth,
|
|
100
|
+
_content_type=_content_type,
|
|
101
|
+
_headers=_headers,
|
|
102
|
+
_host_index=_host_index,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
106
|
+
"201": "Instance",
|
|
107
|
+
"400": None,
|
|
108
|
+
"401": "UnauthorizedResponse",
|
|
109
|
+
"409": None,
|
|
110
|
+
"500": "InternalServerErrorResponse",
|
|
111
|
+
}
|
|
112
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def create_instance_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
project_id: Annotated[
|
|
123
|
+
str,
|
|
124
|
+
Field(
|
|
125
|
+
strict=True,
|
|
126
|
+
max_length=36,
|
|
127
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
128
|
+
),
|
|
129
|
+
],
|
|
130
|
+
create_instance_payload: Annotated[
|
|
131
|
+
CreateInstancePayload, Field(description="Provides the options to use when creating the instance.")
|
|
132
|
+
],
|
|
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
|
+
"""Users with write-access to a project may create a new STACKIT Git instance by posting the instance creation request to this endpoint, which will schedule the creation of a new STACKIT Git instance within that project.
|
|
144
|
+
|
|
145
|
+
Creates a new STACKIT Git instance within the project.
|
|
146
|
+
|
|
147
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
148
|
+
:type project_id: str
|
|
149
|
+
:param create_instance_payload: Provides the options to use when creating the instance. (required)
|
|
150
|
+
:type create_instance_payload: CreateInstancePayload
|
|
151
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
152
|
+
number provided, it will be total request
|
|
153
|
+
timeout. It can also be a pair (tuple) of
|
|
154
|
+
(connection, read) timeouts.
|
|
155
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
156
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
157
|
+
request; this effectively ignores the
|
|
158
|
+
authentication in the spec for a single request.
|
|
159
|
+
:type _request_auth: dict, optional
|
|
160
|
+
:param _content_type: force content-type for the request.
|
|
161
|
+
:type _content_type: str, Optional
|
|
162
|
+
:param _headers: set to override the headers for a single
|
|
163
|
+
request; this effectively ignores the headers
|
|
164
|
+
in the spec for a single request.
|
|
165
|
+
:type _headers: dict, optional
|
|
166
|
+
:param _host_index: set to override the host_index for a single
|
|
167
|
+
request; this effectively ignores the host_index
|
|
168
|
+
in the spec for a single request.
|
|
169
|
+
:type _host_index: int, optional
|
|
170
|
+
:return: Returns the result object.
|
|
171
|
+
""" # noqa: E501 docstring might be too long
|
|
172
|
+
|
|
173
|
+
_param = self._create_instance_serialize(
|
|
174
|
+
project_id=project_id,
|
|
175
|
+
create_instance_payload=create_instance_payload,
|
|
176
|
+
_request_auth=_request_auth,
|
|
177
|
+
_content_type=_content_type,
|
|
178
|
+
_headers=_headers,
|
|
179
|
+
_host_index=_host_index,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
183
|
+
"201": "Instance",
|
|
184
|
+
"400": None,
|
|
185
|
+
"401": "UnauthorizedResponse",
|
|
186
|
+
"409": None,
|
|
187
|
+
"500": "InternalServerErrorResponse",
|
|
188
|
+
}
|
|
189
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
190
|
+
response_data.read()
|
|
191
|
+
return self.api_client.response_deserialize(
|
|
192
|
+
response_data=response_data,
|
|
193
|
+
response_types_map=_response_types_map,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
@validate_call
|
|
197
|
+
def create_instance_without_preload_content(
|
|
198
|
+
self,
|
|
199
|
+
project_id: Annotated[
|
|
200
|
+
str,
|
|
201
|
+
Field(
|
|
202
|
+
strict=True,
|
|
203
|
+
max_length=36,
|
|
204
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
205
|
+
),
|
|
206
|
+
],
|
|
207
|
+
create_instance_payload: Annotated[
|
|
208
|
+
CreateInstancePayload, Field(description="Provides the options to use when creating the instance.")
|
|
209
|
+
],
|
|
210
|
+
_request_timeout: Union[
|
|
211
|
+
None,
|
|
212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
213
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
214
|
+
] = None,
|
|
215
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
216
|
+
_content_type: Optional[StrictStr] = None,
|
|
217
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
218
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
219
|
+
) -> RESTResponseType:
|
|
220
|
+
"""Users with write-access to a project may create a new STACKIT Git instance by posting the instance creation request to this endpoint, which will schedule the creation of a new STACKIT Git instance within that project.
|
|
221
|
+
|
|
222
|
+
Creates a new STACKIT Git instance within the project.
|
|
223
|
+
|
|
224
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
225
|
+
:type project_id: str
|
|
226
|
+
:param create_instance_payload: Provides the options to use when creating the instance. (required)
|
|
227
|
+
:type create_instance_payload: CreateInstancePayload
|
|
228
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
229
|
+
number provided, it will be total request
|
|
230
|
+
timeout. It can also be a pair (tuple) of
|
|
231
|
+
(connection, read) timeouts.
|
|
232
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
233
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
234
|
+
request; this effectively ignores the
|
|
235
|
+
authentication in the spec for a single request.
|
|
236
|
+
:type _request_auth: dict, optional
|
|
237
|
+
:param _content_type: force content-type for the request.
|
|
238
|
+
:type _content_type: str, Optional
|
|
239
|
+
:param _headers: set to override the headers for a single
|
|
240
|
+
request; this effectively ignores the headers
|
|
241
|
+
in the spec for a single request.
|
|
242
|
+
:type _headers: dict, optional
|
|
243
|
+
:param _host_index: set to override the host_index for a single
|
|
244
|
+
request; this effectively ignores the host_index
|
|
245
|
+
in the spec for a single request.
|
|
246
|
+
:type _host_index: int, optional
|
|
247
|
+
:return: Returns the result object.
|
|
248
|
+
""" # noqa: E501 docstring might be too long
|
|
249
|
+
|
|
250
|
+
_param = self._create_instance_serialize(
|
|
251
|
+
project_id=project_id,
|
|
252
|
+
create_instance_payload=create_instance_payload,
|
|
253
|
+
_request_auth=_request_auth,
|
|
254
|
+
_content_type=_content_type,
|
|
255
|
+
_headers=_headers,
|
|
256
|
+
_host_index=_host_index,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
260
|
+
"201": "Instance",
|
|
261
|
+
"400": None,
|
|
262
|
+
"401": "UnauthorizedResponse",
|
|
263
|
+
"409": None,
|
|
264
|
+
"500": "InternalServerErrorResponse",
|
|
265
|
+
}
|
|
266
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
267
|
+
return response_data.response
|
|
268
|
+
|
|
269
|
+
def _create_instance_serialize(
|
|
270
|
+
self,
|
|
271
|
+
project_id,
|
|
272
|
+
create_instance_payload,
|
|
273
|
+
_request_auth,
|
|
274
|
+
_content_type,
|
|
275
|
+
_headers,
|
|
276
|
+
_host_index,
|
|
277
|
+
) -> RequestSerialized:
|
|
278
|
+
|
|
279
|
+
_host = None
|
|
280
|
+
|
|
281
|
+
_collection_formats: Dict[str, str] = {}
|
|
282
|
+
|
|
283
|
+
_path_params: Dict[str, str] = {}
|
|
284
|
+
_query_params: List[Tuple[str, str]] = []
|
|
285
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
286
|
+
_form_params: List[Tuple[str, str]] = []
|
|
287
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
288
|
+
_body_params: Optional[bytes] = None
|
|
289
|
+
|
|
290
|
+
# process the path parameters
|
|
291
|
+
if project_id is not None:
|
|
292
|
+
_path_params["projectId"] = project_id
|
|
293
|
+
# process the query parameters
|
|
294
|
+
# process the header parameters
|
|
295
|
+
# process the form parameters
|
|
296
|
+
# process the body parameter
|
|
297
|
+
if create_instance_payload is not None:
|
|
298
|
+
_body_params = create_instance_payload
|
|
299
|
+
|
|
300
|
+
# set the HTTP header `Accept`
|
|
301
|
+
if "Accept" not in _header_params:
|
|
302
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
303
|
+
|
|
304
|
+
# set the HTTP header `Content-Type`
|
|
305
|
+
if _content_type:
|
|
306
|
+
_header_params["Content-Type"] = _content_type
|
|
307
|
+
else:
|
|
308
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
309
|
+
if _default_content_type is not None:
|
|
310
|
+
_header_params["Content-Type"] = _default_content_type
|
|
311
|
+
|
|
312
|
+
# authentication setting
|
|
313
|
+
_auth_settings: List[str] = []
|
|
314
|
+
|
|
315
|
+
return self.api_client.param_serialize(
|
|
316
|
+
method="POST",
|
|
317
|
+
resource_path="/v1beta/projects/{projectId}/instances",
|
|
318
|
+
path_params=_path_params,
|
|
319
|
+
query_params=_query_params,
|
|
320
|
+
header_params=_header_params,
|
|
321
|
+
body=_body_params,
|
|
322
|
+
post_params=_form_params,
|
|
323
|
+
files=_files,
|
|
324
|
+
auth_settings=_auth_settings,
|
|
325
|
+
collection_formats=_collection_formats,
|
|
326
|
+
_host=_host,
|
|
327
|
+
_request_auth=_request_auth,
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
@validate_call
|
|
331
|
+
def delete_instance(
|
|
332
|
+
self,
|
|
333
|
+
project_id: Annotated[
|
|
334
|
+
str,
|
|
335
|
+
Field(
|
|
336
|
+
strict=True,
|
|
337
|
+
max_length=36,
|
|
338
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
339
|
+
),
|
|
340
|
+
],
|
|
341
|
+
instance_id: Annotated[str, Field(strict=True, max_length=36, description="The STACKIT Git instance UUID.")],
|
|
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
|
+
"""Allows a user with write-access to a project to schedule the deletion of a STACKIT Git instance, which will soon eliminate all repositories & user metadata associated with that instance. This is a destructive operation.
|
|
353
|
+
|
|
354
|
+
Deletes the given STACKIT Git instance.
|
|
355
|
+
|
|
356
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
357
|
+
:type project_id: str
|
|
358
|
+
:param instance_id: The STACKIT Git instance UUID. (required)
|
|
359
|
+
:type instance_id: str
|
|
360
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
361
|
+
number provided, it will be total request
|
|
362
|
+
timeout. It can also be a pair (tuple) of
|
|
363
|
+
(connection, read) timeouts.
|
|
364
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
365
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
366
|
+
request; this effectively ignores the
|
|
367
|
+
authentication in the spec for a single request.
|
|
368
|
+
:type _request_auth: dict, optional
|
|
369
|
+
:param _content_type: force content-type for the request.
|
|
370
|
+
:type _content_type: str, Optional
|
|
371
|
+
:param _headers: set to override the headers for a single
|
|
372
|
+
request; this effectively ignores the headers
|
|
373
|
+
in the spec for a single request.
|
|
374
|
+
:type _headers: dict, optional
|
|
375
|
+
:param _host_index: set to override the host_index for a single
|
|
376
|
+
request; this effectively ignores the host_index
|
|
377
|
+
in the spec for a single request.
|
|
378
|
+
:type _host_index: int, optional
|
|
379
|
+
:return: Returns the result object.
|
|
380
|
+
""" # noqa: E501 docstring might be too long
|
|
381
|
+
|
|
382
|
+
_param = self._delete_instance_serialize(
|
|
383
|
+
project_id=project_id,
|
|
384
|
+
instance_id=instance_id,
|
|
385
|
+
_request_auth=_request_auth,
|
|
386
|
+
_content_type=_content_type,
|
|
387
|
+
_headers=_headers,
|
|
388
|
+
_host_index=_host_index,
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
392
|
+
"202": None,
|
|
393
|
+
"400": None,
|
|
394
|
+
"401": "UnauthorizedResponse",
|
|
395
|
+
"404": None,
|
|
396
|
+
"409": None,
|
|
397
|
+
"500": "InternalServerErrorResponse",
|
|
398
|
+
}
|
|
399
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
400
|
+
response_data.read()
|
|
401
|
+
return self.api_client.response_deserialize(
|
|
402
|
+
response_data=response_data,
|
|
403
|
+
response_types_map=_response_types_map,
|
|
404
|
+
).data
|
|
405
|
+
|
|
406
|
+
@validate_call
|
|
407
|
+
def delete_instance_with_http_info(
|
|
408
|
+
self,
|
|
409
|
+
project_id: Annotated[
|
|
410
|
+
str,
|
|
411
|
+
Field(
|
|
412
|
+
strict=True,
|
|
413
|
+
max_length=36,
|
|
414
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
415
|
+
),
|
|
416
|
+
],
|
|
417
|
+
instance_id: Annotated[str, Field(strict=True, max_length=36, description="The STACKIT Git instance UUID.")],
|
|
418
|
+
_request_timeout: Union[
|
|
419
|
+
None,
|
|
420
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
421
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
422
|
+
] = None,
|
|
423
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
424
|
+
_content_type: Optional[StrictStr] = None,
|
|
425
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
426
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
427
|
+
) -> ApiResponse[None]:
|
|
428
|
+
"""Allows a user with write-access to a project to schedule the deletion of a STACKIT Git instance, which will soon eliminate all repositories & user metadata associated with that instance. This is a destructive operation.
|
|
429
|
+
|
|
430
|
+
Deletes the given STACKIT Git instance.
|
|
431
|
+
|
|
432
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
433
|
+
:type project_id: str
|
|
434
|
+
:param instance_id: The STACKIT Git instance UUID. (required)
|
|
435
|
+
:type instance_id: str
|
|
436
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
437
|
+
number provided, it will be total request
|
|
438
|
+
timeout. It can also be a pair (tuple) of
|
|
439
|
+
(connection, read) timeouts.
|
|
440
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
441
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
442
|
+
request; this effectively ignores the
|
|
443
|
+
authentication in the spec for a single request.
|
|
444
|
+
:type _request_auth: dict, optional
|
|
445
|
+
:param _content_type: force content-type for the request.
|
|
446
|
+
:type _content_type: str, Optional
|
|
447
|
+
:param _headers: set to override the headers for a single
|
|
448
|
+
request; this effectively ignores the headers
|
|
449
|
+
in the spec for a single request.
|
|
450
|
+
:type _headers: dict, optional
|
|
451
|
+
:param _host_index: set to override the host_index for a single
|
|
452
|
+
request; this effectively ignores the host_index
|
|
453
|
+
in the spec for a single request.
|
|
454
|
+
:type _host_index: int, optional
|
|
455
|
+
:return: Returns the result object.
|
|
456
|
+
""" # noqa: E501 docstring might be too long
|
|
457
|
+
|
|
458
|
+
_param = self._delete_instance_serialize(
|
|
459
|
+
project_id=project_id,
|
|
460
|
+
instance_id=instance_id,
|
|
461
|
+
_request_auth=_request_auth,
|
|
462
|
+
_content_type=_content_type,
|
|
463
|
+
_headers=_headers,
|
|
464
|
+
_host_index=_host_index,
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
468
|
+
"202": None,
|
|
469
|
+
"400": None,
|
|
470
|
+
"401": "UnauthorizedResponse",
|
|
471
|
+
"404": None,
|
|
472
|
+
"409": None,
|
|
473
|
+
"500": "InternalServerErrorResponse",
|
|
474
|
+
}
|
|
475
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
476
|
+
response_data.read()
|
|
477
|
+
return self.api_client.response_deserialize(
|
|
478
|
+
response_data=response_data,
|
|
479
|
+
response_types_map=_response_types_map,
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
@validate_call
|
|
483
|
+
def delete_instance_without_preload_content(
|
|
484
|
+
self,
|
|
485
|
+
project_id: Annotated[
|
|
486
|
+
str,
|
|
487
|
+
Field(
|
|
488
|
+
strict=True,
|
|
489
|
+
max_length=36,
|
|
490
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
491
|
+
),
|
|
492
|
+
],
|
|
493
|
+
instance_id: Annotated[str, Field(strict=True, max_length=36, description="The STACKIT Git instance UUID.")],
|
|
494
|
+
_request_timeout: Union[
|
|
495
|
+
None,
|
|
496
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
497
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
498
|
+
] = None,
|
|
499
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
500
|
+
_content_type: Optional[StrictStr] = None,
|
|
501
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
502
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
503
|
+
) -> RESTResponseType:
|
|
504
|
+
"""Allows a user with write-access to a project to schedule the deletion of a STACKIT Git instance, which will soon eliminate all repositories & user metadata associated with that instance. This is a destructive operation.
|
|
505
|
+
|
|
506
|
+
Deletes the given STACKIT Git instance.
|
|
507
|
+
|
|
508
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
509
|
+
:type project_id: str
|
|
510
|
+
:param instance_id: The STACKIT Git instance UUID. (required)
|
|
511
|
+
:type instance_id: str
|
|
512
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
513
|
+
number provided, it will be total request
|
|
514
|
+
timeout. It can also be a pair (tuple) of
|
|
515
|
+
(connection, read) timeouts.
|
|
516
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
517
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
518
|
+
request; this effectively ignores the
|
|
519
|
+
authentication in the spec for a single request.
|
|
520
|
+
:type _request_auth: dict, optional
|
|
521
|
+
:param _content_type: force content-type for the request.
|
|
522
|
+
:type _content_type: str, Optional
|
|
523
|
+
:param _headers: set to override the headers for a single
|
|
524
|
+
request; this effectively ignores the headers
|
|
525
|
+
in the spec for a single request.
|
|
526
|
+
:type _headers: dict, optional
|
|
527
|
+
:param _host_index: set to override the host_index for a single
|
|
528
|
+
request; this effectively ignores the host_index
|
|
529
|
+
in the spec for a single request.
|
|
530
|
+
:type _host_index: int, optional
|
|
531
|
+
:return: Returns the result object.
|
|
532
|
+
""" # noqa: E501 docstring might be too long
|
|
533
|
+
|
|
534
|
+
_param = self._delete_instance_serialize(
|
|
535
|
+
project_id=project_id,
|
|
536
|
+
instance_id=instance_id,
|
|
537
|
+
_request_auth=_request_auth,
|
|
538
|
+
_content_type=_content_type,
|
|
539
|
+
_headers=_headers,
|
|
540
|
+
_host_index=_host_index,
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
544
|
+
"202": None,
|
|
545
|
+
"400": None,
|
|
546
|
+
"401": "UnauthorizedResponse",
|
|
547
|
+
"404": None,
|
|
548
|
+
"409": None,
|
|
549
|
+
"500": "InternalServerErrorResponse",
|
|
550
|
+
}
|
|
551
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
552
|
+
return response_data.response
|
|
553
|
+
|
|
554
|
+
def _delete_instance_serialize(
|
|
555
|
+
self,
|
|
556
|
+
project_id,
|
|
557
|
+
instance_id,
|
|
558
|
+
_request_auth,
|
|
559
|
+
_content_type,
|
|
560
|
+
_headers,
|
|
561
|
+
_host_index,
|
|
562
|
+
) -> RequestSerialized:
|
|
563
|
+
|
|
564
|
+
_host = None
|
|
565
|
+
|
|
566
|
+
_collection_formats: Dict[str, str] = {}
|
|
567
|
+
|
|
568
|
+
_path_params: Dict[str, str] = {}
|
|
569
|
+
_query_params: List[Tuple[str, str]] = []
|
|
570
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
571
|
+
_form_params: List[Tuple[str, str]] = []
|
|
572
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
573
|
+
_body_params: Optional[bytes] = None
|
|
574
|
+
|
|
575
|
+
# process the path parameters
|
|
576
|
+
if project_id is not None:
|
|
577
|
+
_path_params["projectId"] = project_id
|
|
578
|
+
if instance_id is not None:
|
|
579
|
+
_path_params["instanceId"] = instance_id
|
|
580
|
+
# process the query parameters
|
|
581
|
+
# process the header parameters
|
|
582
|
+
# process the form parameters
|
|
583
|
+
# process the body parameter
|
|
584
|
+
|
|
585
|
+
# set the HTTP header `Accept`
|
|
586
|
+
if "Accept" not in _header_params:
|
|
587
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
588
|
+
|
|
589
|
+
# authentication setting
|
|
590
|
+
_auth_settings: List[str] = []
|
|
591
|
+
|
|
592
|
+
return self.api_client.param_serialize(
|
|
593
|
+
method="DELETE",
|
|
594
|
+
resource_path="/v1beta/projects/{projectId}/instances/{instanceId}",
|
|
595
|
+
path_params=_path_params,
|
|
596
|
+
query_params=_query_params,
|
|
597
|
+
header_params=_header_params,
|
|
598
|
+
body=_body_params,
|
|
599
|
+
post_params=_form_params,
|
|
600
|
+
files=_files,
|
|
601
|
+
auth_settings=_auth_settings,
|
|
602
|
+
collection_formats=_collection_formats,
|
|
603
|
+
_host=_host,
|
|
604
|
+
_request_auth=_request_auth,
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
@validate_call
|
|
608
|
+
def get_instance(
|
|
609
|
+
self,
|
|
610
|
+
project_id: Annotated[
|
|
611
|
+
str,
|
|
612
|
+
Field(
|
|
613
|
+
strict=True,
|
|
614
|
+
max_length=36,
|
|
615
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
616
|
+
),
|
|
617
|
+
],
|
|
618
|
+
instance_id: Annotated[str, Field(strict=True, max_length=36, description="The STACKIT Git instance UUID.")],
|
|
619
|
+
_request_timeout: Union[
|
|
620
|
+
None,
|
|
621
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
622
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
623
|
+
] = None,
|
|
624
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
625
|
+
_content_type: Optional[StrictStr] = None,
|
|
626
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
627
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
628
|
+
) -> Instance:
|
|
629
|
+
"""Provides detailed information about the state of an instance within the specified project including information about how to access the instance for further use.
|
|
630
|
+
|
|
631
|
+
Returns the details for the given STACKIT Git instance.
|
|
632
|
+
|
|
633
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
634
|
+
:type project_id: str
|
|
635
|
+
:param instance_id: The STACKIT Git instance UUID. (required)
|
|
636
|
+
:type instance_id: str
|
|
637
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
638
|
+
number provided, it will be total request
|
|
639
|
+
timeout. It can also be a pair (tuple) of
|
|
640
|
+
(connection, read) timeouts.
|
|
641
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
642
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
643
|
+
request; this effectively ignores the
|
|
644
|
+
authentication in the spec for a single request.
|
|
645
|
+
:type _request_auth: dict, optional
|
|
646
|
+
:param _content_type: force content-type for the request.
|
|
647
|
+
:type _content_type: str, Optional
|
|
648
|
+
:param _headers: set to override the headers for a single
|
|
649
|
+
request; this effectively ignores the headers
|
|
650
|
+
in the spec for a single request.
|
|
651
|
+
:type _headers: dict, optional
|
|
652
|
+
:param _host_index: set to override the host_index for a single
|
|
653
|
+
request; this effectively ignores the host_index
|
|
654
|
+
in the spec for a single request.
|
|
655
|
+
:type _host_index: int, optional
|
|
656
|
+
:return: Returns the result object.
|
|
657
|
+
""" # noqa: E501 docstring might be too long
|
|
658
|
+
|
|
659
|
+
_param = self._get_instance_serialize(
|
|
660
|
+
project_id=project_id,
|
|
661
|
+
instance_id=instance_id,
|
|
662
|
+
_request_auth=_request_auth,
|
|
663
|
+
_content_type=_content_type,
|
|
664
|
+
_headers=_headers,
|
|
665
|
+
_host_index=_host_index,
|
|
666
|
+
)
|
|
667
|
+
|
|
668
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
669
|
+
"200": "Instance",
|
|
670
|
+
"400": None,
|
|
671
|
+
"401": "UnauthorizedResponse",
|
|
672
|
+
"404": None,
|
|
673
|
+
"500": "InternalServerErrorResponse",
|
|
674
|
+
}
|
|
675
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
676
|
+
response_data.read()
|
|
677
|
+
return self.api_client.response_deserialize(
|
|
678
|
+
response_data=response_data,
|
|
679
|
+
response_types_map=_response_types_map,
|
|
680
|
+
).data
|
|
681
|
+
|
|
682
|
+
@validate_call
|
|
683
|
+
def get_instance_with_http_info(
|
|
684
|
+
self,
|
|
685
|
+
project_id: Annotated[
|
|
686
|
+
str,
|
|
687
|
+
Field(
|
|
688
|
+
strict=True,
|
|
689
|
+
max_length=36,
|
|
690
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
691
|
+
),
|
|
692
|
+
],
|
|
693
|
+
instance_id: Annotated[str, Field(strict=True, max_length=36, description="The STACKIT Git instance UUID.")],
|
|
694
|
+
_request_timeout: Union[
|
|
695
|
+
None,
|
|
696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
697
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
698
|
+
] = None,
|
|
699
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
700
|
+
_content_type: Optional[StrictStr] = None,
|
|
701
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
702
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
703
|
+
) -> ApiResponse[Instance]:
|
|
704
|
+
"""Provides detailed information about the state of an instance within the specified project including information about how to access the instance for further use.
|
|
705
|
+
|
|
706
|
+
Returns the details for the given STACKIT Git instance.
|
|
707
|
+
|
|
708
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
709
|
+
:type project_id: str
|
|
710
|
+
:param instance_id: The STACKIT Git instance UUID. (required)
|
|
711
|
+
:type instance_id: str
|
|
712
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
713
|
+
number provided, it will be total request
|
|
714
|
+
timeout. It can also be a pair (tuple) of
|
|
715
|
+
(connection, read) timeouts.
|
|
716
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
717
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
718
|
+
request; this effectively ignores the
|
|
719
|
+
authentication in the spec for a single request.
|
|
720
|
+
:type _request_auth: dict, optional
|
|
721
|
+
:param _content_type: force content-type for the request.
|
|
722
|
+
:type _content_type: str, Optional
|
|
723
|
+
:param _headers: set to override the headers for a single
|
|
724
|
+
request; this effectively ignores the headers
|
|
725
|
+
in the spec for a single request.
|
|
726
|
+
:type _headers: dict, optional
|
|
727
|
+
:param _host_index: set to override the host_index for a single
|
|
728
|
+
request; this effectively ignores the host_index
|
|
729
|
+
in the spec for a single request.
|
|
730
|
+
:type _host_index: int, optional
|
|
731
|
+
:return: Returns the result object.
|
|
732
|
+
""" # noqa: E501 docstring might be too long
|
|
733
|
+
|
|
734
|
+
_param = self._get_instance_serialize(
|
|
735
|
+
project_id=project_id,
|
|
736
|
+
instance_id=instance_id,
|
|
737
|
+
_request_auth=_request_auth,
|
|
738
|
+
_content_type=_content_type,
|
|
739
|
+
_headers=_headers,
|
|
740
|
+
_host_index=_host_index,
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
744
|
+
"200": "Instance",
|
|
745
|
+
"400": None,
|
|
746
|
+
"401": "UnauthorizedResponse",
|
|
747
|
+
"404": None,
|
|
748
|
+
"500": "InternalServerErrorResponse",
|
|
749
|
+
}
|
|
750
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
751
|
+
response_data.read()
|
|
752
|
+
return self.api_client.response_deserialize(
|
|
753
|
+
response_data=response_data,
|
|
754
|
+
response_types_map=_response_types_map,
|
|
755
|
+
)
|
|
756
|
+
|
|
757
|
+
@validate_call
|
|
758
|
+
def get_instance_without_preload_content(
|
|
759
|
+
self,
|
|
760
|
+
project_id: Annotated[
|
|
761
|
+
str,
|
|
762
|
+
Field(
|
|
763
|
+
strict=True,
|
|
764
|
+
max_length=36,
|
|
765
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
766
|
+
),
|
|
767
|
+
],
|
|
768
|
+
instance_id: Annotated[str, Field(strict=True, max_length=36, description="The STACKIT Git instance UUID.")],
|
|
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
|
+
"""Provides detailed information about the state of an instance within the specified project including information about how to access the instance for further use.
|
|
780
|
+
|
|
781
|
+
Returns the details for the given STACKIT Git instance.
|
|
782
|
+
|
|
783
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
784
|
+
:type project_id: str
|
|
785
|
+
:param instance_id: The STACKIT Git instance UUID. (required)
|
|
786
|
+
:type instance_id: str
|
|
787
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
788
|
+
number provided, it will be total request
|
|
789
|
+
timeout. It can also be a pair (tuple) of
|
|
790
|
+
(connection, read) timeouts.
|
|
791
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
792
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
793
|
+
request; this effectively ignores the
|
|
794
|
+
authentication in the spec for a single request.
|
|
795
|
+
:type _request_auth: dict, optional
|
|
796
|
+
:param _content_type: force content-type for the request.
|
|
797
|
+
:type _content_type: str, Optional
|
|
798
|
+
:param _headers: set to override the headers for a single
|
|
799
|
+
request; this effectively ignores the headers
|
|
800
|
+
in the spec for a single request.
|
|
801
|
+
:type _headers: dict, optional
|
|
802
|
+
:param _host_index: set to override the host_index for a single
|
|
803
|
+
request; this effectively ignores the host_index
|
|
804
|
+
in the spec for a single request.
|
|
805
|
+
:type _host_index: int, optional
|
|
806
|
+
:return: Returns the result object.
|
|
807
|
+
""" # noqa: E501 docstring might be too long
|
|
808
|
+
|
|
809
|
+
_param = self._get_instance_serialize(
|
|
810
|
+
project_id=project_id,
|
|
811
|
+
instance_id=instance_id,
|
|
812
|
+
_request_auth=_request_auth,
|
|
813
|
+
_content_type=_content_type,
|
|
814
|
+
_headers=_headers,
|
|
815
|
+
_host_index=_host_index,
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
819
|
+
"200": "Instance",
|
|
820
|
+
"400": None,
|
|
821
|
+
"401": "UnauthorizedResponse",
|
|
822
|
+
"404": None,
|
|
823
|
+
"500": "InternalServerErrorResponse",
|
|
824
|
+
}
|
|
825
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
826
|
+
return response_data.response
|
|
827
|
+
|
|
828
|
+
def _get_instance_serialize(
|
|
829
|
+
self,
|
|
830
|
+
project_id,
|
|
831
|
+
instance_id,
|
|
832
|
+
_request_auth,
|
|
833
|
+
_content_type,
|
|
834
|
+
_headers,
|
|
835
|
+
_host_index,
|
|
836
|
+
) -> RequestSerialized:
|
|
837
|
+
|
|
838
|
+
_host = None
|
|
839
|
+
|
|
840
|
+
_collection_formats: Dict[str, str] = {}
|
|
841
|
+
|
|
842
|
+
_path_params: Dict[str, str] = {}
|
|
843
|
+
_query_params: List[Tuple[str, str]] = []
|
|
844
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
845
|
+
_form_params: List[Tuple[str, str]] = []
|
|
846
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
847
|
+
_body_params: Optional[bytes] = None
|
|
848
|
+
|
|
849
|
+
# process the path parameters
|
|
850
|
+
if project_id is not None:
|
|
851
|
+
_path_params["projectId"] = project_id
|
|
852
|
+
if instance_id is not None:
|
|
853
|
+
_path_params["instanceId"] = instance_id
|
|
854
|
+
# process the query parameters
|
|
855
|
+
# process the header parameters
|
|
856
|
+
# process the form parameters
|
|
857
|
+
# process the body parameter
|
|
858
|
+
|
|
859
|
+
# set the HTTP header `Accept`
|
|
860
|
+
if "Accept" not in _header_params:
|
|
861
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
862
|
+
|
|
863
|
+
# authentication setting
|
|
864
|
+
_auth_settings: List[str] = []
|
|
865
|
+
|
|
866
|
+
return self.api_client.param_serialize(
|
|
867
|
+
method="GET",
|
|
868
|
+
resource_path="/v1beta/projects/{projectId}/instances/{instanceId}",
|
|
869
|
+
path_params=_path_params,
|
|
870
|
+
query_params=_query_params,
|
|
871
|
+
header_params=_header_params,
|
|
872
|
+
body=_body_params,
|
|
873
|
+
post_params=_form_params,
|
|
874
|
+
files=_files,
|
|
875
|
+
auth_settings=_auth_settings,
|
|
876
|
+
collection_formats=_collection_formats,
|
|
877
|
+
_host=_host,
|
|
878
|
+
_request_auth=_request_auth,
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
@validate_call
|
|
882
|
+
def list_instances(
|
|
883
|
+
self,
|
|
884
|
+
project_id: Annotated[
|
|
885
|
+
str,
|
|
886
|
+
Field(
|
|
887
|
+
strict=True,
|
|
888
|
+
max_length=36,
|
|
889
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
890
|
+
),
|
|
891
|
+
],
|
|
892
|
+
_request_timeout: Union[
|
|
893
|
+
None,
|
|
894
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
895
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
896
|
+
] = None,
|
|
897
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
898
|
+
_content_type: Optional[StrictStr] = None,
|
|
899
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
900
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
901
|
+
) -> ListInstances:
|
|
902
|
+
"""STACKIT Git instances exist within a project, and a project may have zero or more instances. This endpoint allows a user with read-access to a project to list all instances that exist within the specified project.
|
|
903
|
+
|
|
904
|
+
Returns a list of all STACKIT Git instances within the project.
|
|
905
|
+
|
|
906
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
907
|
+
:type project_id: str
|
|
908
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
909
|
+
number provided, it will be total request
|
|
910
|
+
timeout. It can also be a pair (tuple) of
|
|
911
|
+
(connection, read) timeouts.
|
|
912
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
913
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
914
|
+
request; this effectively ignores the
|
|
915
|
+
authentication in the spec for a single request.
|
|
916
|
+
:type _request_auth: dict, optional
|
|
917
|
+
:param _content_type: force content-type for the request.
|
|
918
|
+
:type _content_type: str, Optional
|
|
919
|
+
:param _headers: set to override the headers for a single
|
|
920
|
+
request; this effectively ignores the headers
|
|
921
|
+
in the spec for a single request.
|
|
922
|
+
:type _headers: dict, optional
|
|
923
|
+
:param _host_index: set to override the host_index for a single
|
|
924
|
+
request; this effectively ignores the host_index
|
|
925
|
+
in the spec for a single request.
|
|
926
|
+
:type _host_index: int, optional
|
|
927
|
+
:return: Returns the result object.
|
|
928
|
+
""" # noqa: E501 docstring might be too long
|
|
929
|
+
|
|
930
|
+
_param = self._list_instances_serialize(
|
|
931
|
+
project_id=project_id,
|
|
932
|
+
_request_auth=_request_auth,
|
|
933
|
+
_content_type=_content_type,
|
|
934
|
+
_headers=_headers,
|
|
935
|
+
_host_index=_host_index,
|
|
936
|
+
)
|
|
937
|
+
|
|
938
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
939
|
+
"200": "ListInstances",
|
|
940
|
+
"400": None,
|
|
941
|
+
"401": "UnauthorizedResponse",
|
|
942
|
+
"500": "InternalServerErrorResponse",
|
|
943
|
+
}
|
|
944
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
945
|
+
response_data.read()
|
|
946
|
+
return self.api_client.response_deserialize(
|
|
947
|
+
response_data=response_data,
|
|
948
|
+
response_types_map=_response_types_map,
|
|
949
|
+
).data
|
|
950
|
+
|
|
951
|
+
@validate_call
|
|
952
|
+
def list_instances_with_http_info(
|
|
953
|
+
self,
|
|
954
|
+
project_id: Annotated[
|
|
955
|
+
str,
|
|
956
|
+
Field(
|
|
957
|
+
strict=True,
|
|
958
|
+
max_length=36,
|
|
959
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
960
|
+
),
|
|
961
|
+
],
|
|
962
|
+
_request_timeout: Union[
|
|
963
|
+
None,
|
|
964
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
965
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
966
|
+
] = None,
|
|
967
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
968
|
+
_content_type: Optional[StrictStr] = None,
|
|
969
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
970
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
971
|
+
) -> ApiResponse[ListInstances]:
|
|
972
|
+
"""STACKIT Git instances exist within a project, and a project may have zero or more instances. This endpoint allows a user with read-access to a project to list all instances that exist within the specified project.
|
|
973
|
+
|
|
974
|
+
Returns a list of all STACKIT Git instances within the project.
|
|
975
|
+
|
|
976
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
977
|
+
:type project_id: str
|
|
978
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
979
|
+
number provided, it will be total request
|
|
980
|
+
timeout. It can also be a pair (tuple) of
|
|
981
|
+
(connection, read) timeouts.
|
|
982
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
983
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
984
|
+
request; this effectively ignores the
|
|
985
|
+
authentication in the spec for a single request.
|
|
986
|
+
:type _request_auth: dict, optional
|
|
987
|
+
:param _content_type: force content-type for the request.
|
|
988
|
+
:type _content_type: str, Optional
|
|
989
|
+
:param _headers: set to override the headers for a single
|
|
990
|
+
request; this effectively ignores the headers
|
|
991
|
+
in the spec for a single request.
|
|
992
|
+
:type _headers: dict, optional
|
|
993
|
+
:param _host_index: set to override the host_index for a single
|
|
994
|
+
request; this effectively ignores the host_index
|
|
995
|
+
in the spec for a single request.
|
|
996
|
+
:type _host_index: int, optional
|
|
997
|
+
:return: Returns the result object.
|
|
998
|
+
""" # noqa: E501 docstring might be too long
|
|
999
|
+
|
|
1000
|
+
_param = self._list_instances_serialize(
|
|
1001
|
+
project_id=project_id,
|
|
1002
|
+
_request_auth=_request_auth,
|
|
1003
|
+
_content_type=_content_type,
|
|
1004
|
+
_headers=_headers,
|
|
1005
|
+
_host_index=_host_index,
|
|
1006
|
+
)
|
|
1007
|
+
|
|
1008
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1009
|
+
"200": "ListInstances",
|
|
1010
|
+
"400": None,
|
|
1011
|
+
"401": "UnauthorizedResponse",
|
|
1012
|
+
"500": "InternalServerErrorResponse",
|
|
1013
|
+
}
|
|
1014
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1015
|
+
response_data.read()
|
|
1016
|
+
return self.api_client.response_deserialize(
|
|
1017
|
+
response_data=response_data,
|
|
1018
|
+
response_types_map=_response_types_map,
|
|
1019
|
+
)
|
|
1020
|
+
|
|
1021
|
+
@validate_call
|
|
1022
|
+
def list_instances_without_preload_content(
|
|
1023
|
+
self,
|
|
1024
|
+
project_id: Annotated[
|
|
1025
|
+
str,
|
|
1026
|
+
Field(
|
|
1027
|
+
strict=True,
|
|
1028
|
+
max_length=36,
|
|
1029
|
+
description="The STACKIT portal project UUID the STACKIT Git instance is part of.",
|
|
1030
|
+
),
|
|
1031
|
+
],
|
|
1032
|
+
_request_timeout: Union[
|
|
1033
|
+
None,
|
|
1034
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1035
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1036
|
+
] = None,
|
|
1037
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1038
|
+
_content_type: Optional[StrictStr] = None,
|
|
1039
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1040
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1041
|
+
) -> RESTResponseType:
|
|
1042
|
+
"""STACKIT Git instances exist within a project, and a project may have zero or more instances. This endpoint allows a user with read-access to a project to list all instances that exist within the specified project.
|
|
1043
|
+
|
|
1044
|
+
Returns a list of all STACKIT Git instances within the project.
|
|
1045
|
+
|
|
1046
|
+
:param project_id: The STACKIT portal project UUID the STACKIT Git instance is part of. (required)
|
|
1047
|
+
:type project_id: str
|
|
1048
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1049
|
+
number provided, it will be total request
|
|
1050
|
+
timeout. It can also be a pair (tuple) of
|
|
1051
|
+
(connection, read) timeouts.
|
|
1052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1054
|
+
request; this effectively ignores the
|
|
1055
|
+
authentication in the spec for a single request.
|
|
1056
|
+
:type _request_auth: dict, optional
|
|
1057
|
+
:param _content_type: force content-type for the request.
|
|
1058
|
+
:type _content_type: str, Optional
|
|
1059
|
+
:param _headers: set to override the headers for a single
|
|
1060
|
+
request; this effectively ignores the headers
|
|
1061
|
+
in the spec for a single request.
|
|
1062
|
+
:type _headers: dict, optional
|
|
1063
|
+
:param _host_index: set to override the host_index for a single
|
|
1064
|
+
request; this effectively ignores the host_index
|
|
1065
|
+
in the spec for a single request.
|
|
1066
|
+
:type _host_index: int, optional
|
|
1067
|
+
:return: Returns the result object.
|
|
1068
|
+
""" # noqa: E501 docstring might be too long
|
|
1069
|
+
|
|
1070
|
+
_param = self._list_instances_serialize(
|
|
1071
|
+
project_id=project_id,
|
|
1072
|
+
_request_auth=_request_auth,
|
|
1073
|
+
_content_type=_content_type,
|
|
1074
|
+
_headers=_headers,
|
|
1075
|
+
_host_index=_host_index,
|
|
1076
|
+
)
|
|
1077
|
+
|
|
1078
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1079
|
+
"200": "ListInstances",
|
|
1080
|
+
"400": None,
|
|
1081
|
+
"401": "UnauthorizedResponse",
|
|
1082
|
+
"500": "InternalServerErrorResponse",
|
|
1083
|
+
}
|
|
1084
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1085
|
+
return response_data.response
|
|
1086
|
+
|
|
1087
|
+
def _list_instances_serialize(
|
|
1088
|
+
self,
|
|
1089
|
+
project_id,
|
|
1090
|
+
_request_auth,
|
|
1091
|
+
_content_type,
|
|
1092
|
+
_headers,
|
|
1093
|
+
_host_index,
|
|
1094
|
+
) -> RequestSerialized:
|
|
1095
|
+
|
|
1096
|
+
_host = None
|
|
1097
|
+
|
|
1098
|
+
_collection_formats: Dict[str, str] = {}
|
|
1099
|
+
|
|
1100
|
+
_path_params: Dict[str, str] = {}
|
|
1101
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1102
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1103
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1104
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1105
|
+
_body_params: Optional[bytes] = None
|
|
1106
|
+
|
|
1107
|
+
# process the path parameters
|
|
1108
|
+
if project_id is not None:
|
|
1109
|
+
_path_params["projectId"] = project_id
|
|
1110
|
+
# process the query parameters
|
|
1111
|
+
# process the header parameters
|
|
1112
|
+
# process the form parameters
|
|
1113
|
+
# process the body parameter
|
|
1114
|
+
|
|
1115
|
+
# set the HTTP header `Accept`
|
|
1116
|
+
if "Accept" not in _header_params:
|
|
1117
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1118
|
+
|
|
1119
|
+
# authentication setting
|
|
1120
|
+
_auth_settings: List[str] = []
|
|
1121
|
+
|
|
1122
|
+
return self.api_client.param_serialize(
|
|
1123
|
+
method="GET",
|
|
1124
|
+
resource_path="/v1beta/projects/{projectId}/instances",
|
|
1125
|
+
path_params=_path_params,
|
|
1126
|
+
query_params=_query_params,
|
|
1127
|
+
header_params=_header_params,
|
|
1128
|
+
body=_body_params,
|
|
1129
|
+
post_params=_form_params,
|
|
1130
|
+
files=_files,
|
|
1131
|
+
auth_settings=_auth_settings,
|
|
1132
|
+
collection_formats=_collection_formats,
|
|
1133
|
+
_host=_host,
|
|
1134
|
+
_request_auth=_request_auth,
|
|
1135
|
+
)
|