hyperstack 1.41.2a0__py3-none-any.whl → 1.42.1a0__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.
@@ -46,9 +46,10 @@ class FirewallsApi:
46
46
 
47
47
 
48
48
  @validate_call
49
- def delete_security_group_details(
49
+ def add_firewall_rule_to_an_existing_firewall(
50
50
  self,
51
- id: StrictInt,
51
+ firewall_id: StrictInt,
52
+ payload: CreateFirewallRulePayload,
52
53
  _request_timeout: Union[
53
54
  None,
54
55
  Annotated[StrictFloat, Field(gt=0)],
@@ -61,13 +62,15 @@ class FirewallsApi:
61
62
  _content_type: Optional[StrictStr] = None,
62
63
  _headers: Optional[Dict[StrictStr, Any]] = None,
63
64
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
- ) -> ResponseModel:
65
- """Delete firewall
65
+ ) -> FirewallRule:
66
+ """Add firewall rule to firewall
66
67
 
67
- Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/delete-firewall).
68
+ Creates a [**firewall rule**](https://docs...cloud/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
68
69
 
69
- :param id: (required)
70
- :type id: int
70
+ :param firewall_id: (required)
71
+ :type firewall_id: int
72
+ :param payload: (required)
73
+ :type payload: CreateFirewallRulePayload
71
74
  :param _request_timeout: timeout setting for this request. If one
72
75
  number provided, it will be total request
73
76
  timeout. It can also be a pair (tuple) of
@@ -90,8 +93,9 @@ class FirewallsApi:
90
93
  :return: Returns the result object.
91
94
  """ # noqa: E501
92
95
 
93
- _param = self._delete_security_group_details_serialize(
94
- id=id,
96
+ _param = self._add_firewall_rule_to_an_existing_firewall_serialize(
97
+ firewall_id=firewall_id,
98
+ payload=payload,
95
99
  _request_auth=_request_auth,
96
100
  _content_type=_content_type,
97
101
  _headers=_headers,
@@ -99,12 +103,10 @@ class FirewallsApi:
99
103
  )
100
104
 
101
105
  _response_types_map: Dict[str, Optional[str]] = {
102
- '200': "ResponseModel",
106
+ '200': "FirewallRule",
103
107
  '400': "ErrorResponseModel",
104
108
  '401': "ErrorResponseModel",
105
109
  '403': "ErrorResponseModel",
106
- '404': "ErrorResponseModel",
107
- '409': "ErrorResponseModel",
108
110
  '500': None,
109
111
  }
110
112
  response_data = self.api_client.call_api(
@@ -119,9 +121,10 @@ class FirewallsApi:
119
121
 
120
122
 
121
123
  @validate_call
122
- def delete_security_group_details_with_http_info(
124
+ def add_firewall_rule_to_an_existing_firewall_with_http_info(
123
125
  self,
124
- id: StrictInt,
126
+ firewall_id: StrictInt,
127
+ payload: CreateFirewallRulePayload,
125
128
  _request_timeout: Union[
126
129
  None,
127
130
  Annotated[StrictFloat, Field(gt=0)],
@@ -134,13 +137,15 @@ class FirewallsApi:
134
137
  _content_type: Optional[StrictStr] = None,
135
138
  _headers: Optional[Dict[StrictStr, Any]] = None,
136
139
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
- ) -> ApiResponse[ResponseModel]:
138
- """Delete firewall
140
+ ) -> ApiResponse[FirewallRule]:
141
+ """Add firewall rule to firewall
139
142
 
140
- Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/delete-firewall).
143
+ Creates a [**firewall rule**](https://docs...cloud/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
141
144
 
142
- :param id: (required)
143
- :type id: int
145
+ :param firewall_id: (required)
146
+ :type firewall_id: int
147
+ :param payload: (required)
148
+ :type payload: CreateFirewallRulePayload
144
149
  :param _request_timeout: timeout setting for this request. If one
145
150
  number provided, it will be total request
146
151
  timeout. It can also be a pair (tuple) of
@@ -163,8 +168,9 @@ class FirewallsApi:
163
168
  :return: Returns the result object.
164
169
  """ # noqa: E501
165
170
 
166
- _param = self._delete_security_group_details_serialize(
167
- id=id,
171
+ _param = self._add_firewall_rule_to_an_existing_firewall_serialize(
172
+ firewall_id=firewall_id,
173
+ payload=payload,
168
174
  _request_auth=_request_auth,
169
175
  _content_type=_content_type,
170
176
  _headers=_headers,
@@ -172,12 +178,10 @@ class FirewallsApi:
172
178
  )
173
179
 
174
180
  _response_types_map: Dict[str, Optional[str]] = {
175
- '200': "ResponseModel",
181
+ '200': "FirewallRule",
176
182
  '400': "ErrorResponseModel",
177
183
  '401': "ErrorResponseModel",
178
184
  '403': "ErrorResponseModel",
179
- '404': "ErrorResponseModel",
180
- '409': "ErrorResponseModel",
181
185
  '500': None,
182
186
  }
183
187
  response_data = self.api_client.call_api(
@@ -192,9 +196,10 @@ class FirewallsApi:
192
196
 
193
197
 
194
198
  @validate_call
195
- def delete_security_group_details_without_preload_content(
199
+ def add_firewall_rule_to_an_existing_firewall_without_preload_content(
196
200
  self,
197
- id: StrictInt,
201
+ firewall_id: StrictInt,
202
+ payload: CreateFirewallRulePayload,
198
203
  _request_timeout: Union[
199
204
  None,
200
205
  Annotated[StrictFloat, Field(gt=0)],
@@ -208,12 +213,14 @@ class FirewallsApi:
208
213
  _headers: Optional[Dict[StrictStr, Any]] = None,
209
214
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
210
215
  ) -> RESTResponseType:
211
- """Delete firewall
216
+ """Add firewall rule to firewall
212
217
 
213
- Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/delete-firewall).
218
+ Creates a [**firewall rule**](https://docs...cloud/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
214
219
 
215
- :param id: (required)
216
- :type id: int
220
+ :param firewall_id: (required)
221
+ :type firewall_id: int
222
+ :param payload: (required)
223
+ :type payload: CreateFirewallRulePayload
217
224
  :param _request_timeout: timeout setting for this request. If one
218
225
  number provided, it will be total request
219
226
  timeout. It can also be a pair (tuple) of
@@ -236,8 +243,9 @@ class FirewallsApi:
236
243
  :return: Returns the result object.
237
244
  """ # noqa: E501
238
245
 
239
- _param = self._delete_security_group_details_serialize(
240
- id=id,
246
+ _param = self._add_firewall_rule_to_an_existing_firewall_serialize(
247
+ firewall_id=firewall_id,
248
+ payload=payload,
241
249
  _request_auth=_request_auth,
242
250
  _content_type=_content_type,
243
251
  _headers=_headers,
@@ -245,12 +253,10 @@ class FirewallsApi:
245
253
  )
246
254
 
247
255
  _response_types_map: Dict[str, Optional[str]] = {
248
- '200': "ResponseModel",
256
+ '200': "FirewallRule",
249
257
  '400': "ErrorResponseModel",
250
258
  '401': "ErrorResponseModel",
251
259
  '403': "ErrorResponseModel",
252
- '404': "ErrorResponseModel",
253
- '409': "ErrorResponseModel",
254
260
  '500': None,
255
261
  }
256
262
  response_data = self.api_client.call_api(
@@ -260,9 +266,10 @@ class FirewallsApi:
260
266
  return response_data.response
261
267
 
262
268
 
263
- def _delete_security_group_details_serialize(
269
+ def _add_firewall_rule_to_an_existing_firewall_serialize(
264
270
  self,
265
- id,
271
+ firewall_id,
272
+ payload,
266
273
  _request_auth,
267
274
  _content_type,
268
275
  _headers,
@@ -284,12 +291,14 @@ class FirewallsApi:
284
291
  _body_params: Optional[bytes] = None
285
292
 
286
293
  # process the path parameters
287
- if id is not None:
288
- _path_params['id'] = id
294
+ if firewall_id is not None:
295
+ _path_params['firewall_id'] = firewall_id
289
296
  # process the query parameters
290
297
  # process the header parameters
291
298
  # process the form parameters
292
299
  # process the body parameter
300
+ if payload is not None:
301
+ _body_params = payload
293
302
 
294
303
 
295
304
  # set the HTTP header `Accept`
@@ -300,6 +309,19 @@ class FirewallsApi:
300
309
  ]
301
310
  )
302
311
 
312
+ # set the HTTP header `Content-Type`
313
+ if _content_type:
314
+ _header_params['Content-Type'] = _content_type
315
+ else:
316
+ _default_content_type = (
317
+ self.api_client.select_header_content_type(
318
+ [
319
+ 'application/json'
320
+ ]
321
+ )
322
+ )
323
+ if _default_content_type is not None:
324
+ _header_params['Content-Type'] = _default_content_type
303
325
 
304
326
  # authentication setting
305
327
  _auth_settings: List[str] = [
@@ -307,8 +329,8 @@ class FirewallsApi:
307
329
  ]
308
330
 
309
331
  return self.api_client.param_serialize(
310
- method='DELETE',
311
- resource_path='/core/firewalls/{id}',
332
+ method='POST',
333
+ resource_path='/core/firewalls/{firewall_id}/firewall-rules',
312
334
  path_params=_path_params,
313
335
  query_params=_query_params,
314
336
  header_params=_header_params,
@@ -325,10 +347,9 @@ class FirewallsApi:
325
347
 
326
348
 
327
349
  @validate_call
328
- def delete_security_group_rule_delete(
350
+ def create_a_new_firewall(
329
351
  self,
330
- firewall_id: StrictInt,
331
- firewall_rule_id: StrictInt,
352
+ payload: CreateFirewallPayload,
332
353
  _request_timeout: Union[
333
354
  None,
334
355
  Annotated[StrictFloat, Field(gt=0)],
@@ -341,15 +362,13 @@ class FirewallsApi:
341
362
  _content_type: Optional[StrictStr] = None,
342
363
  _headers: Optional[Dict[StrictStr, Any]] = None,
343
364
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
344
- ) -> ResponseModel:
345
- """Delete firewall rules from firewall
365
+ ) -> FirewallResponse:
366
+ """Create firewall
346
367
 
347
- Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
368
+ Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://docs...cloud/docs/api-reference/core-resources/environments/list-environments) endpoint.
348
369
 
349
- :param firewall_id: (required)
350
- :type firewall_id: int
351
- :param firewall_rule_id: (required)
352
- :type firewall_rule_id: int
370
+ :param payload: (required)
371
+ :type payload: CreateFirewallPayload
353
372
  :param _request_timeout: timeout setting for this request. If one
354
373
  number provided, it will be total request
355
374
  timeout. It can also be a pair (tuple) of
@@ -372,9 +391,8 @@ class FirewallsApi:
372
391
  :return: Returns the result object.
373
392
  """ # noqa: E501
374
393
 
375
- _param = self._delete_security_group_rule_delete_serialize(
376
- firewall_id=firewall_id,
377
- firewall_rule_id=firewall_rule_id,
394
+ _param = self._create_a_new_firewall_serialize(
395
+ payload=payload,
378
396
  _request_auth=_request_auth,
379
397
  _content_type=_content_type,
380
398
  _headers=_headers,
@@ -382,7 +400,7 @@ class FirewallsApi:
382
400
  )
383
401
 
384
402
  _response_types_map: Dict[str, Optional[str]] = {
385
- '200': "ResponseModel",
403
+ '200': "FirewallResponse",
386
404
  '400': "ErrorResponseModel",
387
405
  '401': "ErrorResponseModel",
388
406
  '403': "ErrorResponseModel",
@@ -402,10 +420,9 @@ class FirewallsApi:
402
420
 
403
421
 
404
422
  @validate_call
405
- def delete_security_group_rule_delete_with_http_info(
423
+ def create_a_new_firewall_with_http_info(
406
424
  self,
407
- firewall_id: StrictInt,
408
- firewall_rule_id: StrictInt,
425
+ payload: CreateFirewallPayload,
409
426
  _request_timeout: Union[
410
427
  None,
411
428
  Annotated[StrictFloat, Field(gt=0)],
@@ -418,15 +435,13 @@ class FirewallsApi:
418
435
  _content_type: Optional[StrictStr] = None,
419
436
  _headers: Optional[Dict[StrictStr, Any]] = None,
420
437
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
421
- ) -> ApiResponse[ResponseModel]:
422
- """Delete firewall rules from firewall
438
+ ) -> ApiResponse[FirewallResponse]:
439
+ """Create firewall
423
440
 
424
- Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
441
+ Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://docs...cloud/docs/api-reference/core-resources/environments/list-environments) endpoint.
425
442
 
426
- :param firewall_id: (required)
427
- :type firewall_id: int
428
- :param firewall_rule_id: (required)
429
- :type firewall_rule_id: int
443
+ :param payload: (required)
444
+ :type payload: CreateFirewallPayload
430
445
  :param _request_timeout: timeout setting for this request. If one
431
446
  number provided, it will be total request
432
447
  timeout. It can also be a pair (tuple) of
@@ -449,9 +464,8 @@ class FirewallsApi:
449
464
  :return: Returns the result object.
450
465
  """ # noqa: E501
451
466
 
452
- _param = self._delete_security_group_rule_delete_serialize(
453
- firewall_id=firewall_id,
454
- firewall_rule_id=firewall_rule_id,
467
+ _param = self._create_a_new_firewall_serialize(
468
+ payload=payload,
455
469
  _request_auth=_request_auth,
456
470
  _content_type=_content_type,
457
471
  _headers=_headers,
@@ -459,7 +473,7 @@ class FirewallsApi:
459
473
  )
460
474
 
461
475
  _response_types_map: Dict[str, Optional[str]] = {
462
- '200': "ResponseModel",
476
+ '200': "FirewallResponse",
463
477
  '400': "ErrorResponseModel",
464
478
  '401': "ErrorResponseModel",
465
479
  '403': "ErrorResponseModel",
@@ -479,10 +493,9 @@ class FirewallsApi:
479
493
 
480
494
 
481
495
  @validate_call
482
- def delete_security_group_rule_delete_without_preload_content(
496
+ def create_a_new_firewall_without_preload_content(
483
497
  self,
484
- firewall_id: StrictInt,
485
- firewall_rule_id: StrictInt,
498
+ payload: CreateFirewallPayload,
486
499
  _request_timeout: Union[
487
500
  None,
488
501
  Annotated[StrictFloat, Field(gt=0)],
@@ -496,14 +509,12 @@ class FirewallsApi:
496
509
  _headers: Optional[Dict[StrictStr, Any]] = None,
497
510
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
498
511
  ) -> RESTResponseType:
499
- """Delete firewall rules from firewall
512
+ """Create firewall
500
513
 
501
- Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
514
+ Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://docs...cloud/docs/api-reference/core-resources/environments/list-environments) endpoint.
502
515
 
503
- :param firewall_id: (required)
504
- :type firewall_id: int
505
- :param firewall_rule_id: (required)
506
- :type firewall_rule_id: int
516
+ :param payload: (required)
517
+ :type payload: CreateFirewallPayload
507
518
  :param _request_timeout: timeout setting for this request. If one
508
519
  number provided, it will be total request
509
520
  timeout. It can also be a pair (tuple) of
@@ -526,9 +537,8 @@ class FirewallsApi:
526
537
  :return: Returns the result object.
527
538
  """ # noqa: E501
528
539
 
529
- _param = self._delete_security_group_rule_delete_serialize(
530
- firewall_id=firewall_id,
531
- firewall_rule_id=firewall_rule_id,
540
+ _param = self._create_a_new_firewall_serialize(
541
+ payload=payload,
532
542
  _request_auth=_request_auth,
533
543
  _content_type=_content_type,
534
544
  _headers=_headers,
@@ -536,7 +546,7 @@ class FirewallsApi:
536
546
  )
537
547
 
538
548
  _response_types_map: Dict[str, Optional[str]] = {
539
- '200': "ResponseModel",
549
+ '200': "FirewallResponse",
540
550
  '400': "ErrorResponseModel",
541
551
  '401': "ErrorResponseModel",
542
552
  '403': "ErrorResponseModel",
@@ -551,10 +561,9 @@ class FirewallsApi:
551
561
  return response_data.response
552
562
 
553
563
 
554
- def _delete_security_group_rule_delete_serialize(
564
+ def _create_a_new_firewall_serialize(
555
565
  self,
556
- firewall_id,
557
- firewall_rule_id,
566
+ payload,
558
567
  _request_auth,
559
568
  _content_type,
560
569
  _headers,
@@ -576,14 +585,12 @@ class FirewallsApi:
576
585
  _body_params: Optional[bytes] = None
577
586
 
578
587
  # process the path parameters
579
- if firewall_id is not None:
580
- _path_params['firewall_id'] = firewall_id
581
- if firewall_rule_id is not None:
582
- _path_params['firewall_rule_id'] = firewall_rule_id
583
588
  # process the query parameters
584
589
  # process the header parameters
585
590
  # process the form parameters
586
591
  # process the body parameter
592
+ if payload is not None:
593
+ _body_params = payload
587
594
 
588
595
 
589
596
  # set the HTTP header `Accept`
@@ -594,6 +601,19 @@ class FirewallsApi:
594
601
  ]
595
602
  )
596
603
 
604
+ # set the HTTP header `Content-Type`
605
+ if _content_type:
606
+ _header_params['Content-Type'] = _content_type
607
+ else:
608
+ _default_content_type = (
609
+ self.api_client.select_header_content_type(
610
+ [
611
+ 'application/json'
612
+ ]
613
+ )
614
+ )
615
+ if _default_content_type is not None:
616
+ _header_params['Content-Type'] = _default_content_type
597
617
 
598
618
  # authentication setting
599
619
  _auth_settings: List[str] = [
@@ -601,8 +621,8 @@ class FirewallsApi:
601
621
  ]
602
622
 
603
623
  return self.api_client.param_serialize(
604
- method='DELETE',
605
- resource_path='/core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}',
624
+ method='POST',
625
+ resource_path='/core/firewalls',
606
626
  path_params=_path_params,
607
627
  query_params=_query_params,
608
628
  header_params=_header_params,
@@ -619,12 +639,9 @@ class FirewallsApi:
619
639
 
620
640
 
621
641
  @validate_call
622
- def get_security_group(
642
+ def delete_existing_firewall(
623
643
  self,
624
- page: Optional[StrictInt] = None,
625
- page_size: Optional[StrictInt] = None,
626
- search: Optional[StrictStr] = None,
627
- environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
644
+ id: StrictInt,
628
645
  _request_timeout: Union[
629
646
  None,
630
647
  Annotated[StrictFloat, Field(gt=0)],
@@ -637,19 +654,13 @@ class FirewallsApi:
637
654
  _content_type: Optional[StrictStr] = None,
638
655
  _headers: Optional[Dict[StrictStr, Any]] = None,
639
656
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
640
- ) -> FirewallsListResponse:
641
- """List firewalls
657
+ ) -> ResponseModel:
658
+ """Delete firewall
642
659
 
643
- Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://docs...cloud/docs/network-security/security-groups).
660
+ Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/delete-firewall).
644
661
 
645
- :param page:
646
- :type page: int
647
- :param page_size:
648
- :type page_size: int
649
- :param search:
650
- :type search: str
651
- :param environment: Filter Environment ID or Name
652
- :type environment: str
662
+ :param id: (required)
663
+ :type id: int
653
664
  :param _request_timeout: timeout setting for this request. If one
654
665
  number provided, it will be total request
655
666
  timeout. It can also be a pair (tuple) of
@@ -672,11 +683,8 @@ class FirewallsApi:
672
683
  :return: Returns the result object.
673
684
  """ # noqa: E501
674
685
 
675
- _param = self._get_security_group_serialize(
676
- page=page,
677
- page_size=page_size,
678
- search=search,
679
- environment=environment,
686
+ _param = self._delete_existing_firewall_serialize(
687
+ id=id,
680
688
  _request_auth=_request_auth,
681
689
  _content_type=_content_type,
682
690
  _headers=_headers,
@@ -684,10 +692,12 @@ class FirewallsApi:
684
692
  )
685
693
 
686
694
  _response_types_map: Dict[str, Optional[str]] = {
687
- '200': "FirewallsListResponse",
695
+ '200': "ResponseModel",
688
696
  '400': "ErrorResponseModel",
689
697
  '401': "ErrorResponseModel",
690
698
  '403': "ErrorResponseModel",
699
+ '404': "ErrorResponseModel",
700
+ '409': "ErrorResponseModel",
691
701
  '500': None,
692
702
  }
693
703
  response_data = self.api_client.call_api(
@@ -702,12 +712,9 @@ class FirewallsApi:
702
712
 
703
713
 
704
714
  @validate_call
705
- def get_security_group_with_http_info(
715
+ def delete_existing_firewall_with_http_info(
706
716
  self,
707
- page: Optional[StrictInt] = None,
708
- page_size: Optional[StrictInt] = None,
709
- search: Optional[StrictStr] = None,
710
- environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
717
+ id: StrictInt,
711
718
  _request_timeout: Union[
712
719
  None,
713
720
  Annotated[StrictFloat, Field(gt=0)],
@@ -720,19 +727,13 @@ class FirewallsApi:
720
727
  _content_type: Optional[StrictStr] = None,
721
728
  _headers: Optional[Dict[StrictStr, Any]] = None,
722
729
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
- ) -> ApiResponse[FirewallsListResponse]:
724
- """List firewalls
730
+ ) -> ApiResponse[ResponseModel]:
731
+ """Delete firewall
725
732
 
726
- Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://docs...cloud/docs/network-security/security-groups).
733
+ Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/delete-firewall).
727
734
 
728
- :param page:
729
- :type page: int
730
- :param page_size:
731
- :type page_size: int
732
- :param search:
733
- :type search: str
734
- :param environment: Filter Environment ID or Name
735
- :type environment: str
735
+ :param id: (required)
736
+ :type id: int
736
737
  :param _request_timeout: timeout setting for this request. If one
737
738
  number provided, it will be total request
738
739
  timeout. It can also be a pair (tuple) of
@@ -755,11 +756,8 @@ class FirewallsApi:
755
756
  :return: Returns the result object.
756
757
  """ # noqa: E501
757
758
 
758
- _param = self._get_security_group_serialize(
759
- page=page,
760
- page_size=page_size,
761
- search=search,
762
- environment=environment,
759
+ _param = self._delete_existing_firewall_serialize(
760
+ id=id,
763
761
  _request_auth=_request_auth,
764
762
  _content_type=_content_type,
765
763
  _headers=_headers,
@@ -767,10 +765,12 @@ class FirewallsApi:
767
765
  )
768
766
 
769
767
  _response_types_map: Dict[str, Optional[str]] = {
770
- '200': "FirewallsListResponse",
768
+ '200': "ResponseModel",
771
769
  '400': "ErrorResponseModel",
772
770
  '401': "ErrorResponseModel",
773
771
  '403': "ErrorResponseModel",
772
+ '404': "ErrorResponseModel",
773
+ '409': "ErrorResponseModel",
774
774
  '500': None,
775
775
  }
776
776
  response_data = self.api_client.call_api(
@@ -785,12 +785,9 @@ class FirewallsApi:
785
785
 
786
786
 
787
787
  @validate_call
788
- def get_security_group_without_preload_content(
788
+ def delete_existing_firewall_without_preload_content(
789
789
  self,
790
- page: Optional[StrictInt] = None,
791
- page_size: Optional[StrictInt] = None,
792
- search: Optional[StrictStr] = None,
793
- environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
790
+ id: StrictInt,
794
791
  _request_timeout: Union[
795
792
  None,
796
793
  Annotated[StrictFloat, Field(gt=0)],
@@ -804,18 +801,12 @@ class FirewallsApi:
804
801
  _headers: Optional[Dict[StrictStr, Any]] = None,
805
802
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
806
803
  ) -> RESTResponseType:
807
- """List firewalls
804
+ """Delete firewall
808
805
 
809
- Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://docs...cloud/docs/network-security/security-groups).
806
+ Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/delete-firewall).
810
807
 
811
- :param page:
812
- :type page: int
813
- :param page_size:
814
- :type page_size: int
815
- :param search:
816
- :type search: str
817
- :param environment: Filter Environment ID or Name
818
- :type environment: str
808
+ :param id: (required)
809
+ :type id: int
819
810
  :param _request_timeout: timeout setting for this request. If one
820
811
  number provided, it will be total request
821
812
  timeout. It can also be a pair (tuple) of
@@ -838,11 +829,8 @@ class FirewallsApi:
838
829
  :return: Returns the result object.
839
830
  """ # noqa: E501
840
831
 
841
- _param = self._get_security_group_serialize(
842
- page=page,
843
- page_size=page_size,
844
- search=search,
845
- environment=environment,
832
+ _param = self._delete_existing_firewall_serialize(
833
+ id=id,
846
834
  _request_auth=_request_auth,
847
835
  _content_type=_content_type,
848
836
  _headers=_headers,
@@ -850,10 +838,12 @@ class FirewallsApi:
850
838
  )
851
839
 
852
840
  _response_types_map: Dict[str, Optional[str]] = {
853
- '200': "FirewallsListResponse",
841
+ '200': "ResponseModel",
854
842
  '400': "ErrorResponseModel",
855
843
  '401': "ErrorResponseModel",
856
844
  '403': "ErrorResponseModel",
845
+ '404': "ErrorResponseModel",
846
+ '409': "ErrorResponseModel",
857
847
  '500': None,
858
848
  }
859
849
  response_data = self.api_client.call_api(
@@ -863,12 +853,9 @@ class FirewallsApi:
863
853
  return response_data.response
864
854
 
865
855
 
866
- def _get_security_group_serialize(
856
+ def _delete_existing_firewall_serialize(
867
857
  self,
868
- page,
869
- page_size,
870
- search,
871
- environment,
858
+ id,
872
859
  _request_auth,
873
860
  _content_type,
874
861
  _headers,
@@ -890,23 +877,9 @@ class FirewallsApi:
890
877
  _body_params: Optional[bytes] = None
891
878
 
892
879
  # process the path parameters
880
+ if id is not None:
881
+ _path_params['id'] = id
893
882
  # process the query parameters
894
- if page is not None:
895
-
896
- _query_params.append(('page', page))
897
-
898
- if page_size is not None:
899
-
900
- _query_params.append(('pageSize', page_size))
901
-
902
- if search is not None:
903
-
904
- _query_params.append(('search', search))
905
-
906
- if environment is not None:
907
-
908
- _query_params.append(('environment', environment))
909
-
910
883
  # process the header parameters
911
884
  # process the form parameters
912
885
  # process the body parameter
@@ -927,8 +900,8 @@ class FirewallsApi:
927
900
  ]
928
901
 
929
902
  return self.api_client.param_serialize(
930
- method='GET',
931
- resource_path='/core/firewalls',
903
+ method='DELETE',
904
+ resource_path='/core/firewalls/{id}',
932
905
  path_params=_path_params,
933
906
  query_params=_query_params,
934
907
  header_params=_header_params,
@@ -945,9 +918,10 @@ class FirewallsApi:
945
918
 
946
919
 
947
920
  @validate_call
948
- def get_security_group_details(
921
+ def delete_firewall_rules_from_firewall(
949
922
  self,
950
- id: StrictInt,
923
+ firewall_id: StrictInt,
924
+ firewall_rule_id: StrictInt,
951
925
  _request_timeout: Union[
952
926
  None,
953
927
  Annotated[StrictFloat, Field(gt=0)],
@@ -960,13 +934,15 @@ class FirewallsApi:
960
934
  _content_type: Optional[StrictStr] = None,
961
935
  _headers: Optional[Dict[StrictStr, Any]] = None,
962
936
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
963
- ) -> FirewallDetailResponse:
964
- """Retrieve firewall details
937
+ ) -> ResponseModel:
938
+ """Delete firewall rules from firewall
965
939
 
966
- Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
940
+ Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
967
941
 
968
- :param id: (required)
969
- :type id: int
942
+ :param firewall_id: (required)
943
+ :type firewall_id: int
944
+ :param firewall_rule_id: (required)
945
+ :type firewall_rule_id: int
970
946
  :param _request_timeout: timeout setting for this request. If one
971
947
  number provided, it will be total request
972
948
  timeout. It can also be a pair (tuple) of
@@ -989,8 +965,9 @@ class FirewallsApi:
989
965
  :return: Returns the result object.
990
966
  """ # noqa: E501
991
967
 
992
- _param = self._get_security_group_details_serialize(
993
- id=id,
968
+ _param = self._delete_firewall_rules_from_firewall_serialize(
969
+ firewall_id=firewall_id,
970
+ firewall_rule_id=firewall_rule_id,
994
971
  _request_auth=_request_auth,
995
972
  _content_type=_content_type,
996
973
  _headers=_headers,
@@ -998,11 +975,12 @@ class FirewallsApi:
998
975
  )
999
976
 
1000
977
  _response_types_map: Dict[str, Optional[str]] = {
1001
- '200': "FirewallDetailResponse",
978
+ '200': "ResponseModel",
1002
979
  '400': "ErrorResponseModel",
1003
980
  '401': "ErrorResponseModel",
1004
981
  '403': "ErrorResponseModel",
1005
982
  '404': "ErrorResponseModel",
983
+ '409': "ErrorResponseModel",
1006
984
  '500': None,
1007
985
  }
1008
986
  response_data = self.api_client.call_api(
@@ -1017,9 +995,10 @@ class FirewallsApi:
1017
995
 
1018
996
 
1019
997
  @validate_call
1020
- def get_security_group_details_with_http_info(
998
+ def delete_firewall_rules_from_firewall_with_http_info(
1021
999
  self,
1022
- id: StrictInt,
1000
+ firewall_id: StrictInt,
1001
+ firewall_rule_id: StrictInt,
1023
1002
  _request_timeout: Union[
1024
1003
  None,
1025
1004
  Annotated[StrictFloat, Field(gt=0)],
@@ -1032,13 +1011,15 @@ class FirewallsApi:
1032
1011
  _content_type: Optional[StrictStr] = None,
1033
1012
  _headers: Optional[Dict[StrictStr, Any]] = None,
1034
1013
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1035
- ) -> ApiResponse[FirewallDetailResponse]:
1036
- """Retrieve firewall details
1014
+ ) -> ApiResponse[ResponseModel]:
1015
+ """Delete firewall rules from firewall
1037
1016
 
1038
- Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1017
+ Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
1039
1018
 
1040
- :param id: (required)
1041
- :type id: int
1019
+ :param firewall_id: (required)
1020
+ :type firewall_id: int
1021
+ :param firewall_rule_id: (required)
1022
+ :type firewall_rule_id: int
1042
1023
  :param _request_timeout: timeout setting for this request. If one
1043
1024
  number provided, it will be total request
1044
1025
  timeout. It can also be a pair (tuple) of
@@ -1061,8 +1042,9 @@ class FirewallsApi:
1061
1042
  :return: Returns the result object.
1062
1043
  """ # noqa: E501
1063
1044
 
1064
- _param = self._get_security_group_details_serialize(
1065
- id=id,
1045
+ _param = self._delete_firewall_rules_from_firewall_serialize(
1046
+ firewall_id=firewall_id,
1047
+ firewall_rule_id=firewall_rule_id,
1066
1048
  _request_auth=_request_auth,
1067
1049
  _content_type=_content_type,
1068
1050
  _headers=_headers,
@@ -1070,11 +1052,12 @@ class FirewallsApi:
1070
1052
  )
1071
1053
 
1072
1054
  _response_types_map: Dict[str, Optional[str]] = {
1073
- '200': "FirewallDetailResponse",
1055
+ '200': "ResponseModel",
1074
1056
  '400': "ErrorResponseModel",
1075
1057
  '401': "ErrorResponseModel",
1076
1058
  '403': "ErrorResponseModel",
1077
1059
  '404': "ErrorResponseModel",
1060
+ '409': "ErrorResponseModel",
1078
1061
  '500': None,
1079
1062
  }
1080
1063
  response_data = self.api_client.call_api(
@@ -1089,9 +1072,10 @@ class FirewallsApi:
1089
1072
 
1090
1073
 
1091
1074
  @validate_call
1092
- def get_security_group_details_without_preload_content(
1075
+ def delete_firewall_rules_from_firewall_without_preload_content(
1093
1076
  self,
1094
- id: StrictInt,
1077
+ firewall_id: StrictInt,
1078
+ firewall_rule_id: StrictInt,
1095
1079
  _request_timeout: Union[
1096
1080
  None,
1097
1081
  Annotated[StrictFloat, Field(gt=0)],
@@ -1105,12 +1089,14 @@ class FirewallsApi:
1105
1089
  _headers: Optional[Dict[StrictStr, Any]] = None,
1106
1090
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1107
1091
  ) -> RESTResponseType:
1108
- """Retrieve firewall details
1092
+ """Delete firewall rules from firewall
1109
1093
 
1110
- Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1094
+ Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://docs...cloud/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
1111
1095
 
1112
- :param id: (required)
1113
- :type id: int
1096
+ :param firewall_id: (required)
1097
+ :type firewall_id: int
1098
+ :param firewall_rule_id: (required)
1099
+ :type firewall_rule_id: int
1114
1100
  :param _request_timeout: timeout setting for this request. If one
1115
1101
  number provided, it will be total request
1116
1102
  timeout. It can also be a pair (tuple) of
@@ -1133,8 +1119,9 @@ class FirewallsApi:
1133
1119
  :return: Returns the result object.
1134
1120
  """ # noqa: E501
1135
1121
 
1136
- _param = self._get_security_group_details_serialize(
1137
- id=id,
1122
+ _param = self._delete_firewall_rules_from_firewall_serialize(
1123
+ firewall_id=firewall_id,
1124
+ firewall_rule_id=firewall_rule_id,
1138
1125
  _request_auth=_request_auth,
1139
1126
  _content_type=_content_type,
1140
1127
  _headers=_headers,
@@ -1142,11 +1129,12 @@ class FirewallsApi:
1142
1129
  )
1143
1130
 
1144
1131
  _response_types_map: Dict[str, Optional[str]] = {
1145
- '200': "FirewallDetailResponse",
1132
+ '200': "ResponseModel",
1146
1133
  '400': "ErrorResponseModel",
1147
1134
  '401': "ErrorResponseModel",
1148
1135
  '403': "ErrorResponseModel",
1149
1136
  '404': "ErrorResponseModel",
1137
+ '409': "ErrorResponseModel",
1150
1138
  '500': None,
1151
1139
  }
1152
1140
  response_data = self.api_client.call_api(
@@ -1156,9 +1144,10 @@ class FirewallsApi:
1156
1144
  return response_data.response
1157
1145
 
1158
1146
 
1159
- def _get_security_group_details_serialize(
1147
+ def _delete_firewall_rules_from_firewall_serialize(
1160
1148
  self,
1161
- id,
1149
+ firewall_id,
1150
+ firewall_rule_id,
1162
1151
  _request_auth,
1163
1152
  _content_type,
1164
1153
  _headers,
@@ -1180,8 +1169,10 @@ class FirewallsApi:
1180
1169
  _body_params: Optional[bytes] = None
1181
1170
 
1182
1171
  # process the path parameters
1183
- if id is not None:
1184
- _path_params['id'] = id
1172
+ if firewall_id is not None:
1173
+ _path_params['firewall_id'] = firewall_id
1174
+ if firewall_rule_id is not None:
1175
+ _path_params['firewall_rule_id'] = firewall_rule_id
1185
1176
  # process the query parameters
1186
1177
  # process the header parameters
1187
1178
  # process the form parameters
@@ -1203,8 +1194,8 @@ class FirewallsApi:
1203
1194
  ]
1204
1195
 
1205
1196
  return self.api_client.param_serialize(
1206
- method='GET',
1207
- resource_path='/core/firewalls/{id}',
1197
+ method='DELETE',
1198
+ resource_path='/core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}',
1208
1199
  path_params=_path_params,
1209
1200
  query_params=_query_params,
1210
1201
  header_params=_header_params,
@@ -1221,9 +1212,12 @@ class FirewallsApi:
1221
1212
 
1222
1213
 
1223
1214
  @validate_call
1224
- def post_security_group(
1215
+ def list_existing_firewalls(
1225
1216
  self,
1226
- payload: CreateFirewallPayload,
1217
+ page: Optional[StrictInt] = None,
1218
+ page_size: Optional[StrictInt] = None,
1219
+ search: Optional[StrictStr] = None,
1220
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1227
1221
  _request_timeout: Union[
1228
1222
  None,
1229
1223
  Annotated[StrictFloat, Field(gt=0)],
@@ -1236,13 +1230,19 @@ class FirewallsApi:
1236
1230
  _content_type: Optional[StrictStr] = None,
1237
1231
  _headers: Optional[Dict[StrictStr, Any]] = None,
1238
1232
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1239
- ) -> FirewallResponse:
1240
- """Create firewall
1233
+ ) -> FirewallsListResponse:
1234
+ """List firewalls
1241
1235
 
1242
- Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://docs...cloud/docs/api-reference/core-resources/environments/list-environments) endpoint.
1236
+ Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://docs...cloud/docs/network-security/security-groups).
1243
1237
 
1244
- :param payload: (required)
1245
- :type payload: CreateFirewallPayload
1238
+ :param page:
1239
+ :type page: int
1240
+ :param page_size:
1241
+ :type page_size: int
1242
+ :param search:
1243
+ :type search: str
1244
+ :param environment: Filter Environment ID or Name
1245
+ :type environment: str
1246
1246
  :param _request_timeout: timeout setting for this request. If one
1247
1247
  number provided, it will be total request
1248
1248
  timeout. It can also be a pair (tuple) of
@@ -1265,8 +1265,11 @@ class FirewallsApi:
1265
1265
  :return: Returns the result object.
1266
1266
  """ # noqa: E501
1267
1267
 
1268
- _param = self._post_security_group_serialize(
1269
- payload=payload,
1268
+ _param = self._list_existing_firewalls_serialize(
1269
+ page=page,
1270
+ page_size=page_size,
1271
+ search=search,
1272
+ environment=environment,
1270
1273
  _request_auth=_request_auth,
1271
1274
  _content_type=_content_type,
1272
1275
  _headers=_headers,
@@ -1274,12 +1277,10 @@ class FirewallsApi:
1274
1277
  )
1275
1278
 
1276
1279
  _response_types_map: Dict[str, Optional[str]] = {
1277
- '200': "FirewallResponse",
1280
+ '200': "FirewallsListResponse",
1278
1281
  '400': "ErrorResponseModel",
1279
1282
  '401': "ErrorResponseModel",
1280
1283
  '403': "ErrorResponseModel",
1281
- '404': "ErrorResponseModel",
1282
- '409': "ErrorResponseModel",
1283
1284
  '500': None,
1284
1285
  }
1285
1286
  response_data = self.api_client.call_api(
@@ -1294,9 +1295,12 @@ class FirewallsApi:
1294
1295
 
1295
1296
 
1296
1297
  @validate_call
1297
- def post_security_group_with_http_info(
1298
+ def list_existing_firewalls_with_http_info(
1298
1299
  self,
1299
- payload: CreateFirewallPayload,
1300
+ page: Optional[StrictInt] = None,
1301
+ page_size: Optional[StrictInt] = None,
1302
+ search: Optional[StrictStr] = None,
1303
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1300
1304
  _request_timeout: Union[
1301
1305
  None,
1302
1306
  Annotated[StrictFloat, Field(gt=0)],
@@ -1309,13 +1313,19 @@ class FirewallsApi:
1309
1313
  _content_type: Optional[StrictStr] = None,
1310
1314
  _headers: Optional[Dict[StrictStr, Any]] = None,
1311
1315
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1312
- ) -> ApiResponse[FirewallResponse]:
1313
- """Create firewall
1316
+ ) -> ApiResponse[FirewallsListResponse]:
1317
+ """List firewalls
1314
1318
 
1315
- Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://docs...cloud/docs/api-reference/core-resources/environments/list-environments) endpoint.
1319
+ Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://docs...cloud/docs/network-security/security-groups).
1316
1320
 
1317
- :param payload: (required)
1318
- :type payload: CreateFirewallPayload
1321
+ :param page:
1322
+ :type page: int
1323
+ :param page_size:
1324
+ :type page_size: int
1325
+ :param search:
1326
+ :type search: str
1327
+ :param environment: Filter Environment ID or Name
1328
+ :type environment: str
1319
1329
  :param _request_timeout: timeout setting for this request. If one
1320
1330
  number provided, it will be total request
1321
1331
  timeout. It can also be a pair (tuple) of
@@ -1338,8 +1348,11 @@ class FirewallsApi:
1338
1348
  :return: Returns the result object.
1339
1349
  """ # noqa: E501
1340
1350
 
1341
- _param = self._post_security_group_serialize(
1342
- payload=payload,
1351
+ _param = self._list_existing_firewalls_serialize(
1352
+ page=page,
1353
+ page_size=page_size,
1354
+ search=search,
1355
+ environment=environment,
1343
1356
  _request_auth=_request_auth,
1344
1357
  _content_type=_content_type,
1345
1358
  _headers=_headers,
@@ -1347,12 +1360,10 @@ class FirewallsApi:
1347
1360
  )
1348
1361
 
1349
1362
  _response_types_map: Dict[str, Optional[str]] = {
1350
- '200': "FirewallResponse",
1363
+ '200': "FirewallsListResponse",
1351
1364
  '400': "ErrorResponseModel",
1352
1365
  '401': "ErrorResponseModel",
1353
1366
  '403': "ErrorResponseModel",
1354
- '404': "ErrorResponseModel",
1355
- '409': "ErrorResponseModel",
1356
1367
  '500': None,
1357
1368
  }
1358
1369
  response_data = self.api_client.call_api(
@@ -1367,9 +1378,12 @@ class FirewallsApi:
1367
1378
 
1368
1379
 
1369
1380
  @validate_call
1370
- def post_security_group_without_preload_content(
1381
+ def list_existing_firewalls_without_preload_content(
1371
1382
  self,
1372
- payload: CreateFirewallPayload,
1383
+ page: Optional[StrictInt] = None,
1384
+ page_size: Optional[StrictInt] = None,
1385
+ search: Optional[StrictStr] = None,
1386
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1373
1387
  _request_timeout: Union[
1374
1388
  None,
1375
1389
  Annotated[StrictFloat, Field(gt=0)],
@@ -1383,12 +1397,18 @@ class FirewallsApi:
1383
1397
  _headers: Optional[Dict[StrictStr, Any]] = None,
1384
1398
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1385
1399
  ) -> RESTResponseType:
1386
- """Create firewall
1400
+ """List firewalls
1387
1401
 
1388
- Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://docs...cloud/docs/api-reference/core-resources/environments/list-environments) endpoint.
1402
+ Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://docs...cloud/docs/network-security/security-groups).
1389
1403
 
1390
- :param payload: (required)
1391
- :type payload: CreateFirewallPayload
1404
+ :param page:
1405
+ :type page: int
1406
+ :param page_size:
1407
+ :type page_size: int
1408
+ :param search:
1409
+ :type search: str
1410
+ :param environment: Filter Environment ID or Name
1411
+ :type environment: str
1392
1412
  :param _request_timeout: timeout setting for this request. If one
1393
1413
  number provided, it will be total request
1394
1414
  timeout. It can also be a pair (tuple) of
@@ -1411,8 +1431,11 @@ class FirewallsApi:
1411
1431
  :return: Returns the result object.
1412
1432
  """ # noqa: E501
1413
1433
 
1414
- _param = self._post_security_group_serialize(
1415
- payload=payload,
1434
+ _param = self._list_existing_firewalls_serialize(
1435
+ page=page,
1436
+ page_size=page_size,
1437
+ search=search,
1438
+ environment=environment,
1416
1439
  _request_auth=_request_auth,
1417
1440
  _content_type=_content_type,
1418
1441
  _headers=_headers,
@@ -1420,12 +1443,10 @@ class FirewallsApi:
1420
1443
  )
1421
1444
 
1422
1445
  _response_types_map: Dict[str, Optional[str]] = {
1423
- '200': "FirewallResponse",
1446
+ '200': "FirewallsListResponse",
1424
1447
  '400': "ErrorResponseModel",
1425
1448
  '401': "ErrorResponseModel",
1426
1449
  '403': "ErrorResponseModel",
1427
- '404': "ErrorResponseModel",
1428
- '409': "ErrorResponseModel",
1429
1450
  '500': None,
1430
1451
  }
1431
1452
  response_data = self.api_client.call_api(
@@ -1435,9 +1456,12 @@ class FirewallsApi:
1435
1456
  return response_data.response
1436
1457
 
1437
1458
 
1438
- def _post_security_group_serialize(
1459
+ def _list_existing_firewalls_serialize(
1439
1460
  self,
1440
- payload,
1461
+ page,
1462
+ page_size,
1463
+ search,
1464
+ environment,
1441
1465
  _request_auth,
1442
1466
  _content_type,
1443
1467
  _headers,
@@ -1460,11 +1484,25 @@ class FirewallsApi:
1460
1484
 
1461
1485
  # process the path parameters
1462
1486
  # process the query parameters
1487
+ if page is not None:
1488
+
1489
+ _query_params.append(('page', page))
1490
+
1491
+ if page_size is not None:
1492
+
1493
+ _query_params.append(('pageSize', page_size))
1494
+
1495
+ if search is not None:
1496
+
1497
+ _query_params.append(('search', search))
1498
+
1499
+ if environment is not None:
1500
+
1501
+ _query_params.append(('environment', environment))
1502
+
1463
1503
  # process the header parameters
1464
1504
  # process the form parameters
1465
1505
  # process the body parameter
1466
- if payload is not None:
1467
- _body_params = payload
1468
1506
 
1469
1507
 
1470
1508
  # set the HTTP header `Accept`
@@ -1475,19 +1513,6 @@ class FirewallsApi:
1475
1513
  ]
1476
1514
  )
1477
1515
 
1478
- # set the HTTP header `Content-Type`
1479
- if _content_type:
1480
- _header_params['Content-Type'] = _content_type
1481
- else:
1482
- _default_content_type = (
1483
- self.api_client.select_header_content_type(
1484
- [
1485
- 'application/json'
1486
- ]
1487
- )
1488
- )
1489
- if _default_content_type is not None:
1490
- _header_params['Content-Type'] = _default_content_type
1491
1516
 
1492
1517
  # authentication setting
1493
1518
  _auth_settings: List[str] = [
@@ -1495,7 +1520,7 @@ class FirewallsApi:
1495
1520
  ]
1496
1521
 
1497
1522
  return self.api_client.param_serialize(
1498
- method='POST',
1523
+ method='GET',
1499
1524
  resource_path='/core/firewalls',
1500
1525
  path_params=_path_params,
1501
1526
  query_params=_query_params,
@@ -1513,10 +1538,9 @@ class FirewallsApi:
1513
1538
 
1514
1539
 
1515
1540
  @validate_call
1516
- def post_security_group_rules(
1541
+ def retrieve_the_details_of_an_existing_firewall(
1517
1542
  self,
1518
- firewall_id: StrictInt,
1519
- payload: CreateFirewallRulePayload,
1543
+ id: StrictInt,
1520
1544
  _request_timeout: Union[
1521
1545
  None,
1522
1546
  Annotated[StrictFloat, Field(gt=0)],
@@ -1529,15 +1553,13 @@ class FirewallsApi:
1529
1553
  _content_type: Optional[StrictStr] = None,
1530
1554
  _headers: Optional[Dict[StrictStr, Any]] = None,
1531
1555
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1532
- ) -> FirewallRule:
1533
- """Add firewall rule to firewall
1556
+ ) -> FirewallDetailResponse:
1557
+ """Retrieve firewall details
1534
1558
 
1535
- Creates a [**firewall rule**](https://docs...cloud/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
1559
+ Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1536
1560
 
1537
- :param firewall_id: (required)
1538
- :type firewall_id: int
1539
- :param payload: (required)
1540
- :type payload: CreateFirewallRulePayload
1561
+ :param id: (required)
1562
+ :type id: int
1541
1563
  :param _request_timeout: timeout setting for this request. If one
1542
1564
  number provided, it will be total request
1543
1565
  timeout. It can also be a pair (tuple) of
@@ -1560,9 +1582,8 @@ class FirewallsApi:
1560
1582
  :return: Returns the result object.
1561
1583
  """ # noqa: E501
1562
1584
 
1563
- _param = self._post_security_group_rules_serialize(
1564
- firewall_id=firewall_id,
1565
- payload=payload,
1585
+ _param = self._retrieve_the_details_of_an_existing_firewall_serialize(
1586
+ id=id,
1566
1587
  _request_auth=_request_auth,
1567
1588
  _content_type=_content_type,
1568
1589
  _headers=_headers,
@@ -1570,10 +1591,11 @@ class FirewallsApi:
1570
1591
  )
1571
1592
 
1572
1593
  _response_types_map: Dict[str, Optional[str]] = {
1573
- '200': "FirewallRule",
1594
+ '200': "FirewallDetailResponse",
1574
1595
  '400': "ErrorResponseModel",
1575
1596
  '401': "ErrorResponseModel",
1576
1597
  '403': "ErrorResponseModel",
1598
+ '404': "ErrorResponseModel",
1577
1599
  '500': None,
1578
1600
  }
1579
1601
  response_data = self.api_client.call_api(
@@ -1588,10 +1610,9 @@ class FirewallsApi:
1588
1610
 
1589
1611
 
1590
1612
  @validate_call
1591
- def post_security_group_rules_with_http_info(
1613
+ def retrieve_the_details_of_an_existing_firewall_with_http_info(
1592
1614
  self,
1593
- firewall_id: StrictInt,
1594
- payload: CreateFirewallRulePayload,
1615
+ id: StrictInt,
1595
1616
  _request_timeout: Union[
1596
1617
  None,
1597
1618
  Annotated[StrictFloat, Field(gt=0)],
@@ -1604,15 +1625,13 @@ class FirewallsApi:
1604
1625
  _content_type: Optional[StrictStr] = None,
1605
1626
  _headers: Optional[Dict[StrictStr, Any]] = None,
1606
1627
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1607
- ) -> ApiResponse[FirewallRule]:
1608
- """Add firewall rule to firewall
1628
+ ) -> ApiResponse[FirewallDetailResponse]:
1629
+ """Retrieve firewall details
1609
1630
 
1610
- Creates a [**firewall rule**](https://docs...cloud/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
1631
+ Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1611
1632
 
1612
- :param firewall_id: (required)
1613
- :type firewall_id: int
1614
- :param payload: (required)
1615
- :type payload: CreateFirewallRulePayload
1633
+ :param id: (required)
1634
+ :type id: int
1616
1635
  :param _request_timeout: timeout setting for this request. If one
1617
1636
  number provided, it will be total request
1618
1637
  timeout. It can also be a pair (tuple) of
@@ -1635,9 +1654,8 @@ class FirewallsApi:
1635
1654
  :return: Returns the result object.
1636
1655
  """ # noqa: E501
1637
1656
 
1638
- _param = self._post_security_group_rules_serialize(
1639
- firewall_id=firewall_id,
1640
- payload=payload,
1657
+ _param = self._retrieve_the_details_of_an_existing_firewall_serialize(
1658
+ id=id,
1641
1659
  _request_auth=_request_auth,
1642
1660
  _content_type=_content_type,
1643
1661
  _headers=_headers,
@@ -1645,10 +1663,11 @@ class FirewallsApi:
1645
1663
  )
1646
1664
 
1647
1665
  _response_types_map: Dict[str, Optional[str]] = {
1648
- '200': "FirewallRule",
1666
+ '200': "FirewallDetailResponse",
1649
1667
  '400': "ErrorResponseModel",
1650
1668
  '401': "ErrorResponseModel",
1651
1669
  '403': "ErrorResponseModel",
1670
+ '404': "ErrorResponseModel",
1652
1671
  '500': None,
1653
1672
  }
1654
1673
  response_data = self.api_client.call_api(
@@ -1663,10 +1682,9 @@ class FirewallsApi:
1663
1682
 
1664
1683
 
1665
1684
  @validate_call
1666
- def post_security_group_rules_without_preload_content(
1685
+ def retrieve_the_details_of_an_existing_firewall_without_preload_content(
1667
1686
  self,
1668
- firewall_id: StrictInt,
1669
- payload: CreateFirewallRulePayload,
1687
+ id: StrictInt,
1670
1688
  _request_timeout: Union[
1671
1689
  None,
1672
1690
  Annotated[StrictFloat, Field(gt=0)],
@@ -1680,14 +1698,12 @@ class FirewallsApi:
1680
1698
  _headers: Optional[Dict[StrictStr, Any]] = None,
1681
1699
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1682
1700
  ) -> RESTResponseType:
1683
- """Add firewall rule to firewall
1701
+ """Retrieve firewall details
1684
1702
 
1685
- Creates a [**firewall rule**](https://docs...cloud/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
1703
+ Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1686
1704
 
1687
- :param firewall_id: (required)
1688
- :type firewall_id: int
1689
- :param payload: (required)
1690
- :type payload: CreateFirewallRulePayload
1705
+ :param id: (required)
1706
+ :type id: int
1691
1707
  :param _request_timeout: timeout setting for this request. If one
1692
1708
  number provided, it will be total request
1693
1709
  timeout. It can also be a pair (tuple) of
@@ -1710,9 +1726,8 @@ class FirewallsApi:
1710
1726
  :return: Returns the result object.
1711
1727
  """ # noqa: E501
1712
1728
 
1713
- _param = self._post_security_group_rules_serialize(
1714
- firewall_id=firewall_id,
1715
- payload=payload,
1729
+ _param = self._retrieve_the_details_of_an_existing_firewall_serialize(
1730
+ id=id,
1716
1731
  _request_auth=_request_auth,
1717
1732
  _content_type=_content_type,
1718
1733
  _headers=_headers,
@@ -1720,10 +1735,11 @@ class FirewallsApi:
1720
1735
  )
1721
1736
 
1722
1737
  _response_types_map: Dict[str, Optional[str]] = {
1723
- '200': "FirewallRule",
1738
+ '200': "FirewallDetailResponse",
1724
1739
  '400': "ErrorResponseModel",
1725
1740
  '401': "ErrorResponseModel",
1726
1741
  '403': "ErrorResponseModel",
1742
+ '404': "ErrorResponseModel",
1727
1743
  '500': None,
1728
1744
  }
1729
1745
  response_data = self.api_client.call_api(
@@ -1733,10 +1749,9 @@ class FirewallsApi:
1733
1749
  return response_data.response
1734
1750
 
1735
1751
 
1736
- def _post_security_group_rules_serialize(
1752
+ def _retrieve_the_details_of_an_existing_firewall_serialize(
1737
1753
  self,
1738
- firewall_id,
1739
- payload,
1754
+ id,
1740
1755
  _request_auth,
1741
1756
  _content_type,
1742
1757
  _headers,
@@ -1758,14 +1773,12 @@ class FirewallsApi:
1758
1773
  _body_params: Optional[bytes] = None
1759
1774
 
1760
1775
  # process the path parameters
1761
- if firewall_id is not None:
1762
- _path_params['firewall_id'] = firewall_id
1776
+ if id is not None:
1777
+ _path_params['id'] = id
1763
1778
  # process the query parameters
1764
1779
  # process the header parameters
1765
1780
  # process the form parameters
1766
1781
  # process the body parameter
1767
- if payload is not None:
1768
- _body_params = payload
1769
1782
 
1770
1783
 
1771
1784
  # set the HTTP header `Accept`
@@ -1776,19 +1789,6 @@ class FirewallsApi:
1776
1789
  ]
1777
1790
  )
1778
1791
 
1779
- # set the HTTP header `Content-Type`
1780
- if _content_type:
1781
- _header_params['Content-Type'] = _content_type
1782
- else:
1783
- _default_content_type = (
1784
- self.api_client.select_header_content_type(
1785
- [
1786
- 'application/json'
1787
- ]
1788
- )
1789
- )
1790
- if _default_content_type is not None:
1791
- _header_params['Content-Type'] = _default_content_type
1792
1792
 
1793
1793
  # authentication setting
1794
1794
  _auth_settings: List[str] = [
@@ -1796,8 +1796,8 @@ class FirewallsApi:
1796
1796
  ]
1797
1797
 
1798
1798
  return self.api_client.param_serialize(
1799
- method='POST',
1800
- resource_path='/core/firewalls/{firewall_id}/firewall-rules',
1799
+ method='GET',
1800
+ resource_path='/core/firewalls/{id}',
1801
1801
  path_params=_path_params,
1802
1802
  query_params=_query_params,
1803
1803
  header_params=_header_params,