basaltic-sdk-python 0.1.1__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.
Files changed (47) hide show
  1. basaltic/__init__.py +26 -0
  2. basaltic/_client.py +136 -0
  3. basaltic/_common.py +284 -0
  4. basaltic/_transport.py +196 -0
  5. basaltic/_version.py +3 -0
  6. basaltic/auth.py +231 -0
  7. basaltic/client.py +144 -0
  8. basaltic/config.py +151 -0
  9. basaltic/errors.py +73 -0
  10. basaltic/models/__init__.py +17 -0
  11. basaltic/models/audit.py +85 -0
  12. basaltic/models/billing.py +284 -0
  13. basaltic/models/catalog.py +35 -0
  14. basaltic/models/certificate.py +127 -0
  15. basaltic/models/compute.py +905 -0
  16. basaltic/models/dns.py +256 -0
  17. basaltic/models/iam.py +736 -0
  18. basaltic/models/kms.py +157 -0
  19. basaltic/models/loadbalancer.py +574 -0
  20. basaltic/models/network.py +985 -0
  21. basaltic/models/quota.py +30 -0
  22. basaltic/models/secrets.py +136 -0
  23. basaltic/models/storage.py +789 -0
  24. basaltic/models/telemetry.py +393 -0
  25. basaltic/models/workspace.py +734 -0
  26. basaltic/py.typed +0 -0
  27. basaltic/response.py +152 -0
  28. basaltic/services/__init__.py +1 -0
  29. basaltic/services/audit.py +211 -0
  30. basaltic/services/billing.py +777 -0
  31. basaltic/services/catalog.py +172 -0
  32. basaltic/services/certificate.py +395 -0
  33. basaltic/services/compute.py +2395 -0
  34. basaltic/services/dns.py +1079 -0
  35. basaltic/services/iam.py +3405 -0
  36. basaltic/services/kms.py +742 -0
  37. basaltic/services/loadbalancer.py +1727 -0
  38. basaltic/services/network.py +4691 -0
  39. basaltic/services/quota.py +75 -0
  40. basaltic/services/secrets.py +550 -0
  41. basaltic/services/storage.py +3059 -0
  42. basaltic/services/telemetry.py +1316 -0
  43. basaltic/services/workspace.py +3899 -0
  44. basaltic_sdk_python-0.1.1.dist-info/METADATA +211 -0
  45. basaltic_sdk_python-0.1.1.dist-info/RECORD +47 -0
  46. basaltic_sdk_python-0.1.1.dist-info/WHEEL +4 -0
  47. basaltic_sdk_python-0.1.1.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,4691 @@
1
+ """Generated typed API methods; do not edit."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from collections.abc import AsyncIterator, Iterator
6
+ from typing import cast
7
+
8
+ from .._common import UNSET, Operation, Unset
9
+ from .._transport import AsyncTransport, SyncTransport
10
+ from ..config import RequestOptions
11
+ from ..models import network as m
12
+ from ..response import (
13
+ ApiResponse,
14
+ Page,
15
+ aiterate_pages,
16
+ aresolve_reference,
17
+ iterate_pages,
18
+ reference_scope,
19
+ resolve_reference,
20
+ )
21
+
22
+ _OPS = {
23
+ "attachFloatingIp": Operation(
24
+ id="attachFloatingIp",
25
+ method="POST",
26
+ path="/v1/floating-ips/{floating_ip_id}/attach",
27
+ authenticated=True,
28
+ requiredQuery=[],
29
+ requiredHeaders=[],
30
+ queryEncoding={},
31
+ bodyRequired=True,
32
+ contentType="application/json",
33
+ accept="application/json",
34
+ ),
35
+ "attachInternetGateway": Operation(
36
+ id="attachInternetGateway",
37
+ method="POST",
38
+ path="/v1/internet-gateways/{internet_gateway_id}/attach",
39
+ authenticated=True,
40
+ requiredQuery=[],
41
+ requiredHeaders=[],
42
+ queryEncoding={},
43
+ bodyRequired=True,
44
+ contentType="application/json",
45
+ accept="application/json",
46
+ ),
47
+ "createEgressOnlyGateway": Operation(
48
+ id="createEgressOnlyGateway",
49
+ method="POST",
50
+ path="/v1/egress-only-gateways",
51
+ authenticated=True,
52
+ requiredQuery=[],
53
+ requiredHeaders=[],
54
+ queryEncoding={},
55
+ bodyRequired=True,
56
+ contentType="application/json",
57
+ accept="application/json",
58
+ ),
59
+ "createFloatingIp": Operation(
60
+ id="createFloatingIp",
61
+ method="POST",
62
+ path="/v1/floating-ips",
63
+ authenticated=True,
64
+ requiredQuery=[],
65
+ requiredHeaders=[],
66
+ queryEncoding={},
67
+ bodyRequired=False,
68
+ contentType="application/json",
69
+ accept="application/json",
70
+ ),
71
+ "createInterface": Operation(
72
+ id="createInterface",
73
+ method="POST",
74
+ path="/v1/interfaces",
75
+ authenticated=True,
76
+ requiredQuery=[],
77
+ requiredHeaders=[],
78
+ queryEncoding={},
79
+ bodyRequired=True,
80
+ contentType="application/json",
81
+ accept="application/json",
82
+ ),
83
+ "createInterfaceAddress": Operation(
84
+ id="createInterfaceAddress",
85
+ method="POST",
86
+ path="/v1/interfaces/{interface_id}/addresses",
87
+ authenticated=True,
88
+ requiredQuery=[],
89
+ requiredHeaders=[],
90
+ queryEncoding={},
91
+ bodyRequired=True,
92
+ contentType="application/json",
93
+ accept="application/json",
94
+ ),
95
+ "createInterfacePrefix": Operation(
96
+ id="createInterfacePrefix",
97
+ method="POST",
98
+ path="/v1/interfaces/{interface_id}/prefixes",
99
+ authenticated=True,
100
+ requiredQuery=[],
101
+ requiredHeaders=[],
102
+ queryEncoding={},
103
+ bodyRequired=True,
104
+ contentType="application/json",
105
+ accept="application/json",
106
+ ),
107
+ "createInternetGateway": Operation(
108
+ id="createInternetGateway",
109
+ method="POST",
110
+ path="/v1/internet-gateways",
111
+ authenticated=True,
112
+ requiredQuery=[],
113
+ requiredHeaders=[],
114
+ queryEncoding={},
115
+ bodyRequired=True,
116
+ contentType="application/json",
117
+ accept="application/json",
118
+ ),
119
+ "createNATGateway": Operation(
120
+ id="createNATGateway",
121
+ method="POST",
122
+ path="/v1/nat-gateways",
123
+ authenticated=True,
124
+ requiredQuery=[],
125
+ requiredHeaders=[],
126
+ queryEncoding={},
127
+ bodyRequired=True,
128
+ contentType="application/json",
129
+ accept="application/json",
130
+ ),
131
+ "createPrefixPool": Operation(
132
+ id="createPrefixPool",
133
+ method="POST",
134
+ path="/v1/vpcs/{vpc_id}/prefix-pools",
135
+ authenticated=True,
136
+ requiredQuery=[],
137
+ requiredHeaders=[],
138
+ queryEncoding={},
139
+ bodyRequired=True,
140
+ contentType="application/json",
141
+ accept="application/json",
142
+ ),
143
+ "createRoute": Operation(
144
+ id="createRoute",
145
+ method="POST",
146
+ path="/v1/route-tables/{route_table_id}/routes",
147
+ authenticated=True,
148
+ requiredQuery=[],
149
+ requiredHeaders=[],
150
+ queryEncoding={},
151
+ bodyRequired=True,
152
+ contentType="application/json",
153
+ accept="application/json",
154
+ ),
155
+ "createRouteTable": Operation(
156
+ id="createRouteTable",
157
+ method="POST",
158
+ path="/v1/route-tables",
159
+ authenticated=True,
160
+ requiredQuery=[],
161
+ requiredHeaders=[],
162
+ queryEncoding={},
163
+ bodyRequired=True,
164
+ contentType="application/json",
165
+ accept="application/json",
166
+ ),
167
+ "createSecurityGroup": Operation(
168
+ id="createSecurityGroup",
169
+ method="POST",
170
+ path="/v1/security-groups",
171
+ authenticated=True,
172
+ requiredQuery=[],
173
+ requiredHeaders=[],
174
+ queryEncoding={},
175
+ bodyRequired=True,
176
+ contentType="application/json",
177
+ accept="application/json",
178
+ ),
179
+ "createSecurityGroupRule": Operation(
180
+ id="createSecurityGroupRule",
181
+ method="POST",
182
+ path="/v1/security-groups/{security_group_id}/rules",
183
+ authenticated=True,
184
+ requiredQuery=[],
185
+ requiredHeaders=[],
186
+ queryEncoding={},
187
+ bodyRequired=True,
188
+ contentType="application/json",
189
+ accept="application/json",
190
+ ),
191
+ "createSubnet": Operation(
192
+ id="createSubnet",
193
+ method="POST",
194
+ path="/v1/subnets",
195
+ authenticated=True,
196
+ requiredQuery=[],
197
+ requiredHeaders=[],
198
+ queryEncoding={},
199
+ bodyRequired=True,
200
+ contentType="application/json",
201
+ accept="application/json",
202
+ ),
203
+ "createVpc": Operation(
204
+ id="createVpc",
205
+ method="POST",
206
+ path="/v1/vpcs",
207
+ authenticated=True,
208
+ requiredQuery=[],
209
+ requiredHeaders=[],
210
+ queryEncoding={},
211
+ bodyRequired=True,
212
+ contentType="application/json",
213
+ accept="application/json",
214
+ ),
215
+ "deleteEgressOnlyGateway": Operation(
216
+ id="deleteEgressOnlyGateway",
217
+ method="DELETE",
218
+ path="/v1/egress-only-gateways/{egress_only_gateway_id}",
219
+ authenticated=True,
220
+ requiredQuery=[],
221
+ requiredHeaders=[],
222
+ queryEncoding={},
223
+ bodyRequired=False,
224
+ contentType="",
225
+ accept="application/json",
226
+ ),
227
+ "deleteFloatingIp": Operation(
228
+ id="deleteFloatingIp",
229
+ method="DELETE",
230
+ path="/v1/floating-ips/{floating_ip_id}",
231
+ authenticated=True,
232
+ requiredQuery=[],
233
+ requiredHeaders=[],
234
+ queryEncoding={},
235
+ bodyRequired=False,
236
+ contentType="",
237
+ accept="application/json",
238
+ ),
239
+ "deleteInterface": Operation(
240
+ id="deleteInterface",
241
+ method="DELETE",
242
+ path="/v1/interfaces/{interface_id}",
243
+ authenticated=True,
244
+ requiredQuery=[],
245
+ requiredHeaders=[],
246
+ queryEncoding={},
247
+ bodyRequired=False,
248
+ contentType="",
249
+ accept="application/json",
250
+ ),
251
+ "deleteInterfaceAddress": Operation(
252
+ id="deleteInterfaceAddress",
253
+ method="DELETE",
254
+ path="/v1/interfaces/{interface_id}/addresses/{address_id}",
255
+ authenticated=True,
256
+ requiredQuery=[],
257
+ requiredHeaders=[],
258
+ queryEncoding={},
259
+ bodyRequired=False,
260
+ contentType="",
261
+ accept="application/json",
262
+ ),
263
+ "deleteInterfacePrefix": Operation(
264
+ id="deleteInterfacePrefix",
265
+ method="DELETE",
266
+ path="/v1/interfaces/{interface_id}/prefixes/{prefix_id}",
267
+ authenticated=True,
268
+ requiredQuery=[],
269
+ requiredHeaders=[],
270
+ queryEncoding={},
271
+ bodyRequired=False,
272
+ contentType="",
273
+ accept="application/json",
274
+ ),
275
+ "deleteInternetGateway": Operation(
276
+ id="deleteInternetGateway",
277
+ method="DELETE",
278
+ path="/v1/internet-gateways/{internet_gateway_id}",
279
+ authenticated=True,
280
+ requiredQuery=[],
281
+ requiredHeaders=[],
282
+ queryEncoding={},
283
+ bodyRequired=False,
284
+ contentType="",
285
+ accept="application/json",
286
+ ),
287
+ "deleteNATGateway": Operation(
288
+ id="deleteNATGateway",
289
+ method="DELETE",
290
+ path="/v1/nat-gateways/{nat_gateway_id}",
291
+ authenticated=True,
292
+ requiredQuery=[],
293
+ requiredHeaders=[],
294
+ queryEncoding={},
295
+ bodyRequired=False,
296
+ contentType="",
297
+ accept="application/json",
298
+ ),
299
+ "deletePrefixPool": Operation(
300
+ id="deletePrefixPool",
301
+ method="DELETE",
302
+ path="/v1/vpcs/{vpc_id}/prefix-pools/{pool_id}",
303
+ authenticated=True,
304
+ requiredQuery=[],
305
+ requiredHeaders=[],
306
+ queryEncoding={},
307
+ bodyRequired=False,
308
+ contentType="",
309
+ accept="application/json",
310
+ ),
311
+ "deleteRoute": Operation(
312
+ id="deleteRoute",
313
+ method="DELETE",
314
+ path="/v1/route-tables/{route_table_id}/routes/{route_id}",
315
+ authenticated=True,
316
+ requiredQuery=[],
317
+ requiredHeaders=[],
318
+ queryEncoding={},
319
+ bodyRequired=False,
320
+ contentType="",
321
+ accept="application/json",
322
+ ),
323
+ "deleteRouteTable": Operation(
324
+ id="deleteRouteTable",
325
+ method="DELETE",
326
+ path="/v1/route-tables/{route_table_id}",
327
+ authenticated=True,
328
+ requiredQuery=[],
329
+ requiredHeaders=[],
330
+ queryEncoding={},
331
+ bodyRequired=False,
332
+ contentType="",
333
+ accept="application/json",
334
+ ),
335
+ "deleteSecurityGroup": Operation(
336
+ id="deleteSecurityGroup",
337
+ method="DELETE",
338
+ path="/v1/security-groups/{security_group_id}",
339
+ authenticated=True,
340
+ requiredQuery=[],
341
+ requiredHeaders=[],
342
+ queryEncoding={},
343
+ bodyRequired=False,
344
+ contentType="",
345
+ accept="application/json",
346
+ ),
347
+ "deleteSecurityGroupRule": Operation(
348
+ id="deleteSecurityGroupRule",
349
+ method="DELETE",
350
+ path="/v1/security-groups/{security_group_id}/rules/{rule_id}",
351
+ authenticated=True,
352
+ requiredQuery=[],
353
+ requiredHeaders=[],
354
+ queryEncoding={},
355
+ bodyRequired=False,
356
+ contentType="",
357
+ accept="application/json",
358
+ ),
359
+ "deleteSubnet": Operation(
360
+ id="deleteSubnet",
361
+ method="DELETE",
362
+ path="/v1/subnets/{subnet_id}",
363
+ authenticated=True,
364
+ requiredQuery=[],
365
+ requiredHeaders=[],
366
+ queryEncoding={},
367
+ bodyRequired=False,
368
+ contentType="",
369
+ accept="application/json",
370
+ ),
371
+ "deleteVpc": Operation(
372
+ id="deleteVpc",
373
+ method="DELETE",
374
+ path="/v1/vpcs/{vpc_id}",
375
+ authenticated=True,
376
+ requiredQuery=[],
377
+ requiredHeaders=[],
378
+ queryEncoding={},
379
+ bodyRequired=False,
380
+ contentType="",
381
+ accept="application/json",
382
+ ),
383
+ "detachFloatingIp": Operation(
384
+ id="detachFloatingIp",
385
+ method="POST",
386
+ path="/v1/floating-ips/{floating_ip_id}/detach",
387
+ authenticated=True,
388
+ requiredQuery=[],
389
+ requiredHeaders=[],
390
+ queryEncoding={},
391
+ bodyRequired=False,
392
+ contentType="application/json",
393
+ accept="application/json",
394
+ ),
395
+ "detachInternetGateway": Operation(
396
+ id="detachInternetGateway",
397
+ method="POST",
398
+ path="/v1/internet-gateways/{internet_gateway_id}/detach",
399
+ authenticated=True,
400
+ requiredQuery=[],
401
+ requiredHeaders=[],
402
+ queryEncoding={},
403
+ bodyRequired=False,
404
+ contentType="",
405
+ accept="application/json",
406
+ ),
407
+ "getEgressOnlyGateway": Operation(
408
+ id="getEgressOnlyGateway",
409
+ method="GET",
410
+ path="/v1/egress-only-gateways/{egress_only_gateway_id}",
411
+ authenticated=True,
412
+ requiredQuery=[],
413
+ requiredHeaders=[],
414
+ queryEncoding={},
415
+ bodyRequired=False,
416
+ contentType="",
417
+ accept="application/json",
418
+ ),
419
+ "getFloatingIp": Operation(
420
+ id="getFloatingIp",
421
+ method="GET",
422
+ path="/v1/floating-ips/{floating_ip_id}",
423
+ authenticated=True,
424
+ requiredQuery=[],
425
+ requiredHeaders=[],
426
+ queryEncoding={},
427
+ bodyRequired=False,
428
+ contentType="",
429
+ accept="application/json",
430
+ ),
431
+ "getInterface": Operation(
432
+ id="getInterface",
433
+ method="GET",
434
+ path="/v1/interfaces/{interface_id}",
435
+ authenticated=True,
436
+ requiredQuery=[],
437
+ requiredHeaders=[],
438
+ queryEncoding={},
439
+ bodyRequired=False,
440
+ contentType="",
441
+ accept="application/json",
442
+ ),
443
+ "getInterfaceAddress": Operation(
444
+ id="getInterfaceAddress",
445
+ method="GET",
446
+ path="/v1/interfaces/{interface_id}/addresses/{address_id}",
447
+ authenticated=True,
448
+ requiredQuery=[],
449
+ requiredHeaders=[],
450
+ queryEncoding={},
451
+ bodyRequired=False,
452
+ contentType="",
453
+ accept="application/json",
454
+ ),
455
+ "getInternetGateway": Operation(
456
+ id="getInternetGateway",
457
+ method="GET",
458
+ path="/v1/internet-gateways/{internet_gateway_id}",
459
+ authenticated=True,
460
+ requiredQuery=[],
461
+ requiredHeaders=[],
462
+ queryEncoding={},
463
+ bodyRequired=False,
464
+ contentType="",
465
+ accept="application/json",
466
+ ),
467
+ "getNATGateway": Operation(
468
+ id="getNATGateway",
469
+ method="GET",
470
+ path="/v1/nat-gateways/{nat_gateway_id}",
471
+ authenticated=True,
472
+ requiredQuery=[],
473
+ requiredHeaders=[],
474
+ queryEncoding={},
475
+ bodyRequired=False,
476
+ contentType="",
477
+ accept="application/json",
478
+ ),
479
+ "getRoute": Operation(
480
+ id="getRoute",
481
+ method="GET",
482
+ path="/v1/route-tables/{route_table_id}/routes/{route_id}",
483
+ authenticated=True,
484
+ requiredQuery=[],
485
+ requiredHeaders=[],
486
+ queryEncoding={},
487
+ bodyRequired=False,
488
+ contentType="",
489
+ accept="application/json",
490
+ ),
491
+ "getRouteTable": Operation(
492
+ id="getRouteTable",
493
+ method="GET",
494
+ path="/v1/route-tables/{route_table_id}",
495
+ authenticated=True,
496
+ requiredQuery=[],
497
+ requiredHeaders=[],
498
+ queryEncoding={},
499
+ bodyRequired=False,
500
+ contentType="",
501
+ accept="application/json",
502
+ ),
503
+ "getSecurityGroup": Operation(
504
+ id="getSecurityGroup",
505
+ method="GET",
506
+ path="/v1/security-groups/{security_group_id}",
507
+ authenticated=True,
508
+ requiredQuery=[],
509
+ requiredHeaders=[],
510
+ queryEncoding={},
511
+ bodyRequired=False,
512
+ contentType="",
513
+ accept="application/json",
514
+ ),
515
+ "getSecurityGroupRule": Operation(
516
+ id="getSecurityGroupRule",
517
+ method="GET",
518
+ path="/v1/security-groups/{security_group_id}/rules/{rule_id}",
519
+ authenticated=True,
520
+ requiredQuery=[],
521
+ requiredHeaders=[],
522
+ queryEncoding={},
523
+ bodyRequired=False,
524
+ contentType="",
525
+ accept="application/json",
526
+ ),
527
+ "getSubnet": Operation(
528
+ id="getSubnet",
529
+ method="GET",
530
+ path="/v1/subnets/{subnet_id}",
531
+ authenticated=True,
532
+ requiredQuery=[],
533
+ requiredHeaders=[],
534
+ queryEncoding={},
535
+ bodyRequired=False,
536
+ contentType="",
537
+ accept="application/json",
538
+ ),
539
+ "getVpc": Operation(
540
+ id="getVpc",
541
+ method="GET",
542
+ path="/v1/vpcs/{vpc_id}",
543
+ authenticated=True,
544
+ requiredQuery=[],
545
+ requiredHeaders=[],
546
+ queryEncoding={},
547
+ bodyRequired=False,
548
+ contentType="",
549
+ accept="application/json",
550
+ ),
551
+ "listEgressOnlyGatewayRoutes": Operation(
552
+ id="listEgressOnlyGatewayRoutes",
553
+ method="GET",
554
+ path="/v1/egress-only-gateways/{egress_only_gateway_id}/routes",
555
+ authenticated=True,
556
+ requiredQuery=[],
557
+ requiredHeaders=[],
558
+ queryEncoding={
559
+ "name": {"style": "form", "explode": True},
560
+ "crn": {"style": "form", "explode": True},
561
+ "limit": {"style": "form", "explode": True},
562
+ "marker": {"style": "form", "explode": True},
563
+ },
564
+ bodyRequired=False,
565
+ contentType="",
566
+ accept="application/json",
567
+ itemsKey="routes",
568
+ ),
569
+ "listEgressOnlyGateways": Operation(
570
+ id="listEgressOnlyGateways",
571
+ method="GET",
572
+ path="/v1/egress-only-gateways",
573
+ authenticated=True,
574
+ requiredQuery=[],
575
+ requiredHeaders=[],
576
+ queryEncoding={
577
+ "name": {"style": "form", "explode": True},
578
+ "crn": {"style": "form", "explode": True},
579
+ "limit": {"style": "form", "explode": True},
580
+ "marker": {"style": "form", "explode": True},
581
+ },
582
+ bodyRequired=False,
583
+ contentType="",
584
+ accept="application/json",
585
+ itemsKey="egress_only_gateways",
586
+ ),
587
+ "listFloatingIps": Operation(
588
+ id="listFloatingIps",
589
+ method="GET",
590
+ path="/v1/floating-ips",
591
+ authenticated=True,
592
+ requiredQuery=[],
593
+ requiredHeaders=[],
594
+ queryEncoding={
595
+ "name": {"style": "form", "explode": True},
596
+ "crn": {"style": "form", "explode": True},
597
+ "attached_to": {"style": "form", "explode": True},
598
+ "limit": {"style": "form", "explode": True},
599
+ "marker": {"style": "form", "explode": True},
600
+ },
601
+ bodyRequired=False,
602
+ contentType="",
603
+ accept="application/json",
604
+ itemsKey="floating_ips",
605
+ ),
606
+ "listInterfaceAddresses": Operation(
607
+ id="listInterfaceAddresses",
608
+ method="GET",
609
+ path="/v1/interfaces/{interface_id}/addresses",
610
+ authenticated=True,
611
+ requiredQuery=[],
612
+ requiredHeaders=[],
613
+ queryEncoding={},
614
+ bodyRequired=False,
615
+ contentType="",
616
+ accept="application/json",
617
+ itemsKey="addresses",
618
+ ),
619
+ "listInterfacePrefixes": Operation(
620
+ id="listInterfacePrefixes",
621
+ method="GET",
622
+ path="/v1/interfaces/{interface_id}/prefixes",
623
+ authenticated=True,
624
+ requiredQuery=[],
625
+ requiredHeaders=[],
626
+ queryEncoding={},
627
+ bodyRequired=False,
628
+ contentType="",
629
+ accept="application/json",
630
+ itemsKey="routed_prefixes",
631
+ ),
632
+ "listInterfaceSecurityGroups": Operation(
633
+ id="listInterfaceSecurityGroups",
634
+ method="GET",
635
+ path="/v1/interfaces/{interface_id}/security-groups",
636
+ authenticated=True,
637
+ requiredQuery=[],
638
+ requiredHeaders=[],
639
+ queryEncoding={
640
+ "name": {"style": "form", "explode": True},
641
+ "crn": {"style": "form", "explode": True},
642
+ },
643
+ bodyRequired=False,
644
+ contentType="",
645
+ accept="application/json",
646
+ itemsKey="security_group_ids",
647
+ ),
648
+ "listInterfaces": Operation(
649
+ id="listInterfaces",
650
+ method="GET",
651
+ path="/v1/interfaces",
652
+ authenticated=True,
653
+ requiredQuery=[],
654
+ requiredHeaders=[],
655
+ queryEncoding={
656
+ "name": {"style": "form", "explode": True},
657
+ "crn": {"style": "form", "explode": True},
658
+ "subnet": {"style": "form", "explode": True},
659
+ "vpc": {"style": "form", "explode": True},
660
+ "limit": {"style": "form", "explode": True},
661
+ "marker": {"style": "form", "explode": True},
662
+ },
663
+ bodyRequired=False,
664
+ contentType="",
665
+ accept="application/json",
666
+ itemsKey="interfaces",
667
+ ),
668
+ "listInternetGatewayRoutes": Operation(
669
+ id="listInternetGatewayRoutes",
670
+ method="GET",
671
+ path="/v1/internet-gateways/{internet_gateway_id}/routes",
672
+ authenticated=True,
673
+ requiredQuery=[],
674
+ requiredHeaders=[],
675
+ queryEncoding={
676
+ "name": {"style": "form", "explode": True},
677
+ "crn": {"style": "form", "explode": True},
678
+ "limit": {"style": "form", "explode": True},
679
+ "marker": {"style": "form", "explode": True},
680
+ },
681
+ bodyRequired=False,
682
+ contentType="",
683
+ accept="application/json",
684
+ itemsKey="routes",
685
+ ),
686
+ "listInternetGateways": Operation(
687
+ id="listInternetGateways",
688
+ method="GET",
689
+ path="/v1/internet-gateways",
690
+ authenticated=True,
691
+ requiredQuery=[],
692
+ requiredHeaders=[],
693
+ queryEncoding={
694
+ "name": {"style": "form", "explode": True},
695
+ "crn": {"style": "form", "explode": True},
696
+ "limit": {"style": "form", "explode": True},
697
+ "marker": {"style": "form", "explode": True},
698
+ },
699
+ bodyRequired=False,
700
+ contentType="",
701
+ accept="application/json",
702
+ itemsKey="internet_gateways",
703
+ ),
704
+ "listNATGatewayRoutes": Operation(
705
+ id="listNATGatewayRoutes",
706
+ method="GET",
707
+ path="/v1/nat-gateways/{nat_gateway_id}/routes",
708
+ authenticated=True,
709
+ requiredQuery=[],
710
+ requiredHeaders=[],
711
+ queryEncoding={
712
+ "name": {"style": "form", "explode": True},
713
+ "crn": {"style": "form", "explode": True},
714
+ "limit": {"style": "form", "explode": True},
715
+ "marker": {"style": "form", "explode": True},
716
+ },
717
+ bodyRequired=False,
718
+ contentType="",
719
+ accept="application/json",
720
+ itemsKey="routes",
721
+ ),
722
+ "listNATGateways": Operation(
723
+ id="listNATGateways",
724
+ method="GET",
725
+ path="/v1/nat-gateways",
726
+ authenticated=True,
727
+ requiredQuery=[],
728
+ requiredHeaders=[],
729
+ queryEncoding={
730
+ "name": {"style": "form", "explode": True},
731
+ "crn": {"style": "form", "explode": True},
732
+ "subnet": {"style": "form", "explode": True},
733
+ "vpc": {"style": "form", "explode": True},
734
+ "limit": {"style": "form", "explode": True},
735
+ "marker": {"style": "form", "explode": True},
736
+ },
737
+ bodyRequired=False,
738
+ contentType="",
739
+ accept="application/json",
740
+ itemsKey="nat_gateways",
741
+ ),
742
+ "listPrefixPools": Operation(
743
+ id="listPrefixPools",
744
+ method="GET",
745
+ path="/v1/vpcs/{vpc_id}/prefix-pools",
746
+ authenticated=True,
747
+ requiredQuery=[],
748
+ requiredHeaders=[],
749
+ queryEncoding={},
750
+ bodyRequired=False,
751
+ contentType="",
752
+ accept="application/json",
753
+ itemsKey="prefix_pools",
754
+ ),
755
+ "listRouteTables": Operation(
756
+ id="listRouteTables",
757
+ method="GET",
758
+ path="/v1/route-tables",
759
+ authenticated=True,
760
+ requiredQuery=[],
761
+ requiredHeaders=[],
762
+ queryEncoding={
763
+ "name": {"style": "form", "explode": True},
764
+ "crn": {"style": "form", "explode": True},
765
+ "vpc": {"style": "form", "explode": True},
766
+ "limit": {"style": "form", "explode": True},
767
+ "marker": {"style": "form", "explode": True},
768
+ },
769
+ bodyRequired=False,
770
+ contentType="",
771
+ accept="application/json",
772
+ itemsKey="route_tables",
773
+ ),
774
+ "listRoutes": Operation(
775
+ id="listRoutes",
776
+ method="GET",
777
+ path="/v1/route-tables/{route_table_id}/routes",
778
+ authenticated=True,
779
+ requiredQuery=[],
780
+ requiredHeaders=[],
781
+ queryEncoding={
782
+ "name": {"style": "form", "explode": True},
783
+ "crn": {"style": "form", "explode": True},
784
+ "limit": {"style": "form", "explode": True},
785
+ "marker": {"style": "form", "explode": True},
786
+ },
787
+ bodyRequired=False,
788
+ contentType="",
789
+ accept="application/json",
790
+ itemsKey="routes",
791
+ ),
792
+ "listSecurityGroupRules": Operation(
793
+ id="listSecurityGroupRules",
794
+ method="GET",
795
+ path="/v1/security-groups/{security_group_id}/rules",
796
+ authenticated=True,
797
+ requiredQuery=[],
798
+ requiredHeaders=[],
799
+ queryEncoding={
800
+ "name": {"style": "form", "explode": True},
801
+ "crn": {"style": "form", "explode": True},
802
+ "limit": {"style": "form", "explode": True},
803
+ "marker": {"style": "form", "explode": True},
804
+ },
805
+ bodyRequired=False,
806
+ contentType="",
807
+ accept="application/json",
808
+ itemsKey="rules",
809
+ ),
810
+ "listSecurityGroups": Operation(
811
+ id="listSecurityGroups",
812
+ method="GET",
813
+ path="/v1/security-groups",
814
+ authenticated=True,
815
+ requiredQuery=[],
816
+ requiredHeaders=[],
817
+ queryEncoding={
818
+ "name": {"style": "form", "explode": True},
819
+ "crn": {"style": "form", "explode": True},
820
+ "limit": {"style": "form", "explode": True},
821
+ "marker": {"style": "form", "explode": True},
822
+ },
823
+ bodyRequired=False,
824
+ contentType="",
825
+ accept="application/json",
826
+ itemsKey="security_groups",
827
+ ),
828
+ "listSubnets": Operation(
829
+ id="listSubnets",
830
+ method="GET",
831
+ path="/v1/subnets",
832
+ authenticated=True,
833
+ requiredQuery=[],
834
+ requiredHeaders=[],
835
+ queryEncoding={
836
+ "name": {"style": "form", "explode": True},
837
+ "crn": {"style": "form", "explode": True},
838
+ "vpc": {"style": "form", "explode": True},
839
+ "limit": {"style": "form", "explode": True},
840
+ "marker": {"style": "form", "explode": True},
841
+ },
842
+ bodyRequired=False,
843
+ contentType="",
844
+ accept="application/json",
845
+ itemsKey="subnets",
846
+ ),
847
+ "listVpcs": Operation(
848
+ id="listVpcs",
849
+ method="GET",
850
+ path="/v1/vpcs",
851
+ authenticated=True,
852
+ requiredQuery=[],
853
+ requiredHeaders=[],
854
+ queryEncoding={
855
+ "name": {"style": "form", "explode": True},
856
+ "crn": {"style": "form", "explode": True},
857
+ "limit": {"style": "form", "explode": True},
858
+ "marker": {"style": "form", "explode": True},
859
+ },
860
+ bodyRequired=False,
861
+ contentType="",
862
+ accept="application/json",
863
+ itemsKey="vpcs",
864
+ ),
865
+ "setInterfaceSecurityGroups": Operation(
866
+ id="setInterfaceSecurityGroups",
867
+ method="PUT",
868
+ path="/v1/interfaces/{interface_id}/security-groups",
869
+ authenticated=True,
870
+ requiredQuery=[],
871
+ requiredHeaders=[],
872
+ queryEncoding={},
873
+ bodyRequired=True,
874
+ contentType="application/json",
875
+ accept="application/json",
876
+ ),
877
+ "updateEgressOnlyGateway": Operation(
878
+ id="updateEgressOnlyGateway",
879
+ method="PATCH",
880
+ path="/v1/egress-only-gateways/{egress_only_gateway_id}",
881
+ authenticated=True,
882
+ requiredQuery=[],
883
+ requiredHeaders=[],
884
+ queryEncoding={},
885
+ bodyRequired=True,
886
+ contentType="application/json",
887
+ accept="application/json",
888
+ ),
889
+ "updateFloatingIp": Operation(
890
+ id="updateFloatingIp",
891
+ method="PATCH",
892
+ path="/v1/floating-ips/{floating_ip_id}",
893
+ authenticated=True,
894
+ requiredQuery=[],
895
+ requiredHeaders=[],
896
+ queryEncoding={},
897
+ bodyRequired=True,
898
+ contentType="application/json",
899
+ accept="application/json",
900
+ ),
901
+ "updateInterface": Operation(
902
+ id="updateInterface",
903
+ method="PATCH",
904
+ path="/v1/interfaces/{interface_id}",
905
+ authenticated=True,
906
+ requiredQuery=[],
907
+ requiredHeaders=[],
908
+ queryEncoding={},
909
+ bodyRequired=True,
910
+ contentType="application/json",
911
+ accept="application/json",
912
+ ),
913
+ "updateInternetGateway": Operation(
914
+ id="updateInternetGateway",
915
+ method="PATCH",
916
+ path="/v1/internet-gateways/{internet_gateway_id}",
917
+ authenticated=True,
918
+ requiredQuery=[],
919
+ requiredHeaders=[],
920
+ queryEncoding={},
921
+ bodyRequired=True,
922
+ contentType="application/json",
923
+ accept="application/json",
924
+ ),
925
+ "updateNATGateway": Operation(
926
+ id="updateNATGateway",
927
+ method="PATCH",
928
+ path="/v1/nat-gateways/{nat_gateway_id}",
929
+ authenticated=True,
930
+ requiredQuery=[],
931
+ requiredHeaders=[],
932
+ queryEncoding={},
933
+ bodyRequired=True,
934
+ contentType="application/json",
935
+ accept="application/json",
936
+ ),
937
+ "updateRoute": Operation(
938
+ id="updateRoute",
939
+ method="PATCH",
940
+ path="/v1/route-tables/{route_table_id}/routes/{route_id}",
941
+ authenticated=True,
942
+ requiredQuery=[],
943
+ requiredHeaders=[],
944
+ queryEncoding={},
945
+ bodyRequired=True,
946
+ contentType="application/json",
947
+ accept="application/json",
948
+ ),
949
+ "updateRouteTable": Operation(
950
+ id="updateRouteTable",
951
+ method="PATCH",
952
+ path="/v1/route-tables/{route_table_id}",
953
+ authenticated=True,
954
+ requiredQuery=[],
955
+ requiredHeaders=[],
956
+ queryEncoding={},
957
+ bodyRequired=True,
958
+ contentType="application/json",
959
+ accept="application/json",
960
+ ),
961
+ "updateSecurityGroup": Operation(
962
+ id="updateSecurityGroup",
963
+ method="PATCH",
964
+ path="/v1/security-groups/{security_group_id}",
965
+ authenticated=True,
966
+ requiredQuery=[],
967
+ requiredHeaders=[],
968
+ queryEncoding={},
969
+ bodyRequired=True,
970
+ contentType="application/json",
971
+ accept="application/json",
972
+ ),
973
+ "updateSubnet": Operation(
974
+ id="updateSubnet",
975
+ method="PATCH",
976
+ path="/v1/subnets/{subnet_id}",
977
+ authenticated=True,
978
+ requiredQuery=[],
979
+ requiredHeaders=[],
980
+ queryEncoding={},
981
+ bodyRequired=True,
982
+ contentType="application/json",
983
+ accept="application/json",
984
+ ),
985
+ "updateVpc": Operation(
986
+ id="updateVpc",
987
+ method="PATCH",
988
+ path="/v1/vpcs/{vpc_id}",
989
+ authenticated=True,
990
+ requiredQuery=[],
991
+ requiredHeaders=[],
992
+ queryEncoding={},
993
+ bodyRequired=True,
994
+ contentType="application/json",
995
+ accept="application/json",
996
+ ),
997
+ }
998
+
999
+
1000
+ class NetworkService:
1001
+ def __init__(self, transport: SyncTransport) -> None:
1002
+ self._transport = transport
1003
+
1004
+ def attach_floating_ip(
1005
+ self,
1006
+ floating_ip_id: str,
1007
+ body: m.AttachFloatingIpBody,
1008
+ *,
1009
+ options: RequestOptions | None = None,
1010
+ ) -> ApiResponse[m.AttachFloatingIpResponse]:
1011
+ "Attach a floating IP to an interface"
1012
+ return cast(
1013
+ ApiResponse[m.AttachFloatingIpResponse],
1014
+ self._transport.request(
1015
+ "network",
1016
+ "https://network.{region}.basaltic.sh",
1017
+ _OPS["attachFloatingIp"],
1018
+ "json",
1019
+ {"floating_ip_id": floating_ip_id},
1020
+ body,
1021
+ None,
1022
+ options,
1023
+ ),
1024
+ )
1025
+
1026
+ def attach_internet_gateway(
1027
+ self,
1028
+ internet_gateway_id: str,
1029
+ body: m.AttachInternetGatewayBody,
1030
+ *,
1031
+ options: RequestOptions | None = None,
1032
+ ) -> ApiResponse[m.AttachInternetGatewayResponse]:
1033
+ "Attach internet gateway to a VPC"
1034
+ return cast(
1035
+ ApiResponse[m.AttachInternetGatewayResponse],
1036
+ self._transport.request(
1037
+ "network",
1038
+ "https://network.{region}.basaltic.sh",
1039
+ _OPS["attachInternetGateway"],
1040
+ "json",
1041
+ {"internet_gateway_id": internet_gateway_id},
1042
+ body,
1043
+ None,
1044
+ options,
1045
+ ),
1046
+ )
1047
+
1048
+ def create_egress_only_gateway(
1049
+ self, body: m.CreateEgressOnlyGatewayBody, *, options: RequestOptions | None = None
1050
+ ) -> ApiResponse[m.CreateEgressOnlyGatewayResponse]:
1051
+ "Create egress-only gateway"
1052
+ return cast(
1053
+ ApiResponse[m.CreateEgressOnlyGatewayResponse],
1054
+ self._transport.request(
1055
+ "network",
1056
+ "https://network.{region}.basaltic.sh",
1057
+ _OPS["createEgressOnlyGateway"],
1058
+ "json",
1059
+ {},
1060
+ body,
1061
+ None,
1062
+ options,
1063
+ ),
1064
+ )
1065
+
1066
+ def create_floating_ip(
1067
+ self, body: m.CreateFloatingIpBody | Unset = UNSET, *, options: RequestOptions | None = None
1068
+ ) -> ApiResponse[m.CreateFloatingIpResponse]:
1069
+ "Allocate floating IP"
1070
+ return cast(
1071
+ ApiResponse[m.CreateFloatingIpResponse],
1072
+ self._transport.request(
1073
+ "network",
1074
+ "https://network.{region}.basaltic.sh",
1075
+ _OPS["createFloatingIp"],
1076
+ "json",
1077
+ {},
1078
+ body,
1079
+ None,
1080
+ options,
1081
+ ),
1082
+ )
1083
+
1084
+ def create_interface(
1085
+ self, body: m.CreateInterfaceBody, *, options: RequestOptions | None = None
1086
+ ) -> ApiResponse[m.CreateInterfaceResponse]:
1087
+ "Create interface"
1088
+ return cast(
1089
+ ApiResponse[m.CreateInterfaceResponse],
1090
+ self._transport.request(
1091
+ "network",
1092
+ "https://network.{region}.basaltic.sh",
1093
+ _OPS["createInterface"],
1094
+ "json",
1095
+ {},
1096
+ body,
1097
+ None,
1098
+ options,
1099
+ ),
1100
+ )
1101
+
1102
+ def create_interface_address(
1103
+ self,
1104
+ interface_id: str,
1105
+ body: m.CreateInterfaceAddressBody,
1106
+ *,
1107
+ options: RequestOptions | None = None,
1108
+ ) -> ApiResponse[m.CreateInterfaceAddressResponse]:
1109
+ "Create interface address"
1110
+ return cast(
1111
+ ApiResponse[m.CreateInterfaceAddressResponse],
1112
+ self._transport.request(
1113
+ "network",
1114
+ "https://network.{region}.basaltic.sh",
1115
+ _OPS["createInterfaceAddress"],
1116
+ "json",
1117
+ {"interface_id": interface_id},
1118
+ body,
1119
+ None,
1120
+ options,
1121
+ ),
1122
+ )
1123
+
1124
+ def create_interface_prefix(
1125
+ self,
1126
+ interface_id: str,
1127
+ body: m.CreateInterfacePrefixBody,
1128
+ *,
1129
+ options: RequestOptions | None = None,
1130
+ ) -> ApiResponse[m.CreateInterfacePrefixResponse]:
1131
+ "Create interface prefix"
1132
+ return cast(
1133
+ ApiResponse[m.CreateInterfacePrefixResponse],
1134
+ self._transport.request(
1135
+ "network",
1136
+ "https://network.{region}.basaltic.sh",
1137
+ _OPS["createInterfacePrefix"],
1138
+ "json",
1139
+ {"interface_id": interface_id},
1140
+ body,
1141
+ None,
1142
+ options,
1143
+ ),
1144
+ )
1145
+
1146
+ def create_internet_gateway(
1147
+ self, body: m.CreateInternetGatewayBody, *, options: RequestOptions | None = None
1148
+ ) -> ApiResponse[m.CreateInternetGatewayResponse]:
1149
+ "Create internet gateway"
1150
+ return cast(
1151
+ ApiResponse[m.CreateInternetGatewayResponse],
1152
+ self._transport.request(
1153
+ "network",
1154
+ "https://network.{region}.basaltic.sh",
1155
+ _OPS["createInternetGateway"],
1156
+ "json",
1157
+ {},
1158
+ body,
1159
+ None,
1160
+ options,
1161
+ ),
1162
+ )
1163
+
1164
+ def create_nat_gateway(
1165
+ self, body: m.CreateNATGatewayBody, *, options: RequestOptions | None = None
1166
+ ) -> ApiResponse[m.CreateNATGatewayResponse]:
1167
+ "Create NAT gateway"
1168
+ return cast(
1169
+ ApiResponse[m.CreateNATGatewayResponse],
1170
+ self._transport.request(
1171
+ "network",
1172
+ "https://network.{region}.basaltic.sh",
1173
+ _OPS["createNATGateway"],
1174
+ "json",
1175
+ {},
1176
+ body,
1177
+ None,
1178
+ options,
1179
+ ),
1180
+ )
1181
+
1182
+ def create_prefix_pool(
1183
+ self, vpc_id: str, body: m.CreatePrefixPoolBody, *, options: RequestOptions | None = None
1184
+ ) -> ApiResponse[m.CreatePrefixPoolResponse]:
1185
+ "Create prefix pool"
1186
+ return cast(
1187
+ ApiResponse[m.CreatePrefixPoolResponse],
1188
+ self._transport.request(
1189
+ "network",
1190
+ "https://network.{region}.basaltic.sh",
1191
+ _OPS["createPrefixPool"],
1192
+ "json",
1193
+ {"vpc_id": vpc_id},
1194
+ body,
1195
+ None,
1196
+ options,
1197
+ ),
1198
+ )
1199
+
1200
+ def create_route(
1201
+ self, route_table_id: str, body: m.CreateRouteBody, *, options: RequestOptions | None = None
1202
+ ) -> ApiResponse[m.CreateRouteResponse]:
1203
+ "Create route"
1204
+ return cast(
1205
+ ApiResponse[m.CreateRouteResponse],
1206
+ self._transport.request(
1207
+ "network",
1208
+ "https://network.{region}.basaltic.sh",
1209
+ _OPS["createRoute"],
1210
+ "json",
1211
+ {"route_table_id": route_table_id},
1212
+ body,
1213
+ None,
1214
+ options,
1215
+ ),
1216
+ )
1217
+
1218
+ def create_route_table(
1219
+ self, body: m.CreateRouteTableBody, *, options: RequestOptions | None = None
1220
+ ) -> ApiResponse[m.CreateRouteTableResponse]:
1221
+ "Create route table"
1222
+ return cast(
1223
+ ApiResponse[m.CreateRouteTableResponse],
1224
+ self._transport.request(
1225
+ "network",
1226
+ "https://network.{region}.basaltic.sh",
1227
+ _OPS["createRouteTable"],
1228
+ "json",
1229
+ {},
1230
+ body,
1231
+ None,
1232
+ options,
1233
+ ),
1234
+ )
1235
+
1236
+ def create_security_group(
1237
+ self, body: m.CreateSecurityGroupBody, *, options: RequestOptions | None = None
1238
+ ) -> ApiResponse[m.CreateSecurityGroupResponse]:
1239
+ "Create security group"
1240
+ return cast(
1241
+ ApiResponse[m.CreateSecurityGroupResponse],
1242
+ self._transport.request(
1243
+ "network",
1244
+ "https://network.{region}.basaltic.sh",
1245
+ _OPS["createSecurityGroup"],
1246
+ "json",
1247
+ {},
1248
+ body,
1249
+ None,
1250
+ options,
1251
+ ),
1252
+ )
1253
+
1254
+ def create_security_group_rule(
1255
+ self,
1256
+ security_group_id: str,
1257
+ body: m.CreateSecurityGroupRuleBody,
1258
+ *,
1259
+ options: RequestOptions | None = None,
1260
+ ) -> ApiResponse[m.CreateSecurityGroupRuleResponse]:
1261
+ "Create security group rule"
1262
+ return cast(
1263
+ ApiResponse[m.CreateSecurityGroupRuleResponse],
1264
+ self._transport.request(
1265
+ "network",
1266
+ "https://network.{region}.basaltic.sh",
1267
+ _OPS["createSecurityGroupRule"],
1268
+ "json",
1269
+ {"security_group_id": security_group_id},
1270
+ body,
1271
+ None,
1272
+ options,
1273
+ ),
1274
+ )
1275
+
1276
+ def create_subnet(
1277
+ self, body: m.CreateSubnetBody, *, options: RequestOptions | None = None
1278
+ ) -> ApiResponse[m.CreateSubnetResponse]:
1279
+ "Create subnet"
1280
+ return cast(
1281
+ ApiResponse[m.CreateSubnetResponse],
1282
+ self._transport.request(
1283
+ "network",
1284
+ "https://network.{region}.basaltic.sh",
1285
+ _OPS["createSubnet"],
1286
+ "json",
1287
+ {},
1288
+ body,
1289
+ None,
1290
+ options,
1291
+ ),
1292
+ )
1293
+
1294
+ def create_vpc(
1295
+ self, body: m.CreateVpcBody, *, options: RequestOptions | None = None
1296
+ ) -> ApiResponse[m.CreateVpcResponse]:
1297
+ "Create VPC"
1298
+ return cast(
1299
+ ApiResponse[m.CreateVpcResponse],
1300
+ self._transport.request(
1301
+ "network",
1302
+ "https://network.{region}.basaltic.sh",
1303
+ _OPS["createVpc"],
1304
+ "json",
1305
+ {},
1306
+ body,
1307
+ None,
1308
+ options,
1309
+ ),
1310
+ )
1311
+
1312
+ def delete_egress_only_gateway(
1313
+ self, egress_only_gateway_id: str, *, options: RequestOptions | None = None
1314
+ ) -> None:
1315
+ "Delete egress-only gateway"
1316
+ return cast(
1317
+ None,
1318
+ self._transport.request(
1319
+ "network",
1320
+ "https://network.{region}.basaltic.sh",
1321
+ _OPS["deleteEgressOnlyGateway"],
1322
+ "discard",
1323
+ {"egress_only_gateway_id": egress_only_gateway_id},
1324
+ UNSET,
1325
+ None,
1326
+ options,
1327
+ ),
1328
+ )
1329
+
1330
+ def delete_floating_ip(
1331
+ self, floating_ip_id: str, *, options: RequestOptions | None = None
1332
+ ) -> None:
1333
+ "Release floating IP"
1334
+ return cast(
1335
+ None,
1336
+ self._transport.request(
1337
+ "network",
1338
+ "https://network.{region}.basaltic.sh",
1339
+ _OPS["deleteFloatingIp"],
1340
+ "discard",
1341
+ {"floating_ip_id": floating_ip_id},
1342
+ UNSET,
1343
+ None,
1344
+ options,
1345
+ ),
1346
+ )
1347
+
1348
+ def delete_interface(self, interface_id: str, *, options: RequestOptions | None = None) -> None:
1349
+ "Delete interface"
1350
+ return cast(
1351
+ None,
1352
+ self._transport.request(
1353
+ "network",
1354
+ "https://network.{region}.basaltic.sh",
1355
+ _OPS["deleteInterface"],
1356
+ "discard",
1357
+ {"interface_id": interface_id},
1358
+ UNSET,
1359
+ None,
1360
+ options,
1361
+ ),
1362
+ )
1363
+
1364
+ def delete_interface_address(
1365
+ self, interface_id: str, address_id: str, *, options: RequestOptions | None = None
1366
+ ) -> None:
1367
+ "Delete interface address"
1368
+ return cast(
1369
+ None,
1370
+ self._transport.request(
1371
+ "network",
1372
+ "https://network.{region}.basaltic.sh",
1373
+ _OPS["deleteInterfaceAddress"],
1374
+ "discard",
1375
+ {"interface_id": interface_id, "address_id": address_id},
1376
+ UNSET,
1377
+ None,
1378
+ options,
1379
+ ),
1380
+ )
1381
+
1382
+ def delete_interface_prefix(
1383
+ self, interface_id: str, prefix_id: str, *, options: RequestOptions | None = None
1384
+ ) -> None:
1385
+ "Delete interface prefix"
1386
+ return cast(
1387
+ None,
1388
+ self._transport.request(
1389
+ "network",
1390
+ "https://network.{region}.basaltic.sh",
1391
+ _OPS["deleteInterfacePrefix"],
1392
+ "discard",
1393
+ {"interface_id": interface_id, "prefix_id": prefix_id},
1394
+ UNSET,
1395
+ None,
1396
+ options,
1397
+ ),
1398
+ )
1399
+
1400
+ def delete_internet_gateway(
1401
+ self, internet_gateway_id: str, *, options: RequestOptions | None = None
1402
+ ) -> None:
1403
+ "Delete internet gateway"
1404
+ return cast(
1405
+ None,
1406
+ self._transport.request(
1407
+ "network",
1408
+ "https://network.{region}.basaltic.sh",
1409
+ _OPS["deleteInternetGateway"],
1410
+ "discard",
1411
+ {"internet_gateway_id": internet_gateway_id},
1412
+ UNSET,
1413
+ None,
1414
+ options,
1415
+ ),
1416
+ )
1417
+
1418
+ def delete_nat_gateway(
1419
+ self, nat_gateway_id: str, *, options: RequestOptions | None = None
1420
+ ) -> None:
1421
+ "Delete NAT gateway"
1422
+ return cast(
1423
+ None,
1424
+ self._transport.request(
1425
+ "network",
1426
+ "https://network.{region}.basaltic.sh",
1427
+ _OPS["deleteNATGateway"],
1428
+ "discard",
1429
+ {"nat_gateway_id": nat_gateway_id},
1430
+ UNSET,
1431
+ None,
1432
+ options,
1433
+ ),
1434
+ )
1435
+
1436
+ def delete_prefix_pool(
1437
+ self, vpc_id: str, pool_id: str, *, options: RequestOptions | None = None
1438
+ ) -> None:
1439
+ "Delete prefix pool"
1440
+ return cast(
1441
+ None,
1442
+ self._transport.request(
1443
+ "network",
1444
+ "https://network.{region}.basaltic.sh",
1445
+ _OPS["deletePrefixPool"],
1446
+ "discard",
1447
+ {"vpc_id": vpc_id, "pool_id": pool_id},
1448
+ UNSET,
1449
+ None,
1450
+ options,
1451
+ ),
1452
+ )
1453
+
1454
+ def delete_route(
1455
+ self, route_table_id: str, route_id: str, *, options: RequestOptions | None = None
1456
+ ) -> None:
1457
+ "Delete route"
1458
+ return cast(
1459
+ None,
1460
+ self._transport.request(
1461
+ "network",
1462
+ "https://network.{region}.basaltic.sh",
1463
+ _OPS["deleteRoute"],
1464
+ "discard",
1465
+ {"route_table_id": route_table_id, "route_id": route_id},
1466
+ UNSET,
1467
+ None,
1468
+ options,
1469
+ ),
1470
+ )
1471
+
1472
+ def delete_route_table(
1473
+ self, route_table_id: str, *, options: RequestOptions | None = None
1474
+ ) -> None:
1475
+ "Delete route table"
1476
+ return cast(
1477
+ None,
1478
+ self._transport.request(
1479
+ "network",
1480
+ "https://network.{region}.basaltic.sh",
1481
+ _OPS["deleteRouteTable"],
1482
+ "discard",
1483
+ {"route_table_id": route_table_id},
1484
+ UNSET,
1485
+ None,
1486
+ options,
1487
+ ),
1488
+ )
1489
+
1490
+ def delete_security_group(
1491
+ self, security_group_id: str, *, options: RequestOptions | None = None
1492
+ ) -> None:
1493
+ "Delete security group"
1494
+ return cast(
1495
+ None,
1496
+ self._transport.request(
1497
+ "network",
1498
+ "https://network.{region}.basaltic.sh",
1499
+ _OPS["deleteSecurityGroup"],
1500
+ "discard",
1501
+ {"security_group_id": security_group_id},
1502
+ UNSET,
1503
+ None,
1504
+ options,
1505
+ ),
1506
+ )
1507
+
1508
+ def delete_security_group_rule(
1509
+ self, security_group_id: str, rule_id: str, *, options: RequestOptions | None = None
1510
+ ) -> None:
1511
+ "Delete security group rule"
1512
+ return cast(
1513
+ None,
1514
+ self._transport.request(
1515
+ "network",
1516
+ "https://network.{region}.basaltic.sh",
1517
+ _OPS["deleteSecurityGroupRule"],
1518
+ "discard",
1519
+ {"security_group_id": security_group_id, "rule_id": rule_id},
1520
+ UNSET,
1521
+ None,
1522
+ options,
1523
+ ),
1524
+ )
1525
+
1526
+ def delete_subnet(self, subnet_id: str, *, options: RequestOptions | None = None) -> None:
1527
+ "Delete subnet"
1528
+ return cast(
1529
+ None,
1530
+ self._transport.request(
1531
+ "network",
1532
+ "https://network.{region}.basaltic.sh",
1533
+ _OPS["deleteSubnet"],
1534
+ "discard",
1535
+ {"subnet_id": subnet_id},
1536
+ UNSET,
1537
+ None,
1538
+ options,
1539
+ ),
1540
+ )
1541
+
1542
+ def delete_vpc(self, vpc_id: str, *, options: RequestOptions | None = None) -> None:
1543
+ "Delete VPC"
1544
+ return cast(
1545
+ None,
1546
+ self._transport.request(
1547
+ "network",
1548
+ "https://network.{region}.basaltic.sh",
1549
+ _OPS["deleteVpc"],
1550
+ "discard",
1551
+ {"vpc_id": vpc_id},
1552
+ UNSET,
1553
+ None,
1554
+ options,
1555
+ ),
1556
+ )
1557
+
1558
+ def detach_floating_ip(
1559
+ self,
1560
+ floating_ip_id: str,
1561
+ body: m.DetachFloatingIpBody | Unset = UNSET,
1562
+ *,
1563
+ options: RequestOptions | None = None,
1564
+ ) -> ApiResponse[m.DetachFloatingIpResponse]:
1565
+ "Detach a floating IP"
1566
+ return cast(
1567
+ ApiResponse[m.DetachFloatingIpResponse],
1568
+ self._transport.request(
1569
+ "network",
1570
+ "https://network.{region}.basaltic.sh",
1571
+ _OPS["detachFloatingIp"],
1572
+ "json",
1573
+ {"floating_ip_id": floating_ip_id},
1574
+ body,
1575
+ None,
1576
+ options,
1577
+ ),
1578
+ )
1579
+
1580
+ def detach_internet_gateway(
1581
+ self, internet_gateway_id: str, *, options: RequestOptions | None = None
1582
+ ) -> ApiResponse[m.DetachInternetGatewayResponse]:
1583
+ "Detach internet gateway from its VPC"
1584
+ return cast(
1585
+ ApiResponse[m.DetachInternetGatewayResponse],
1586
+ self._transport.request(
1587
+ "network",
1588
+ "https://network.{region}.basaltic.sh",
1589
+ _OPS["detachInternetGateway"],
1590
+ "json",
1591
+ {"internet_gateway_id": internet_gateway_id},
1592
+ UNSET,
1593
+ None,
1594
+ options,
1595
+ ),
1596
+ )
1597
+
1598
+ def get_egress_only_gateway(
1599
+ self, egress_only_gateway_id: str, *, options: RequestOptions | None = None
1600
+ ) -> ApiResponse[m.GetEgressOnlyGatewayResponse]:
1601
+ "Get egress-only gateway"
1602
+ return cast(
1603
+ ApiResponse[m.GetEgressOnlyGatewayResponse],
1604
+ self._transport.request(
1605
+ "network",
1606
+ "https://network.{region}.basaltic.sh",
1607
+ _OPS["getEgressOnlyGateway"],
1608
+ "json",
1609
+ {"egress_only_gateway_id": egress_only_gateway_id},
1610
+ UNSET,
1611
+ None,
1612
+ options,
1613
+ ),
1614
+ )
1615
+
1616
+ def get_egress_only_gateway_by_reference(
1617
+ self,
1618
+ reference: str,
1619
+ *,
1620
+ scope: m.GetEgressOnlyGatewayScope | None = None,
1621
+ options: RequestOptions | None = None,
1622
+ ) -> ApiResponse[m.GetEgressOnlyGatewayResource]:
1623
+ return cast(
1624
+ ApiResponse[m.GetEgressOnlyGatewayResource],
1625
+ resolve_reference(
1626
+ reference,
1627
+ lambda id: self.get_egress_only_gateway(id, options=options),
1628
+ lambda match: self.list_egress_only_gateways(
1629
+ query=cast(
1630
+ m.ListEgressOnlyGatewaysQuery,
1631
+ {**reference_scope(scope), **match, "limit": 2},
1632
+ ),
1633
+ options=options,
1634
+ ),
1635
+ True,
1636
+ "egress_only_gateway",
1637
+ ),
1638
+ )
1639
+
1640
+ def get_floating_ip(
1641
+ self, floating_ip_id: str, *, options: RequestOptions | None = None
1642
+ ) -> ApiResponse[m.GetFloatingIpResponse]:
1643
+ "Get floating IP"
1644
+ return cast(
1645
+ ApiResponse[m.GetFloatingIpResponse],
1646
+ self._transport.request(
1647
+ "network",
1648
+ "https://network.{region}.basaltic.sh",
1649
+ _OPS["getFloatingIp"],
1650
+ "json",
1651
+ {"floating_ip_id": floating_ip_id},
1652
+ UNSET,
1653
+ None,
1654
+ options,
1655
+ ),
1656
+ )
1657
+
1658
+ def get_floating_ip_by_reference(
1659
+ self,
1660
+ reference: str,
1661
+ *,
1662
+ scope: m.GetFloatingIpScope | None = None,
1663
+ options: RequestOptions | None = None,
1664
+ ) -> ApiResponse[m.GetFloatingIpResource]:
1665
+ return cast(
1666
+ ApiResponse[m.GetFloatingIpResource],
1667
+ resolve_reference(
1668
+ reference,
1669
+ lambda id: self.get_floating_ip(id, options=options),
1670
+ lambda match: self.list_floating_ips(
1671
+ query=cast(
1672
+ m.ListFloatingIpsQuery, {**reference_scope(scope), **match, "limit": 2}
1673
+ ),
1674
+ options=options,
1675
+ ),
1676
+ True,
1677
+ "floating_ip",
1678
+ ),
1679
+ )
1680
+
1681
+ def get_interface(
1682
+ self, interface_id: str, *, options: RequestOptions | None = None
1683
+ ) -> ApiResponse[m.GetInterfaceResponse]:
1684
+ "Get interface"
1685
+ return cast(
1686
+ ApiResponse[m.GetInterfaceResponse],
1687
+ self._transport.request(
1688
+ "network",
1689
+ "https://network.{region}.basaltic.sh",
1690
+ _OPS["getInterface"],
1691
+ "json",
1692
+ {"interface_id": interface_id},
1693
+ UNSET,
1694
+ None,
1695
+ options,
1696
+ ),
1697
+ )
1698
+
1699
+ def get_interface_by_reference(
1700
+ self,
1701
+ reference: str,
1702
+ *,
1703
+ scope: m.GetInterfaceScope | None = None,
1704
+ options: RequestOptions | None = None,
1705
+ ) -> ApiResponse[m.GetInterfaceResource]:
1706
+ return cast(
1707
+ ApiResponse[m.GetInterfaceResource],
1708
+ resolve_reference(
1709
+ reference,
1710
+ lambda id: self.get_interface(id, options=options),
1711
+ lambda match: self.list_interfaces(
1712
+ query=cast(
1713
+ m.ListInterfacesQuery, {**reference_scope(scope), **match, "limit": 2}
1714
+ ),
1715
+ options=options,
1716
+ ),
1717
+ True,
1718
+ "interface",
1719
+ ),
1720
+ )
1721
+
1722
+ def get_interface_address(
1723
+ self, interface_id: str, address_id: str, *, options: RequestOptions | None = None
1724
+ ) -> ApiResponse[m.GetInterfaceAddressResponse]:
1725
+ "Get interface address"
1726
+ return cast(
1727
+ ApiResponse[m.GetInterfaceAddressResponse],
1728
+ self._transport.request(
1729
+ "network",
1730
+ "https://network.{region}.basaltic.sh",
1731
+ _OPS["getInterfaceAddress"],
1732
+ "json",
1733
+ {"interface_id": interface_id, "address_id": address_id},
1734
+ UNSET,
1735
+ None,
1736
+ options,
1737
+ ),
1738
+ )
1739
+
1740
+ def get_internet_gateway(
1741
+ self, internet_gateway_id: str, *, options: RequestOptions | None = None
1742
+ ) -> ApiResponse[m.GetInternetGatewayResponse]:
1743
+ "Get internet gateway"
1744
+ return cast(
1745
+ ApiResponse[m.GetInternetGatewayResponse],
1746
+ self._transport.request(
1747
+ "network",
1748
+ "https://network.{region}.basaltic.sh",
1749
+ _OPS["getInternetGateway"],
1750
+ "json",
1751
+ {"internet_gateway_id": internet_gateway_id},
1752
+ UNSET,
1753
+ None,
1754
+ options,
1755
+ ),
1756
+ )
1757
+
1758
+ def get_internet_gateway_by_reference(
1759
+ self,
1760
+ reference: str,
1761
+ *,
1762
+ scope: m.GetInternetGatewayScope | None = None,
1763
+ options: RequestOptions | None = None,
1764
+ ) -> ApiResponse[m.GetInternetGatewayResource]:
1765
+ return cast(
1766
+ ApiResponse[m.GetInternetGatewayResource],
1767
+ resolve_reference(
1768
+ reference,
1769
+ lambda id: self.get_internet_gateway(id, options=options),
1770
+ lambda match: self.list_internet_gateways(
1771
+ query=cast(
1772
+ m.ListInternetGatewaysQuery, {**reference_scope(scope), **match, "limit": 2}
1773
+ ),
1774
+ options=options,
1775
+ ),
1776
+ True,
1777
+ "internet_gateway",
1778
+ ),
1779
+ )
1780
+
1781
+ def get_nat_gateway(
1782
+ self, nat_gateway_id: str, *, options: RequestOptions | None = None
1783
+ ) -> ApiResponse[m.GetNATGatewayResponse]:
1784
+ "Get NAT gateway"
1785
+ return cast(
1786
+ ApiResponse[m.GetNATGatewayResponse],
1787
+ self._transport.request(
1788
+ "network",
1789
+ "https://network.{region}.basaltic.sh",
1790
+ _OPS["getNATGateway"],
1791
+ "json",
1792
+ {"nat_gateway_id": nat_gateway_id},
1793
+ UNSET,
1794
+ None,
1795
+ options,
1796
+ ),
1797
+ )
1798
+
1799
+ def get_nat_gateway_by_reference(
1800
+ self,
1801
+ reference: str,
1802
+ *,
1803
+ scope: m.GetNATGatewayScope | None = None,
1804
+ options: RequestOptions | None = None,
1805
+ ) -> ApiResponse[m.GetNATGatewayResource]:
1806
+ return cast(
1807
+ ApiResponse[m.GetNATGatewayResource],
1808
+ resolve_reference(
1809
+ reference,
1810
+ lambda id: self.get_nat_gateway(id, options=options),
1811
+ lambda match: self.list_nat_gateways(
1812
+ query=cast(
1813
+ m.ListNATGatewaysQuery, {**reference_scope(scope), **match, "limit": 2}
1814
+ ),
1815
+ options=options,
1816
+ ),
1817
+ True,
1818
+ "nat_gateway",
1819
+ ),
1820
+ )
1821
+
1822
+ def get_route(
1823
+ self, route_table_id: str, route_id: str, *, options: RequestOptions | None = None
1824
+ ) -> ApiResponse[m.GetRouteResponse]:
1825
+ "Get route"
1826
+ return cast(
1827
+ ApiResponse[m.GetRouteResponse],
1828
+ self._transport.request(
1829
+ "network",
1830
+ "https://network.{region}.basaltic.sh",
1831
+ _OPS["getRoute"],
1832
+ "json",
1833
+ {"route_table_id": route_table_id, "route_id": route_id},
1834
+ UNSET,
1835
+ None,
1836
+ options,
1837
+ ),
1838
+ )
1839
+
1840
+ def get_route_by_reference(
1841
+ self,
1842
+ route_table_id: str,
1843
+ reference: str,
1844
+ *,
1845
+ scope: m.GetRouteScope | None = None,
1846
+ options: RequestOptions | None = None,
1847
+ ) -> ApiResponse[m.GetRouteResource]:
1848
+ return cast(
1849
+ ApiResponse[m.GetRouteResource],
1850
+ resolve_reference(
1851
+ reference,
1852
+ lambda id: self.get_route(route_table_id, id, options=options),
1853
+ lambda match: self.list_routes(
1854
+ route_table_id,
1855
+ query=cast(m.ListRoutesQuery, {**reference_scope(scope), **match, "limit": 2}),
1856
+ options=options,
1857
+ ),
1858
+ True,
1859
+ "route",
1860
+ ),
1861
+ )
1862
+
1863
+ def get_route_table(
1864
+ self, route_table_id: str, *, options: RequestOptions | None = None
1865
+ ) -> ApiResponse[m.GetRouteTableResponse]:
1866
+ "Get route table"
1867
+ return cast(
1868
+ ApiResponse[m.GetRouteTableResponse],
1869
+ self._transport.request(
1870
+ "network",
1871
+ "https://network.{region}.basaltic.sh",
1872
+ _OPS["getRouteTable"],
1873
+ "json",
1874
+ {"route_table_id": route_table_id},
1875
+ UNSET,
1876
+ None,
1877
+ options,
1878
+ ),
1879
+ )
1880
+
1881
+ def get_route_table_by_reference(
1882
+ self,
1883
+ reference: str,
1884
+ *,
1885
+ scope: m.GetRouteTableScope | None = None,
1886
+ options: RequestOptions | None = None,
1887
+ ) -> ApiResponse[m.GetRouteTableResource]:
1888
+ return cast(
1889
+ ApiResponse[m.GetRouteTableResource],
1890
+ resolve_reference(
1891
+ reference,
1892
+ lambda id: self.get_route_table(id, options=options),
1893
+ lambda match: self.list_route_tables(
1894
+ query=cast(
1895
+ m.ListRouteTablesQuery, {**reference_scope(scope), **match, "limit": 2}
1896
+ ),
1897
+ options=options,
1898
+ ),
1899
+ True,
1900
+ "route_table",
1901
+ ),
1902
+ )
1903
+
1904
+ def get_security_group(
1905
+ self, security_group_id: str, *, options: RequestOptions | None = None
1906
+ ) -> ApiResponse[m.GetSecurityGroupResponse]:
1907
+ "Get security group"
1908
+ return cast(
1909
+ ApiResponse[m.GetSecurityGroupResponse],
1910
+ self._transport.request(
1911
+ "network",
1912
+ "https://network.{region}.basaltic.sh",
1913
+ _OPS["getSecurityGroup"],
1914
+ "json",
1915
+ {"security_group_id": security_group_id},
1916
+ UNSET,
1917
+ None,
1918
+ options,
1919
+ ),
1920
+ )
1921
+
1922
+ def get_security_group_by_reference(
1923
+ self,
1924
+ reference: str,
1925
+ *,
1926
+ scope: m.GetSecurityGroupScope | None = None,
1927
+ options: RequestOptions | None = None,
1928
+ ) -> ApiResponse[m.GetSecurityGroupResource]:
1929
+ return cast(
1930
+ ApiResponse[m.GetSecurityGroupResource],
1931
+ resolve_reference(
1932
+ reference,
1933
+ lambda id: self.get_security_group(id, options=options),
1934
+ lambda match: self.list_security_groups(
1935
+ query=cast(
1936
+ m.ListSecurityGroupsQuery, {**reference_scope(scope), **match, "limit": 2}
1937
+ ),
1938
+ options=options,
1939
+ ),
1940
+ True,
1941
+ "security_group",
1942
+ ),
1943
+ )
1944
+
1945
+ def get_security_group_rule(
1946
+ self, security_group_id: str, rule_id: str, *, options: RequestOptions | None = None
1947
+ ) -> ApiResponse[m.GetSecurityGroupRuleResponse]:
1948
+ "Get security group rule"
1949
+ return cast(
1950
+ ApiResponse[m.GetSecurityGroupRuleResponse],
1951
+ self._transport.request(
1952
+ "network",
1953
+ "https://network.{region}.basaltic.sh",
1954
+ _OPS["getSecurityGroupRule"],
1955
+ "json",
1956
+ {"security_group_id": security_group_id, "rule_id": rule_id},
1957
+ UNSET,
1958
+ None,
1959
+ options,
1960
+ ),
1961
+ )
1962
+
1963
+ def get_security_group_rule_by_reference(
1964
+ self,
1965
+ security_group_id: str,
1966
+ reference: str,
1967
+ *,
1968
+ scope: m.GetSecurityGroupRuleScope | None = None,
1969
+ options: RequestOptions | None = None,
1970
+ ) -> ApiResponse[m.GetSecurityGroupRuleResource]:
1971
+ return cast(
1972
+ ApiResponse[m.GetSecurityGroupRuleResource],
1973
+ resolve_reference(
1974
+ reference,
1975
+ lambda id: self.get_security_group_rule(security_group_id, id, options=options),
1976
+ lambda match: self.list_security_group_rules(
1977
+ security_group_id,
1978
+ query=cast(
1979
+ m.ListSecurityGroupRulesQuery,
1980
+ {**reference_scope(scope), **match, "limit": 2},
1981
+ ),
1982
+ options=options,
1983
+ ),
1984
+ True,
1985
+ "rule",
1986
+ ),
1987
+ )
1988
+
1989
+ def get_subnet(
1990
+ self, subnet_id: str, *, options: RequestOptions | None = None
1991
+ ) -> ApiResponse[m.GetSubnetResponse]:
1992
+ "Get subnet"
1993
+ return cast(
1994
+ ApiResponse[m.GetSubnetResponse],
1995
+ self._transport.request(
1996
+ "network",
1997
+ "https://network.{region}.basaltic.sh",
1998
+ _OPS["getSubnet"],
1999
+ "json",
2000
+ {"subnet_id": subnet_id},
2001
+ UNSET,
2002
+ None,
2003
+ options,
2004
+ ),
2005
+ )
2006
+
2007
+ def get_subnet_by_reference(
2008
+ self,
2009
+ reference: str,
2010
+ *,
2011
+ scope: m.GetSubnetScope | None = None,
2012
+ options: RequestOptions | None = None,
2013
+ ) -> ApiResponse[m.GetSubnetResource]:
2014
+ return cast(
2015
+ ApiResponse[m.GetSubnetResource],
2016
+ resolve_reference(
2017
+ reference,
2018
+ lambda id: self.get_subnet(id, options=options),
2019
+ lambda match: self.list_subnets(
2020
+ query=cast(m.ListSubnetsQuery, {**reference_scope(scope), **match, "limit": 2}),
2021
+ options=options,
2022
+ ),
2023
+ True,
2024
+ "subnet",
2025
+ ),
2026
+ )
2027
+
2028
+ def get_vpc(
2029
+ self, vpc_id: str, *, options: RequestOptions | None = None
2030
+ ) -> ApiResponse[m.GetVpcResponse]:
2031
+ "Get VPC"
2032
+ return cast(
2033
+ ApiResponse[m.GetVpcResponse],
2034
+ self._transport.request(
2035
+ "network",
2036
+ "https://network.{region}.basaltic.sh",
2037
+ _OPS["getVpc"],
2038
+ "json",
2039
+ {"vpc_id": vpc_id},
2040
+ UNSET,
2041
+ None,
2042
+ options,
2043
+ ),
2044
+ )
2045
+
2046
+ def get_vpc_by_reference(
2047
+ self,
2048
+ reference: str,
2049
+ *,
2050
+ scope: m.GetVpcScope | None = None,
2051
+ options: RequestOptions | None = None,
2052
+ ) -> ApiResponse[m.GetVpcResource]:
2053
+ return cast(
2054
+ ApiResponse[m.GetVpcResource],
2055
+ resolve_reference(
2056
+ reference,
2057
+ lambda id: self.get_vpc(id, options=options),
2058
+ lambda match: self.list_vpcs(
2059
+ query=cast(m.ListVpcsQuery, {**reference_scope(scope), **match, "limit": 2}),
2060
+ options=options,
2061
+ ),
2062
+ True,
2063
+ "vpc",
2064
+ ),
2065
+ )
2066
+
2067
+ def list_egress_only_gateway_routes(
2068
+ self,
2069
+ egress_only_gateway_id: str,
2070
+ *,
2071
+ query: m.ListEgressOnlyGatewayRoutesQuery | None = None,
2072
+ options: RequestOptions | None = None,
2073
+ ) -> Page[m.ListEgressOnlyGatewayRoutesResponse, m.ListEgressOnlyGatewayRoutesItem]:
2074
+ "List egress-only gateway routes"
2075
+ return cast(
2076
+ Page[m.ListEgressOnlyGatewayRoutesResponse, m.ListEgressOnlyGatewayRoutesItem],
2077
+ self._transport.request(
2078
+ "network",
2079
+ "https://network.{region}.basaltic.sh",
2080
+ _OPS["listEgressOnlyGatewayRoutes"],
2081
+ "page",
2082
+ {"egress_only_gateway_id": egress_only_gateway_id},
2083
+ UNSET,
2084
+ query,
2085
+ options,
2086
+ ),
2087
+ )
2088
+
2089
+ def list_egress_only_gateway_routes_all(
2090
+ self,
2091
+ egress_only_gateway_id: str,
2092
+ *,
2093
+ query: m.ListEgressOnlyGatewayRoutesQuery | None = None,
2094
+ options: RequestOptions | None = None,
2095
+ ) -> Iterator[m.ListEgressOnlyGatewayRoutesItem]:
2096
+ return iterate_pages(
2097
+ lambda marker: self.list_egress_only_gateway_routes(
2098
+ egress_only_gateway_id,
2099
+ query=cast(m.ListEgressOnlyGatewayRoutesQuery, {**(query or {}), "marker": marker}),
2100
+ options=options,
2101
+ ),
2102
+ (query or {}).get("marker", ""),
2103
+ )
2104
+
2105
+ def list_egress_only_gateways(
2106
+ self,
2107
+ *,
2108
+ query: m.ListEgressOnlyGatewaysQuery | None = None,
2109
+ options: RequestOptions | None = None,
2110
+ ) -> Page[m.ListEgressOnlyGatewaysResponse, m.ListEgressOnlyGatewaysItem]:
2111
+ "List egress-only gateways"
2112
+ return cast(
2113
+ Page[m.ListEgressOnlyGatewaysResponse, m.ListEgressOnlyGatewaysItem],
2114
+ self._transport.request(
2115
+ "network",
2116
+ "https://network.{region}.basaltic.sh",
2117
+ _OPS["listEgressOnlyGateways"],
2118
+ "page",
2119
+ {},
2120
+ UNSET,
2121
+ query,
2122
+ options,
2123
+ ),
2124
+ )
2125
+
2126
+ def list_egress_only_gateways_all(
2127
+ self,
2128
+ *,
2129
+ query: m.ListEgressOnlyGatewaysQuery | None = None,
2130
+ options: RequestOptions | None = None,
2131
+ ) -> Iterator[m.ListEgressOnlyGatewaysItem]:
2132
+ return iterate_pages(
2133
+ lambda marker: self.list_egress_only_gateways(
2134
+ query=cast(m.ListEgressOnlyGatewaysQuery, {**(query or {}), "marker": marker}),
2135
+ options=options,
2136
+ ),
2137
+ (query or {}).get("marker", ""),
2138
+ )
2139
+
2140
+ def list_floating_ips(
2141
+ self, *, query: m.ListFloatingIpsQuery | None = None, options: RequestOptions | None = None
2142
+ ) -> Page[m.ListFloatingIpsResponse, m.ListFloatingIpsItem]:
2143
+ "List floating IPs"
2144
+ return cast(
2145
+ Page[m.ListFloatingIpsResponse, m.ListFloatingIpsItem],
2146
+ self._transport.request(
2147
+ "network",
2148
+ "https://network.{region}.basaltic.sh",
2149
+ _OPS["listFloatingIps"],
2150
+ "page",
2151
+ {},
2152
+ UNSET,
2153
+ query,
2154
+ options,
2155
+ ),
2156
+ )
2157
+
2158
+ def list_floating_ips_all(
2159
+ self, *, query: m.ListFloatingIpsQuery | None = None, options: RequestOptions | None = None
2160
+ ) -> Iterator[m.ListFloatingIpsItem]:
2161
+ return iterate_pages(
2162
+ lambda marker: self.list_floating_ips(
2163
+ query=cast(m.ListFloatingIpsQuery, {**(query or {}), "marker": marker}),
2164
+ options=options,
2165
+ ),
2166
+ (query or {}).get("marker", ""),
2167
+ )
2168
+
2169
+ def list_interface_addresses(
2170
+ self, interface_id: str, *, options: RequestOptions | None = None
2171
+ ) -> Page[m.ListInterfaceAddressesResponse, m.ListInterfaceAddressesItem]:
2172
+ "List interface addresses"
2173
+ return cast(
2174
+ Page[m.ListInterfaceAddressesResponse, m.ListInterfaceAddressesItem],
2175
+ self._transport.request(
2176
+ "network",
2177
+ "https://network.{region}.basaltic.sh",
2178
+ _OPS["listInterfaceAddresses"],
2179
+ "page",
2180
+ {"interface_id": interface_id},
2181
+ UNSET,
2182
+ None,
2183
+ options,
2184
+ ),
2185
+ )
2186
+
2187
+ def list_interface_prefixes(
2188
+ self, interface_id: str, *, options: RequestOptions | None = None
2189
+ ) -> Page[m.ListInterfacePrefixesResponse, m.ListInterfacePrefixesItem]:
2190
+ "List interface prefixes"
2191
+ return cast(
2192
+ Page[m.ListInterfacePrefixesResponse, m.ListInterfacePrefixesItem],
2193
+ self._transport.request(
2194
+ "network",
2195
+ "https://network.{region}.basaltic.sh",
2196
+ _OPS["listInterfacePrefixes"],
2197
+ "page",
2198
+ {"interface_id": interface_id},
2199
+ UNSET,
2200
+ None,
2201
+ options,
2202
+ ),
2203
+ )
2204
+
2205
+ def list_interface_security_groups(
2206
+ self,
2207
+ interface_id: str,
2208
+ *,
2209
+ query: m.ListInterfaceSecurityGroupsQuery | None = None,
2210
+ options: RequestOptions | None = None,
2211
+ ) -> Page[m.ListInterfaceSecurityGroupsResponse, m.ListInterfaceSecurityGroupsItem]:
2212
+ "List interface security-group membership"
2213
+ return cast(
2214
+ Page[m.ListInterfaceSecurityGroupsResponse, m.ListInterfaceSecurityGroupsItem],
2215
+ self._transport.request(
2216
+ "network",
2217
+ "https://network.{region}.basaltic.sh",
2218
+ _OPS["listInterfaceSecurityGroups"],
2219
+ "page",
2220
+ {"interface_id": interface_id},
2221
+ UNSET,
2222
+ query,
2223
+ options,
2224
+ ),
2225
+ )
2226
+
2227
+ def list_interfaces(
2228
+ self, *, query: m.ListInterfacesQuery | None = None, options: RequestOptions | None = None
2229
+ ) -> Page[m.ListInterfacesResponse, m.ListInterfacesItem]:
2230
+ "List interfaces"
2231
+ return cast(
2232
+ Page[m.ListInterfacesResponse, m.ListInterfacesItem],
2233
+ self._transport.request(
2234
+ "network",
2235
+ "https://network.{region}.basaltic.sh",
2236
+ _OPS["listInterfaces"],
2237
+ "page",
2238
+ {},
2239
+ UNSET,
2240
+ query,
2241
+ options,
2242
+ ),
2243
+ )
2244
+
2245
+ def list_interfaces_all(
2246
+ self, *, query: m.ListInterfacesQuery | None = None, options: RequestOptions | None = None
2247
+ ) -> Iterator[m.ListInterfacesItem]:
2248
+ return iterate_pages(
2249
+ lambda marker: self.list_interfaces(
2250
+ query=cast(m.ListInterfacesQuery, {**(query or {}), "marker": marker}),
2251
+ options=options,
2252
+ ),
2253
+ (query or {}).get("marker", ""),
2254
+ )
2255
+
2256
+ def list_internet_gateway_routes(
2257
+ self,
2258
+ internet_gateway_id: str,
2259
+ *,
2260
+ query: m.ListInternetGatewayRoutesQuery | None = None,
2261
+ options: RequestOptions | None = None,
2262
+ ) -> Page[m.ListInternetGatewayRoutesResponse, m.ListInternetGatewayRoutesItem]:
2263
+ "List internet gateway routes"
2264
+ return cast(
2265
+ Page[m.ListInternetGatewayRoutesResponse, m.ListInternetGatewayRoutesItem],
2266
+ self._transport.request(
2267
+ "network",
2268
+ "https://network.{region}.basaltic.sh",
2269
+ _OPS["listInternetGatewayRoutes"],
2270
+ "page",
2271
+ {"internet_gateway_id": internet_gateway_id},
2272
+ UNSET,
2273
+ query,
2274
+ options,
2275
+ ),
2276
+ )
2277
+
2278
+ def list_internet_gateway_routes_all(
2279
+ self,
2280
+ internet_gateway_id: str,
2281
+ *,
2282
+ query: m.ListInternetGatewayRoutesQuery | None = None,
2283
+ options: RequestOptions | None = None,
2284
+ ) -> Iterator[m.ListInternetGatewayRoutesItem]:
2285
+ return iterate_pages(
2286
+ lambda marker: self.list_internet_gateway_routes(
2287
+ internet_gateway_id,
2288
+ query=cast(m.ListInternetGatewayRoutesQuery, {**(query or {}), "marker": marker}),
2289
+ options=options,
2290
+ ),
2291
+ (query or {}).get("marker", ""),
2292
+ )
2293
+
2294
+ def list_internet_gateways(
2295
+ self,
2296
+ *,
2297
+ query: m.ListInternetGatewaysQuery | None = None,
2298
+ options: RequestOptions | None = None,
2299
+ ) -> Page[m.ListInternetGatewaysResponse, m.ListInternetGatewaysItem]:
2300
+ "List internet gateways"
2301
+ return cast(
2302
+ Page[m.ListInternetGatewaysResponse, m.ListInternetGatewaysItem],
2303
+ self._transport.request(
2304
+ "network",
2305
+ "https://network.{region}.basaltic.sh",
2306
+ _OPS["listInternetGateways"],
2307
+ "page",
2308
+ {},
2309
+ UNSET,
2310
+ query,
2311
+ options,
2312
+ ),
2313
+ )
2314
+
2315
+ def list_internet_gateways_all(
2316
+ self,
2317
+ *,
2318
+ query: m.ListInternetGatewaysQuery | None = None,
2319
+ options: RequestOptions | None = None,
2320
+ ) -> Iterator[m.ListInternetGatewaysItem]:
2321
+ return iterate_pages(
2322
+ lambda marker: self.list_internet_gateways(
2323
+ query=cast(m.ListInternetGatewaysQuery, {**(query or {}), "marker": marker}),
2324
+ options=options,
2325
+ ),
2326
+ (query or {}).get("marker", ""),
2327
+ )
2328
+
2329
+ def list_nat_gateway_routes(
2330
+ self,
2331
+ nat_gateway_id: str,
2332
+ *,
2333
+ query: m.ListNATGatewayRoutesQuery | None = None,
2334
+ options: RequestOptions | None = None,
2335
+ ) -> Page[m.ListNATGatewayRoutesResponse, m.ListNATGatewayRoutesItem]:
2336
+ "List NAT gateway routes"
2337
+ return cast(
2338
+ Page[m.ListNATGatewayRoutesResponse, m.ListNATGatewayRoutesItem],
2339
+ self._transport.request(
2340
+ "network",
2341
+ "https://network.{region}.basaltic.sh",
2342
+ _OPS["listNATGatewayRoutes"],
2343
+ "page",
2344
+ {"nat_gateway_id": nat_gateway_id},
2345
+ UNSET,
2346
+ query,
2347
+ options,
2348
+ ),
2349
+ )
2350
+
2351
+ def list_nat_gateway_routes_all(
2352
+ self,
2353
+ nat_gateway_id: str,
2354
+ *,
2355
+ query: m.ListNATGatewayRoutesQuery | None = None,
2356
+ options: RequestOptions | None = None,
2357
+ ) -> Iterator[m.ListNATGatewayRoutesItem]:
2358
+ return iterate_pages(
2359
+ lambda marker: self.list_nat_gateway_routes(
2360
+ nat_gateway_id,
2361
+ query=cast(m.ListNATGatewayRoutesQuery, {**(query or {}), "marker": marker}),
2362
+ options=options,
2363
+ ),
2364
+ (query or {}).get("marker", ""),
2365
+ )
2366
+
2367
+ def list_nat_gateways(
2368
+ self, *, query: m.ListNATGatewaysQuery | None = None, options: RequestOptions | None = None
2369
+ ) -> Page[m.ListNATGatewaysResponse, m.ListNATGatewaysItem]:
2370
+ "List NAT gateways"
2371
+ return cast(
2372
+ Page[m.ListNATGatewaysResponse, m.ListNATGatewaysItem],
2373
+ self._transport.request(
2374
+ "network",
2375
+ "https://network.{region}.basaltic.sh",
2376
+ _OPS["listNATGateways"],
2377
+ "page",
2378
+ {},
2379
+ UNSET,
2380
+ query,
2381
+ options,
2382
+ ),
2383
+ )
2384
+
2385
+ def list_nat_gateways_all(
2386
+ self, *, query: m.ListNATGatewaysQuery | None = None, options: RequestOptions | None = None
2387
+ ) -> Iterator[m.ListNATGatewaysItem]:
2388
+ return iterate_pages(
2389
+ lambda marker: self.list_nat_gateways(
2390
+ query=cast(m.ListNATGatewaysQuery, {**(query or {}), "marker": marker}),
2391
+ options=options,
2392
+ ),
2393
+ (query or {}).get("marker", ""),
2394
+ )
2395
+
2396
+ def list_prefix_pools(
2397
+ self, vpc_id: str, *, options: RequestOptions | None = None
2398
+ ) -> Page[m.ListPrefixPoolsResponse, m.ListPrefixPoolsItem]:
2399
+ "List prefix pools"
2400
+ return cast(
2401
+ Page[m.ListPrefixPoolsResponse, m.ListPrefixPoolsItem],
2402
+ self._transport.request(
2403
+ "network",
2404
+ "https://network.{region}.basaltic.sh",
2405
+ _OPS["listPrefixPools"],
2406
+ "page",
2407
+ {"vpc_id": vpc_id},
2408
+ UNSET,
2409
+ None,
2410
+ options,
2411
+ ),
2412
+ )
2413
+
2414
+ def list_route_tables(
2415
+ self, *, query: m.ListRouteTablesQuery | None = None, options: RequestOptions | None = None
2416
+ ) -> Page[m.ListRouteTablesResponse, m.ListRouteTablesItem]:
2417
+ "List route tables"
2418
+ return cast(
2419
+ Page[m.ListRouteTablesResponse, m.ListRouteTablesItem],
2420
+ self._transport.request(
2421
+ "network",
2422
+ "https://network.{region}.basaltic.sh",
2423
+ _OPS["listRouteTables"],
2424
+ "page",
2425
+ {},
2426
+ UNSET,
2427
+ query,
2428
+ options,
2429
+ ),
2430
+ )
2431
+
2432
+ def list_route_tables_all(
2433
+ self, *, query: m.ListRouteTablesQuery | None = None, options: RequestOptions | None = None
2434
+ ) -> Iterator[m.ListRouteTablesItem]:
2435
+ return iterate_pages(
2436
+ lambda marker: self.list_route_tables(
2437
+ query=cast(m.ListRouteTablesQuery, {**(query or {}), "marker": marker}),
2438
+ options=options,
2439
+ ),
2440
+ (query or {}).get("marker", ""),
2441
+ )
2442
+
2443
+ def list_routes(
2444
+ self,
2445
+ route_table_id: str,
2446
+ *,
2447
+ query: m.ListRoutesQuery | None = None,
2448
+ options: RequestOptions | None = None,
2449
+ ) -> Page[m.ListRoutesResponse, m.ListRoutesItem]:
2450
+ "List routes"
2451
+ return cast(
2452
+ Page[m.ListRoutesResponse, m.ListRoutesItem],
2453
+ self._transport.request(
2454
+ "network",
2455
+ "https://network.{region}.basaltic.sh",
2456
+ _OPS["listRoutes"],
2457
+ "page",
2458
+ {"route_table_id": route_table_id},
2459
+ UNSET,
2460
+ query,
2461
+ options,
2462
+ ),
2463
+ )
2464
+
2465
+ def list_routes_all(
2466
+ self,
2467
+ route_table_id: str,
2468
+ *,
2469
+ query: m.ListRoutesQuery | None = None,
2470
+ options: RequestOptions | None = None,
2471
+ ) -> Iterator[m.ListRoutesItem]:
2472
+ return iterate_pages(
2473
+ lambda marker: self.list_routes(
2474
+ route_table_id,
2475
+ query=cast(m.ListRoutesQuery, {**(query or {}), "marker": marker}),
2476
+ options=options,
2477
+ ),
2478
+ (query or {}).get("marker", ""),
2479
+ )
2480
+
2481
+ def list_security_group_rules(
2482
+ self,
2483
+ security_group_id: str,
2484
+ *,
2485
+ query: m.ListSecurityGroupRulesQuery | None = None,
2486
+ options: RequestOptions | None = None,
2487
+ ) -> Page[m.ListSecurityGroupRulesResponse, m.ListSecurityGroupRulesItem]:
2488
+ "List security group rules"
2489
+ return cast(
2490
+ Page[m.ListSecurityGroupRulesResponse, m.ListSecurityGroupRulesItem],
2491
+ self._transport.request(
2492
+ "network",
2493
+ "https://network.{region}.basaltic.sh",
2494
+ _OPS["listSecurityGroupRules"],
2495
+ "page",
2496
+ {"security_group_id": security_group_id},
2497
+ UNSET,
2498
+ query,
2499
+ options,
2500
+ ),
2501
+ )
2502
+
2503
+ def list_security_group_rules_all(
2504
+ self,
2505
+ security_group_id: str,
2506
+ *,
2507
+ query: m.ListSecurityGroupRulesQuery | None = None,
2508
+ options: RequestOptions | None = None,
2509
+ ) -> Iterator[m.ListSecurityGroupRulesItem]:
2510
+ return iterate_pages(
2511
+ lambda marker: self.list_security_group_rules(
2512
+ security_group_id,
2513
+ query=cast(m.ListSecurityGroupRulesQuery, {**(query or {}), "marker": marker}),
2514
+ options=options,
2515
+ ),
2516
+ (query or {}).get("marker", ""),
2517
+ )
2518
+
2519
+ def list_security_groups(
2520
+ self,
2521
+ *,
2522
+ query: m.ListSecurityGroupsQuery | None = None,
2523
+ options: RequestOptions | None = None,
2524
+ ) -> Page[m.ListSecurityGroupsResponse, m.ListSecurityGroupsItem]:
2525
+ "List security groups"
2526
+ return cast(
2527
+ Page[m.ListSecurityGroupsResponse, m.ListSecurityGroupsItem],
2528
+ self._transport.request(
2529
+ "network",
2530
+ "https://network.{region}.basaltic.sh",
2531
+ _OPS["listSecurityGroups"],
2532
+ "page",
2533
+ {},
2534
+ UNSET,
2535
+ query,
2536
+ options,
2537
+ ),
2538
+ )
2539
+
2540
+ def list_security_groups_all(
2541
+ self,
2542
+ *,
2543
+ query: m.ListSecurityGroupsQuery | None = None,
2544
+ options: RequestOptions | None = None,
2545
+ ) -> Iterator[m.ListSecurityGroupsItem]:
2546
+ return iterate_pages(
2547
+ lambda marker: self.list_security_groups(
2548
+ query=cast(m.ListSecurityGroupsQuery, {**(query or {}), "marker": marker}),
2549
+ options=options,
2550
+ ),
2551
+ (query or {}).get("marker", ""),
2552
+ )
2553
+
2554
+ def list_subnets(
2555
+ self, *, query: m.ListSubnetsQuery | None = None, options: RequestOptions | None = None
2556
+ ) -> Page[m.ListSubnetsResponse, m.ListSubnetsItem]:
2557
+ "List subnets"
2558
+ return cast(
2559
+ Page[m.ListSubnetsResponse, m.ListSubnetsItem],
2560
+ self._transport.request(
2561
+ "network",
2562
+ "https://network.{region}.basaltic.sh",
2563
+ _OPS["listSubnets"],
2564
+ "page",
2565
+ {},
2566
+ UNSET,
2567
+ query,
2568
+ options,
2569
+ ),
2570
+ )
2571
+
2572
+ def list_subnets_all(
2573
+ self, *, query: m.ListSubnetsQuery | None = None, options: RequestOptions | None = None
2574
+ ) -> Iterator[m.ListSubnetsItem]:
2575
+ return iterate_pages(
2576
+ lambda marker: self.list_subnets(
2577
+ query=cast(m.ListSubnetsQuery, {**(query or {}), "marker": marker}), options=options
2578
+ ),
2579
+ (query or {}).get("marker", ""),
2580
+ )
2581
+
2582
+ def list_vpcs(
2583
+ self, *, query: m.ListVpcsQuery | None = None, options: RequestOptions | None = None
2584
+ ) -> Page[m.ListVpcsResponse, m.ListVpcsItem]:
2585
+ "List VPCs"
2586
+ return cast(
2587
+ Page[m.ListVpcsResponse, m.ListVpcsItem],
2588
+ self._transport.request(
2589
+ "network",
2590
+ "https://network.{region}.basaltic.sh",
2591
+ _OPS["listVpcs"],
2592
+ "page",
2593
+ {},
2594
+ UNSET,
2595
+ query,
2596
+ options,
2597
+ ),
2598
+ )
2599
+
2600
+ def list_vpcs_all(
2601
+ self, *, query: m.ListVpcsQuery | None = None, options: RequestOptions | None = None
2602
+ ) -> Iterator[m.ListVpcsItem]:
2603
+ return iterate_pages(
2604
+ lambda marker: self.list_vpcs(
2605
+ query=cast(m.ListVpcsQuery, {**(query or {}), "marker": marker}), options=options
2606
+ ),
2607
+ (query or {}).get("marker", ""),
2608
+ )
2609
+
2610
+ def set_interface_security_groups(
2611
+ self,
2612
+ interface_id: str,
2613
+ body: m.SetInterfaceSecurityGroupsBody,
2614
+ *,
2615
+ options: RequestOptions | None = None,
2616
+ ) -> ApiResponse[m.SetInterfaceSecurityGroupsResponse]:
2617
+ "Set interface security-group membership"
2618
+ return cast(
2619
+ ApiResponse[m.SetInterfaceSecurityGroupsResponse],
2620
+ self._transport.request(
2621
+ "network",
2622
+ "https://network.{region}.basaltic.sh",
2623
+ _OPS["setInterfaceSecurityGroups"],
2624
+ "json",
2625
+ {"interface_id": interface_id},
2626
+ body,
2627
+ None,
2628
+ options,
2629
+ ),
2630
+ )
2631
+
2632
+ def update_egress_only_gateway(
2633
+ self,
2634
+ egress_only_gateway_id: str,
2635
+ body: m.UpdateEgressOnlyGatewayBody,
2636
+ *,
2637
+ options: RequestOptions | None = None,
2638
+ ) -> ApiResponse[m.UpdateEgressOnlyGatewayResponse]:
2639
+ "Update egress-only gateway"
2640
+ return cast(
2641
+ ApiResponse[m.UpdateEgressOnlyGatewayResponse],
2642
+ self._transport.request(
2643
+ "network",
2644
+ "https://network.{region}.basaltic.sh",
2645
+ _OPS["updateEgressOnlyGateway"],
2646
+ "json",
2647
+ {"egress_only_gateway_id": egress_only_gateway_id},
2648
+ body,
2649
+ None,
2650
+ options,
2651
+ ),
2652
+ )
2653
+
2654
+ def update_floating_ip(
2655
+ self,
2656
+ floating_ip_id: str,
2657
+ body: m.UpdateFloatingIpBody,
2658
+ *,
2659
+ options: RequestOptions | None = None,
2660
+ ) -> ApiResponse[m.UpdateFloatingIpResponse]:
2661
+ "Update floating IP"
2662
+ return cast(
2663
+ ApiResponse[m.UpdateFloatingIpResponse],
2664
+ self._transport.request(
2665
+ "network",
2666
+ "https://network.{region}.basaltic.sh",
2667
+ _OPS["updateFloatingIp"],
2668
+ "json",
2669
+ {"floating_ip_id": floating_ip_id},
2670
+ body,
2671
+ None,
2672
+ options,
2673
+ ),
2674
+ )
2675
+
2676
+ def update_interface(
2677
+ self,
2678
+ interface_id: str,
2679
+ body: m.UpdateInterfaceBody,
2680
+ *,
2681
+ options: RequestOptions | None = None,
2682
+ ) -> ApiResponse[m.UpdateInterfaceResponse]:
2683
+ "Update interface"
2684
+ return cast(
2685
+ ApiResponse[m.UpdateInterfaceResponse],
2686
+ self._transport.request(
2687
+ "network",
2688
+ "https://network.{region}.basaltic.sh",
2689
+ _OPS["updateInterface"],
2690
+ "json",
2691
+ {"interface_id": interface_id},
2692
+ body,
2693
+ None,
2694
+ options,
2695
+ ),
2696
+ )
2697
+
2698
+ def update_internet_gateway(
2699
+ self,
2700
+ internet_gateway_id: str,
2701
+ body: m.UpdateInternetGatewayBody,
2702
+ *,
2703
+ options: RequestOptions | None = None,
2704
+ ) -> ApiResponse[m.UpdateInternetGatewayResponse]:
2705
+ "Update internet gateway"
2706
+ return cast(
2707
+ ApiResponse[m.UpdateInternetGatewayResponse],
2708
+ self._transport.request(
2709
+ "network",
2710
+ "https://network.{region}.basaltic.sh",
2711
+ _OPS["updateInternetGateway"],
2712
+ "json",
2713
+ {"internet_gateway_id": internet_gateway_id},
2714
+ body,
2715
+ None,
2716
+ options,
2717
+ ),
2718
+ )
2719
+
2720
+ def update_nat_gateway(
2721
+ self,
2722
+ nat_gateway_id: str,
2723
+ body: m.UpdateNATGatewayBody,
2724
+ *,
2725
+ options: RequestOptions | None = None,
2726
+ ) -> ApiResponse[m.UpdateNATGatewayResponse]:
2727
+ "Update NAT gateway"
2728
+ return cast(
2729
+ ApiResponse[m.UpdateNATGatewayResponse],
2730
+ self._transport.request(
2731
+ "network",
2732
+ "https://network.{region}.basaltic.sh",
2733
+ _OPS["updateNATGateway"],
2734
+ "json",
2735
+ {"nat_gateway_id": nat_gateway_id},
2736
+ body,
2737
+ None,
2738
+ options,
2739
+ ),
2740
+ )
2741
+
2742
+ def update_route(
2743
+ self,
2744
+ route_table_id: str,
2745
+ route_id: str,
2746
+ body: m.UpdateRouteBody,
2747
+ *,
2748
+ options: RequestOptions | None = None,
2749
+ ) -> ApiResponse[m.UpdateRouteResponse]:
2750
+ "Update route"
2751
+ return cast(
2752
+ ApiResponse[m.UpdateRouteResponse],
2753
+ self._transport.request(
2754
+ "network",
2755
+ "https://network.{region}.basaltic.sh",
2756
+ _OPS["updateRoute"],
2757
+ "json",
2758
+ {"route_table_id": route_table_id, "route_id": route_id},
2759
+ body,
2760
+ None,
2761
+ options,
2762
+ ),
2763
+ )
2764
+
2765
+ def update_route_table(
2766
+ self,
2767
+ route_table_id: str,
2768
+ body: m.UpdateRouteTableBody,
2769
+ *,
2770
+ options: RequestOptions | None = None,
2771
+ ) -> ApiResponse[m.UpdateRouteTableResponse]:
2772
+ "Update route table"
2773
+ return cast(
2774
+ ApiResponse[m.UpdateRouteTableResponse],
2775
+ self._transport.request(
2776
+ "network",
2777
+ "https://network.{region}.basaltic.sh",
2778
+ _OPS["updateRouteTable"],
2779
+ "json",
2780
+ {"route_table_id": route_table_id},
2781
+ body,
2782
+ None,
2783
+ options,
2784
+ ),
2785
+ )
2786
+
2787
+ def update_security_group(
2788
+ self,
2789
+ security_group_id: str,
2790
+ body: m.UpdateSecurityGroupBody,
2791
+ *,
2792
+ options: RequestOptions | None = None,
2793
+ ) -> ApiResponse[m.UpdateSecurityGroupResponse]:
2794
+ "Update security group"
2795
+ return cast(
2796
+ ApiResponse[m.UpdateSecurityGroupResponse],
2797
+ self._transport.request(
2798
+ "network",
2799
+ "https://network.{region}.basaltic.sh",
2800
+ _OPS["updateSecurityGroup"],
2801
+ "json",
2802
+ {"security_group_id": security_group_id},
2803
+ body,
2804
+ None,
2805
+ options,
2806
+ ),
2807
+ )
2808
+
2809
+ def update_subnet(
2810
+ self, subnet_id: str, body: m.UpdateSubnetBody, *, options: RequestOptions | None = None
2811
+ ) -> ApiResponse[m.UpdateSubnetResponse]:
2812
+ "Update subnet"
2813
+ return cast(
2814
+ ApiResponse[m.UpdateSubnetResponse],
2815
+ self._transport.request(
2816
+ "network",
2817
+ "https://network.{region}.basaltic.sh",
2818
+ _OPS["updateSubnet"],
2819
+ "json",
2820
+ {"subnet_id": subnet_id},
2821
+ body,
2822
+ None,
2823
+ options,
2824
+ ),
2825
+ )
2826
+
2827
+ def update_vpc(
2828
+ self, vpc_id: str, body: m.UpdateVpcBody, *, options: RequestOptions | None = None
2829
+ ) -> ApiResponse[m.UpdateVpcResponse]:
2830
+ "Update VPC"
2831
+ return cast(
2832
+ ApiResponse[m.UpdateVpcResponse],
2833
+ self._transport.request(
2834
+ "network",
2835
+ "https://network.{region}.basaltic.sh",
2836
+ _OPS["updateVpc"],
2837
+ "json",
2838
+ {"vpc_id": vpc_id},
2839
+ body,
2840
+ None,
2841
+ options,
2842
+ ),
2843
+ )
2844
+
2845
+
2846
+ class AsyncNetworkService:
2847
+ def __init__(self, transport: AsyncTransport) -> None:
2848
+ self._transport = transport
2849
+
2850
+ async def attach_floating_ip(
2851
+ self,
2852
+ floating_ip_id: str,
2853
+ body: m.AttachFloatingIpBody,
2854
+ *,
2855
+ options: RequestOptions | None = None,
2856
+ ) -> ApiResponse[m.AttachFloatingIpResponse]:
2857
+ "Attach a floating IP to an interface"
2858
+ return cast(
2859
+ ApiResponse[m.AttachFloatingIpResponse],
2860
+ await self._transport.request(
2861
+ "network",
2862
+ "https://network.{region}.basaltic.sh",
2863
+ _OPS["attachFloatingIp"],
2864
+ "json",
2865
+ {"floating_ip_id": floating_ip_id},
2866
+ body,
2867
+ None,
2868
+ options,
2869
+ ),
2870
+ )
2871
+
2872
+ async def attach_internet_gateway(
2873
+ self,
2874
+ internet_gateway_id: str,
2875
+ body: m.AttachInternetGatewayBody,
2876
+ *,
2877
+ options: RequestOptions | None = None,
2878
+ ) -> ApiResponse[m.AttachInternetGatewayResponse]:
2879
+ "Attach internet gateway to a VPC"
2880
+ return cast(
2881
+ ApiResponse[m.AttachInternetGatewayResponse],
2882
+ await self._transport.request(
2883
+ "network",
2884
+ "https://network.{region}.basaltic.sh",
2885
+ _OPS["attachInternetGateway"],
2886
+ "json",
2887
+ {"internet_gateway_id": internet_gateway_id},
2888
+ body,
2889
+ None,
2890
+ options,
2891
+ ),
2892
+ )
2893
+
2894
+ async def create_egress_only_gateway(
2895
+ self, body: m.CreateEgressOnlyGatewayBody, *, options: RequestOptions | None = None
2896
+ ) -> ApiResponse[m.CreateEgressOnlyGatewayResponse]:
2897
+ "Create egress-only gateway"
2898
+ return cast(
2899
+ ApiResponse[m.CreateEgressOnlyGatewayResponse],
2900
+ await self._transport.request(
2901
+ "network",
2902
+ "https://network.{region}.basaltic.sh",
2903
+ _OPS["createEgressOnlyGateway"],
2904
+ "json",
2905
+ {},
2906
+ body,
2907
+ None,
2908
+ options,
2909
+ ),
2910
+ )
2911
+
2912
+ async def create_floating_ip(
2913
+ self, body: m.CreateFloatingIpBody | Unset = UNSET, *, options: RequestOptions | None = None
2914
+ ) -> ApiResponse[m.CreateFloatingIpResponse]:
2915
+ "Allocate floating IP"
2916
+ return cast(
2917
+ ApiResponse[m.CreateFloatingIpResponse],
2918
+ await self._transport.request(
2919
+ "network",
2920
+ "https://network.{region}.basaltic.sh",
2921
+ _OPS["createFloatingIp"],
2922
+ "json",
2923
+ {},
2924
+ body,
2925
+ None,
2926
+ options,
2927
+ ),
2928
+ )
2929
+
2930
+ async def create_interface(
2931
+ self, body: m.CreateInterfaceBody, *, options: RequestOptions | None = None
2932
+ ) -> ApiResponse[m.CreateInterfaceResponse]:
2933
+ "Create interface"
2934
+ return cast(
2935
+ ApiResponse[m.CreateInterfaceResponse],
2936
+ await self._transport.request(
2937
+ "network",
2938
+ "https://network.{region}.basaltic.sh",
2939
+ _OPS["createInterface"],
2940
+ "json",
2941
+ {},
2942
+ body,
2943
+ None,
2944
+ options,
2945
+ ),
2946
+ )
2947
+
2948
+ async def create_interface_address(
2949
+ self,
2950
+ interface_id: str,
2951
+ body: m.CreateInterfaceAddressBody,
2952
+ *,
2953
+ options: RequestOptions | None = None,
2954
+ ) -> ApiResponse[m.CreateInterfaceAddressResponse]:
2955
+ "Create interface address"
2956
+ return cast(
2957
+ ApiResponse[m.CreateInterfaceAddressResponse],
2958
+ await self._transport.request(
2959
+ "network",
2960
+ "https://network.{region}.basaltic.sh",
2961
+ _OPS["createInterfaceAddress"],
2962
+ "json",
2963
+ {"interface_id": interface_id},
2964
+ body,
2965
+ None,
2966
+ options,
2967
+ ),
2968
+ )
2969
+
2970
+ async def create_interface_prefix(
2971
+ self,
2972
+ interface_id: str,
2973
+ body: m.CreateInterfacePrefixBody,
2974
+ *,
2975
+ options: RequestOptions | None = None,
2976
+ ) -> ApiResponse[m.CreateInterfacePrefixResponse]:
2977
+ "Create interface prefix"
2978
+ return cast(
2979
+ ApiResponse[m.CreateInterfacePrefixResponse],
2980
+ await self._transport.request(
2981
+ "network",
2982
+ "https://network.{region}.basaltic.sh",
2983
+ _OPS["createInterfacePrefix"],
2984
+ "json",
2985
+ {"interface_id": interface_id},
2986
+ body,
2987
+ None,
2988
+ options,
2989
+ ),
2990
+ )
2991
+
2992
+ async def create_internet_gateway(
2993
+ self, body: m.CreateInternetGatewayBody, *, options: RequestOptions | None = None
2994
+ ) -> ApiResponse[m.CreateInternetGatewayResponse]:
2995
+ "Create internet gateway"
2996
+ return cast(
2997
+ ApiResponse[m.CreateInternetGatewayResponse],
2998
+ await self._transport.request(
2999
+ "network",
3000
+ "https://network.{region}.basaltic.sh",
3001
+ _OPS["createInternetGateway"],
3002
+ "json",
3003
+ {},
3004
+ body,
3005
+ None,
3006
+ options,
3007
+ ),
3008
+ )
3009
+
3010
+ async def create_nat_gateway(
3011
+ self, body: m.CreateNATGatewayBody, *, options: RequestOptions | None = None
3012
+ ) -> ApiResponse[m.CreateNATGatewayResponse]:
3013
+ "Create NAT gateway"
3014
+ return cast(
3015
+ ApiResponse[m.CreateNATGatewayResponse],
3016
+ await self._transport.request(
3017
+ "network",
3018
+ "https://network.{region}.basaltic.sh",
3019
+ _OPS["createNATGateway"],
3020
+ "json",
3021
+ {},
3022
+ body,
3023
+ None,
3024
+ options,
3025
+ ),
3026
+ )
3027
+
3028
+ async def create_prefix_pool(
3029
+ self, vpc_id: str, body: m.CreatePrefixPoolBody, *, options: RequestOptions | None = None
3030
+ ) -> ApiResponse[m.CreatePrefixPoolResponse]:
3031
+ "Create prefix pool"
3032
+ return cast(
3033
+ ApiResponse[m.CreatePrefixPoolResponse],
3034
+ await self._transport.request(
3035
+ "network",
3036
+ "https://network.{region}.basaltic.sh",
3037
+ _OPS["createPrefixPool"],
3038
+ "json",
3039
+ {"vpc_id": vpc_id},
3040
+ body,
3041
+ None,
3042
+ options,
3043
+ ),
3044
+ )
3045
+
3046
+ async def create_route(
3047
+ self, route_table_id: str, body: m.CreateRouteBody, *, options: RequestOptions | None = None
3048
+ ) -> ApiResponse[m.CreateRouteResponse]:
3049
+ "Create route"
3050
+ return cast(
3051
+ ApiResponse[m.CreateRouteResponse],
3052
+ await self._transport.request(
3053
+ "network",
3054
+ "https://network.{region}.basaltic.sh",
3055
+ _OPS["createRoute"],
3056
+ "json",
3057
+ {"route_table_id": route_table_id},
3058
+ body,
3059
+ None,
3060
+ options,
3061
+ ),
3062
+ )
3063
+
3064
+ async def create_route_table(
3065
+ self, body: m.CreateRouteTableBody, *, options: RequestOptions | None = None
3066
+ ) -> ApiResponse[m.CreateRouteTableResponse]:
3067
+ "Create route table"
3068
+ return cast(
3069
+ ApiResponse[m.CreateRouteTableResponse],
3070
+ await self._transport.request(
3071
+ "network",
3072
+ "https://network.{region}.basaltic.sh",
3073
+ _OPS["createRouteTable"],
3074
+ "json",
3075
+ {},
3076
+ body,
3077
+ None,
3078
+ options,
3079
+ ),
3080
+ )
3081
+
3082
+ async def create_security_group(
3083
+ self, body: m.CreateSecurityGroupBody, *, options: RequestOptions | None = None
3084
+ ) -> ApiResponse[m.CreateSecurityGroupResponse]:
3085
+ "Create security group"
3086
+ return cast(
3087
+ ApiResponse[m.CreateSecurityGroupResponse],
3088
+ await self._transport.request(
3089
+ "network",
3090
+ "https://network.{region}.basaltic.sh",
3091
+ _OPS["createSecurityGroup"],
3092
+ "json",
3093
+ {},
3094
+ body,
3095
+ None,
3096
+ options,
3097
+ ),
3098
+ )
3099
+
3100
+ async def create_security_group_rule(
3101
+ self,
3102
+ security_group_id: str,
3103
+ body: m.CreateSecurityGroupRuleBody,
3104
+ *,
3105
+ options: RequestOptions | None = None,
3106
+ ) -> ApiResponse[m.CreateSecurityGroupRuleResponse]:
3107
+ "Create security group rule"
3108
+ return cast(
3109
+ ApiResponse[m.CreateSecurityGroupRuleResponse],
3110
+ await self._transport.request(
3111
+ "network",
3112
+ "https://network.{region}.basaltic.sh",
3113
+ _OPS["createSecurityGroupRule"],
3114
+ "json",
3115
+ {"security_group_id": security_group_id},
3116
+ body,
3117
+ None,
3118
+ options,
3119
+ ),
3120
+ )
3121
+
3122
+ async def create_subnet(
3123
+ self, body: m.CreateSubnetBody, *, options: RequestOptions | None = None
3124
+ ) -> ApiResponse[m.CreateSubnetResponse]:
3125
+ "Create subnet"
3126
+ return cast(
3127
+ ApiResponse[m.CreateSubnetResponse],
3128
+ await self._transport.request(
3129
+ "network",
3130
+ "https://network.{region}.basaltic.sh",
3131
+ _OPS["createSubnet"],
3132
+ "json",
3133
+ {},
3134
+ body,
3135
+ None,
3136
+ options,
3137
+ ),
3138
+ )
3139
+
3140
+ async def create_vpc(
3141
+ self, body: m.CreateVpcBody, *, options: RequestOptions | None = None
3142
+ ) -> ApiResponse[m.CreateVpcResponse]:
3143
+ "Create VPC"
3144
+ return cast(
3145
+ ApiResponse[m.CreateVpcResponse],
3146
+ await self._transport.request(
3147
+ "network",
3148
+ "https://network.{region}.basaltic.sh",
3149
+ _OPS["createVpc"],
3150
+ "json",
3151
+ {},
3152
+ body,
3153
+ None,
3154
+ options,
3155
+ ),
3156
+ )
3157
+
3158
+ async def delete_egress_only_gateway(
3159
+ self, egress_only_gateway_id: str, *, options: RequestOptions | None = None
3160
+ ) -> None:
3161
+ "Delete egress-only gateway"
3162
+ return cast(
3163
+ None,
3164
+ await self._transport.request(
3165
+ "network",
3166
+ "https://network.{region}.basaltic.sh",
3167
+ _OPS["deleteEgressOnlyGateway"],
3168
+ "discard",
3169
+ {"egress_only_gateway_id": egress_only_gateway_id},
3170
+ UNSET,
3171
+ None,
3172
+ options,
3173
+ ),
3174
+ )
3175
+
3176
+ async def delete_floating_ip(
3177
+ self, floating_ip_id: str, *, options: RequestOptions | None = None
3178
+ ) -> None:
3179
+ "Release floating IP"
3180
+ return cast(
3181
+ None,
3182
+ await self._transport.request(
3183
+ "network",
3184
+ "https://network.{region}.basaltic.sh",
3185
+ _OPS["deleteFloatingIp"],
3186
+ "discard",
3187
+ {"floating_ip_id": floating_ip_id},
3188
+ UNSET,
3189
+ None,
3190
+ options,
3191
+ ),
3192
+ )
3193
+
3194
+ async def delete_interface(
3195
+ self, interface_id: str, *, options: RequestOptions | None = None
3196
+ ) -> None:
3197
+ "Delete interface"
3198
+ return cast(
3199
+ None,
3200
+ await self._transport.request(
3201
+ "network",
3202
+ "https://network.{region}.basaltic.sh",
3203
+ _OPS["deleteInterface"],
3204
+ "discard",
3205
+ {"interface_id": interface_id},
3206
+ UNSET,
3207
+ None,
3208
+ options,
3209
+ ),
3210
+ )
3211
+
3212
+ async def delete_interface_address(
3213
+ self, interface_id: str, address_id: str, *, options: RequestOptions | None = None
3214
+ ) -> None:
3215
+ "Delete interface address"
3216
+ return cast(
3217
+ None,
3218
+ await self._transport.request(
3219
+ "network",
3220
+ "https://network.{region}.basaltic.sh",
3221
+ _OPS["deleteInterfaceAddress"],
3222
+ "discard",
3223
+ {"interface_id": interface_id, "address_id": address_id},
3224
+ UNSET,
3225
+ None,
3226
+ options,
3227
+ ),
3228
+ )
3229
+
3230
+ async def delete_interface_prefix(
3231
+ self, interface_id: str, prefix_id: str, *, options: RequestOptions | None = None
3232
+ ) -> None:
3233
+ "Delete interface prefix"
3234
+ return cast(
3235
+ None,
3236
+ await self._transport.request(
3237
+ "network",
3238
+ "https://network.{region}.basaltic.sh",
3239
+ _OPS["deleteInterfacePrefix"],
3240
+ "discard",
3241
+ {"interface_id": interface_id, "prefix_id": prefix_id},
3242
+ UNSET,
3243
+ None,
3244
+ options,
3245
+ ),
3246
+ )
3247
+
3248
+ async def delete_internet_gateway(
3249
+ self, internet_gateway_id: str, *, options: RequestOptions | None = None
3250
+ ) -> None:
3251
+ "Delete internet gateway"
3252
+ return cast(
3253
+ None,
3254
+ await self._transport.request(
3255
+ "network",
3256
+ "https://network.{region}.basaltic.sh",
3257
+ _OPS["deleteInternetGateway"],
3258
+ "discard",
3259
+ {"internet_gateway_id": internet_gateway_id},
3260
+ UNSET,
3261
+ None,
3262
+ options,
3263
+ ),
3264
+ )
3265
+
3266
+ async def delete_nat_gateway(
3267
+ self, nat_gateway_id: str, *, options: RequestOptions | None = None
3268
+ ) -> None:
3269
+ "Delete NAT gateway"
3270
+ return cast(
3271
+ None,
3272
+ await self._transport.request(
3273
+ "network",
3274
+ "https://network.{region}.basaltic.sh",
3275
+ _OPS["deleteNATGateway"],
3276
+ "discard",
3277
+ {"nat_gateway_id": nat_gateway_id},
3278
+ UNSET,
3279
+ None,
3280
+ options,
3281
+ ),
3282
+ )
3283
+
3284
+ async def delete_prefix_pool(
3285
+ self, vpc_id: str, pool_id: str, *, options: RequestOptions | None = None
3286
+ ) -> None:
3287
+ "Delete prefix pool"
3288
+ return cast(
3289
+ None,
3290
+ await self._transport.request(
3291
+ "network",
3292
+ "https://network.{region}.basaltic.sh",
3293
+ _OPS["deletePrefixPool"],
3294
+ "discard",
3295
+ {"vpc_id": vpc_id, "pool_id": pool_id},
3296
+ UNSET,
3297
+ None,
3298
+ options,
3299
+ ),
3300
+ )
3301
+
3302
+ async def delete_route(
3303
+ self, route_table_id: str, route_id: str, *, options: RequestOptions | None = None
3304
+ ) -> None:
3305
+ "Delete route"
3306
+ return cast(
3307
+ None,
3308
+ await self._transport.request(
3309
+ "network",
3310
+ "https://network.{region}.basaltic.sh",
3311
+ _OPS["deleteRoute"],
3312
+ "discard",
3313
+ {"route_table_id": route_table_id, "route_id": route_id},
3314
+ UNSET,
3315
+ None,
3316
+ options,
3317
+ ),
3318
+ )
3319
+
3320
+ async def delete_route_table(
3321
+ self, route_table_id: str, *, options: RequestOptions | None = None
3322
+ ) -> None:
3323
+ "Delete route table"
3324
+ return cast(
3325
+ None,
3326
+ await self._transport.request(
3327
+ "network",
3328
+ "https://network.{region}.basaltic.sh",
3329
+ _OPS["deleteRouteTable"],
3330
+ "discard",
3331
+ {"route_table_id": route_table_id},
3332
+ UNSET,
3333
+ None,
3334
+ options,
3335
+ ),
3336
+ )
3337
+
3338
+ async def delete_security_group(
3339
+ self, security_group_id: str, *, options: RequestOptions | None = None
3340
+ ) -> None:
3341
+ "Delete security group"
3342
+ return cast(
3343
+ None,
3344
+ await self._transport.request(
3345
+ "network",
3346
+ "https://network.{region}.basaltic.sh",
3347
+ _OPS["deleteSecurityGroup"],
3348
+ "discard",
3349
+ {"security_group_id": security_group_id},
3350
+ UNSET,
3351
+ None,
3352
+ options,
3353
+ ),
3354
+ )
3355
+
3356
+ async def delete_security_group_rule(
3357
+ self, security_group_id: str, rule_id: str, *, options: RequestOptions | None = None
3358
+ ) -> None:
3359
+ "Delete security group rule"
3360
+ return cast(
3361
+ None,
3362
+ await self._transport.request(
3363
+ "network",
3364
+ "https://network.{region}.basaltic.sh",
3365
+ _OPS["deleteSecurityGroupRule"],
3366
+ "discard",
3367
+ {"security_group_id": security_group_id, "rule_id": rule_id},
3368
+ UNSET,
3369
+ None,
3370
+ options,
3371
+ ),
3372
+ )
3373
+
3374
+ async def delete_subnet(self, subnet_id: str, *, options: RequestOptions | None = None) -> None:
3375
+ "Delete subnet"
3376
+ return cast(
3377
+ None,
3378
+ await self._transport.request(
3379
+ "network",
3380
+ "https://network.{region}.basaltic.sh",
3381
+ _OPS["deleteSubnet"],
3382
+ "discard",
3383
+ {"subnet_id": subnet_id},
3384
+ UNSET,
3385
+ None,
3386
+ options,
3387
+ ),
3388
+ )
3389
+
3390
+ async def delete_vpc(self, vpc_id: str, *, options: RequestOptions | None = None) -> None:
3391
+ "Delete VPC"
3392
+ return cast(
3393
+ None,
3394
+ await self._transport.request(
3395
+ "network",
3396
+ "https://network.{region}.basaltic.sh",
3397
+ _OPS["deleteVpc"],
3398
+ "discard",
3399
+ {"vpc_id": vpc_id},
3400
+ UNSET,
3401
+ None,
3402
+ options,
3403
+ ),
3404
+ )
3405
+
3406
+ async def detach_floating_ip(
3407
+ self,
3408
+ floating_ip_id: str,
3409
+ body: m.DetachFloatingIpBody | Unset = UNSET,
3410
+ *,
3411
+ options: RequestOptions | None = None,
3412
+ ) -> ApiResponse[m.DetachFloatingIpResponse]:
3413
+ "Detach a floating IP"
3414
+ return cast(
3415
+ ApiResponse[m.DetachFloatingIpResponse],
3416
+ await self._transport.request(
3417
+ "network",
3418
+ "https://network.{region}.basaltic.sh",
3419
+ _OPS["detachFloatingIp"],
3420
+ "json",
3421
+ {"floating_ip_id": floating_ip_id},
3422
+ body,
3423
+ None,
3424
+ options,
3425
+ ),
3426
+ )
3427
+
3428
+ async def detach_internet_gateway(
3429
+ self, internet_gateway_id: str, *, options: RequestOptions | None = None
3430
+ ) -> ApiResponse[m.DetachInternetGatewayResponse]:
3431
+ "Detach internet gateway from its VPC"
3432
+ return cast(
3433
+ ApiResponse[m.DetachInternetGatewayResponse],
3434
+ await self._transport.request(
3435
+ "network",
3436
+ "https://network.{region}.basaltic.sh",
3437
+ _OPS["detachInternetGateway"],
3438
+ "json",
3439
+ {"internet_gateway_id": internet_gateway_id},
3440
+ UNSET,
3441
+ None,
3442
+ options,
3443
+ ),
3444
+ )
3445
+
3446
+ async def get_egress_only_gateway(
3447
+ self, egress_only_gateway_id: str, *, options: RequestOptions | None = None
3448
+ ) -> ApiResponse[m.GetEgressOnlyGatewayResponse]:
3449
+ "Get egress-only gateway"
3450
+ return cast(
3451
+ ApiResponse[m.GetEgressOnlyGatewayResponse],
3452
+ await self._transport.request(
3453
+ "network",
3454
+ "https://network.{region}.basaltic.sh",
3455
+ _OPS["getEgressOnlyGateway"],
3456
+ "json",
3457
+ {"egress_only_gateway_id": egress_only_gateway_id},
3458
+ UNSET,
3459
+ None,
3460
+ options,
3461
+ ),
3462
+ )
3463
+
3464
+ async def get_egress_only_gateway_by_reference(
3465
+ self,
3466
+ reference: str,
3467
+ *,
3468
+ scope: m.GetEgressOnlyGatewayScope | None = None,
3469
+ options: RequestOptions | None = None,
3470
+ ) -> ApiResponse[m.GetEgressOnlyGatewayResource]:
3471
+ return cast(
3472
+ ApiResponse[m.GetEgressOnlyGatewayResource],
3473
+ await aresolve_reference(
3474
+ reference,
3475
+ lambda id: self.get_egress_only_gateway(id, options=options),
3476
+ lambda match: self.list_egress_only_gateways(
3477
+ query=cast(
3478
+ m.ListEgressOnlyGatewaysQuery,
3479
+ {**reference_scope(scope), **match, "limit": 2},
3480
+ ),
3481
+ options=options,
3482
+ ),
3483
+ True,
3484
+ "egress_only_gateway",
3485
+ ),
3486
+ )
3487
+
3488
+ async def get_floating_ip(
3489
+ self, floating_ip_id: str, *, options: RequestOptions | None = None
3490
+ ) -> ApiResponse[m.GetFloatingIpResponse]:
3491
+ "Get floating IP"
3492
+ return cast(
3493
+ ApiResponse[m.GetFloatingIpResponse],
3494
+ await self._transport.request(
3495
+ "network",
3496
+ "https://network.{region}.basaltic.sh",
3497
+ _OPS["getFloatingIp"],
3498
+ "json",
3499
+ {"floating_ip_id": floating_ip_id},
3500
+ UNSET,
3501
+ None,
3502
+ options,
3503
+ ),
3504
+ )
3505
+
3506
+ async def get_floating_ip_by_reference(
3507
+ self,
3508
+ reference: str,
3509
+ *,
3510
+ scope: m.GetFloatingIpScope | None = None,
3511
+ options: RequestOptions | None = None,
3512
+ ) -> ApiResponse[m.GetFloatingIpResource]:
3513
+ return cast(
3514
+ ApiResponse[m.GetFloatingIpResource],
3515
+ await aresolve_reference(
3516
+ reference,
3517
+ lambda id: self.get_floating_ip(id, options=options),
3518
+ lambda match: self.list_floating_ips(
3519
+ query=cast(
3520
+ m.ListFloatingIpsQuery, {**reference_scope(scope), **match, "limit": 2}
3521
+ ),
3522
+ options=options,
3523
+ ),
3524
+ True,
3525
+ "floating_ip",
3526
+ ),
3527
+ )
3528
+
3529
+ async def get_interface(
3530
+ self, interface_id: str, *, options: RequestOptions | None = None
3531
+ ) -> ApiResponse[m.GetInterfaceResponse]:
3532
+ "Get interface"
3533
+ return cast(
3534
+ ApiResponse[m.GetInterfaceResponse],
3535
+ await self._transport.request(
3536
+ "network",
3537
+ "https://network.{region}.basaltic.sh",
3538
+ _OPS["getInterface"],
3539
+ "json",
3540
+ {"interface_id": interface_id},
3541
+ UNSET,
3542
+ None,
3543
+ options,
3544
+ ),
3545
+ )
3546
+
3547
+ async def get_interface_by_reference(
3548
+ self,
3549
+ reference: str,
3550
+ *,
3551
+ scope: m.GetInterfaceScope | None = None,
3552
+ options: RequestOptions | None = None,
3553
+ ) -> ApiResponse[m.GetInterfaceResource]:
3554
+ return cast(
3555
+ ApiResponse[m.GetInterfaceResource],
3556
+ await aresolve_reference(
3557
+ reference,
3558
+ lambda id: self.get_interface(id, options=options),
3559
+ lambda match: self.list_interfaces(
3560
+ query=cast(
3561
+ m.ListInterfacesQuery, {**reference_scope(scope), **match, "limit": 2}
3562
+ ),
3563
+ options=options,
3564
+ ),
3565
+ True,
3566
+ "interface",
3567
+ ),
3568
+ )
3569
+
3570
+ async def get_interface_address(
3571
+ self, interface_id: str, address_id: str, *, options: RequestOptions | None = None
3572
+ ) -> ApiResponse[m.GetInterfaceAddressResponse]:
3573
+ "Get interface address"
3574
+ return cast(
3575
+ ApiResponse[m.GetInterfaceAddressResponse],
3576
+ await self._transport.request(
3577
+ "network",
3578
+ "https://network.{region}.basaltic.sh",
3579
+ _OPS["getInterfaceAddress"],
3580
+ "json",
3581
+ {"interface_id": interface_id, "address_id": address_id},
3582
+ UNSET,
3583
+ None,
3584
+ options,
3585
+ ),
3586
+ )
3587
+
3588
+ async def get_internet_gateway(
3589
+ self, internet_gateway_id: str, *, options: RequestOptions | None = None
3590
+ ) -> ApiResponse[m.GetInternetGatewayResponse]:
3591
+ "Get internet gateway"
3592
+ return cast(
3593
+ ApiResponse[m.GetInternetGatewayResponse],
3594
+ await self._transport.request(
3595
+ "network",
3596
+ "https://network.{region}.basaltic.sh",
3597
+ _OPS["getInternetGateway"],
3598
+ "json",
3599
+ {"internet_gateway_id": internet_gateway_id},
3600
+ UNSET,
3601
+ None,
3602
+ options,
3603
+ ),
3604
+ )
3605
+
3606
+ async def get_internet_gateway_by_reference(
3607
+ self,
3608
+ reference: str,
3609
+ *,
3610
+ scope: m.GetInternetGatewayScope | None = None,
3611
+ options: RequestOptions | None = None,
3612
+ ) -> ApiResponse[m.GetInternetGatewayResource]:
3613
+ return cast(
3614
+ ApiResponse[m.GetInternetGatewayResource],
3615
+ await aresolve_reference(
3616
+ reference,
3617
+ lambda id: self.get_internet_gateway(id, options=options),
3618
+ lambda match: self.list_internet_gateways(
3619
+ query=cast(
3620
+ m.ListInternetGatewaysQuery, {**reference_scope(scope), **match, "limit": 2}
3621
+ ),
3622
+ options=options,
3623
+ ),
3624
+ True,
3625
+ "internet_gateway",
3626
+ ),
3627
+ )
3628
+
3629
+ async def get_nat_gateway(
3630
+ self, nat_gateway_id: str, *, options: RequestOptions | None = None
3631
+ ) -> ApiResponse[m.GetNATGatewayResponse]:
3632
+ "Get NAT gateway"
3633
+ return cast(
3634
+ ApiResponse[m.GetNATGatewayResponse],
3635
+ await self._transport.request(
3636
+ "network",
3637
+ "https://network.{region}.basaltic.sh",
3638
+ _OPS["getNATGateway"],
3639
+ "json",
3640
+ {"nat_gateway_id": nat_gateway_id},
3641
+ UNSET,
3642
+ None,
3643
+ options,
3644
+ ),
3645
+ )
3646
+
3647
+ async def get_nat_gateway_by_reference(
3648
+ self,
3649
+ reference: str,
3650
+ *,
3651
+ scope: m.GetNATGatewayScope | None = None,
3652
+ options: RequestOptions | None = None,
3653
+ ) -> ApiResponse[m.GetNATGatewayResource]:
3654
+ return cast(
3655
+ ApiResponse[m.GetNATGatewayResource],
3656
+ await aresolve_reference(
3657
+ reference,
3658
+ lambda id: self.get_nat_gateway(id, options=options),
3659
+ lambda match: self.list_nat_gateways(
3660
+ query=cast(
3661
+ m.ListNATGatewaysQuery, {**reference_scope(scope), **match, "limit": 2}
3662
+ ),
3663
+ options=options,
3664
+ ),
3665
+ True,
3666
+ "nat_gateway",
3667
+ ),
3668
+ )
3669
+
3670
+ async def get_route(
3671
+ self, route_table_id: str, route_id: str, *, options: RequestOptions | None = None
3672
+ ) -> ApiResponse[m.GetRouteResponse]:
3673
+ "Get route"
3674
+ return cast(
3675
+ ApiResponse[m.GetRouteResponse],
3676
+ await self._transport.request(
3677
+ "network",
3678
+ "https://network.{region}.basaltic.sh",
3679
+ _OPS["getRoute"],
3680
+ "json",
3681
+ {"route_table_id": route_table_id, "route_id": route_id},
3682
+ UNSET,
3683
+ None,
3684
+ options,
3685
+ ),
3686
+ )
3687
+
3688
+ async def get_route_by_reference(
3689
+ self,
3690
+ route_table_id: str,
3691
+ reference: str,
3692
+ *,
3693
+ scope: m.GetRouteScope | None = None,
3694
+ options: RequestOptions | None = None,
3695
+ ) -> ApiResponse[m.GetRouteResource]:
3696
+ return cast(
3697
+ ApiResponse[m.GetRouteResource],
3698
+ await aresolve_reference(
3699
+ reference,
3700
+ lambda id: self.get_route(route_table_id, id, options=options),
3701
+ lambda match: self.list_routes(
3702
+ route_table_id,
3703
+ query=cast(m.ListRoutesQuery, {**reference_scope(scope), **match, "limit": 2}),
3704
+ options=options,
3705
+ ),
3706
+ True,
3707
+ "route",
3708
+ ),
3709
+ )
3710
+
3711
+ async def get_route_table(
3712
+ self, route_table_id: str, *, options: RequestOptions | None = None
3713
+ ) -> ApiResponse[m.GetRouteTableResponse]:
3714
+ "Get route table"
3715
+ return cast(
3716
+ ApiResponse[m.GetRouteTableResponse],
3717
+ await self._transport.request(
3718
+ "network",
3719
+ "https://network.{region}.basaltic.sh",
3720
+ _OPS["getRouteTable"],
3721
+ "json",
3722
+ {"route_table_id": route_table_id},
3723
+ UNSET,
3724
+ None,
3725
+ options,
3726
+ ),
3727
+ )
3728
+
3729
+ async def get_route_table_by_reference(
3730
+ self,
3731
+ reference: str,
3732
+ *,
3733
+ scope: m.GetRouteTableScope | None = None,
3734
+ options: RequestOptions | None = None,
3735
+ ) -> ApiResponse[m.GetRouteTableResource]:
3736
+ return cast(
3737
+ ApiResponse[m.GetRouteTableResource],
3738
+ await aresolve_reference(
3739
+ reference,
3740
+ lambda id: self.get_route_table(id, options=options),
3741
+ lambda match: self.list_route_tables(
3742
+ query=cast(
3743
+ m.ListRouteTablesQuery, {**reference_scope(scope), **match, "limit": 2}
3744
+ ),
3745
+ options=options,
3746
+ ),
3747
+ True,
3748
+ "route_table",
3749
+ ),
3750
+ )
3751
+
3752
+ async def get_security_group(
3753
+ self, security_group_id: str, *, options: RequestOptions | None = None
3754
+ ) -> ApiResponse[m.GetSecurityGroupResponse]:
3755
+ "Get security group"
3756
+ return cast(
3757
+ ApiResponse[m.GetSecurityGroupResponse],
3758
+ await self._transport.request(
3759
+ "network",
3760
+ "https://network.{region}.basaltic.sh",
3761
+ _OPS["getSecurityGroup"],
3762
+ "json",
3763
+ {"security_group_id": security_group_id},
3764
+ UNSET,
3765
+ None,
3766
+ options,
3767
+ ),
3768
+ )
3769
+
3770
+ async def get_security_group_by_reference(
3771
+ self,
3772
+ reference: str,
3773
+ *,
3774
+ scope: m.GetSecurityGroupScope | None = None,
3775
+ options: RequestOptions | None = None,
3776
+ ) -> ApiResponse[m.GetSecurityGroupResource]:
3777
+ return cast(
3778
+ ApiResponse[m.GetSecurityGroupResource],
3779
+ await aresolve_reference(
3780
+ reference,
3781
+ lambda id: self.get_security_group(id, options=options),
3782
+ lambda match: self.list_security_groups(
3783
+ query=cast(
3784
+ m.ListSecurityGroupsQuery, {**reference_scope(scope), **match, "limit": 2}
3785
+ ),
3786
+ options=options,
3787
+ ),
3788
+ True,
3789
+ "security_group",
3790
+ ),
3791
+ )
3792
+
3793
+ async def get_security_group_rule(
3794
+ self, security_group_id: str, rule_id: str, *, options: RequestOptions | None = None
3795
+ ) -> ApiResponse[m.GetSecurityGroupRuleResponse]:
3796
+ "Get security group rule"
3797
+ return cast(
3798
+ ApiResponse[m.GetSecurityGroupRuleResponse],
3799
+ await self._transport.request(
3800
+ "network",
3801
+ "https://network.{region}.basaltic.sh",
3802
+ _OPS["getSecurityGroupRule"],
3803
+ "json",
3804
+ {"security_group_id": security_group_id, "rule_id": rule_id},
3805
+ UNSET,
3806
+ None,
3807
+ options,
3808
+ ),
3809
+ )
3810
+
3811
+ async def get_security_group_rule_by_reference(
3812
+ self,
3813
+ security_group_id: str,
3814
+ reference: str,
3815
+ *,
3816
+ scope: m.GetSecurityGroupRuleScope | None = None,
3817
+ options: RequestOptions | None = None,
3818
+ ) -> ApiResponse[m.GetSecurityGroupRuleResource]:
3819
+ return cast(
3820
+ ApiResponse[m.GetSecurityGroupRuleResource],
3821
+ await aresolve_reference(
3822
+ reference,
3823
+ lambda id: self.get_security_group_rule(security_group_id, id, options=options),
3824
+ lambda match: self.list_security_group_rules(
3825
+ security_group_id,
3826
+ query=cast(
3827
+ m.ListSecurityGroupRulesQuery,
3828
+ {**reference_scope(scope), **match, "limit": 2},
3829
+ ),
3830
+ options=options,
3831
+ ),
3832
+ True,
3833
+ "rule",
3834
+ ),
3835
+ )
3836
+
3837
+ async def get_subnet(
3838
+ self, subnet_id: str, *, options: RequestOptions | None = None
3839
+ ) -> ApiResponse[m.GetSubnetResponse]:
3840
+ "Get subnet"
3841
+ return cast(
3842
+ ApiResponse[m.GetSubnetResponse],
3843
+ await self._transport.request(
3844
+ "network",
3845
+ "https://network.{region}.basaltic.sh",
3846
+ _OPS["getSubnet"],
3847
+ "json",
3848
+ {"subnet_id": subnet_id},
3849
+ UNSET,
3850
+ None,
3851
+ options,
3852
+ ),
3853
+ )
3854
+
3855
+ async def get_subnet_by_reference(
3856
+ self,
3857
+ reference: str,
3858
+ *,
3859
+ scope: m.GetSubnetScope | None = None,
3860
+ options: RequestOptions | None = None,
3861
+ ) -> ApiResponse[m.GetSubnetResource]:
3862
+ return cast(
3863
+ ApiResponse[m.GetSubnetResource],
3864
+ await aresolve_reference(
3865
+ reference,
3866
+ lambda id: self.get_subnet(id, options=options),
3867
+ lambda match: self.list_subnets(
3868
+ query=cast(m.ListSubnetsQuery, {**reference_scope(scope), **match, "limit": 2}),
3869
+ options=options,
3870
+ ),
3871
+ True,
3872
+ "subnet",
3873
+ ),
3874
+ )
3875
+
3876
+ async def get_vpc(
3877
+ self, vpc_id: str, *, options: RequestOptions | None = None
3878
+ ) -> ApiResponse[m.GetVpcResponse]:
3879
+ "Get VPC"
3880
+ return cast(
3881
+ ApiResponse[m.GetVpcResponse],
3882
+ await self._transport.request(
3883
+ "network",
3884
+ "https://network.{region}.basaltic.sh",
3885
+ _OPS["getVpc"],
3886
+ "json",
3887
+ {"vpc_id": vpc_id},
3888
+ UNSET,
3889
+ None,
3890
+ options,
3891
+ ),
3892
+ )
3893
+
3894
+ async def get_vpc_by_reference(
3895
+ self,
3896
+ reference: str,
3897
+ *,
3898
+ scope: m.GetVpcScope | None = None,
3899
+ options: RequestOptions | None = None,
3900
+ ) -> ApiResponse[m.GetVpcResource]:
3901
+ return cast(
3902
+ ApiResponse[m.GetVpcResource],
3903
+ await aresolve_reference(
3904
+ reference,
3905
+ lambda id: self.get_vpc(id, options=options),
3906
+ lambda match: self.list_vpcs(
3907
+ query=cast(m.ListVpcsQuery, {**reference_scope(scope), **match, "limit": 2}),
3908
+ options=options,
3909
+ ),
3910
+ True,
3911
+ "vpc",
3912
+ ),
3913
+ )
3914
+
3915
+ async def list_egress_only_gateway_routes(
3916
+ self,
3917
+ egress_only_gateway_id: str,
3918
+ *,
3919
+ query: m.ListEgressOnlyGatewayRoutesQuery | None = None,
3920
+ options: RequestOptions | None = None,
3921
+ ) -> Page[m.ListEgressOnlyGatewayRoutesResponse, m.ListEgressOnlyGatewayRoutesItem]:
3922
+ "List egress-only gateway routes"
3923
+ return cast(
3924
+ Page[m.ListEgressOnlyGatewayRoutesResponse, m.ListEgressOnlyGatewayRoutesItem],
3925
+ await self._transport.request(
3926
+ "network",
3927
+ "https://network.{region}.basaltic.sh",
3928
+ _OPS["listEgressOnlyGatewayRoutes"],
3929
+ "page",
3930
+ {"egress_only_gateway_id": egress_only_gateway_id},
3931
+ UNSET,
3932
+ query,
3933
+ options,
3934
+ ),
3935
+ )
3936
+
3937
+ def list_egress_only_gateway_routes_all(
3938
+ self,
3939
+ egress_only_gateway_id: str,
3940
+ *,
3941
+ query: m.ListEgressOnlyGatewayRoutesQuery | None = None,
3942
+ options: RequestOptions | None = None,
3943
+ ) -> AsyncIterator[m.ListEgressOnlyGatewayRoutesItem]:
3944
+ return aiterate_pages(
3945
+ lambda marker: self.list_egress_only_gateway_routes(
3946
+ egress_only_gateway_id,
3947
+ query=cast(m.ListEgressOnlyGatewayRoutesQuery, {**(query or {}), "marker": marker}),
3948
+ options=options,
3949
+ ),
3950
+ (query or {}).get("marker", ""),
3951
+ )
3952
+
3953
+ async def list_egress_only_gateways(
3954
+ self,
3955
+ *,
3956
+ query: m.ListEgressOnlyGatewaysQuery | None = None,
3957
+ options: RequestOptions | None = None,
3958
+ ) -> Page[m.ListEgressOnlyGatewaysResponse, m.ListEgressOnlyGatewaysItem]:
3959
+ "List egress-only gateways"
3960
+ return cast(
3961
+ Page[m.ListEgressOnlyGatewaysResponse, m.ListEgressOnlyGatewaysItem],
3962
+ await self._transport.request(
3963
+ "network",
3964
+ "https://network.{region}.basaltic.sh",
3965
+ _OPS["listEgressOnlyGateways"],
3966
+ "page",
3967
+ {},
3968
+ UNSET,
3969
+ query,
3970
+ options,
3971
+ ),
3972
+ )
3973
+
3974
+ def list_egress_only_gateways_all(
3975
+ self,
3976
+ *,
3977
+ query: m.ListEgressOnlyGatewaysQuery | None = None,
3978
+ options: RequestOptions | None = None,
3979
+ ) -> AsyncIterator[m.ListEgressOnlyGatewaysItem]:
3980
+ return aiterate_pages(
3981
+ lambda marker: self.list_egress_only_gateways(
3982
+ query=cast(m.ListEgressOnlyGatewaysQuery, {**(query or {}), "marker": marker}),
3983
+ options=options,
3984
+ ),
3985
+ (query or {}).get("marker", ""),
3986
+ )
3987
+
3988
+ async def list_floating_ips(
3989
+ self, *, query: m.ListFloatingIpsQuery | None = None, options: RequestOptions | None = None
3990
+ ) -> Page[m.ListFloatingIpsResponse, m.ListFloatingIpsItem]:
3991
+ "List floating IPs"
3992
+ return cast(
3993
+ Page[m.ListFloatingIpsResponse, m.ListFloatingIpsItem],
3994
+ await self._transport.request(
3995
+ "network",
3996
+ "https://network.{region}.basaltic.sh",
3997
+ _OPS["listFloatingIps"],
3998
+ "page",
3999
+ {},
4000
+ UNSET,
4001
+ query,
4002
+ options,
4003
+ ),
4004
+ )
4005
+
4006
+ def list_floating_ips_all(
4007
+ self, *, query: m.ListFloatingIpsQuery | None = None, options: RequestOptions | None = None
4008
+ ) -> AsyncIterator[m.ListFloatingIpsItem]:
4009
+ return aiterate_pages(
4010
+ lambda marker: self.list_floating_ips(
4011
+ query=cast(m.ListFloatingIpsQuery, {**(query or {}), "marker": marker}),
4012
+ options=options,
4013
+ ),
4014
+ (query or {}).get("marker", ""),
4015
+ )
4016
+
4017
+ async def list_interface_addresses(
4018
+ self, interface_id: str, *, options: RequestOptions | None = None
4019
+ ) -> Page[m.ListInterfaceAddressesResponse, m.ListInterfaceAddressesItem]:
4020
+ "List interface addresses"
4021
+ return cast(
4022
+ Page[m.ListInterfaceAddressesResponse, m.ListInterfaceAddressesItem],
4023
+ await self._transport.request(
4024
+ "network",
4025
+ "https://network.{region}.basaltic.sh",
4026
+ _OPS["listInterfaceAddresses"],
4027
+ "page",
4028
+ {"interface_id": interface_id},
4029
+ UNSET,
4030
+ None,
4031
+ options,
4032
+ ),
4033
+ )
4034
+
4035
+ async def list_interface_prefixes(
4036
+ self, interface_id: str, *, options: RequestOptions | None = None
4037
+ ) -> Page[m.ListInterfacePrefixesResponse, m.ListInterfacePrefixesItem]:
4038
+ "List interface prefixes"
4039
+ return cast(
4040
+ Page[m.ListInterfacePrefixesResponse, m.ListInterfacePrefixesItem],
4041
+ await self._transport.request(
4042
+ "network",
4043
+ "https://network.{region}.basaltic.sh",
4044
+ _OPS["listInterfacePrefixes"],
4045
+ "page",
4046
+ {"interface_id": interface_id},
4047
+ UNSET,
4048
+ None,
4049
+ options,
4050
+ ),
4051
+ )
4052
+
4053
+ async def list_interface_security_groups(
4054
+ self,
4055
+ interface_id: str,
4056
+ *,
4057
+ query: m.ListInterfaceSecurityGroupsQuery | None = None,
4058
+ options: RequestOptions | None = None,
4059
+ ) -> Page[m.ListInterfaceSecurityGroupsResponse, m.ListInterfaceSecurityGroupsItem]:
4060
+ "List interface security-group membership"
4061
+ return cast(
4062
+ Page[m.ListInterfaceSecurityGroupsResponse, m.ListInterfaceSecurityGroupsItem],
4063
+ await self._transport.request(
4064
+ "network",
4065
+ "https://network.{region}.basaltic.sh",
4066
+ _OPS["listInterfaceSecurityGroups"],
4067
+ "page",
4068
+ {"interface_id": interface_id},
4069
+ UNSET,
4070
+ query,
4071
+ options,
4072
+ ),
4073
+ )
4074
+
4075
+ async def list_interfaces(
4076
+ self, *, query: m.ListInterfacesQuery | None = None, options: RequestOptions | None = None
4077
+ ) -> Page[m.ListInterfacesResponse, m.ListInterfacesItem]:
4078
+ "List interfaces"
4079
+ return cast(
4080
+ Page[m.ListInterfacesResponse, m.ListInterfacesItem],
4081
+ await self._transport.request(
4082
+ "network",
4083
+ "https://network.{region}.basaltic.sh",
4084
+ _OPS["listInterfaces"],
4085
+ "page",
4086
+ {},
4087
+ UNSET,
4088
+ query,
4089
+ options,
4090
+ ),
4091
+ )
4092
+
4093
+ def list_interfaces_all(
4094
+ self, *, query: m.ListInterfacesQuery | None = None, options: RequestOptions | None = None
4095
+ ) -> AsyncIterator[m.ListInterfacesItem]:
4096
+ return aiterate_pages(
4097
+ lambda marker: self.list_interfaces(
4098
+ query=cast(m.ListInterfacesQuery, {**(query or {}), "marker": marker}),
4099
+ options=options,
4100
+ ),
4101
+ (query or {}).get("marker", ""),
4102
+ )
4103
+
4104
+ async def list_internet_gateway_routes(
4105
+ self,
4106
+ internet_gateway_id: str,
4107
+ *,
4108
+ query: m.ListInternetGatewayRoutesQuery | None = None,
4109
+ options: RequestOptions | None = None,
4110
+ ) -> Page[m.ListInternetGatewayRoutesResponse, m.ListInternetGatewayRoutesItem]:
4111
+ "List internet gateway routes"
4112
+ return cast(
4113
+ Page[m.ListInternetGatewayRoutesResponse, m.ListInternetGatewayRoutesItem],
4114
+ await self._transport.request(
4115
+ "network",
4116
+ "https://network.{region}.basaltic.sh",
4117
+ _OPS["listInternetGatewayRoutes"],
4118
+ "page",
4119
+ {"internet_gateway_id": internet_gateway_id},
4120
+ UNSET,
4121
+ query,
4122
+ options,
4123
+ ),
4124
+ )
4125
+
4126
+ def list_internet_gateway_routes_all(
4127
+ self,
4128
+ internet_gateway_id: str,
4129
+ *,
4130
+ query: m.ListInternetGatewayRoutesQuery | None = None,
4131
+ options: RequestOptions | None = None,
4132
+ ) -> AsyncIterator[m.ListInternetGatewayRoutesItem]:
4133
+ return aiterate_pages(
4134
+ lambda marker: self.list_internet_gateway_routes(
4135
+ internet_gateway_id,
4136
+ query=cast(m.ListInternetGatewayRoutesQuery, {**(query or {}), "marker": marker}),
4137
+ options=options,
4138
+ ),
4139
+ (query or {}).get("marker", ""),
4140
+ )
4141
+
4142
+ async def list_internet_gateways(
4143
+ self,
4144
+ *,
4145
+ query: m.ListInternetGatewaysQuery | None = None,
4146
+ options: RequestOptions | None = None,
4147
+ ) -> Page[m.ListInternetGatewaysResponse, m.ListInternetGatewaysItem]:
4148
+ "List internet gateways"
4149
+ return cast(
4150
+ Page[m.ListInternetGatewaysResponse, m.ListInternetGatewaysItem],
4151
+ await self._transport.request(
4152
+ "network",
4153
+ "https://network.{region}.basaltic.sh",
4154
+ _OPS["listInternetGateways"],
4155
+ "page",
4156
+ {},
4157
+ UNSET,
4158
+ query,
4159
+ options,
4160
+ ),
4161
+ )
4162
+
4163
+ def list_internet_gateways_all(
4164
+ self,
4165
+ *,
4166
+ query: m.ListInternetGatewaysQuery | None = None,
4167
+ options: RequestOptions | None = None,
4168
+ ) -> AsyncIterator[m.ListInternetGatewaysItem]:
4169
+ return aiterate_pages(
4170
+ lambda marker: self.list_internet_gateways(
4171
+ query=cast(m.ListInternetGatewaysQuery, {**(query or {}), "marker": marker}),
4172
+ options=options,
4173
+ ),
4174
+ (query or {}).get("marker", ""),
4175
+ )
4176
+
4177
+ async def list_nat_gateway_routes(
4178
+ self,
4179
+ nat_gateway_id: str,
4180
+ *,
4181
+ query: m.ListNATGatewayRoutesQuery | None = None,
4182
+ options: RequestOptions | None = None,
4183
+ ) -> Page[m.ListNATGatewayRoutesResponse, m.ListNATGatewayRoutesItem]:
4184
+ "List NAT gateway routes"
4185
+ return cast(
4186
+ Page[m.ListNATGatewayRoutesResponse, m.ListNATGatewayRoutesItem],
4187
+ await self._transport.request(
4188
+ "network",
4189
+ "https://network.{region}.basaltic.sh",
4190
+ _OPS["listNATGatewayRoutes"],
4191
+ "page",
4192
+ {"nat_gateway_id": nat_gateway_id},
4193
+ UNSET,
4194
+ query,
4195
+ options,
4196
+ ),
4197
+ )
4198
+
4199
+ def list_nat_gateway_routes_all(
4200
+ self,
4201
+ nat_gateway_id: str,
4202
+ *,
4203
+ query: m.ListNATGatewayRoutesQuery | None = None,
4204
+ options: RequestOptions | None = None,
4205
+ ) -> AsyncIterator[m.ListNATGatewayRoutesItem]:
4206
+ return aiterate_pages(
4207
+ lambda marker: self.list_nat_gateway_routes(
4208
+ nat_gateway_id,
4209
+ query=cast(m.ListNATGatewayRoutesQuery, {**(query or {}), "marker": marker}),
4210
+ options=options,
4211
+ ),
4212
+ (query or {}).get("marker", ""),
4213
+ )
4214
+
4215
+ async def list_nat_gateways(
4216
+ self, *, query: m.ListNATGatewaysQuery | None = None, options: RequestOptions | None = None
4217
+ ) -> Page[m.ListNATGatewaysResponse, m.ListNATGatewaysItem]:
4218
+ "List NAT gateways"
4219
+ return cast(
4220
+ Page[m.ListNATGatewaysResponse, m.ListNATGatewaysItem],
4221
+ await self._transport.request(
4222
+ "network",
4223
+ "https://network.{region}.basaltic.sh",
4224
+ _OPS["listNATGateways"],
4225
+ "page",
4226
+ {},
4227
+ UNSET,
4228
+ query,
4229
+ options,
4230
+ ),
4231
+ )
4232
+
4233
+ def list_nat_gateways_all(
4234
+ self, *, query: m.ListNATGatewaysQuery | None = None, options: RequestOptions | None = None
4235
+ ) -> AsyncIterator[m.ListNATGatewaysItem]:
4236
+ return aiterate_pages(
4237
+ lambda marker: self.list_nat_gateways(
4238
+ query=cast(m.ListNATGatewaysQuery, {**(query or {}), "marker": marker}),
4239
+ options=options,
4240
+ ),
4241
+ (query or {}).get("marker", ""),
4242
+ )
4243
+
4244
+ async def list_prefix_pools(
4245
+ self, vpc_id: str, *, options: RequestOptions | None = None
4246
+ ) -> Page[m.ListPrefixPoolsResponse, m.ListPrefixPoolsItem]:
4247
+ "List prefix pools"
4248
+ return cast(
4249
+ Page[m.ListPrefixPoolsResponse, m.ListPrefixPoolsItem],
4250
+ await self._transport.request(
4251
+ "network",
4252
+ "https://network.{region}.basaltic.sh",
4253
+ _OPS["listPrefixPools"],
4254
+ "page",
4255
+ {"vpc_id": vpc_id},
4256
+ UNSET,
4257
+ None,
4258
+ options,
4259
+ ),
4260
+ )
4261
+
4262
+ async def list_route_tables(
4263
+ self, *, query: m.ListRouteTablesQuery | None = None, options: RequestOptions | None = None
4264
+ ) -> Page[m.ListRouteTablesResponse, m.ListRouteTablesItem]:
4265
+ "List route tables"
4266
+ return cast(
4267
+ Page[m.ListRouteTablesResponse, m.ListRouteTablesItem],
4268
+ await self._transport.request(
4269
+ "network",
4270
+ "https://network.{region}.basaltic.sh",
4271
+ _OPS["listRouteTables"],
4272
+ "page",
4273
+ {},
4274
+ UNSET,
4275
+ query,
4276
+ options,
4277
+ ),
4278
+ )
4279
+
4280
+ def list_route_tables_all(
4281
+ self, *, query: m.ListRouteTablesQuery | None = None, options: RequestOptions | None = None
4282
+ ) -> AsyncIterator[m.ListRouteTablesItem]:
4283
+ return aiterate_pages(
4284
+ lambda marker: self.list_route_tables(
4285
+ query=cast(m.ListRouteTablesQuery, {**(query or {}), "marker": marker}),
4286
+ options=options,
4287
+ ),
4288
+ (query or {}).get("marker", ""),
4289
+ )
4290
+
4291
+ async def list_routes(
4292
+ self,
4293
+ route_table_id: str,
4294
+ *,
4295
+ query: m.ListRoutesQuery | None = None,
4296
+ options: RequestOptions | None = None,
4297
+ ) -> Page[m.ListRoutesResponse, m.ListRoutesItem]:
4298
+ "List routes"
4299
+ return cast(
4300
+ Page[m.ListRoutesResponse, m.ListRoutesItem],
4301
+ await self._transport.request(
4302
+ "network",
4303
+ "https://network.{region}.basaltic.sh",
4304
+ _OPS["listRoutes"],
4305
+ "page",
4306
+ {"route_table_id": route_table_id},
4307
+ UNSET,
4308
+ query,
4309
+ options,
4310
+ ),
4311
+ )
4312
+
4313
+ def list_routes_all(
4314
+ self,
4315
+ route_table_id: str,
4316
+ *,
4317
+ query: m.ListRoutesQuery | None = None,
4318
+ options: RequestOptions | None = None,
4319
+ ) -> AsyncIterator[m.ListRoutesItem]:
4320
+ return aiterate_pages(
4321
+ lambda marker: self.list_routes(
4322
+ route_table_id,
4323
+ query=cast(m.ListRoutesQuery, {**(query or {}), "marker": marker}),
4324
+ options=options,
4325
+ ),
4326
+ (query or {}).get("marker", ""),
4327
+ )
4328
+
4329
+ async def list_security_group_rules(
4330
+ self,
4331
+ security_group_id: str,
4332
+ *,
4333
+ query: m.ListSecurityGroupRulesQuery | None = None,
4334
+ options: RequestOptions | None = None,
4335
+ ) -> Page[m.ListSecurityGroupRulesResponse, m.ListSecurityGroupRulesItem]:
4336
+ "List security group rules"
4337
+ return cast(
4338
+ Page[m.ListSecurityGroupRulesResponse, m.ListSecurityGroupRulesItem],
4339
+ await self._transport.request(
4340
+ "network",
4341
+ "https://network.{region}.basaltic.sh",
4342
+ _OPS["listSecurityGroupRules"],
4343
+ "page",
4344
+ {"security_group_id": security_group_id},
4345
+ UNSET,
4346
+ query,
4347
+ options,
4348
+ ),
4349
+ )
4350
+
4351
+ def list_security_group_rules_all(
4352
+ self,
4353
+ security_group_id: str,
4354
+ *,
4355
+ query: m.ListSecurityGroupRulesQuery | None = None,
4356
+ options: RequestOptions | None = None,
4357
+ ) -> AsyncIterator[m.ListSecurityGroupRulesItem]:
4358
+ return aiterate_pages(
4359
+ lambda marker: self.list_security_group_rules(
4360
+ security_group_id,
4361
+ query=cast(m.ListSecurityGroupRulesQuery, {**(query or {}), "marker": marker}),
4362
+ options=options,
4363
+ ),
4364
+ (query or {}).get("marker", ""),
4365
+ )
4366
+
4367
+ async def list_security_groups(
4368
+ self,
4369
+ *,
4370
+ query: m.ListSecurityGroupsQuery | None = None,
4371
+ options: RequestOptions | None = None,
4372
+ ) -> Page[m.ListSecurityGroupsResponse, m.ListSecurityGroupsItem]:
4373
+ "List security groups"
4374
+ return cast(
4375
+ Page[m.ListSecurityGroupsResponse, m.ListSecurityGroupsItem],
4376
+ await self._transport.request(
4377
+ "network",
4378
+ "https://network.{region}.basaltic.sh",
4379
+ _OPS["listSecurityGroups"],
4380
+ "page",
4381
+ {},
4382
+ UNSET,
4383
+ query,
4384
+ options,
4385
+ ),
4386
+ )
4387
+
4388
+ def list_security_groups_all(
4389
+ self,
4390
+ *,
4391
+ query: m.ListSecurityGroupsQuery | None = None,
4392
+ options: RequestOptions | None = None,
4393
+ ) -> AsyncIterator[m.ListSecurityGroupsItem]:
4394
+ return aiterate_pages(
4395
+ lambda marker: self.list_security_groups(
4396
+ query=cast(m.ListSecurityGroupsQuery, {**(query or {}), "marker": marker}),
4397
+ options=options,
4398
+ ),
4399
+ (query or {}).get("marker", ""),
4400
+ )
4401
+
4402
+ async def list_subnets(
4403
+ self, *, query: m.ListSubnetsQuery | None = None, options: RequestOptions | None = None
4404
+ ) -> Page[m.ListSubnetsResponse, m.ListSubnetsItem]:
4405
+ "List subnets"
4406
+ return cast(
4407
+ Page[m.ListSubnetsResponse, m.ListSubnetsItem],
4408
+ await self._transport.request(
4409
+ "network",
4410
+ "https://network.{region}.basaltic.sh",
4411
+ _OPS["listSubnets"],
4412
+ "page",
4413
+ {},
4414
+ UNSET,
4415
+ query,
4416
+ options,
4417
+ ),
4418
+ )
4419
+
4420
+ def list_subnets_all(
4421
+ self, *, query: m.ListSubnetsQuery | None = None, options: RequestOptions | None = None
4422
+ ) -> AsyncIterator[m.ListSubnetsItem]:
4423
+ return aiterate_pages(
4424
+ lambda marker: self.list_subnets(
4425
+ query=cast(m.ListSubnetsQuery, {**(query or {}), "marker": marker}), options=options
4426
+ ),
4427
+ (query or {}).get("marker", ""),
4428
+ )
4429
+
4430
+ async def list_vpcs(
4431
+ self, *, query: m.ListVpcsQuery | None = None, options: RequestOptions | None = None
4432
+ ) -> Page[m.ListVpcsResponse, m.ListVpcsItem]:
4433
+ "List VPCs"
4434
+ return cast(
4435
+ Page[m.ListVpcsResponse, m.ListVpcsItem],
4436
+ await self._transport.request(
4437
+ "network",
4438
+ "https://network.{region}.basaltic.sh",
4439
+ _OPS["listVpcs"],
4440
+ "page",
4441
+ {},
4442
+ UNSET,
4443
+ query,
4444
+ options,
4445
+ ),
4446
+ )
4447
+
4448
+ def list_vpcs_all(
4449
+ self, *, query: m.ListVpcsQuery | None = None, options: RequestOptions | None = None
4450
+ ) -> AsyncIterator[m.ListVpcsItem]:
4451
+ return aiterate_pages(
4452
+ lambda marker: self.list_vpcs(
4453
+ query=cast(m.ListVpcsQuery, {**(query or {}), "marker": marker}), options=options
4454
+ ),
4455
+ (query or {}).get("marker", ""),
4456
+ )
4457
+
4458
+ async def set_interface_security_groups(
4459
+ self,
4460
+ interface_id: str,
4461
+ body: m.SetInterfaceSecurityGroupsBody,
4462
+ *,
4463
+ options: RequestOptions | None = None,
4464
+ ) -> ApiResponse[m.SetInterfaceSecurityGroupsResponse]:
4465
+ "Set interface security-group membership"
4466
+ return cast(
4467
+ ApiResponse[m.SetInterfaceSecurityGroupsResponse],
4468
+ await self._transport.request(
4469
+ "network",
4470
+ "https://network.{region}.basaltic.sh",
4471
+ _OPS["setInterfaceSecurityGroups"],
4472
+ "json",
4473
+ {"interface_id": interface_id},
4474
+ body,
4475
+ None,
4476
+ options,
4477
+ ),
4478
+ )
4479
+
4480
+ async def update_egress_only_gateway(
4481
+ self,
4482
+ egress_only_gateway_id: str,
4483
+ body: m.UpdateEgressOnlyGatewayBody,
4484
+ *,
4485
+ options: RequestOptions | None = None,
4486
+ ) -> ApiResponse[m.UpdateEgressOnlyGatewayResponse]:
4487
+ "Update egress-only gateway"
4488
+ return cast(
4489
+ ApiResponse[m.UpdateEgressOnlyGatewayResponse],
4490
+ await self._transport.request(
4491
+ "network",
4492
+ "https://network.{region}.basaltic.sh",
4493
+ _OPS["updateEgressOnlyGateway"],
4494
+ "json",
4495
+ {"egress_only_gateway_id": egress_only_gateway_id},
4496
+ body,
4497
+ None,
4498
+ options,
4499
+ ),
4500
+ )
4501
+
4502
+ async def update_floating_ip(
4503
+ self,
4504
+ floating_ip_id: str,
4505
+ body: m.UpdateFloatingIpBody,
4506
+ *,
4507
+ options: RequestOptions | None = None,
4508
+ ) -> ApiResponse[m.UpdateFloatingIpResponse]:
4509
+ "Update floating IP"
4510
+ return cast(
4511
+ ApiResponse[m.UpdateFloatingIpResponse],
4512
+ await self._transport.request(
4513
+ "network",
4514
+ "https://network.{region}.basaltic.sh",
4515
+ _OPS["updateFloatingIp"],
4516
+ "json",
4517
+ {"floating_ip_id": floating_ip_id},
4518
+ body,
4519
+ None,
4520
+ options,
4521
+ ),
4522
+ )
4523
+
4524
+ async def update_interface(
4525
+ self,
4526
+ interface_id: str,
4527
+ body: m.UpdateInterfaceBody,
4528
+ *,
4529
+ options: RequestOptions | None = None,
4530
+ ) -> ApiResponse[m.UpdateInterfaceResponse]:
4531
+ "Update interface"
4532
+ return cast(
4533
+ ApiResponse[m.UpdateInterfaceResponse],
4534
+ await self._transport.request(
4535
+ "network",
4536
+ "https://network.{region}.basaltic.sh",
4537
+ _OPS["updateInterface"],
4538
+ "json",
4539
+ {"interface_id": interface_id},
4540
+ body,
4541
+ None,
4542
+ options,
4543
+ ),
4544
+ )
4545
+
4546
+ async def update_internet_gateway(
4547
+ self,
4548
+ internet_gateway_id: str,
4549
+ body: m.UpdateInternetGatewayBody,
4550
+ *,
4551
+ options: RequestOptions | None = None,
4552
+ ) -> ApiResponse[m.UpdateInternetGatewayResponse]:
4553
+ "Update internet gateway"
4554
+ return cast(
4555
+ ApiResponse[m.UpdateInternetGatewayResponse],
4556
+ await self._transport.request(
4557
+ "network",
4558
+ "https://network.{region}.basaltic.sh",
4559
+ _OPS["updateInternetGateway"],
4560
+ "json",
4561
+ {"internet_gateway_id": internet_gateway_id},
4562
+ body,
4563
+ None,
4564
+ options,
4565
+ ),
4566
+ )
4567
+
4568
+ async def update_nat_gateway(
4569
+ self,
4570
+ nat_gateway_id: str,
4571
+ body: m.UpdateNATGatewayBody,
4572
+ *,
4573
+ options: RequestOptions | None = None,
4574
+ ) -> ApiResponse[m.UpdateNATGatewayResponse]:
4575
+ "Update NAT gateway"
4576
+ return cast(
4577
+ ApiResponse[m.UpdateNATGatewayResponse],
4578
+ await self._transport.request(
4579
+ "network",
4580
+ "https://network.{region}.basaltic.sh",
4581
+ _OPS["updateNATGateway"],
4582
+ "json",
4583
+ {"nat_gateway_id": nat_gateway_id},
4584
+ body,
4585
+ None,
4586
+ options,
4587
+ ),
4588
+ )
4589
+
4590
+ async def update_route(
4591
+ self,
4592
+ route_table_id: str,
4593
+ route_id: str,
4594
+ body: m.UpdateRouteBody,
4595
+ *,
4596
+ options: RequestOptions | None = None,
4597
+ ) -> ApiResponse[m.UpdateRouteResponse]:
4598
+ "Update route"
4599
+ return cast(
4600
+ ApiResponse[m.UpdateRouteResponse],
4601
+ await self._transport.request(
4602
+ "network",
4603
+ "https://network.{region}.basaltic.sh",
4604
+ _OPS["updateRoute"],
4605
+ "json",
4606
+ {"route_table_id": route_table_id, "route_id": route_id},
4607
+ body,
4608
+ None,
4609
+ options,
4610
+ ),
4611
+ )
4612
+
4613
+ async def update_route_table(
4614
+ self,
4615
+ route_table_id: str,
4616
+ body: m.UpdateRouteTableBody,
4617
+ *,
4618
+ options: RequestOptions | None = None,
4619
+ ) -> ApiResponse[m.UpdateRouteTableResponse]:
4620
+ "Update route table"
4621
+ return cast(
4622
+ ApiResponse[m.UpdateRouteTableResponse],
4623
+ await self._transport.request(
4624
+ "network",
4625
+ "https://network.{region}.basaltic.sh",
4626
+ _OPS["updateRouteTable"],
4627
+ "json",
4628
+ {"route_table_id": route_table_id},
4629
+ body,
4630
+ None,
4631
+ options,
4632
+ ),
4633
+ )
4634
+
4635
+ async def update_security_group(
4636
+ self,
4637
+ security_group_id: str,
4638
+ body: m.UpdateSecurityGroupBody,
4639
+ *,
4640
+ options: RequestOptions | None = None,
4641
+ ) -> ApiResponse[m.UpdateSecurityGroupResponse]:
4642
+ "Update security group"
4643
+ return cast(
4644
+ ApiResponse[m.UpdateSecurityGroupResponse],
4645
+ await self._transport.request(
4646
+ "network",
4647
+ "https://network.{region}.basaltic.sh",
4648
+ _OPS["updateSecurityGroup"],
4649
+ "json",
4650
+ {"security_group_id": security_group_id},
4651
+ body,
4652
+ None,
4653
+ options,
4654
+ ),
4655
+ )
4656
+
4657
+ async def update_subnet(
4658
+ self, subnet_id: str, body: m.UpdateSubnetBody, *, options: RequestOptions | None = None
4659
+ ) -> ApiResponse[m.UpdateSubnetResponse]:
4660
+ "Update subnet"
4661
+ return cast(
4662
+ ApiResponse[m.UpdateSubnetResponse],
4663
+ await self._transport.request(
4664
+ "network",
4665
+ "https://network.{region}.basaltic.sh",
4666
+ _OPS["updateSubnet"],
4667
+ "json",
4668
+ {"subnet_id": subnet_id},
4669
+ body,
4670
+ None,
4671
+ options,
4672
+ ),
4673
+ )
4674
+
4675
+ async def update_vpc(
4676
+ self, vpc_id: str, body: m.UpdateVpcBody, *, options: RequestOptions | None = None
4677
+ ) -> ApiResponse[m.UpdateVpcResponse]:
4678
+ "Update VPC"
4679
+ return cast(
4680
+ ApiResponse[m.UpdateVpcResponse],
4681
+ await self._transport.request(
4682
+ "network",
4683
+ "https://network.{region}.basaltic.sh",
4684
+ _OPS["updateVpc"],
4685
+ "json",
4686
+ {"vpc_id": vpc_id},
4687
+ body,
4688
+ None,
4689
+ options,
4690
+ ),
4691
+ )