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