stackit-registry 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/registry/__init__.py +111 -0
- stackit/registry/api/__init__.py +4 -0
- stackit/registry/api/default_api.py +1767 -0
- stackit/registry/api_client.py +650 -0
- stackit/registry/api_response.py +22 -0
- stackit/registry/configuration.py +163 -0
- stackit/registry/exceptions.py +218 -0
- stackit/registry/models/__init__.py +38 -0
- stackit/registry/models/artifactory.py +131 -0
- stackit/registry/models/artifactory_list.py +105 -0
- stackit/registry/models/bad_request_error_response.py +84 -0
- stackit/registry/models/conflict_error_response.py +84 -0
- stackit/registry/models/create_artifactory_payload.py +110 -0
- stackit/registry/models/create_proxy_request.py +102 -0
- stackit/registry/models/credentials.py +84 -0
- stackit/registry/models/forbidden_error_response.py +110 -0
- stackit/registry/models/generic_error_response.py +84 -0
- stackit/registry/models/internal_server_error_response.py +84 -0
- stackit/registry/models/not_found_error_response.py +84 -0
- stackit/registry/models/patch_artifactory_payload.py +90 -0
- stackit/registry/models/proxy.py +102 -0
- stackit/registry/models/redacted_credentials.py +83 -0
- stackit/registry/models/replication_adapter.py +100 -0
- stackit/registry/models/replication_adapter_list.py +105 -0
- stackit/registry/models/unauthorized_error_response.py +110 -0
- stackit/registry/models/update_proxy_request.py +98 -0
- stackit/registry/py.typed +0 -0
- stackit/registry/rest.py +164 -0
- stackit_registry-0.1.0.dist-info/METADATA +47 -0
- stackit_registry-0.1.0.dist-info/RECORD +33 -0
- stackit_registry-0.1.0.dist-info/WHEEL +4 -0
- stackit_registry-0.1.0.dist-info/licenses/LICENSE.md +201 -0
- stackit_registry-0.1.0.dist-info/licenses/NOTICE.txt +2 -0
|
@@ -0,0 +1,1767 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Container Registry API
|
|
5
|
+
|
|
6
|
+
STACKIT Container Registry management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: devex_development@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from uuid import UUID
|
|
17
|
+
|
|
18
|
+
from pydantic import (
|
|
19
|
+
Field,
|
|
20
|
+
StrictBool,
|
|
21
|
+
StrictFloat,
|
|
22
|
+
StrictInt,
|
|
23
|
+
StrictStr,
|
|
24
|
+
validate_call,
|
|
25
|
+
)
|
|
26
|
+
from stackit.core.configuration import Configuration
|
|
27
|
+
from typing_extensions import Annotated
|
|
28
|
+
|
|
29
|
+
from stackit.registry.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from stackit.registry.api_response import ApiResponse
|
|
31
|
+
from stackit.registry.models.artifactory import Artifactory
|
|
32
|
+
from stackit.registry.models.artifactory_list import ArtifactoryList
|
|
33
|
+
from stackit.registry.models.create_artifactory_payload import CreateArtifactoryPayload
|
|
34
|
+
from stackit.registry.models.patch_artifactory_payload import PatchArtifactoryPayload
|
|
35
|
+
from stackit.registry.models.replication_adapter_list import ReplicationAdapterList
|
|
36
|
+
from stackit.registry.rest import RESTResponseType
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DefaultApi:
|
|
40
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
41
|
+
Ref: https://openapi-generator.tech
|
|
42
|
+
|
|
43
|
+
Do not edit the class manually.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
def __init__(self, configuration: Configuration = None) -> None:
|
|
47
|
+
if configuration is None:
|
|
48
|
+
configuration = Configuration()
|
|
49
|
+
self.configuration = configuration
|
|
50
|
+
self.api_client = ApiClient(self.configuration)
|
|
51
|
+
|
|
52
|
+
@validate_call
|
|
53
|
+
def create_artifactory(
|
|
54
|
+
self,
|
|
55
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
56
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
57
|
+
create_artifactory_payload: Annotated[
|
|
58
|
+
CreateArtifactoryPayload, Field(description="CreateArtifactory request data")
|
|
59
|
+
],
|
|
60
|
+
claim: Annotated[
|
|
61
|
+
Optional[StrictBool],
|
|
62
|
+
Field(description="If true, claims ownership of an existing Harbor project instead of creating a new one."),
|
|
63
|
+
] = None,
|
|
64
|
+
_request_timeout: Union[
|
|
65
|
+
None,
|
|
66
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
67
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
68
|
+
] = None,
|
|
69
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
70
|
+
_content_type: Optional[StrictStr] = None,
|
|
71
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
72
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
73
|
+
) -> Artifactory:
|
|
74
|
+
"""Creates an artifactory
|
|
75
|
+
|
|
76
|
+
Creates an artifactory associated to the specified project.
|
|
77
|
+
|
|
78
|
+
:param project_id: Project identifier. (required)
|
|
79
|
+
:type project_id: UUID
|
|
80
|
+
:param region_id: STACKIT region identification (required)
|
|
81
|
+
:type region_id: str
|
|
82
|
+
:param create_artifactory_payload: CreateArtifactory request data (required)
|
|
83
|
+
:type create_artifactory_payload: CreateArtifactoryPayload
|
|
84
|
+
:param claim: If true, claims ownership of an existing Harbor project instead of creating a new one.
|
|
85
|
+
:type claim: bool
|
|
86
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
87
|
+
number provided, it will be total request
|
|
88
|
+
timeout. It can also be a pair (tuple) of
|
|
89
|
+
(connection, read) timeouts.
|
|
90
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
91
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
92
|
+
request; this effectively ignores the
|
|
93
|
+
authentication in the spec for a single request.
|
|
94
|
+
:type _request_auth: dict, optional
|
|
95
|
+
:param _content_type: force content-type for the request.
|
|
96
|
+
:type _content_type: str, Optional
|
|
97
|
+
:param _headers: set to override the headers for a single
|
|
98
|
+
request; this effectively ignores the headers
|
|
99
|
+
in the spec for a single request.
|
|
100
|
+
:type _headers: dict, optional
|
|
101
|
+
:param _host_index: set to override the host_index for a single
|
|
102
|
+
request; this effectively ignores the host_index
|
|
103
|
+
in the spec for a single request.
|
|
104
|
+
:type _host_index: int, optional
|
|
105
|
+
:return: Returns the result object.
|
|
106
|
+
""" # noqa: E501
|
|
107
|
+
|
|
108
|
+
_param = self._create_artifactory_serialize(
|
|
109
|
+
project_id=project_id,
|
|
110
|
+
region_id=region_id,
|
|
111
|
+
create_artifactory_payload=create_artifactory_payload,
|
|
112
|
+
claim=claim,
|
|
113
|
+
_request_auth=_request_auth,
|
|
114
|
+
_content_type=_content_type,
|
|
115
|
+
_headers=_headers,
|
|
116
|
+
_host_index=_host_index,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
120
|
+
"202": "Artifactory",
|
|
121
|
+
"400": "BadRequestErrorResponse",
|
|
122
|
+
"401": "UnauthorizedErrorResponse",
|
|
123
|
+
"403": "ForbiddenErrorResponse",
|
|
124
|
+
"404": "NotFoundErrorResponse",
|
|
125
|
+
"409": "ConflictErrorResponse",
|
|
126
|
+
"500": "InternalServerErrorResponse",
|
|
127
|
+
}
|
|
128
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
129
|
+
response_data.read()
|
|
130
|
+
return self.api_client.response_deserialize(
|
|
131
|
+
response_data=response_data,
|
|
132
|
+
response_types_map=_response_types_map,
|
|
133
|
+
).data
|
|
134
|
+
|
|
135
|
+
@validate_call
|
|
136
|
+
def create_artifactory_with_http_info(
|
|
137
|
+
self,
|
|
138
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
139
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
140
|
+
create_artifactory_payload: Annotated[
|
|
141
|
+
CreateArtifactoryPayload, Field(description="CreateArtifactory request data")
|
|
142
|
+
],
|
|
143
|
+
claim: Annotated[
|
|
144
|
+
Optional[StrictBool],
|
|
145
|
+
Field(description="If true, claims ownership of an existing Harbor project instead of creating a new one."),
|
|
146
|
+
] = None,
|
|
147
|
+
_request_timeout: Union[
|
|
148
|
+
None,
|
|
149
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
150
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
151
|
+
] = None,
|
|
152
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
153
|
+
_content_type: Optional[StrictStr] = None,
|
|
154
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
155
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
156
|
+
) -> ApiResponse[Artifactory]:
|
|
157
|
+
"""Creates an artifactory
|
|
158
|
+
|
|
159
|
+
Creates an artifactory associated to the specified project.
|
|
160
|
+
|
|
161
|
+
:param project_id: Project identifier. (required)
|
|
162
|
+
:type project_id: UUID
|
|
163
|
+
:param region_id: STACKIT region identification (required)
|
|
164
|
+
:type region_id: str
|
|
165
|
+
:param create_artifactory_payload: CreateArtifactory request data (required)
|
|
166
|
+
:type create_artifactory_payload: CreateArtifactoryPayload
|
|
167
|
+
:param claim: If true, claims ownership of an existing Harbor project instead of creating a new one.
|
|
168
|
+
:type claim: bool
|
|
169
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
170
|
+
number provided, it will be total request
|
|
171
|
+
timeout. It can also be a pair (tuple) of
|
|
172
|
+
(connection, read) timeouts.
|
|
173
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
174
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
175
|
+
request; this effectively ignores the
|
|
176
|
+
authentication in the spec for a single request.
|
|
177
|
+
:type _request_auth: dict, optional
|
|
178
|
+
:param _content_type: force content-type for the request.
|
|
179
|
+
:type _content_type: str, Optional
|
|
180
|
+
:param _headers: set to override the headers for a single
|
|
181
|
+
request; this effectively ignores the headers
|
|
182
|
+
in the spec for a single request.
|
|
183
|
+
:type _headers: dict, optional
|
|
184
|
+
:param _host_index: set to override the host_index for a single
|
|
185
|
+
request; this effectively ignores the host_index
|
|
186
|
+
in the spec for a single request.
|
|
187
|
+
:type _host_index: int, optional
|
|
188
|
+
:return: Returns the result object.
|
|
189
|
+
""" # noqa: E501
|
|
190
|
+
|
|
191
|
+
_param = self._create_artifactory_serialize(
|
|
192
|
+
project_id=project_id,
|
|
193
|
+
region_id=region_id,
|
|
194
|
+
create_artifactory_payload=create_artifactory_payload,
|
|
195
|
+
claim=claim,
|
|
196
|
+
_request_auth=_request_auth,
|
|
197
|
+
_content_type=_content_type,
|
|
198
|
+
_headers=_headers,
|
|
199
|
+
_host_index=_host_index,
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
203
|
+
"202": "Artifactory",
|
|
204
|
+
"400": "BadRequestErrorResponse",
|
|
205
|
+
"401": "UnauthorizedErrorResponse",
|
|
206
|
+
"403": "ForbiddenErrorResponse",
|
|
207
|
+
"404": "NotFoundErrorResponse",
|
|
208
|
+
"409": "ConflictErrorResponse",
|
|
209
|
+
"500": "InternalServerErrorResponse",
|
|
210
|
+
}
|
|
211
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
212
|
+
response_data.read()
|
|
213
|
+
return self.api_client.response_deserialize(
|
|
214
|
+
response_data=response_data,
|
|
215
|
+
response_types_map=_response_types_map,
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
@validate_call
|
|
219
|
+
def create_artifactory_without_preload_content(
|
|
220
|
+
self,
|
|
221
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
222
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
223
|
+
create_artifactory_payload: Annotated[
|
|
224
|
+
CreateArtifactoryPayload, Field(description="CreateArtifactory request data")
|
|
225
|
+
],
|
|
226
|
+
claim: Annotated[
|
|
227
|
+
Optional[StrictBool],
|
|
228
|
+
Field(description="If true, claims ownership of an existing Harbor project instead of creating a new one."),
|
|
229
|
+
] = None,
|
|
230
|
+
_request_timeout: Union[
|
|
231
|
+
None,
|
|
232
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
233
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
234
|
+
] = None,
|
|
235
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
236
|
+
_content_type: Optional[StrictStr] = None,
|
|
237
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
238
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
239
|
+
) -> RESTResponseType:
|
|
240
|
+
"""Creates an artifactory
|
|
241
|
+
|
|
242
|
+
Creates an artifactory associated to the specified project.
|
|
243
|
+
|
|
244
|
+
:param project_id: Project identifier. (required)
|
|
245
|
+
:type project_id: UUID
|
|
246
|
+
:param region_id: STACKIT region identification (required)
|
|
247
|
+
:type region_id: str
|
|
248
|
+
:param create_artifactory_payload: CreateArtifactory request data (required)
|
|
249
|
+
:type create_artifactory_payload: CreateArtifactoryPayload
|
|
250
|
+
:param claim: If true, claims ownership of an existing Harbor project instead of creating a new one.
|
|
251
|
+
:type claim: bool
|
|
252
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
253
|
+
number provided, it will be total request
|
|
254
|
+
timeout. It can also be a pair (tuple) of
|
|
255
|
+
(connection, read) timeouts.
|
|
256
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
257
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
258
|
+
request; this effectively ignores the
|
|
259
|
+
authentication in the spec for a single request.
|
|
260
|
+
:type _request_auth: dict, optional
|
|
261
|
+
:param _content_type: force content-type for the request.
|
|
262
|
+
:type _content_type: str, Optional
|
|
263
|
+
:param _headers: set to override the headers for a single
|
|
264
|
+
request; this effectively ignores the headers
|
|
265
|
+
in the spec for a single request.
|
|
266
|
+
:type _headers: dict, optional
|
|
267
|
+
:param _host_index: set to override the host_index for a single
|
|
268
|
+
request; this effectively ignores the host_index
|
|
269
|
+
in the spec for a single request.
|
|
270
|
+
:type _host_index: int, optional
|
|
271
|
+
:return: Returns the result object.
|
|
272
|
+
""" # noqa: E501
|
|
273
|
+
|
|
274
|
+
_param = self._create_artifactory_serialize(
|
|
275
|
+
project_id=project_id,
|
|
276
|
+
region_id=region_id,
|
|
277
|
+
create_artifactory_payload=create_artifactory_payload,
|
|
278
|
+
claim=claim,
|
|
279
|
+
_request_auth=_request_auth,
|
|
280
|
+
_content_type=_content_type,
|
|
281
|
+
_headers=_headers,
|
|
282
|
+
_host_index=_host_index,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
286
|
+
"202": "Artifactory",
|
|
287
|
+
"400": "BadRequestErrorResponse",
|
|
288
|
+
"401": "UnauthorizedErrorResponse",
|
|
289
|
+
"403": "ForbiddenErrorResponse",
|
|
290
|
+
"404": "NotFoundErrorResponse",
|
|
291
|
+
"409": "ConflictErrorResponse",
|
|
292
|
+
"500": "InternalServerErrorResponse",
|
|
293
|
+
}
|
|
294
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
295
|
+
return response_data.response
|
|
296
|
+
|
|
297
|
+
def _create_artifactory_serialize(
|
|
298
|
+
self,
|
|
299
|
+
project_id,
|
|
300
|
+
region_id,
|
|
301
|
+
create_artifactory_payload,
|
|
302
|
+
claim,
|
|
303
|
+
_request_auth,
|
|
304
|
+
_content_type,
|
|
305
|
+
_headers,
|
|
306
|
+
_host_index,
|
|
307
|
+
) -> RequestSerialized:
|
|
308
|
+
|
|
309
|
+
_host = None
|
|
310
|
+
|
|
311
|
+
_collection_formats: Dict[str, str] = {}
|
|
312
|
+
|
|
313
|
+
_path_params: Dict[str, str] = {}
|
|
314
|
+
_query_params: List[Tuple[str, str]] = []
|
|
315
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
316
|
+
_form_params: List[Tuple[str, str]] = []
|
|
317
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
318
|
+
_body_params: Optional[bytes] = None
|
|
319
|
+
|
|
320
|
+
# process the path parameters
|
|
321
|
+
if project_id is not None:
|
|
322
|
+
_path_params["projectId"] = project_id
|
|
323
|
+
if region_id is not None:
|
|
324
|
+
_path_params["regionId"] = region_id
|
|
325
|
+
# process the query parameters
|
|
326
|
+
if claim is not None:
|
|
327
|
+
|
|
328
|
+
_query_params.append(("claim", claim))
|
|
329
|
+
|
|
330
|
+
# process the header parameters
|
|
331
|
+
# process the form parameters
|
|
332
|
+
# process the body parameter
|
|
333
|
+
if create_artifactory_payload is not None:
|
|
334
|
+
_body_params = create_artifactory_payload
|
|
335
|
+
|
|
336
|
+
# set the HTTP header `Accept`
|
|
337
|
+
if "Accept" not in _header_params:
|
|
338
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
339
|
+
|
|
340
|
+
# set the HTTP header `Content-Type`
|
|
341
|
+
if _content_type:
|
|
342
|
+
_header_params["Content-Type"] = _content_type
|
|
343
|
+
else:
|
|
344
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
345
|
+
if _default_content_type is not None:
|
|
346
|
+
_header_params["Content-Type"] = _default_content_type
|
|
347
|
+
|
|
348
|
+
# authentication setting
|
|
349
|
+
_auth_settings: List[str] = []
|
|
350
|
+
|
|
351
|
+
return self.api_client.param_serialize(
|
|
352
|
+
method="POST",
|
|
353
|
+
resource_path="/v1/projects/{projectId}/regions/{regionId}/artifactories",
|
|
354
|
+
path_params=_path_params,
|
|
355
|
+
query_params=_query_params,
|
|
356
|
+
header_params=_header_params,
|
|
357
|
+
body=_body_params,
|
|
358
|
+
post_params=_form_params,
|
|
359
|
+
files=_files,
|
|
360
|
+
auth_settings=_auth_settings,
|
|
361
|
+
collection_formats=_collection_formats,
|
|
362
|
+
_host=_host,
|
|
363
|
+
_request_auth=_request_auth,
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
@validate_call
|
|
367
|
+
def delete_artifactory(
|
|
368
|
+
self,
|
|
369
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
370
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
371
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
372
|
+
_request_timeout: Union[
|
|
373
|
+
None,
|
|
374
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
375
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
376
|
+
] = None,
|
|
377
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
378
|
+
_content_type: Optional[StrictStr] = None,
|
|
379
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
380
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
381
|
+
) -> None:
|
|
382
|
+
"""Delete the artifactory.
|
|
383
|
+
|
|
384
|
+
Deletes the artifactory associated to the specified project.
|
|
385
|
+
|
|
386
|
+
:param project_id: Project identifier. (required)
|
|
387
|
+
:type project_id: UUID
|
|
388
|
+
:param region_id: STACKIT region identification (required)
|
|
389
|
+
:type region_id: str
|
|
390
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
391
|
+
:type artifactory_id: UUID
|
|
392
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
393
|
+
number provided, it will be total request
|
|
394
|
+
timeout. It can also be a pair (tuple) of
|
|
395
|
+
(connection, read) timeouts.
|
|
396
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
397
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
398
|
+
request; this effectively ignores the
|
|
399
|
+
authentication in the spec for a single request.
|
|
400
|
+
:type _request_auth: dict, optional
|
|
401
|
+
:param _content_type: force content-type for the request.
|
|
402
|
+
:type _content_type: str, Optional
|
|
403
|
+
:param _headers: set to override the headers for a single
|
|
404
|
+
request; this effectively ignores the headers
|
|
405
|
+
in the spec for a single request.
|
|
406
|
+
:type _headers: dict, optional
|
|
407
|
+
:param _host_index: set to override the host_index for a single
|
|
408
|
+
request; this effectively ignores the host_index
|
|
409
|
+
in the spec for a single request.
|
|
410
|
+
:type _host_index: int, optional
|
|
411
|
+
:return: Returns the result object.
|
|
412
|
+
""" # noqa: E501
|
|
413
|
+
|
|
414
|
+
_param = self._delete_artifactory_serialize(
|
|
415
|
+
project_id=project_id,
|
|
416
|
+
region_id=region_id,
|
|
417
|
+
artifactory_id=artifactory_id,
|
|
418
|
+
_request_auth=_request_auth,
|
|
419
|
+
_content_type=_content_type,
|
|
420
|
+
_headers=_headers,
|
|
421
|
+
_host_index=_host_index,
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
425
|
+
"204": None,
|
|
426
|
+
"400": "GenericErrorResponse",
|
|
427
|
+
"401": "UnauthorizedErrorResponse",
|
|
428
|
+
"403": "ForbiddenErrorResponse",
|
|
429
|
+
"404": "GenericErrorResponse",
|
|
430
|
+
"409": "GenericErrorResponse",
|
|
431
|
+
"500": "GenericErrorResponse",
|
|
432
|
+
}
|
|
433
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
434
|
+
response_data.read()
|
|
435
|
+
return self.api_client.response_deserialize(
|
|
436
|
+
response_data=response_data,
|
|
437
|
+
response_types_map=_response_types_map,
|
|
438
|
+
).data
|
|
439
|
+
|
|
440
|
+
@validate_call
|
|
441
|
+
def delete_artifactory_with_http_info(
|
|
442
|
+
self,
|
|
443
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
444
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
445
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
446
|
+
_request_timeout: Union[
|
|
447
|
+
None,
|
|
448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
449
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
450
|
+
] = None,
|
|
451
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
452
|
+
_content_type: Optional[StrictStr] = None,
|
|
453
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
454
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
455
|
+
) -> ApiResponse[None]:
|
|
456
|
+
"""Delete the artifactory.
|
|
457
|
+
|
|
458
|
+
Deletes the artifactory associated to the specified project.
|
|
459
|
+
|
|
460
|
+
:param project_id: Project identifier. (required)
|
|
461
|
+
:type project_id: UUID
|
|
462
|
+
:param region_id: STACKIT region identification (required)
|
|
463
|
+
:type region_id: str
|
|
464
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
465
|
+
:type artifactory_id: UUID
|
|
466
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
467
|
+
number provided, it will be total request
|
|
468
|
+
timeout. It can also be a pair (tuple) of
|
|
469
|
+
(connection, read) timeouts.
|
|
470
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
471
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
472
|
+
request; this effectively ignores the
|
|
473
|
+
authentication in the spec for a single request.
|
|
474
|
+
:type _request_auth: dict, optional
|
|
475
|
+
:param _content_type: force content-type for the request.
|
|
476
|
+
:type _content_type: str, Optional
|
|
477
|
+
:param _headers: set to override the headers for a single
|
|
478
|
+
request; this effectively ignores the headers
|
|
479
|
+
in the spec for a single request.
|
|
480
|
+
:type _headers: dict, optional
|
|
481
|
+
:param _host_index: set to override the host_index for a single
|
|
482
|
+
request; this effectively ignores the host_index
|
|
483
|
+
in the spec for a single request.
|
|
484
|
+
:type _host_index: int, optional
|
|
485
|
+
:return: Returns the result object.
|
|
486
|
+
""" # noqa: E501
|
|
487
|
+
|
|
488
|
+
_param = self._delete_artifactory_serialize(
|
|
489
|
+
project_id=project_id,
|
|
490
|
+
region_id=region_id,
|
|
491
|
+
artifactory_id=artifactory_id,
|
|
492
|
+
_request_auth=_request_auth,
|
|
493
|
+
_content_type=_content_type,
|
|
494
|
+
_headers=_headers,
|
|
495
|
+
_host_index=_host_index,
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
499
|
+
"204": None,
|
|
500
|
+
"400": "GenericErrorResponse",
|
|
501
|
+
"401": "UnauthorizedErrorResponse",
|
|
502
|
+
"403": "ForbiddenErrorResponse",
|
|
503
|
+
"404": "GenericErrorResponse",
|
|
504
|
+
"409": "GenericErrorResponse",
|
|
505
|
+
"500": "GenericErrorResponse",
|
|
506
|
+
}
|
|
507
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
508
|
+
response_data.read()
|
|
509
|
+
return self.api_client.response_deserialize(
|
|
510
|
+
response_data=response_data,
|
|
511
|
+
response_types_map=_response_types_map,
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
@validate_call
|
|
515
|
+
def delete_artifactory_without_preload_content(
|
|
516
|
+
self,
|
|
517
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
518
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
519
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
520
|
+
_request_timeout: Union[
|
|
521
|
+
None,
|
|
522
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
523
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
524
|
+
] = None,
|
|
525
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
526
|
+
_content_type: Optional[StrictStr] = None,
|
|
527
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
528
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
529
|
+
) -> RESTResponseType:
|
|
530
|
+
"""Delete the artifactory.
|
|
531
|
+
|
|
532
|
+
Deletes the artifactory associated to the specified project.
|
|
533
|
+
|
|
534
|
+
:param project_id: Project identifier. (required)
|
|
535
|
+
:type project_id: UUID
|
|
536
|
+
:param region_id: STACKIT region identification (required)
|
|
537
|
+
:type region_id: str
|
|
538
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
539
|
+
:type artifactory_id: UUID
|
|
540
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
541
|
+
number provided, it will be total request
|
|
542
|
+
timeout. It can also be a pair (tuple) of
|
|
543
|
+
(connection, read) timeouts.
|
|
544
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
545
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
546
|
+
request; this effectively ignores the
|
|
547
|
+
authentication in the spec for a single request.
|
|
548
|
+
:type _request_auth: dict, optional
|
|
549
|
+
:param _content_type: force content-type for the request.
|
|
550
|
+
:type _content_type: str, Optional
|
|
551
|
+
:param _headers: set to override the headers for a single
|
|
552
|
+
request; this effectively ignores the headers
|
|
553
|
+
in the spec for a single request.
|
|
554
|
+
:type _headers: dict, optional
|
|
555
|
+
:param _host_index: set to override the host_index for a single
|
|
556
|
+
request; this effectively ignores the host_index
|
|
557
|
+
in the spec for a single request.
|
|
558
|
+
:type _host_index: int, optional
|
|
559
|
+
:return: Returns the result object.
|
|
560
|
+
""" # noqa: E501
|
|
561
|
+
|
|
562
|
+
_param = self._delete_artifactory_serialize(
|
|
563
|
+
project_id=project_id,
|
|
564
|
+
region_id=region_id,
|
|
565
|
+
artifactory_id=artifactory_id,
|
|
566
|
+
_request_auth=_request_auth,
|
|
567
|
+
_content_type=_content_type,
|
|
568
|
+
_headers=_headers,
|
|
569
|
+
_host_index=_host_index,
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
573
|
+
"204": None,
|
|
574
|
+
"400": "GenericErrorResponse",
|
|
575
|
+
"401": "UnauthorizedErrorResponse",
|
|
576
|
+
"403": "ForbiddenErrorResponse",
|
|
577
|
+
"404": "GenericErrorResponse",
|
|
578
|
+
"409": "GenericErrorResponse",
|
|
579
|
+
"500": "GenericErrorResponse",
|
|
580
|
+
}
|
|
581
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
582
|
+
return response_data.response
|
|
583
|
+
|
|
584
|
+
def _delete_artifactory_serialize(
|
|
585
|
+
self,
|
|
586
|
+
project_id,
|
|
587
|
+
region_id,
|
|
588
|
+
artifactory_id,
|
|
589
|
+
_request_auth,
|
|
590
|
+
_content_type,
|
|
591
|
+
_headers,
|
|
592
|
+
_host_index,
|
|
593
|
+
) -> RequestSerialized:
|
|
594
|
+
|
|
595
|
+
_host = None
|
|
596
|
+
|
|
597
|
+
_collection_formats: Dict[str, str] = {}
|
|
598
|
+
|
|
599
|
+
_path_params: Dict[str, str] = {}
|
|
600
|
+
_query_params: List[Tuple[str, str]] = []
|
|
601
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
602
|
+
_form_params: List[Tuple[str, str]] = []
|
|
603
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
604
|
+
_body_params: Optional[bytes] = None
|
|
605
|
+
|
|
606
|
+
# process the path parameters
|
|
607
|
+
if project_id is not None:
|
|
608
|
+
_path_params["projectId"] = project_id
|
|
609
|
+
if region_id is not None:
|
|
610
|
+
_path_params["regionId"] = region_id
|
|
611
|
+
if artifactory_id is not None:
|
|
612
|
+
_path_params["artifactoryId"] = artifactory_id
|
|
613
|
+
# process the query parameters
|
|
614
|
+
# process the header parameters
|
|
615
|
+
# process the form parameters
|
|
616
|
+
# process the body parameter
|
|
617
|
+
|
|
618
|
+
# set the HTTP header `Accept`
|
|
619
|
+
if "Accept" not in _header_params:
|
|
620
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
621
|
+
|
|
622
|
+
# authentication setting
|
|
623
|
+
_auth_settings: List[str] = []
|
|
624
|
+
|
|
625
|
+
return self.api_client.param_serialize(
|
|
626
|
+
method="DELETE",
|
|
627
|
+
resource_path="/v1/projects/{projectId}/regions/{regionId}/artifactories/{artifactoryId}",
|
|
628
|
+
path_params=_path_params,
|
|
629
|
+
query_params=_query_params,
|
|
630
|
+
header_params=_header_params,
|
|
631
|
+
body=_body_params,
|
|
632
|
+
post_params=_form_params,
|
|
633
|
+
files=_files,
|
|
634
|
+
auth_settings=_auth_settings,
|
|
635
|
+
collection_formats=_collection_formats,
|
|
636
|
+
_host=_host,
|
|
637
|
+
_request_auth=_request_auth,
|
|
638
|
+
)
|
|
639
|
+
|
|
640
|
+
@validate_call
|
|
641
|
+
def get_artifactory(
|
|
642
|
+
self,
|
|
643
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
644
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
645
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
646
|
+
_request_timeout: Union[
|
|
647
|
+
None,
|
|
648
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
649
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
650
|
+
] = None,
|
|
651
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
652
|
+
_content_type: Optional[StrictStr] = None,
|
|
653
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
654
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
655
|
+
) -> Artifactory:
|
|
656
|
+
"""Get Artifactory information.
|
|
657
|
+
|
|
658
|
+
Retrieves information about a STACKIT Artifactory.
|
|
659
|
+
|
|
660
|
+
:param project_id: Project identifier. (required)
|
|
661
|
+
:type project_id: UUID
|
|
662
|
+
:param region_id: STACKIT region identification (required)
|
|
663
|
+
:type region_id: str
|
|
664
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
665
|
+
:type artifactory_id: UUID
|
|
666
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
667
|
+
number provided, it will be total request
|
|
668
|
+
timeout. It can also be a pair (tuple) of
|
|
669
|
+
(connection, read) timeouts.
|
|
670
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
671
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
672
|
+
request; this effectively ignores the
|
|
673
|
+
authentication in the spec for a single request.
|
|
674
|
+
:type _request_auth: dict, optional
|
|
675
|
+
:param _content_type: force content-type for the request.
|
|
676
|
+
:type _content_type: str, Optional
|
|
677
|
+
:param _headers: set to override the headers for a single
|
|
678
|
+
request; this effectively ignores the headers
|
|
679
|
+
in the spec for a single request.
|
|
680
|
+
:type _headers: dict, optional
|
|
681
|
+
:param _host_index: set to override the host_index for a single
|
|
682
|
+
request; this effectively ignores the host_index
|
|
683
|
+
in the spec for a single request.
|
|
684
|
+
:type _host_index: int, optional
|
|
685
|
+
:return: Returns the result object.
|
|
686
|
+
""" # noqa: E501
|
|
687
|
+
|
|
688
|
+
_param = self._get_artifactory_serialize(
|
|
689
|
+
project_id=project_id,
|
|
690
|
+
region_id=region_id,
|
|
691
|
+
artifactory_id=artifactory_id,
|
|
692
|
+
_request_auth=_request_auth,
|
|
693
|
+
_content_type=_content_type,
|
|
694
|
+
_headers=_headers,
|
|
695
|
+
_host_index=_host_index,
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
699
|
+
"200": "Artifactory",
|
|
700
|
+
"400": "GenericErrorResponse",
|
|
701
|
+
"401": "UnauthorizedErrorResponse",
|
|
702
|
+
"403": "ForbiddenErrorResponse",
|
|
703
|
+
"404": "GenericErrorResponse",
|
|
704
|
+
"500": "GenericErrorResponse",
|
|
705
|
+
}
|
|
706
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
707
|
+
response_data.read()
|
|
708
|
+
return self.api_client.response_deserialize(
|
|
709
|
+
response_data=response_data,
|
|
710
|
+
response_types_map=_response_types_map,
|
|
711
|
+
).data
|
|
712
|
+
|
|
713
|
+
@validate_call
|
|
714
|
+
def get_artifactory_with_http_info(
|
|
715
|
+
self,
|
|
716
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
717
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
718
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
719
|
+
_request_timeout: Union[
|
|
720
|
+
None,
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
722
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
723
|
+
] = None,
|
|
724
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
725
|
+
_content_type: Optional[StrictStr] = None,
|
|
726
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
727
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
728
|
+
) -> ApiResponse[Artifactory]:
|
|
729
|
+
"""Get Artifactory information.
|
|
730
|
+
|
|
731
|
+
Retrieves information about a STACKIT Artifactory.
|
|
732
|
+
|
|
733
|
+
:param project_id: Project identifier. (required)
|
|
734
|
+
:type project_id: UUID
|
|
735
|
+
:param region_id: STACKIT region identification (required)
|
|
736
|
+
:type region_id: str
|
|
737
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
738
|
+
:type artifactory_id: UUID
|
|
739
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
740
|
+
number provided, it will be total request
|
|
741
|
+
timeout. It can also be a pair (tuple) of
|
|
742
|
+
(connection, read) timeouts.
|
|
743
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
744
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
745
|
+
request; this effectively ignores the
|
|
746
|
+
authentication in the spec for a single request.
|
|
747
|
+
:type _request_auth: dict, optional
|
|
748
|
+
:param _content_type: force content-type for the request.
|
|
749
|
+
:type _content_type: str, Optional
|
|
750
|
+
:param _headers: set to override the headers for a single
|
|
751
|
+
request; this effectively ignores the headers
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _headers: dict, optional
|
|
754
|
+
:param _host_index: set to override the host_index for a single
|
|
755
|
+
request; this effectively ignores the host_index
|
|
756
|
+
in the spec for a single request.
|
|
757
|
+
:type _host_index: int, optional
|
|
758
|
+
:return: Returns the result object.
|
|
759
|
+
""" # noqa: E501
|
|
760
|
+
|
|
761
|
+
_param = self._get_artifactory_serialize(
|
|
762
|
+
project_id=project_id,
|
|
763
|
+
region_id=region_id,
|
|
764
|
+
artifactory_id=artifactory_id,
|
|
765
|
+
_request_auth=_request_auth,
|
|
766
|
+
_content_type=_content_type,
|
|
767
|
+
_headers=_headers,
|
|
768
|
+
_host_index=_host_index,
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
772
|
+
"200": "Artifactory",
|
|
773
|
+
"400": "GenericErrorResponse",
|
|
774
|
+
"401": "UnauthorizedErrorResponse",
|
|
775
|
+
"403": "ForbiddenErrorResponse",
|
|
776
|
+
"404": "GenericErrorResponse",
|
|
777
|
+
"500": "GenericErrorResponse",
|
|
778
|
+
}
|
|
779
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
780
|
+
response_data.read()
|
|
781
|
+
return self.api_client.response_deserialize(
|
|
782
|
+
response_data=response_data,
|
|
783
|
+
response_types_map=_response_types_map,
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
@validate_call
|
|
787
|
+
def get_artifactory_without_preload_content(
|
|
788
|
+
self,
|
|
789
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
790
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
791
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
792
|
+
_request_timeout: Union[
|
|
793
|
+
None,
|
|
794
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
795
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
796
|
+
] = None,
|
|
797
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
798
|
+
_content_type: Optional[StrictStr] = None,
|
|
799
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
800
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
801
|
+
) -> RESTResponseType:
|
|
802
|
+
"""Get Artifactory information.
|
|
803
|
+
|
|
804
|
+
Retrieves information about a STACKIT Artifactory.
|
|
805
|
+
|
|
806
|
+
:param project_id: Project identifier. (required)
|
|
807
|
+
:type project_id: UUID
|
|
808
|
+
:param region_id: STACKIT region identification (required)
|
|
809
|
+
:type region_id: str
|
|
810
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
811
|
+
:type artifactory_id: UUID
|
|
812
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
813
|
+
number provided, it will be total request
|
|
814
|
+
timeout. It can also be a pair (tuple) of
|
|
815
|
+
(connection, read) timeouts.
|
|
816
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
817
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
818
|
+
request; this effectively ignores the
|
|
819
|
+
authentication in the spec for a single request.
|
|
820
|
+
:type _request_auth: dict, optional
|
|
821
|
+
:param _content_type: force content-type for the request.
|
|
822
|
+
:type _content_type: str, Optional
|
|
823
|
+
:param _headers: set to override the headers for a single
|
|
824
|
+
request; this effectively ignores the headers
|
|
825
|
+
in the spec for a single request.
|
|
826
|
+
:type _headers: dict, optional
|
|
827
|
+
:param _host_index: set to override the host_index for a single
|
|
828
|
+
request; this effectively ignores the host_index
|
|
829
|
+
in the spec for a single request.
|
|
830
|
+
:type _host_index: int, optional
|
|
831
|
+
:return: Returns the result object.
|
|
832
|
+
""" # noqa: E501
|
|
833
|
+
|
|
834
|
+
_param = self._get_artifactory_serialize(
|
|
835
|
+
project_id=project_id,
|
|
836
|
+
region_id=region_id,
|
|
837
|
+
artifactory_id=artifactory_id,
|
|
838
|
+
_request_auth=_request_auth,
|
|
839
|
+
_content_type=_content_type,
|
|
840
|
+
_headers=_headers,
|
|
841
|
+
_host_index=_host_index,
|
|
842
|
+
)
|
|
843
|
+
|
|
844
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
845
|
+
"200": "Artifactory",
|
|
846
|
+
"400": "GenericErrorResponse",
|
|
847
|
+
"401": "UnauthorizedErrorResponse",
|
|
848
|
+
"403": "ForbiddenErrorResponse",
|
|
849
|
+
"404": "GenericErrorResponse",
|
|
850
|
+
"500": "GenericErrorResponse",
|
|
851
|
+
}
|
|
852
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
853
|
+
return response_data.response
|
|
854
|
+
|
|
855
|
+
def _get_artifactory_serialize(
|
|
856
|
+
self,
|
|
857
|
+
project_id,
|
|
858
|
+
region_id,
|
|
859
|
+
artifactory_id,
|
|
860
|
+
_request_auth,
|
|
861
|
+
_content_type,
|
|
862
|
+
_headers,
|
|
863
|
+
_host_index,
|
|
864
|
+
) -> RequestSerialized:
|
|
865
|
+
|
|
866
|
+
_host = None
|
|
867
|
+
|
|
868
|
+
_collection_formats: Dict[str, str] = {}
|
|
869
|
+
|
|
870
|
+
_path_params: Dict[str, str] = {}
|
|
871
|
+
_query_params: List[Tuple[str, str]] = []
|
|
872
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
873
|
+
_form_params: List[Tuple[str, str]] = []
|
|
874
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
875
|
+
_body_params: Optional[bytes] = None
|
|
876
|
+
|
|
877
|
+
# process the path parameters
|
|
878
|
+
if project_id is not None:
|
|
879
|
+
_path_params["projectId"] = project_id
|
|
880
|
+
if region_id is not None:
|
|
881
|
+
_path_params["regionId"] = region_id
|
|
882
|
+
if artifactory_id is not None:
|
|
883
|
+
_path_params["artifactoryId"] = artifactory_id
|
|
884
|
+
# process the query parameters
|
|
885
|
+
# process the header parameters
|
|
886
|
+
# process the form parameters
|
|
887
|
+
# process the body parameter
|
|
888
|
+
|
|
889
|
+
# set the HTTP header `Accept`
|
|
890
|
+
if "Accept" not in _header_params:
|
|
891
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
892
|
+
|
|
893
|
+
# authentication setting
|
|
894
|
+
_auth_settings: List[str] = []
|
|
895
|
+
|
|
896
|
+
return self.api_client.param_serialize(
|
|
897
|
+
method="GET",
|
|
898
|
+
resource_path="/v1/projects/{projectId}/regions/{regionId}/artifactories/{artifactoryId}",
|
|
899
|
+
path_params=_path_params,
|
|
900
|
+
query_params=_query_params,
|
|
901
|
+
header_params=_header_params,
|
|
902
|
+
body=_body_params,
|
|
903
|
+
post_params=_form_params,
|
|
904
|
+
files=_files,
|
|
905
|
+
auth_settings=_auth_settings,
|
|
906
|
+
collection_formats=_collection_formats,
|
|
907
|
+
_host=_host,
|
|
908
|
+
_request_auth=_request_auth,
|
|
909
|
+
)
|
|
910
|
+
|
|
911
|
+
@validate_call
|
|
912
|
+
def list_artifactories(
|
|
913
|
+
self,
|
|
914
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
915
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
916
|
+
page_size: Annotated[
|
|
917
|
+
Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
|
|
918
|
+
Field(
|
|
919
|
+
description="The maximum number of artifactories to return. The service may return fewer than this value."
|
|
920
|
+
),
|
|
921
|
+
] = None,
|
|
922
|
+
next_page_token: Annotated[
|
|
923
|
+
Optional[StrictStr],
|
|
924
|
+
Field(
|
|
925
|
+
description="A page token, received from a previous `ListArtifactories` call. Provide this to retrieve the subsequent page."
|
|
926
|
+
),
|
|
927
|
+
] = None,
|
|
928
|
+
_request_timeout: Union[
|
|
929
|
+
None,
|
|
930
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
931
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
932
|
+
] = None,
|
|
933
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
934
|
+
_content_type: Optional[StrictStr] = None,
|
|
935
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
936
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
937
|
+
) -> ArtifactoryList:
|
|
938
|
+
"""List artifactories inside a STACKIT project
|
|
939
|
+
|
|
940
|
+
Lists all artifactories associated to the specified project.
|
|
941
|
+
|
|
942
|
+
:param project_id: Project identifier. (required)
|
|
943
|
+
:type project_id: UUID
|
|
944
|
+
:param region_id: STACKIT region identification (required)
|
|
945
|
+
:type region_id: str
|
|
946
|
+
:param page_size: The maximum number of artifactories to return. The service may return fewer than this value.
|
|
947
|
+
:type page_size: int
|
|
948
|
+
:param next_page_token: A page token, received from a previous `ListArtifactories` call. Provide this to retrieve the subsequent page.
|
|
949
|
+
:type next_page_token: str
|
|
950
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
951
|
+
number provided, it will be total request
|
|
952
|
+
timeout. It can also be a pair (tuple) of
|
|
953
|
+
(connection, read) timeouts.
|
|
954
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
955
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
956
|
+
request; this effectively ignores the
|
|
957
|
+
authentication in the spec for a single request.
|
|
958
|
+
:type _request_auth: dict, optional
|
|
959
|
+
:param _content_type: force content-type for the request.
|
|
960
|
+
:type _content_type: str, Optional
|
|
961
|
+
:param _headers: set to override the headers for a single
|
|
962
|
+
request; this effectively ignores the headers
|
|
963
|
+
in the spec for a single request.
|
|
964
|
+
:type _headers: dict, optional
|
|
965
|
+
:param _host_index: set to override the host_index for a single
|
|
966
|
+
request; this effectively ignores the host_index
|
|
967
|
+
in the spec for a single request.
|
|
968
|
+
:type _host_index: int, optional
|
|
969
|
+
:return: Returns the result object.
|
|
970
|
+
""" # noqa: E501
|
|
971
|
+
|
|
972
|
+
_param = self._list_artifactories_serialize(
|
|
973
|
+
project_id=project_id,
|
|
974
|
+
region_id=region_id,
|
|
975
|
+
page_size=page_size,
|
|
976
|
+
next_page_token=next_page_token,
|
|
977
|
+
_request_auth=_request_auth,
|
|
978
|
+
_content_type=_content_type,
|
|
979
|
+
_headers=_headers,
|
|
980
|
+
_host_index=_host_index,
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
984
|
+
"200": "ArtifactoryList",
|
|
985
|
+
"400": "BadRequestErrorResponse",
|
|
986
|
+
"401": "UnauthorizedErrorResponse",
|
|
987
|
+
"403": "ForbiddenErrorResponse",
|
|
988
|
+
"500": "InternalServerErrorResponse",
|
|
989
|
+
}
|
|
990
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
991
|
+
response_data.read()
|
|
992
|
+
return self.api_client.response_deserialize(
|
|
993
|
+
response_data=response_data,
|
|
994
|
+
response_types_map=_response_types_map,
|
|
995
|
+
).data
|
|
996
|
+
|
|
997
|
+
@validate_call
|
|
998
|
+
def list_artifactories_with_http_info(
|
|
999
|
+
self,
|
|
1000
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1001
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1002
|
+
page_size: Annotated[
|
|
1003
|
+
Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
|
|
1004
|
+
Field(
|
|
1005
|
+
description="The maximum number of artifactories to return. The service may return fewer than this value."
|
|
1006
|
+
),
|
|
1007
|
+
] = None,
|
|
1008
|
+
next_page_token: Annotated[
|
|
1009
|
+
Optional[StrictStr],
|
|
1010
|
+
Field(
|
|
1011
|
+
description="A page token, received from a previous `ListArtifactories` call. Provide this to retrieve the subsequent page."
|
|
1012
|
+
),
|
|
1013
|
+
] = None,
|
|
1014
|
+
_request_timeout: Union[
|
|
1015
|
+
None,
|
|
1016
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1017
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1018
|
+
] = None,
|
|
1019
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1020
|
+
_content_type: Optional[StrictStr] = None,
|
|
1021
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1022
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1023
|
+
) -> ApiResponse[ArtifactoryList]:
|
|
1024
|
+
"""List artifactories inside a STACKIT project
|
|
1025
|
+
|
|
1026
|
+
Lists all artifactories associated to the specified project.
|
|
1027
|
+
|
|
1028
|
+
:param project_id: Project identifier. (required)
|
|
1029
|
+
:type project_id: UUID
|
|
1030
|
+
:param region_id: STACKIT region identification (required)
|
|
1031
|
+
:type region_id: str
|
|
1032
|
+
:param page_size: The maximum number of artifactories to return. The service may return fewer than this value.
|
|
1033
|
+
:type page_size: int
|
|
1034
|
+
:param next_page_token: A page token, received from a previous `ListArtifactories` call. Provide this to retrieve the subsequent page.
|
|
1035
|
+
:type next_page_token: str
|
|
1036
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1037
|
+
number provided, it will be total request
|
|
1038
|
+
timeout. It can also be a pair (tuple) of
|
|
1039
|
+
(connection, read) timeouts.
|
|
1040
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1041
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1042
|
+
request; this effectively ignores the
|
|
1043
|
+
authentication in the spec for a single request.
|
|
1044
|
+
:type _request_auth: dict, optional
|
|
1045
|
+
:param _content_type: force content-type for the request.
|
|
1046
|
+
:type _content_type: str, Optional
|
|
1047
|
+
:param _headers: set to override the headers for a single
|
|
1048
|
+
request; this effectively ignores the headers
|
|
1049
|
+
in the spec for a single request.
|
|
1050
|
+
:type _headers: dict, optional
|
|
1051
|
+
:param _host_index: set to override the host_index for a single
|
|
1052
|
+
request; this effectively ignores the host_index
|
|
1053
|
+
in the spec for a single request.
|
|
1054
|
+
:type _host_index: int, optional
|
|
1055
|
+
:return: Returns the result object.
|
|
1056
|
+
""" # noqa: E501
|
|
1057
|
+
|
|
1058
|
+
_param = self._list_artifactories_serialize(
|
|
1059
|
+
project_id=project_id,
|
|
1060
|
+
region_id=region_id,
|
|
1061
|
+
page_size=page_size,
|
|
1062
|
+
next_page_token=next_page_token,
|
|
1063
|
+
_request_auth=_request_auth,
|
|
1064
|
+
_content_type=_content_type,
|
|
1065
|
+
_headers=_headers,
|
|
1066
|
+
_host_index=_host_index,
|
|
1067
|
+
)
|
|
1068
|
+
|
|
1069
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1070
|
+
"200": "ArtifactoryList",
|
|
1071
|
+
"400": "BadRequestErrorResponse",
|
|
1072
|
+
"401": "UnauthorizedErrorResponse",
|
|
1073
|
+
"403": "ForbiddenErrorResponse",
|
|
1074
|
+
"500": "InternalServerErrorResponse",
|
|
1075
|
+
}
|
|
1076
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1077
|
+
response_data.read()
|
|
1078
|
+
return self.api_client.response_deserialize(
|
|
1079
|
+
response_data=response_data,
|
|
1080
|
+
response_types_map=_response_types_map,
|
|
1081
|
+
)
|
|
1082
|
+
|
|
1083
|
+
@validate_call
|
|
1084
|
+
def list_artifactories_without_preload_content(
|
|
1085
|
+
self,
|
|
1086
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1087
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1088
|
+
page_size: Annotated[
|
|
1089
|
+
Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
|
|
1090
|
+
Field(
|
|
1091
|
+
description="The maximum number of artifactories to return. The service may return fewer than this value."
|
|
1092
|
+
),
|
|
1093
|
+
] = None,
|
|
1094
|
+
next_page_token: Annotated[
|
|
1095
|
+
Optional[StrictStr],
|
|
1096
|
+
Field(
|
|
1097
|
+
description="A page token, received from a previous `ListArtifactories` call. Provide this to retrieve the subsequent page."
|
|
1098
|
+
),
|
|
1099
|
+
] = None,
|
|
1100
|
+
_request_timeout: Union[
|
|
1101
|
+
None,
|
|
1102
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1103
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1104
|
+
] = None,
|
|
1105
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1106
|
+
_content_type: Optional[StrictStr] = None,
|
|
1107
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1108
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1109
|
+
) -> RESTResponseType:
|
|
1110
|
+
"""List artifactories inside a STACKIT project
|
|
1111
|
+
|
|
1112
|
+
Lists all artifactories associated to the specified project.
|
|
1113
|
+
|
|
1114
|
+
:param project_id: Project identifier. (required)
|
|
1115
|
+
:type project_id: UUID
|
|
1116
|
+
:param region_id: STACKIT region identification (required)
|
|
1117
|
+
:type region_id: str
|
|
1118
|
+
:param page_size: The maximum number of artifactories to return. The service may return fewer than this value.
|
|
1119
|
+
:type page_size: int
|
|
1120
|
+
:param next_page_token: A page token, received from a previous `ListArtifactories` call. Provide this to retrieve the subsequent page.
|
|
1121
|
+
:type next_page_token: str
|
|
1122
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1123
|
+
number provided, it will be total request
|
|
1124
|
+
timeout. It can also be a pair (tuple) of
|
|
1125
|
+
(connection, read) timeouts.
|
|
1126
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1127
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1128
|
+
request; this effectively ignores the
|
|
1129
|
+
authentication in the spec for a single request.
|
|
1130
|
+
:type _request_auth: dict, optional
|
|
1131
|
+
:param _content_type: force content-type for the request.
|
|
1132
|
+
:type _content_type: str, Optional
|
|
1133
|
+
:param _headers: set to override the headers for a single
|
|
1134
|
+
request; this effectively ignores the headers
|
|
1135
|
+
in the spec for a single request.
|
|
1136
|
+
:type _headers: dict, optional
|
|
1137
|
+
:param _host_index: set to override the host_index for a single
|
|
1138
|
+
request; this effectively ignores the host_index
|
|
1139
|
+
in the spec for a single request.
|
|
1140
|
+
:type _host_index: int, optional
|
|
1141
|
+
:return: Returns the result object.
|
|
1142
|
+
""" # noqa: E501
|
|
1143
|
+
|
|
1144
|
+
_param = self._list_artifactories_serialize(
|
|
1145
|
+
project_id=project_id,
|
|
1146
|
+
region_id=region_id,
|
|
1147
|
+
page_size=page_size,
|
|
1148
|
+
next_page_token=next_page_token,
|
|
1149
|
+
_request_auth=_request_auth,
|
|
1150
|
+
_content_type=_content_type,
|
|
1151
|
+
_headers=_headers,
|
|
1152
|
+
_host_index=_host_index,
|
|
1153
|
+
)
|
|
1154
|
+
|
|
1155
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1156
|
+
"200": "ArtifactoryList",
|
|
1157
|
+
"400": "BadRequestErrorResponse",
|
|
1158
|
+
"401": "UnauthorizedErrorResponse",
|
|
1159
|
+
"403": "ForbiddenErrorResponse",
|
|
1160
|
+
"500": "InternalServerErrorResponse",
|
|
1161
|
+
}
|
|
1162
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1163
|
+
return response_data.response
|
|
1164
|
+
|
|
1165
|
+
def _list_artifactories_serialize(
|
|
1166
|
+
self,
|
|
1167
|
+
project_id,
|
|
1168
|
+
region_id,
|
|
1169
|
+
page_size,
|
|
1170
|
+
next_page_token,
|
|
1171
|
+
_request_auth,
|
|
1172
|
+
_content_type,
|
|
1173
|
+
_headers,
|
|
1174
|
+
_host_index,
|
|
1175
|
+
) -> RequestSerialized:
|
|
1176
|
+
|
|
1177
|
+
_host = None
|
|
1178
|
+
|
|
1179
|
+
_collection_formats: Dict[str, str] = {}
|
|
1180
|
+
|
|
1181
|
+
_path_params: Dict[str, str] = {}
|
|
1182
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1183
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1184
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1185
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1186
|
+
_body_params: Optional[bytes] = None
|
|
1187
|
+
|
|
1188
|
+
# process the path parameters
|
|
1189
|
+
if project_id is not None:
|
|
1190
|
+
_path_params["projectId"] = project_id
|
|
1191
|
+
if region_id is not None:
|
|
1192
|
+
_path_params["regionId"] = region_id
|
|
1193
|
+
# process the query parameters
|
|
1194
|
+
if page_size is not None:
|
|
1195
|
+
|
|
1196
|
+
_query_params.append(("page_size", page_size))
|
|
1197
|
+
|
|
1198
|
+
if next_page_token is not None:
|
|
1199
|
+
|
|
1200
|
+
_query_params.append(("next_page_token", next_page_token))
|
|
1201
|
+
|
|
1202
|
+
# process the header parameters
|
|
1203
|
+
# process the form parameters
|
|
1204
|
+
# process the body parameter
|
|
1205
|
+
|
|
1206
|
+
# set the HTTP header `Accept`
|
|
1207
|
+
if "Accept" not in _header_params:
|
|
1208
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1209
|
+
|
|
1210
|
+
# authentication setting
|
|
1211
|
+
_auth_settings: List[str] = []
|
|
1212
|
+
|
|
1213
|
+
return self.api_client.param_serialize(
|
|
1214
|
+
method="GET",
|
|
1215
|
+
resource_path="/v1/projects/{projectId}/regions/{regionId}/artifactories",
|
|
1216
|
+
path_params=_path_params,
|
|
1217
|
+
query_params=_query_params,
|
|
1218
|
+
header_params=_header_params,
|
|
1219
|
+
body=_body_params,
|
|
1220
|
+
post_params=_form_params,
|
|
1221
|
+
files=_files,
|
|
1222
|
+
auth_settings=_auth_settings,
|
|
1223
|
+
collection_formats=_collection_formats,
|
|
1224
|
+
_host=_host,
|
|
1225
|
+
_request_auth=_request_auth,
|
|
1226
|
+
)
|
|
1227
|
+
|
|
1228
|
+
@validate_call
|
|
1229
|
+
def list_replication_adapters(
|
|
1230
|
+
self,
|
|
1231
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1232
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1233
|
+
_request_timeout: Union[
|
|
1234
|
+
None,
|
|
1235
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1236
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1237
|
+
] = None,
|
|
1238
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1239
|
+
_content_type: Optional[StrictStr] = None,
|
|
1240
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1241
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1242
|
+
) -> ReplicationAdapterList:
|
|
1243
|
+
"""list_replication_adapters
|
|
1244
|
+
|
|
1245
|
+
List available adapters for replication to/from other registries
|
|
1246
|
+
|
|
1247
|
+
:param project_id: Project identifier. (required)
|
|
1248
|
+
:type project_id: UUID
|
|
1249
|
+
:param region_id: STACKIT region identification (required)
|
|
1250
|
+
:type region_id: str
|
|
1251
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1252
|
+
number provided, it will be total request
|
|
1253
|
+
timeout. It can also be a pair (tuple) of
|
|
1254
|
+
(connection, read) timeouts.
|
|
1255
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1256
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1257
|
+
request; this effectively ignores the
|
|
1258
|
+
authentication in the spec for a single request.
|
|
1259
|
+
:type _request_auth: dict, optional
|
|
1260
|
+
:param _content_type: force content-type for the request.
|
|
1261
|
+
:type _content_type: str, Optional
|
|
1262
|
+
:param _headers: set to override the headers for a single
|
|
1263
|
+
request; this effectively ignores the headers
|
|
1264
|
+
in the spec for a single request.
|
|
1265
|
+
:type _headers: dict, optional
|
|
1266
|
+
:param _host_index: set to override the host_index for a single
|
|
1267
|
+
request; this effectively ignores the host_index
|
|
1268
|
+
in the spec for a single request.
|
|
1269
|
+
:type _host_index: int, optional
|
|
1270
|
+
:return: Returns the result object.
|
|
1271
|
+
""" # noqa: E501
|
|
1272
|
+
|
|
1273
|
+
_param = self._list_replication_adapters_serialize(
|
|
1274
|
+
project_id=project_id,
|
|
1275
|
+
region_id=region_id,
|
|
1276
|
+
_request_auth=_request_auth,
|
|
1277
|
+
_content_type=_content_type,
|
|
1278
|
+
_headers=_headers,
|
|
1279
|
+
_host_index=_host_index,
|
|
1280
|
+
)
|
|
1281
|
+
|
|
1282
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1283
|
+
"200": "ReplicationAdapterList",
|
|
1284
|
+
"400": "BadRequestErrorResponse",
|
|
1285
|
+
"401": "UnauthorizedErrorResponse",
|
|
1286
|
+
}
|
|
1287
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1288
|
+
response_data.read()
|
|
1289
|
+
return self.api_client.response_deserialize(
|
|
1290
|
+
response_data=response_data,
|
|
1291
|
+
response_types_map=_response_types_map,
|
|
1292
|
+
).data
|
|
1293
|
+
|
|
1294
|
+
@validate_call
|
|
1295
|
+
def list_replication_adapters_with_http_info(
|
|
1296
|
+
self,
|
|
1297
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1298
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1299
|
+
_request_timeout: Union[
|
|
1300
|
+
None,
|
|
1301
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1302
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1303
|
+
] = None,
|
|
1304
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1305
|
+
_content_type: Optional[StrictStr] = None,
|
|
1306
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1307
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1308
|
+
) -> ApiResponse[ReplicationAdapterList]:
|
|
1309
|
+
"""list_replication_adapters
|
|
1310
|
+
|
|
1311
|
+
List available adapters for replication to/from other registries
|
|
1312
|
+
|
|
1313
|
+
:param project_id: Project identifier. (required)
|
|
1314
|
+
:type project_id: UUID
|
|
1315
|
+
:param region_id: STACKIT region identification (required)
|
|
1316
|
+
:type region_id: str
|
|
1317
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1318
|
+
number provided, it will be total request
|
|
1319
|
+
timeout. It can also be a pair (tuple) of
|
|
1320
|
+
(connection, read) timeouts.
|
|
1321
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1322
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1323
|
+
request; this effectively ignores the
|
|
1324
|
+
authentication in the spec for a single request.
|
|
1325
|
+
:type _request_auth: dict, optional
|
|
1326
|
+
:param _content_type: force content-type for the request.
|
|
1327
|
+
:type _content_type: str, Optional
|
|
1328
|
+
:param _headers: set to override the headers for a single
|
|
1329
|
+
request; this effectively ignores the headers
|
|
1330
|
+
in the spec for a single request.
|
|
1331
|
+
:type _headers: dict, optional
|
|
1332
|
+
:param _host_index: set to override the host_index for a single
|
|
1333
|
+
request; this effectively ignores the host_index
|
|
1334
|
+
in the spec for a single request.
|
|
1335
|
+
:type _host_index: int, optional
|
|
1336
|
+
:return: Returns the result object.
|
|
1337
|
+
""" # noqa: E501
|
|
1338
|
+
|
|
1339
|
+
_param = self._list_replication_adapters_serialize(
|
|
1340
|
+
project_id=project_id,
|
|
1341
|
+
region_id=region_id,
|
|
1342
|
+
_request_auth=_request_auth,
|
|
1343
|
+
_content_type=_content_type,
|
|
1344
|
+
_headers=_headers,
|
|
1345
|
+
_host_index=_host_index,
|
|
1346
|
+
)
|
|
1347
|
+
|
|
1348
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1349
|
+
"200": "ReplicationAdapterList",
|
|
1350
|
+
"400": "BadRequestErrorResponse",
|
|
1351
|
+
"401": "UnauthorizedErrorResponse",
|
|
1352
|
+
}
|
|
1353
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1354
|
+
response_data.read()
|
|
1355
|
+
return self.api_client.response_deserialize(
|
|
1356
|
+
response_data=response_data,
|
|
1357
|
+
response_types_map=_response_types_map,
|
|
1358
|
+
)
|
|
1359
|
+
|
|
1360
|
+
@validate_call
|
|
1361
|
+
def list_replication_adapters_without_preload_content(
|
|
1362
|
+
self,
|
|
1363
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1364
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1365
|
+
_request_timeout: Union[
|
|
1366
|
+
None,
|
|
1367
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1368
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1369
|
+
] = None,
|
|
1370
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1371
|
+
_content_type: Optional[StrictStr] = None,
|
|
1372
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1373
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1374
|
+
) -> RESTResponseType:
|
|
1375
|
+
"""list_replication_adapters
|
|
1376
|
+
|
|
1377
|
+
List available adapters for replication to/from other registries
|
|
1378
|
+
|
|
1379
|
+
:param project_id: Project identifier. (required)
|
|
1380
|
+
:type project_id: UUID
|
|
1381
|
+
:param region_id: STACKIT region identification (required)
|
|
1382
|
+
:type region_id: str
|
|
1383
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1384
|
+
number provided, it will be total request
|
|
1385
|
+
timeout. It can also be a pair (tuple) of
|
|
1386
|
+
(connection, read) timeouts.
|
|
1387
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1388
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1389
|
+
request; this effectively ignores the
|
|
1390
|
+
authentication in the spec for a single request.
|
|
1391
|
+
:type _request_auth: dict, optional
|
|
1392
|
+
:param _content_type: force content-type for the request.
|
|
1393
|
+
:type _content_type: str, Optional
|
|
1394
|
+
:param _headers: set to override the headers for a single
|
|
1395
|
+
request; this effectively ignores the headers
|
|
1396
|
+
in the spec for a single request.
|
|
1397
|
+
:type _headers: dict, optional
|
|
1398
|
+
:param _host_index: set to override the host_index for a single
|
|
1399
|
+
request; this effectively ignores the host_index
|
|
1400
|
+
in the spec for a single request.
|
|
1401
|
+
:type _host_index: int, optional
|
|
1402
|
+
:return: Returns the result object.
|
|
1403
|
+
""" # noqa: E501
|
|
1404
|
+
|
|
1405
|
+
_param = self._list_replication_adapters_serialize(
|
|
1406
|
+
project_id=project_id,
|
|
1407
|
+
region_id=region_id,
|
|
1408
|
+
_request_auth=_request_auth,
|
|
1409
|
+
_content_type=_content_type,
|
|
1410
|
+
_headers=_headers,
|
|
1411
|
+
_host_index=_host_index,
|
|
1412
|
+
)
|
|
1413
|
+
|
|
1414
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1415
|
+
"200": "ReplicationAdapterList",
|
|
1416
|
+
"400": "BadRequestErrorResponse",
|
|
1417
|
+
"401": "UnauthorizedErrorResponse",
|
|
1418
|
+
}
|
|
1419
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1420
|
+
return response_data.response
|
|
1421
|
+
|
|
1422
|
+
def _list_replication_adapters_serialize(
|
|
1423
|
+
self,
|
|
1424
|
+
project_id,
|
|
1425
|
+
region_id,
|
|
1426
|
+
_request_auth,
|
|
1427
|
+
_content_type,
|
|
1428
|
+
_headers,
|
|
1429
|
+
_host_index,
|
|
1430
|
+
) -> RequestSerialized:
|
|
1431
|
+
|
|
1432
|
+
_host = None
|
|
1433
|
+
|
|
1434
|
+
_collection_formats: Dict[str, str] = {}
|
|
1435
|
+
|
|
1436
|
+
_path_params: Dict[str, str] = {}
|
|
1437
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1438
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1439
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1440
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1441
|
+
_body_params: Optional[bytes] = None
|
|
1442
|
+
|
|
1443
|
+
# process the path parameters
|
|
1444
|
+
if project_id is not None:
|
|
1445
|
+
_path_params["projectId"] = project_id
|
|
1446
|
+
if region_id is not None:
|
|
1447
|
+
_path_params["regionId"] = region_id
|
|
1448
|
+
# process the query parameters
|
|
1449
|
+
# process the header parameters
|
|
1450
|
+
# process the form parameters
|
|
1451
|
+
# process the body parameter
|
|
1452
|
+
|
|
1453
|
+
# set the HTTP header `Accept`
|
|
1454
|
+
if "Accept" not in _header_params:
|
|
1455
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1456
|
+
|
|
1457
|
+
# authentication setting
|
|
1458
|
+
_auth_settings: List[str] = []
|
|
1459
|
+
|
|
1460
|
+
return self.api_client.param_serialize(
|
|
1461
|
+
method="GET",
|
|
1462
|
+
resource_path="/v1/projects/{projectId}/regions/{regionId}/replication/adapters",
|
|
1463
|
+
path_params=_path_params,
|
|
1464
|
+
query_params=_query_params,
|
|
1465
|
+
header_params=_header_params,
|
|
1466
|
+
body=_body_params,
|
|
1467
|
+
post_params=_form_params,
|
|
1468
|
+
files=_files,
|
|
1469
|
+
auth_settings=_auth_settings,
|
|
1470
|
+
collection_formats=_collection_formats,
|
|
1471
|
+
_host=_host,
|
|
1472
|
+
_request_auth=_request_auth,
|
|
1473
|
+
)
|
|
1474
|
+
|
|
1475
|
+
@validate_call
|
|
1476
|
+
def patch_artifactory(
|
|
1477
|
+
self,
|
|
1478
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1479
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1480
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
1481
|
+
patch_artifactory_payload: Annotated[PatchArtifactoryPayload, Field(description="Patch artifactory request")],
|
|
1482
|
+
_request_timeout: Union[
|
|
1483
|
+
None,
|
|
1484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1485
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1486
|
+
] = None,
|
|
1487
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1488
|
+
_content_type: Optional[StrictStr] = None,
|
|
1489
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1490
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1491
|
+
) -> Artifactory:
|
|
1492
|
+
"""patch_artifactory
|
|
1493
|
+
|
|
1494
|
+
Update Artifactory
|
|
1495
|
+
|
|
1496
|
+
:param project_id: Project identifier. (required)
|
|
1497
|
+
:type project_id: UUID
|
|
1498
|
+
:param region_id: STACKIT region identification (required)
|
|
1499
|
+
:type region_id: str
|
|
1500
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
1501
|
+
:type artifactory_id: UUID
|
|
1502
|
+
:param patch_artifactory_payload: Patch artifactory request (required)
|
|
1503
|
+
:type patch_artifactory_payload: PatchArtifactoryPayload
|
|
1504
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1505
|
+
number provided, it will be total request
|
|
1506
|
+
timeout. It can also be a pair (tuple) of
|
|
1507
|
+
(connection, read) timeouts.
|
|
1508
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1509
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1510
|
+
request; this effectively ignores the
|
|
1511
|
+
authentication in the spec for a single request.
|
|
1512
|
+
:type _request_auth: dict, optional
|
|
1513
|
+
:param _content_type: force content-type for the request.
|
|
1514
|
+
:type _content_type: str, Optional
|
|
1515
|
+
:param _headers: set to override the headers for a single
|
|
1516
|
+
request; this effectively ignores the headers
|
|
1517
|
+
in the spec for a single request.
|
|
1518
|
+
:type _headers: dict, optional
|
|
1519
|
+
:param _host_index: set to override the host_index for a single
|
|
1520
|
+
request; this effectively ignores the host_index
|
|
1521
|
+
in the spec for a single request.
|
|
1522
|
+
:type _host_index: int, optional
|
|
1523
|
+
:return: Returns the result object.
|
|
1524
|
+
""" # noqa: E501
|
|
1525
|
+
|
|
1526
|
+
_param = self._patch_artifactory_serialize(
|
|
1527
|
+
project_id=project_id,
|
|
1528
|
+
region_id=region_id,
|
|
1529
|
+
artifactory_id=artifactory_id,
|
|
1530
|
+
patch_artifactory_payload=patch_artifactory_payload,
|
|
1531
|
+
_request_auth=_request_auth,
|
|
1532
|
+
_content_type=_content_type,
|
|
1533
|
+
_headers=_headers,
|
|
1534
|
+
_host_index=_host_index,
|
|
1535
|
+
)
|
|
1536
|
+
|
|
1537
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1538
|
+
"200": "Artifactory",
|
|
1539
|
+
"400": "GenericErrorResponse",
|
|
1540
|
+
"401": "UnauthorizedErrorResponse",
|
|
1541
|
+
"403": "ForbiddenErrorResponse",
|
|
1542
|
+
"404": "GenericErrorResponse",
|
|
1543
|
+
"500": "GenericErrorResponse",
|
|
1544
|
+
}
|
|
1545
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1546
|
+
response_data.read()
|
|
1547
|
+
return self.api_client.response_deserialize(
|
|
1548
|
+
response_data=response_data,
|
|
1549
|
+
response_types_map=_response_types_map,
|
|
1550
|
+
).data
|
|
1551
|
+
|
|
1552
|
+
@validate_call
|
|
1553
|
+
def patch_artifactory_with_http_info(
|
|
1554
|
+
self,
|
|
1555
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1556
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1557
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
1558
|
+
patch_artifactory_payload: Annotated[PatchArtifactoryPayload, Field(description="Patch artifactory request")],
|
|
1559
|
+
_request_timeout: Union[
|
|
1560
|
+
None,
|
|
1561
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1562
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1563
|
+
] = None,
|
|
1564
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1565
|
+
_content_type: Optional[StrictStr] = None,
|
|
1566
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1567
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1568
|
+
) -> ApiResponse[Artifactory]:
|
|
1569
|
+
"""patch_artifactory
|
|
1570
|
+
|
|
1571
|
+
Update Artifactory
|
|
1572
|
+
|
|
1573
|
+
:param project_id: Project identifier. (required)
|
|
1574
|
+
:type project_id: UUID
|
|
1575
|
+
:param region_id: STACKIT region identification (required)
|
|
1576
|
+
:type region_id: str
|
|
1577
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
1578
|
+
:type artifactory_id: UUID
|
|
1579
|
+
:param patch_artifactory_payload: Patch artifactory request (required)
|
|
1580
|
+
:type patch_artifactory_payload: PatchArtifactoryPayload
|
|
1581
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1582
|
+
number provided, it will be total request
|
|
1583
|
+
timeout. It can also be a pair (tuple) of
|
|
1584
|
+
(connection, read) timeouts.
|
|
1585
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1586
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1587
|
+
request; this effectively ignores the
|
|
1588
|
+
authentication in the spec for a single request.
|
|
1589
|
+
:type _request_auth: dict, optional
|
|
1590
|
+
:param _content_type: force content-type for the request.
|
|
1591
|
+
:type _content_type: str, Optional
|
|
1592
|
+
:param _headers: set to override the headers for a single
|
|
1593
|
+
request; this effectively ignores the headers
|
|
1594
|
+
in the spec for a single request.
|
|
1595
|
+
:type _headers: dict, optional
|
|
1596
|
+
:param _host_index: set to override the host_index for a single
|
|
1597
|
+
request; this effectively ignores the host_index
|
|
1598
|
+
in the spec for a single request.
|
|
1599
|
+
:type _host_index: int, optional
|
|
1600
|
+
:return: Returns the result object.
|
|
1601
|
+
""" # noqa: E501
|
|
1602
|
+
|
|
1603
|
+
_param = self._patch_artifactory_serialize(
|
|
1604
|
+
project_id=project_id,
|
|
1605
|
+
region_id=region_id,
|
|
1606
|
+
artifactory_id=artifactory_id,
|
|
1607
|
+
patch_artifactory_payload=patch_artifactory_payload,
|
|
1608
|
+
_request_auth=_request_auth,
|
|
1609
|
+
_content_type=_content_type,
|
|
1610
|
+
_headers=_headers,
|
|
1611
|
+
_host_index=_host_index,
|
|
1612
|
+
)
|
|
1613
|
+
|
|
1614
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1615
|
+
"200": "Artifactory",
|
|
1616
|
+
"400": "GenericErrorResponse",
|
|
1617
|
+
"401": "UnauthorizedErrorResponse",
|
|
1618
|
+
"403": "ForbiddenErrorResponse",
|
|
1619
|
+
"404": "GenericErrorResponse",
|
|
1620
|
+
"500": "GenericErrorResponse",
|
|
1621
|
+
}
|
|
1622
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1623
|
+
response_data.read()
|
|
1624
|
+
return self.api_client.response_deserialize(
|
|
1625
|
+
response_data=response_data,
|
|
1626
|
+
response_types_map=_response_types_map,
|
|
1627
|
+
)
|
|
1628
|
+
|
|
1629
|
+
@validate_call
|
|
1630
|
+
def patch_artifactory_without_preload_content(
|
|
1631
|
+
self,
|
|
1632
|
+
project_id: Annotated[UUID, Field(description="Project identifier.")],
|
|
1633
|
+
region_id: Annotated[StrictStr, Field(description="STACKIT region identification")],
|
|
1634
|
+
artifactory_id: Annotated[UUID, Field(description="Artifactory identifier.")],
|
|
1635
|
+
patch_artifactory_payload: Annotated[PatchArtifactoryPayload, Field(description="Patch artifactory request")],
|
|
1636
|
+
_request_timeout: Union[
|
|
1637
|
+
None,
|
|
1638
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1639
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1640
|
+
] = None,
|
|
1641
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1642
|
+
_content_type: Optional[StrictStr] = None,
|
|
1643
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1644
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1645
|
+
) -> RESTResponseType:
|
|
1646
|
+
"""patch_artifactory
|
|
1647
|
+
|
|
1648
|
+
Update Artifactory
|
|
1649
|
+
|
|
1650
|
+
:param project_id: Project identifier. (required)
|
|
1651
|
+
:type project_id: UUID
|
|
1652
|
+
:param region_id: STACKIT region identification (required)
|
|
1653
|
+
:type region_id: str
|
|
1654
|
+
:param artifactory_id: Artifactory identifier. (required)
|
|
1655
|
+
:type artifactory_id: UUID
|
|
1656
|
+
:param patch_artifactory_payload: Patch artifactory request (required)
|
|
1657
|
+
:type patch_artifactory_payload: PatchArtifactoryPayload
|
|
1658
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1659
|
+
number provided, it will be total request
|
|
1660
|
+
timeout. It can also be a pair (tuple) of
|
|
1661
|
+
(connection, read) timeouts.
|
|
1662
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1663
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1664
|
+
request; this effectively ignores the
|
|
1665
|
+
authentication in the spec for a single request.
|
|
1666
|
+
:type _request_auth: dict, optional
|
|
1667
|
+
:param _content_type: force content-type for the request.
|
|
1668
|
+
:type _content_type: str, Optional
|
|
1669
|
+
:param _headers: set to override the headers for a single
|
|
1670
|
+
request; this effectively ignores the headers
|
|
1671
|
+
in the spec for a single request.
|
|
1672
|
+
:type _headers: dict, optional
|
|
1673
|
+
:param _host_index: set to override the host_index for a single
|
|
1674
|
+
request; this effectively ignores the host_index
|
|
1675
|
+
in the spec for a single request.
|
|
1676
|
+
:type _host_index: int, optional
|
|
1677
|
+
:return: Returns the result object.
|
|
1678
|
+
""" # noqa: E501
|
|
1679
|
+
|
|
1680
|
+
_param = self._patch_artifactory_serialize(
|
|
1681
|
+
project_id=project_id,
|
|
1682
|
+
region_id=region_id,
|
|
1683
|
+
artifactory_id=artifactory_id,
|
|
1684
|
+
patch_artifactory_payload=patch_artifactory_payload,
|
|
1685
|
+
_request_auth=_request_auth,
|
|
1686
|
+
_content_type=_content_type,
|
|
1687
|
+
_headers=_headers,
|
|
1688
|
+
_host_index=_host_index,
|
|
1689
|
+
)
|
|
1690
|
+
|
|
1691
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1692
|
+
"200": "Artifactory",
|
|
1693
|
+
"400": "GenericErrorResponse",
|
|
1694
|
+
"401": "UnauthorizedErrorResponse",
|
|
1695
|
+
"403": "ForbiddenErrorResponse",
|
|
1696
|
+
"404": "GenericErrorResponse",
|
|
1697
|
+
"500": "GenericErrorResponse",
|
|
1698
|
+
}
|
|
1699
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1700
|
+
return response_data.response
|
|
1701
|
+
|
|
1702
|
+
def _patch_artifactory_serialize(
|
|
1703
|
+
self,
|
|
1704
|
+
project_id,
|
|
1705
|
+
region_id,
|
|
1706
|
+
artifactory_id,
|
|
1707
|
+
patch_artifactory_payload,
|
|
1708
|
+
_request_auth,
|
|
1709
|
+
_content_type,
|
|
1710
|
+
_headers,
|
|
1711
|
+
_host_index,
|
|
1712
|
+
) -> RequestSerialized:
|
|
1713
|
+
|
|
1714
|
+
_host = None
|
|
1715
|
+
|
|
1716
|
+
_collection_formats: Dict[str, str] = {}
|
|
1717
|
+
|
|
1718
|
+
_path_params: Dict[str, str] = {}
|
|
1719
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1720
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1721
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1722
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1723
|
+
_body_params: Optional[bytes] = None
|
|
1724
|
+
|
|
1725
|
+
# process the path parameters
|
|
1726
|
+
if project_id is not None:
|
|
1727
|
+
_path_params["projectId"] = project_id
|
|
1728
|
+
if region_id is not None:
|
|
1729
|
+
_path_params["regionId"] = region_id
|
|
1730
|
+
if artifactory_id is not None:
|
|
1731
|
+
_path_params["artifactoryId"] = artifactory_id
|
|
1732
|
+
# process the query parameters
|
|
1733
|
+
# process the header parameters
|
|
1734
|
+
# process the form parameters
|
|
1735
|
+
# process the body parameter
|
|
1736
|
+
if patch_artifactory_payload is not None:
|
|
1737
|
+
_body_params = patch_artifactory_payload
|
|
1738
|
+
|
|
1739
|
+
# set the HTTP header `Accept`
|
|
1740
|
+
if "Accept" not in _header_params:
|
|
1741
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1742
|
+
|
|
1743
|
+
# set the HTTP header `Content-Type`
|
|
1744
|
+
if _content_type:
|
|
1745
|
+
_header_params["Content-Type"] = _content_type
|
|
1746
|
+
else:
|
|
1747
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
1748
|
+
if _default_content_type is not None:
|
|
1749
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1750
|
+
|
|
1751
|
+
# authentication setting
|
|
1752
|
+
_auth_settings: List[str] = []
|
|
1753
|
+
|
|
1754
|
+
return self.api_client.param_serialize(
|
|
1755
|
+
method="PATCH",
|
|
1756
|
+
resource_path="/v1/projects/{projectId}/regions/{regionId}/artifactories/{artifactoryId}",
|
|
1757
|
+
path_params=_path_params,
|
|
1758
|
+
query_params=_query_params,
|
|
1759
|
+
header_params=_header_params,
|
|
1760
|
+
body=_body_params,
|
|
1761
|
+
post_params=_form_params,
|
|
1762
|
+
files=_files,
|
|
1763
|
+
auth_settings=_auth_settings,
|
|
1764
|
+
collection_formats=_collection_formats,
|
|
1765
|
+
_host=_host,
|
|
1766
|
+
_request_auth=_request_auth,
|
|
1767
|
+
)
|