gcore 0.11.0__py3-none-any.whl → 0.12.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gcore might be problematic. Click here for more details.

gcore/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "gcore"
4
- __version__ = "0.11.0" # x-release-please-version
4
+ __version__ = "0.12.0" # x-release-please-version
@@ -455,6 +455,298 @@ class ReservedFixedIPsResource(SyncAPIResource):
455
455
  cast_to=ReservedFixedIP,
456
456
  )
457
457
 
458
+ @overload
459
+ def create_and_poll(
460
+ self,
461
+ *,
462
+ project_id: int | None = None,
463
+ region_id: int | None = None,
464
+ type: Literal["external"],
465
+ ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
466
+ is_vip: bool | NotGiven = NOT_GIVEN,
467
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
468
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
469
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
470
+ # The extra values given here take precedence over values defined on the client or passed to this method.
471
+ extra_headers: Headers | None = None,
472
+ extra_query: Query | None = None,
473
+ extra_body: Body | None = None,
474
+ ) -> ReservedFixedIP:
475
+ """
476
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
477
+
478
+ Args:
479
+ type: Must be 'external'
480
+
481
+ ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
482
+
483
+ is_vip: If reserved fixed IP is a VIP
484
+
485
+ extra_headers: Send extra headers
486
+
487
+ extra_query: Add additional query parameters to the request
488
+
489
+ extra_body: Add additional JSON properties to the request
490
+
491
+ timeout: Override the client-level default timeout for this request, in seconds
492
+ """
493
+ ...
494
+
495
+ @overload
496
+ def create_and_poll(
497
+ self,
498
+ *,
499
+ project_id: int | None = None,
500
+ region_id: int | None = None,
501
+ subnet_id: str,
502
+ type: Literal["subnet"],
503
+ is_vip: bool | NotGiven = NOT_GIVEN,
504
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
505
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
506
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
507
+ # The extra values given here take precedence over values defined on the client or passed to this method.
508
+ extra_headers: Headers | None = None,
509
+ extra_query: Query | None = None,
510
+ extra_body: Body | None = None,
511
+ ) -> ReservedFixedIP:
512
+ """
513
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
514
+
515
+ Args:
516
+ subnet_id: Reserved fixed IP will be allocated in this subnet
517
+
518
+ type: Must be 'subnet'.
519
+
520
+ is_vip: If reserved fixed IP is a VIP
521
+
522
+ extra_headers: Send extra headers
523
+
524
+ extra_query: Add additional query parameters to the request
525
+
526
+ extra_body: Add additional JSON properties to the request
527
+
528
+ timeout: Override the client-level default timeout for this request, in seconds
529
+ """
530
+ ...
531
+
532
+ @overload
533
+ def create_and_poll(
534
+ self,
535
+ *,
536
+ project_id: int | None = None,
537
+ region_id: int | None = None,
538
+ network_id: str,
539
+ type: Literal["any_subnet"],
540
+ ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
541
+ is_vip: bool | NotGiven = NOT_GIVEN,
542
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
543
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
544
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
545
+ # The extra values given here take precedence over values defined on the client or passed to this method.
546
+ extra_headers: Headers | None = None,
547
+ extra_query: Query | None = None,
548
+ extra_body: Body | None = None,
549
+ ) -> ReservedFixedIP:
550
+ """
551
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
552
+
553
+ Args:
554
+ network_id: Reserved fixed IP will be allocated in a subnet of this network
555
+
556
+ type: Must be '`any_subnet`'.
557
+
558
+ ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
559
+
560
+ is_vip: If reserved fixed IP is a VIP
561
+
562
+ extra_headers: Send extra headers
563
+
564
+ extra_query: Add additional query parameters to the request
565
+
566
+ extra_body: Add additional JSON properties to the request
567
+
568
+ timeout: Override the client-level default timeout for this request, in seconds
569
+ """
570
+ ...
571
+
572
+ @overload
573
+ def create_and_poll(
574
+ self,
575
+ *,
576
+ project_id: int | None = None,
577
+ region_id: int | None = None,
578
+ ip_address: str,
579
+ network_id: str,
580
+ type: Literal["ip_address"],
581
+ is_vip: bool | NotGiven = NOT_GIVEN,
582
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
583
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
584
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
585
+ # The extra values given here take precedence over values defined on the client or passed to this method.
586
+ extra_headers: Headers | None = None,
587
+ extra_query: Query | None = None,
588
+ extra_body: Body | None = None,
589
+ ) -> ReservedFixedIP:
590
+ """
591
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
592
+
593
+ Args:
594
+ ip_address: Reserved fixed IP will be allocated the given IP address
595
+
596
+ network_id: Reserved fixed IP will be allocated in a subnet of this network
597
+
598
+ type: Must be '`ip_address`'.
599
+
600
+ is_vip: If reserved fixed IP is a VIP
601
+
602
+ extra_headers: Send extra headers
603
+
604
+ extra_query: Add additional query parameters to the request
605
+
606
+ extra_body: Add additional JSON properties to the request
607
+
608
+ timeout: Override the client-level default timeout for this request, in seconds
609
+ """
610
+ ...
611
+
612
+ @overload
613
+ def create_and_poll(
614
+ self,
615
+ *,
616
+ project_id: int | None = None,
617
+ region_id: int | None = None,
618
+ port_id: str,
619
+ type: Literal["port"],
620
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
621
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
622
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
623
+ # The extra values given here take precedence over values defined on the client or passed to this method.
624
+ extra_headers: Headers | None = None,
625
+ extra_query: Query | None = None,
626
+ extra_body: Body | None = None,
627
+ ) -> ReservedFixedIP:
628
+ """
629
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
630
+
631
+ Args:
632
+ port_id: Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
633
+ Balancer entity).
634
+
635
+ type: Must be 'port'.
636
+
637
+ extra_headers: Send extra headers
638
+
639
+ extra_query: Add additional query parameters to the request
640
+
641
+ extra_body: Add additional JSON properties to the request
642
+
643
+ timeout: Override the client-level default timeout for this request, in seconds
644
+ """
645
+ ...
646
+
647
+ @required_args(
648
+ ["type"],
649
+ ["subnet_id", "type"],
650
+ ["network_id", "type"],
651
+ ["ip_address", "network_id", "type"],
652
+ ["port_id", "type"],
653
+ )
654
+ def create_and_poll(
655
+ self,
656
+ *,
657
+ project_id: int | None = None,
658
+ region_id: int | None = None,
659
+ type: Literal["external"] | Literal["subnet"] | Literal["any_subnet"] | Literal["ip_address"] | Literal["port"],
660
+ ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
661
+ is_vip: bool | NotGiven = NOT_GIVEN,
662
+ subnet_id: str | NotGiven = NOT_GIVEN,
663
+ network_id: str | NotGiven = NOT_GIVEN,
664
+ ip_address: str | NotGiven = NOT_GIVEN,
665
+ port_id: str | NotGiven = NOT_GIVEN,
666
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
667
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
668
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
669
+ # The extra values given here take precedence over values defined on the client or passed to this method.
670
+ extra_headers: Headers | None = None,
671
+ extra_query: Query | None = None,
672
+ extra_body: Body | None = None,
673
+ ) -> ReservedFixedIP:
674
+ """
675
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
676
+ """
677
+ response: TaskIDList = self.create( # type: ignore
678
+ project_id=project_id,
679
+ region_id=region_id,
680
+ type=type,
681
+ ip_family=ip_family,
682
+ is_vip=is_vip,
683
+ subnet_id=subnet_id,
684
+ network_id=network_id,
685
+ ip_address=ip_address,
686
+ port_id=port_id,
687
+ extra_headers=extra_headers,
688
+ extra_query=extra_query,
689
+ extra_body=extra_body,
690
+ timeout=timeout,
691
+ )
692
+ if not response.tasks: # type: ignore
693
+ raise ValueError("Expected at least one task to be created")
694
+ task = self._client.cloud.tasks.poll(
695
+ task_id=response.tasks[0], # type: ignore
696
+ extra_headers=extra_headers,
697
+ polling_interval_seconds=polling_interval_seconds,
698
+ )
699
+ if (
700
+ task.created_resources is None
701
+ or task.created_resources.ports is None
702
+ or len(task.created_resources.ports) != 1
703
+ ):
704
+ raise ValueError("Task completed but created_resources or ports is missing or invalid")
705
+ created_port_id = task.created_resources.ports[0]
706
+ return self.get(
707
+ port_id=created_port_id,
708
+ project_id=project_id,
709
+ region_id=region_id,
710
+ extra_headers=extra_headers,
711
+ extra_query=extra_query,
712
+ extra_body=extra_body,
713
+ timeout=timeout,
714
+ )
715
+
716
+ def delete_and_poll(
717
+ self,
718
+ port_id: str,
719
+ *,
720
+ project_id: int | None = None,
721
+ region_id: int | None = None,
722
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
723
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
724
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
725
+ # The extra values given here take precedence over values defined on the client or passed to this method.
726
+ extra_headers: Headers | None = None,
727
+ extra_query: Query | None = None,
728
+ extra_body: Body | None = None,
729
+ ) -> None:
730
+ """
731
+ Delete a specific reserved fixed IP and all its associated resources and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
732
+ """
733
+ response = self.delete(
734
+ port_id=port_id,
735
+ project_id=project_id,
736
+ region_id=region_id,
737
+ extra_headers=extra_headers,
738
+ extra_query=extra_query,
739
+ extra_body=extra_body,
740
+ timeout=timeout,
741
+ )
742
+ if not response.tasks:
743
+ raise ValueError("Expected at least one task to be created")
744
+ self._client.cloud.tasks.poll(
745
+ task_id=response.tasks[0],
746
+ extra_headers=extra_headers,
747
+ polling_interval_seconds=polling_interval_seconds,
748
+ )
749
+
458
750
 
459
751
  class AsyncReservedFixedIPsResource(AsyncAPIResource):
460
752
  @cached_property
@@ -876,6 +1168,298 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
876
1168
  cast_to=ReservedFixedIP,
877
1169
  )
878
1170
 
1171
+ @overload
1172
+ async def create_and_poll(
1173
+ self,
1174
+ *,
1175
+ project_id: int | None = None,
1176
+ region_id: int | None = None,
1177
+ type: Literal["external"],
1178
+ ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
1179
+ is_vip: bool | NotGiven = NOT_GIVEN,
1180
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1181
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1182
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1183
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1184
+ extra_headers: Headers | None = None,
1185
+ extra_query: Query | None = None,
1186
+ extra_body: Body | None = None,
1187
+ ) -> ReservedFixedIP:
1188
+ """
1189
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1190
+
1191
+ Args:
1192
+ type: Must be 'external'
1193
+
1194
+ ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
1195
+
1196
+ is_vip: If reserved fixed IP is a VIP
1197
+
1198
+ extra_headers: Send extra headers
1199
+
1200
+ extra_query: Add additional query parameters to the request
1201
+
1202
+ extra_body: Add additional JSON properties to the request
1203
+
1204
+ timeout: Override the client-level default timeout for this request, in seconds
1205
+ """
1206
+ ...
1207
+
1208
+ @overload
1209
+ async def create_and_poll(
1210
+ self,
1211
+ *,
1212
+ project_id: int | None = None,
1213
+ region_id: int | None = None,
1214
+ subnet_id: str,
1215
+ type: Literal["subnet"],
1216
+ is_vip: bool | NotGiven = NOT_GIVEN,
1217
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1218
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1219
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1220
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1221
+ extra_headers: Headers | None = None,
1222
+ extra_query: Query | None = None,
1223
+ extra_body: Body | None = None,
1224
+ ) -> ReservedFixedIP:
1225
+ """
1226
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1227
+
1228
+ Args:
1229
+ subnet_id: Reserved fixed IP will be allocated in this subnet
1230
+
1231
+ type: Must be 'subnet'.
1232
+
1233
+ is_vip: If reserved fixed IP is a VIP
1234
+
1235
+ extra_headers: Send extra headers
1236
+
1237
+ extra_query: Add additional query parameters to the request
1238
+
1239
+ extra_body: Add additional JSON properties to the request
1240
+
1241
+ timeout: Override the client-level default timeout for this request, in seconds
1242
+ """
1243
+ ...
1244
+
1245
+ @overload
1246
+ async def create_and_poll(
1247
+ self,
1248
+ *,
1249
+ project_id: int | None = None,
1250
+ region_id: int | None = None,
1251
+ network_id: str,
1252
+ type: Literal["any_subnet"],
1253
+ ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
1254
+ is_vip: bool | NotGiven = NOT_GIVEN,
1255
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1256
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1257
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1258
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1259
+ extra_headers: Headers | None = None,
1260
+ extra_query: Query | None = None,
1261
+ extra_body: Body | None = None,
1262
+ ) -> ReservedFixedIP:
1263
+ """
1264
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1265
+
1266
+ Args:
1267
+ network_id: Reserved fixed IP will be allocated in a subnet of this network
1268
+
1269
+ type: Must be '`any_subnet`'.
1270
+
1271
+ ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
1272
+
1273
+ is_vip: If reserved fixed IP is a VIP
1274
+
1275
+ extra_headers: Send extra headers
1276
+
1277
+ extra_query: Add additional query parameters to the request
1278
+
1279
+ extra_body: Add additional JSON properties to the request
1280
+
1281
+ timeout: Override the client-level default timeout for this request, in seconds
1282
+ """
1283
+ ...
1284
+
1285
+ @overload
1286
+ async def create_and_poll(
1287
+ self,
1288
+ *,
1289
+ project_id: int | None = None,
1290
+ region_id: int | None = None,
1291
+ ip_address: str,
1292
+ network_id: str,
1293
+ type: Literal["ip_address"],
1294
+ is_vip: bool | NotGiven = NOT_GIVEN,
1295
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1296
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1297
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1298
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1299
+ extra_headers: Headers | None = None,
1300
+ extra_query: Query | None = None,
1301
+ extra_body: Body | None = None,
1302
+ ) -> ReservedFixedIP:
1303
+ """
1304
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1305
+
1306
+ Args:
1307
+ ip_address: Reserved fixed IP will be allocated the given IP address
1308
+
1309
+ network_id: Reserved fixed IP will be allocated in a subnet of this network
1310
+
1311
+ type: Must be '`ip_address`'.
1312
+
1313
+ is_vip: If reserved fixed IP is a VIP
1314
+
1315
+ extra_headers: Send extra headers
1316
+
1317
+ extra_query: Add additional query parameters to the request
1318
+
1319
+ extra_body: Add additional JSON properties to the request
1320
+
1321
+ timeout: Override the client-level default timeout for this request, in seconds
1322
+ """
1323
+ ...
1324
+
1325
+ @overload
1326
+ async def create_and_poll(
1327
+ self,
1328
+ *,
1329
+ project_id: int | None = None,
1330
+ region_id: int | None = None,
1331
+ port_id: str,
1332
+ type: Literal["port"],
1333
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1334
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1335
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1336
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1337
+ extra_headers: Headers | None = None,
1338
+ extra_query: Query | None = None,
1339
+ extra_body: Body | None = None,
1340
+ ) -> ReservedFixedIP:
1341
+ """
1342
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1343
+
1344
+ Args:
1345
+ port_id: Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
1346
+ Balancer entity).
1347
+
1348
+ type: Must be 'port'.
1349
+
1350
+ extra_headers: Send extra headers
1351
+
1352
+ extra_query: Add additional query parameters to the request
1353
+
1354
+ extra_body: Add additional JSON properties to the request
1355
+
1356
+ timeout: Override the client-level default timeout for this request, in seconds
1357
+ """
1358
+ ...
1359
+
1360
+ @required_args(
1361
+ ["type"],
1362
+ ["subnet_id", "type"],
1363
+ ["network_id", "type"],
1364
+ ["ip_address", "network_id", "type"],
1365
+ ["port_id", "type"],
1366
+ )
1367
+ async def create_and_poll(
1368
+ self,
1369
+ *,
1370
+ project_id: int | None = None,
1371
+ region_id: int | None = None,
1372
+ type: Literal["external"] | Literal["subnet"] | Literal["any_subnet"] | Literal["ip_address"] | Literal["port"],
1373
+ ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
1374
+ is_vip: bool | NotGiven = NOT_GIVEN,
1375
+ subnet_id: str | NotGiven = NOT_GIVEN,
1376
+ network_id: str | NotGiven = NOT_GIVEN,
1377
+ ip_address: str | NotGiven = NOT_GIVEN,
1378
+ port_id: str | NotGiven = NOT_GIVEN,
1379
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1380
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1381
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1382
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1383
+ extra_headers: Headers | None = None,
1384
+ extra_query: Query | None = None,
1385
+ extra_body: Body | None = None,
1386
+ ) -> ReservedFixedIP:
1387
+ """
1388
+ Create a new reserved fixed IP with the specified configuration and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1389
+ """
1390
+ response: TaskIDList = await self.create( # type: ignore
1391
+ project_id=project_id,
1392
+ region_id=region_id,
1393
+ type=type,
1394
+ ip_family=ip_family,
1395
+ is_vip=is_vip,
1396
+ subnet_id=subnet_id,
1397
+ network_id=network_id,
1398
+ ip_address=ip_address,
1399
+ port_id=port_id,
1400
+ extra_headers=extra_headers,
1401
+ extra_query=extra_query,
1402
+ extra_body=extra_body,
1403
+ timeout=timeout,
1404
+ )
1405
+ if not response.tasks: # type: ignore
1406
+ raise ValueError("Expected at least one task to be created")
1407
+ task = await self._client.cloud.tasks.poll(
1408
+ task_id=response.tasks[0], # type: ignore
1409
+ extra_headers=extra_headers,
1410
+ polling_interval_seconds=polling_interval_seconds,
1411
+ )
1412
+ if (
1413
+ task.created_resources is None
1414
+ or task.created_resources.ports is None
1415
+ or len(task.created_resources.ports) != 1
1416
+ ):
1417
+ raise ValueError("Task completed but created_resources or ports is missing or invalid")
1418
+ created_port_id = task.created_resources.ports[0]
1419
+ return await self.get(
1420
+ port_id=created_port_id,
1421
+ project_id=project_id,
1422
+ region_id=region_id,
1423
+ extra_headers=extra_headers,
1424
+ extra_query=extra_query,
1425
+ extra_body=extra_body,
1426
+ timeout=timeout,
1427
+ )
1428
+
1429
+ async def delete_and_poll(
1430
+ self,
1431
+ port_id: str,
1432
+ *,
1433
+ project_id: int | None = None,
1434
+ region_id: int | None = None,
1435
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
1436
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1437
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1438
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1439
+ extra_headers: Headers | None = None,
1440
+ extra_query: Query | None = None,
1441
+ extra_body: Body | None = None,
1442
+ ) -> None:
1443
+ """
1444
+ Delete a specific reserved fixed IP and all its associated resources and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
1445
+ """
1446
+ response = await self.delete(
1447
+ port_id=port_id,
1448
+ project_id=project_id,
1449
+ region_id=region_id,
1450
+ extra_headers=extra_headers,
1451
+ extra_query=extra_query,
1452
+ extra_body=extra_body,
1453
+ timeout=timeout,
1454
+ )
1455
+ if not response.tasks:
1456
+ raise ValueError("Expected at least one task to be created")
1457
+ await self._client.cloud.tasks.poll(
1458
+ task_id=response.tasks[0],
1459
+ extra_headers=extra_headers,
1460
+ polling_interval_seconds=polling_interval_seconds,
1461
+ )
1462
+
879
1463
 
880
1464
  class ReservedFixedIPsResourceWithRawResponse:
881
1465
  def __init__(self, reserved_fixed_ips: ReservedFixedIPsResource) -> None:
@@ -893,6 +1477,12 @@ class ReservedFixedIPsResourceWithRawResponse:
893
1477
  self.get = to_raw_response_wrapper(
894
1478
  reserved_fixed_ips.get,
895
1479
  )
1480
+ self.create_and_poll = to_raw_response_wrapper(
1481
+ reserved_fixed_ips.create_and_poll,
1482
+ )
1483
+ self.delete_and_poll = to_raw_response_wrapper(
1484
+ reserved_fixed_ips.delete_and_poll,
1485
+ )
896
1486
 
897
1487
  @cached_property
898
1488
  def vip(self) -> VipResourceWithRawResponse:
@@ -915,6 +1505,12 @@ class AsyncReservedFixedIPsResourceWithRawResponse:
915
1505
  self.get = async_to_raw_response_wrapper(
916
1506
  reserved_fixed_ips.get,
917
1507
  )
1508
+ self.create_and_poll = async_to_raw_response_wrapper(
1509
+ reserved_fixed_ips.create_and_poll,
1510
+ )
1511
+ self.delete_and_poll = async_to_raw_response_wrapper(
1512
+ reserved_fixed_ips.delete_and_poll,
1513
+ )
918
1514
 
919
1515
  @cached_property
920
1516
  def vip(self) -> AsyncVipResourceWithRawResponse:
@@ -937,6 +1533,12 @@ class ReservedFixedIPsResourceWithStreamingResponse:
937
1533
  self.get = to_streamed_response_wrapper(
938
1534
  reserved_fixed_ips.get,
939
1535
  )
1536
+ self.create_and_poll = to_streamed_response_wrapper(
1537
+ reserved_fixed_ips.create_and_poll,
1538
+ )
1539
+ self.delete_and_poll = to_streamed_response_wrapper(
1540
+ reserved_fixed_ips.delete_and_poll,
1541
+ )
940
1542
 
941
1543
  @cached_property
942
1544
  def vip(self) -> VipResourceWithStreamingResponse:
@@ -959,6 +1561,12 @@ class AsyncReservedFixedIPsResourceWithStreamingResponse:
959
1561
  self.get = async_to_streamed_response_wrapper(
960
1562
  reserved_fixed_ips.get,
961
1563
  )
1564
+ self.create_and_poll = async_to_streamed_response_wrapper(
1565
+ reserved_fixed_ips.create_and_poll,
1566
+ )
1567
+ self.delete_and_poll = async_to_streamed_response_wrapper(
1568
+ reserved_fixed_ips.delete_and_poll,
1569
+ )
962
1570
 
963
1571
  @cached_property
964
1572
  def vip(self) -> AsyncVipResourceWithStreamingResponse: