83
83
from stackit.iaas.models.project_list_response import ProjectListResponse
84
84
from stackit.iaas.models.public_ip import PublicIp
85
85
from stackit.iaas.models.public_ip_list_response import PublicIpListResponse
86
+ from stackit.iaas.models.public_network_list_response import PublicNetworkListResponse
86
87
from stackit.iaas.models.quota_list_response import QuotaListResponse
87
88
from stackit.iaas.models.request import Request
88
89
from stackit.iaas.models.rescue_server_payload import RescueServerPayload
@@ -19540,6 +19541,7 @@ def list_images(
19540
19541
str,
19541
19542
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
19542
19543
],
19544
+ all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
19543
19545
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
19544
19546
_request_timeout: Union[
19545
19547
None,
@@ -19557,6 +19559,8 @@ def list_images(
19557
19559
19558
19560
:param project_id: The identifier (ID) of a STACKIT Project. (required)
19559
19561
:type project_id: str
19562
+ :param all: List all Images.
19563
+ :type all: bool
19560
19564
:param label_selector: Filter resources by labels.
19561
19565
:type label_selector: str
19562
19566
:param _request_timeout: timeout setting for this request. If one
@@ -19583,6 +19587,7 @@ def list_images(
19583
19587
19584
19588
_param = self._list_images_serialize(
19585
19589
project_id=project_id,
19590
+ all=all,
19586
19591
label_selector=label_selector,
19587
19592
_request_auth=_request_auth,
19588
19593
_content_type=_content_type,
@@ -19612,6 +19617,7 @@ def list_images_with_http_info(
19612
19617
str,
19613
19618
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
19614
19619
],
19620
+ all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
19615
19621
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
19616
19622
_request_timeout: Union[
19617
19623
None,
@@ -19629,6 +19635,8 @@ def list_images_with_http_info(
19629
19635
19630
19636
:param project_id: The identifier (ID) of a STACKIT Project. (required)
19631
19637
:type project_id: str
19638
+ :param all: List all Images.
19639
+ :type all: bool
19632
19640
:param label_selector: Filter resources by labels.
19633
19641
:type label_selector: str
19634
19642
:param _request_timeout: timeout setting for this request. If one
@@ -19655,6 +19663,7 @@ def list_images_with_http_info(
19655
19663
19656
19664
_param = self._list_images_serialize(
19657
19665
project_id=project_id,
19666
+ all=all,
19658
19667
label_selector=label_selector,
19659
19668
_request_auth=_request_auth,
19660
19669
_content_type=_content_type,
@@ -19684,6 +19693,7 @@ def list_images_without_preload_content(
19684
19693
str,
19685
19694
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
19686
19695
],
19696
+ all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
19687
19697
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
19688
19698
_request_timeout: Union[
19689
19699
None,
@@ -19701,6 +19711,8 @@ def list_images_without_preload_content(
19701
19711
19702
19712
:param project_id: The identifier (ID) of a STACKIT Project. (required)
19703
19713
:type project_id: str
19714
+ :param all: List all Images.
19715
+ :type all: bool
19704
19716
:param label_selector: Filter resources by labels.
19705
19717
:type label_selector: str
19706
19718
:param _request_timeout: timeout setting for this request. If one
@@ -19727,6 +19739,7 @@ def list_images_without_preload_content(
19727
19739
19728
19740
_param = self._list_images_serialize(
19729
19741
project_id=project_id,
19742
+ all=all,
19730
19743
label_selector=label_selector,
19731
19744
_request_auth=_request_auth,
19732
19745
_content_type=_content_type,
@@ -19748,6 +19761,7 @@ def list_images_without_preload_content(
19748
19761
def _list_images_serialize(
19749
19762
self,
19750
19763
project_id,
19764
+ all,
19751
19765
label_selector,
19752
19766
_request_auth,
19753
19767
_content_type,
@@ -19770,6 +19784,10 @@ def _list_images_serialize(
19770
19784
if project_id is not None:
19771
19785
_path_params["projectId"] = project_id
19772
19786
# process the query parameters
19787
+ if all is not None:
19788
+
19789
+ _query_params.append(("all", all))
19790
+
19773
19791
if label_selector is not None:
19774
19792
19775
19793
_query_params.append(("label_selector", label_selector))
@@ -22266,6 +22284,223 @@ def _list_project_nics_serialize(
22266
22284
_request_auth=_request_auth,
22267
22285
)
22268
22286
22287
+ @validate_call
22288
+ def list_public_ip_ranges(
22289
+ self,
22290
+ _request_timeout: Union[
22291
+ None,
22292
+ Annotated[StrictFloat, Field(gt=0)],
22293
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
22294
+ ] = None,
22295
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
22296
+ _content_type: Optional[StrictStr] = None,
22297
+ _headers: Optional[Dict[StrictStr, Any]] = None,
22298
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
22299
+ ) -> PublicNetworkListResponse:
22300
+ """List all public IP ranges.
22301
+
22302
+ Get a list of all public IP ranges that STACKIT uses.
22303
+
22304
+ :param _request_timeout: timeout setting for this request. If one
22305
+ number provided, it will be total request
22306
+ timeout. It can also be a pair (tuple) of
22307
+ (connection, read) timeouts.
22308
+ :type _request_timeout: int, tuple(int, int), optional
22309
+ :param _request_auth: set to override the auth_settings for an a single
22310
+ request; this effectively ignores the
22311
+ authentication in the spec for a single request.
22312
+ :type _request_auth: dict, optional
22313
+ :param _content_type: force content-type for the request.
22314
+ :type _content_type: str, Optional
22315
+ :param _headers: set to override the headers for a single
22316
+ request; this effectively ignores the headers
22317
+ in the spec for a single request.
22318
+ :type _headers: dict, optional
22319
+ :param _host_index: set to override the host_index for a single
22320
+ request; this effectively ignores the host_index
22321
+ in the spec for a single request.
22322
+ :type _host_index: int, optional
22323
+ :return: Returns the result object.
22324
+ """ # noqa: E501 docstring might be too long
22325
+
22326
+ _param = self._list_public_ip_ranges_serialize(
22327
+ _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
22328
+ )
22329
+
22330
+ _response_types_map: Dict[str, Optional[str]] = {
22331
+ "200": "PublicNetworkListResponse",
22332
+ "400": "Error",
22333
+ "401": "Error",
22334
+ "403": "Error",
22335
+ "404": "Error",
22336
+ "500": "Error",
22337
+ }
22338
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
22339
+ response_data.read()
22340
+ return self.api_client.response_deserialize(
22341
+ response_data=response_data,
22342
+ response_types_map=_response_types_map,
22343
+ ).data
22344
+
22345
+ @validate_call
22346
+ def list_public_ip_ranges_with_http_info(
22347
+ self,
22348
+ _request_timeout: Union[
22349
+ None,
22350
+ Annotated[StrictFloat, Field(gt=0)],
22351
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
22352
+ ] = None,
22353
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
22354
+ _content_type: Optional[StrictStr] = None,
22355
+ _headers: Optional[Dict[StrictStr, Any]] = None,
22356
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
22357
+ ) -> ApiResponse[PublicNetworkListResponse]:
22358
+ """List all public IP ranges.
22359
+
22360
+ Get a list of all public IP ranges that STACKIT uses.
22361
+
22362
+ :param _request_timeout: timeout setting for this request. If one
22363
+ number provided, it will be total request
22364
+ timeout. It can also be a pair (tuple) of
22365
+ (connection, read) timeouts.
22366
+ :type _request_timeout: int, tuple(int, int), optional
22367
+ :param _request_auth: set to override the auth_settings for an a single
22368
+ request; this effectively ignores the
22369
+ authentication in the spec for a single request.
22370
+ :type _request_auth: dict, optional
22371
+ :param _content_type: force content-type for the request.
22372
+ :type _content_type: str, Optional
22373
+ :param _headers: set to override the headers for a single
22374
+ request; this effectively ignores the headers
22375
+ in the spec for a single request.
22376
+ :type _headers: dict, optional
22377
+ :param _host_index: set to override the host_index for a single
22378
+ request; this effectively ignores the host_index
22379
+ in the spec for a single request.
22380
+ :type _host_index: int, optional
22381
+ :return: Returns the result object.
22382
+ """ # noqa: E501 docstring might be too long
22383
+
22384
+ _param = self._list_public_ip_ranges_serialize(
22385
+ _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
22386
+ )
22387
+
22388
+ _response_types_map: Dict[str, Optional[str]] = {
22389
+ "200": "PublicNetworkListResponse",
22390
+ "400": "Error",
22391
+ "401": "Error",
22392
+ "403": "Error",
22393
+ "404": "Error",
22394
+ "500": "Error",
22395
+ }
22396
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
22397
+ response_data.read()
22398
+ return self.api_client.response_deserialize(
22399
+ response_data=response_data,
22400
+ response_types_map=_response_types_map,
22401
+ )
22402
+
22403
+ @validate_call
22404
+ def list_public_ip_ranges_without_preload_content(
22405
+ self,
22406
+ _request_timeout: Union[
22407
+ None,
22408
+ Annotated[StrictFloat, Field(gt=0)],
22409
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
22410
+ ] = None,
22411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
22412
+ _content_type: Optional[StrictStr] = None,
22413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
22414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
22415
+ ) -> RESTResponseType:
22416
+ """List all public IP ranges.
22417
+
22418
+ Get a list of all public IP ranges that STACKIT uses.
22419
+
22420
+ :param _request_timeout: timeout setting for this request. If one
22421
+ number provided, it will be total request
22422
+ timeout. It can also be a pair (tuple) of
22423
+ (connection, read) timeouts.
22424
+ :type _request_timeout: int, tuple(int, int), optional
22425
+ :param _request_auth: set to override the auth_settings for an a single
22426
+ request; this effectively ignores the
22427
+ authentication in the spec for a single request.
22428
+ :type _request_auth: dict, optional
22429
+ :param _content_type: force content-type for the request.
22430
+ :type _content_type: str, Optional
22431
+ :param _headers: set to override the headers for a single
22432
+ request; this effectively ignores the headers
22433
+ in the spec for a single request.
22434
+ :type _headers: dict, optional
22435
+ :param _host_index: set to override the host_index for a single
22436
+ request; this effectively ignores the host_index
22437
+ in the spec for a single request.
22438
+ :type _host_index: int, optional
22439
+ :return: Returns the result object.
22440
+ """ # noqa: E501 docstring might be too long
22441
+
22442
+ _param = self._list_public_ip_ranges_serialize(
22443
+ _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
22444
+ )
22445
+
22446
+ _response_types_map: Dict[str, Optional[str]] = {
22447
+ "200": "PublicNetworkListResponse",
22448
+ "400": "Error",
22449
+ "401": "Error",
22450
+ "403": "Error",
22451
+ "404": "Error",
22452
+ "500": "Error",
22453
+ }
22454
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
22455
+ return response_data.response
22456
+
22457
+ def _list_public_ip_ranges_serialize(
22458
+ self,
22459
+ _request_auth,
22460
+ _content_type,
22461
+ _headers,
22462
+ _host_index,
22463
+ ) -> RequestSerialized:
22464
+
22465
+ _host = None
22466
+
22467
+ _collection_formats: Dict[str, str] = {}
22468
+
22469
+ _path_params: Dict[str, str] = {}
22470
+ _query_params: List[Tuple[str, str]] = []
22471
+ _header_params: Dict[str, Optional[str]] = _headers or {}
22472
+ _form_params: List[Tuple[str, str]] = []
22473
+ _files: Dict[str, Union[str, bytes]] = {}
22474
+ _body_params: Optional[bytes] = None
22475
+
22476
+ # process the path parameters
22477
+ # process the query parameters
22478
+ # process the header parameters
22479
+ # process the form parameters
22480
+ # process the body parameter
22481
+
22482
+ # set the HTTP header `Accept`
22483
+ if "Accept" not in _header_params:
22484
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
22485
+
22486
+ # authentication setting
22487
+ _auth_settings: List[str] = []
22488
+
22489
+ return self.api_client.param_serialize(
22490
+ method="GET",
22491
+ resource_path="/v1beta1/networks/public-ip-ranges",
22492
+ path_params=_path_params,
22493
+ query_params=_query_params,
22494
+ header_params=_header_params,
22495
+ body=_body_params,
22496
+ post_params=_form_params,
22497
+ files=_files,
22498
+ auth_settings=_auth_settings,
22499
+ collection_formats=_collection_formats,
22500
+ _host=_host,
22501
+ _request_auth=_request_auth,
22502
+ )
22503
+
22269
22504
@validate_call
22270
22505
def list_public_ips(
22271
22506
self,
0 commit comments