gcore 0.16.0__py3-none-any.whl → 0.17.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.

Files changed (52) hide show
  1. gcore/_client.py +16 -0
  2. gcore/_version.py +1 -1
  3. gcore/resources/cdn/cdn.py +120 -21
  4. gcore/resources/cdn/{logs/logs.py → logs.py} +9 -9
  5. gcore/resources/cloud/baremetal/servers.py +8 -0
  6. gcore/resources/cloud/cloud.py +18 -0
  7. gcore/resources/cloud/file_shares/file_shares.py +124 -33
  8. gcore/resources/cloud/floating_ips.py +8 -0
  9. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +12 -0
  10. gcore/resources/cloud/gpu_baremetal_clusters/images.py +8 -0
  11. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +4 -0
  12. gcore/resources/cloud/inference/deployments/deployments.py +12 -0
  13. gcore/resources/cloud/instances/images.py +12 -0
  14. gcore/resources/cloud/instances/instances.py +20 -0
  15. gcore/resources/cloud/instances/interfaces.py +12 -0
  16. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +12 -0
  17. gcore/resources/cloud/load_balancers/l7_policies/rules.py +12 -0
  18. gcore/resources/cloud/load_balancers/listeners.py +12 -0
  19. gcore/resources/cloud/load_balancers/load_balancers.py +16 -0
  20. gcore/resources/cloud/load_balancers/pools/pools.py +12 -0
  21. gcore/resources/cloud/networks/networks.py +8 -0
  22. gcore/resources/cloud/networks/subnets.py +4 -0
  23. gcore/resources/cloud/placement_groups.py +8 -0
  24. gcore/resources/cloud/projects.py +109 -109
  25. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +18 -0
  26. gcore/resources/cloud/secrets.py +4 -0
  27. gcore/resources/cloud/tasks.py +22 -7
  28. gcore/resources/cloud/volumes.py +27 -1
  29. gcore/types/cdn/__init__.py +3 -0
  30. gcore/types/cdn/alibaba_regions.py +22 -0
  31. gcore/types/cdn/aws_regions.py +22 -0
  32. gcore/types/cdn/cdn_list_purge_statuses_response.py +10 -0
  33. gcore/types/cdn/cdn_resource.py +1 -1
  34. gcore/types/cdn/resource_create_params.py +1 -1
  35. gcore/types/cdn/resource_replace_params.py +1 -1
  36. gcore/types/cdn/resource_update_params.py +1 -1
  37. gcore/types/cdn/resources/cdn_resource_rule.py +1 -1
  38. gcore/types/cdn/resources/rule_create_params.py +1 -1
  39. gcore/types/cdn/resources/rule_replace_params.py +1 -1
  40. gcore/types/cdn/resources/rule_update_params.py +1 -1
  41. gcore/types/cdn/rule_template.py +1 -1
  42. gcore/types/cdn/rule_template_create_params.py +1 -1
  43. gcore/types/cdn/rule_template_replace_params.py +1 -1
  44. gcore/types/cdn/rule_template_update_params.py +1 -1
  45. gcore/types/cloud/__init__.py +1 -1
  46. gcore/types/cloud/{project_replace_params.py → project_update_params.py} +2 -2
  47. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/METADATA +2 -2
  48. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/RECORD +50 -49
  49. gcore/resources/cdn/logs/__init__.py +0 -19
  50. gcore/types/cdn/logs/__init__.py +0 -3
  51. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/WHEEL +0 -0
  52. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,6 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import typing_extensions
6
5
  from typing import Dict, Iterable, Optional
7
6
  from typing_extensions import Literal, overload
8
7
 
@@ -228,7 +227,6 @@ class FileSharesResource(SyncAPIResource):
228
227
  cast_to=TaskIDList,
229
228
  )
230
229
 
231
- @typing_extensions.deprecated("deprecated")
232
230
  def update(
233
231
  self,
234
232
  file_share_id: str,
@@ -244,12 +242,9 @@ class FileSharesResource(SyncAPIResource):
244
242
  extra_query: Query | None = None,
245
243
  extra_body: Body | None = None,
246
244
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
247
- ) -> FileShare:
245
+ ) -> TaskIDList:
248
246
  """
249
- Rename file share or update tags
250
-
251
- **Deprecated**: Use PATCH
252
- /v3/`file_shares`/{`project_id`}/{`region_id`}/{`file_share_id`} instead
247
+ Rename file share, update tags or set share specific properties
253
248
 
254
249
  Args:
255
250
  project_id: Project ID
@@ -299,7 +294,7 @@ class FileSharesResource(SyncAPIResource):
299
294
  if not file_share_id:
300
295
  raise ValueError(f"Expected a non-empty value for `file_share_id` but received {file_share_id!r}")
301
296
  return self._patch(
302
- f"/cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}",
297
+ f"/cloud/v3/file_shares/{project_id}/{region_id}/{file_share_id}",
303
298
  body=maybe_transform(
304
299
  {
305
300
  "name": name,
@@ -311,7 +306,55 @@ class FileSharesResource(SyncAPIResource):
311
306
  options=make_request_options(
312
307
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
313
308
  ),
314
- cast_to=FileShare,
309
+ cast_to=TaskIDList,
310
+ )
311
+
312
+ def update_and_poll(
313
+ self,
314
+ file_share_id: str,
315
+ *,
316
+ project_id: int | None = None,
317
+ region_id: int | None = None,
318
+ name: str | Omit = omit,
319
+ share_settings: file_share_update_params.ShareSettings | Omit = omit,
320
+ tags: Optional[TagUpdateMapParam] | Omit = omit,
321
+ polling_interval_seconds: int | Omit = omit,
322
+ polling_timeout_seconds: int | Omit = omit,
323
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
324
+ # The extra values given here take precedence over values defined on the client or passed to this method.
325
+ extra_headers: Headers | None = None,
326
+ extra_query: Query | None = None,
327
+ extra_body: Body | None = None,
328
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
329
+ ) -> FileShare:
330
+ response = self.update(
331
+ file_share_id,
332
+ project_id=project_id,
333
+ region_id=region_id,
334
+ name=name,
335
+ share_settings=share_settings,
336
+ tags=tags,
337
+ extra_headers=extra_headers,
338
+ extra_query=extra_query,
339
+ extra_body=extra_body,
340
+ timeout=timeout,
341
+ )
342
+ if not response.tasks:
343
+ raise ValueError("Expected at least one task to be created")
344
+ self._client.cloud.tasks.poll(
345
+ task_id=response.tasks[0],
346
+ extra_headers=extra_headers,
347
+ polling_interval_seconds=polling_interval_seconds,
348
+ polling_timeout_seconds=polling_timeout_seconds,
349
+ )
350
+ return self.get(
351
+ file_share_id,
352
+ project_id=project_id,
353
+ region_id=region_id,
354
+ extra_headers=extra_headers,
355
+ extra_query=extra_query,
356
+ extra_body=extra_body,
357
+ timeout=timeout,
315
358
  )
316
359
 
317
360
  def list(
@@ -707,7 +750,6 @@ class AsyncFileSharesResource(AsyncAPIResource):
707
750
  cast_to=TaskIDList,
708
751
  )
709
752
 
710
- @typing_extensions.deprecated("deprecated")
711
753
  async def update(
712
754
  self,
713
755
  file_share_id: str,
@@ -723,12 +765,9 @@ class AsyncFileSharesResource(AsyncAPIResource):
723
765
  extra_query: Query | None = None,
724
766
  extra_body: Body | None = None,
725
767
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
726
- ) -> FileShare:
768
+ ) -> TaskIDList:
727
769
  """
728
- Rename file share or update tags
729
-
730
- **Deprecated**: Use PATCH
731
- /v3/`file_shares`/{`project_id`}/{`region_id`}/{`file_share_id`} instead
770
+ Rename file share, update tags or set share specific properties
732
771
 
733
772
  Args:
734
773
  project_id: Project ID
@@ -778,7 +817,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
778
817
  if not file_share_id:
779
818
  raise ValueError(f"Expected a non-empty value for `file_share_id` but received {file_share_id!r}")
780
819
  return await self._patch(
781
- f"/cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}",
820
+ f"/cloud/v3/file_shares/{project_id}/{region_id}/{file_share_id}",
782
821
  body=await async_maybe_transform(
783
822
  {
784
823
  "name": name,
@@ -790,7 +829,55 @@ class AsyncFileSharesResource(AsyncAPIResource):
790
829
  options=make_request_options(
791
830
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
792
831
  ),
793
- cast_to=FileShare,
832
+ cast_to=TaskIDList,
833
+ )
834
+
835
+ async def update_and_poll(
836
+ self,
837
+ file_share_id: str,
838
+ *,
839
+ project_id: int | None = None,
840
+ region_id: int | None = None,
841
+ name: str | Omit = omit,
842
+ share_settings: file_share_update_params.ShareSettings | Omit = omit,
843
+ tags: Optional[TagUpdateMapParam] | Omit = omit,
844
+ polling_interval_seconds: int | Omit = omit,
845
+ polling_timeout_seconds: int | Omit = omit,
846
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
847
+ # The extra values given here take precedence over values defined on the client or passed to this method.
848
+ extra_headers: Headers | None = None,
849
+ extra_query: Query | None = None,
850
+ extra_body: Body | None = None,
851
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
852
+ ) -> FileShare:
853
+ response = await self.update(
854
+ file_share_id,
855
+ project_id=project_id,
856
+ region_id=region_id,
857
+ name=name,
858
+ share_settings=share_settings,
859
+ tags=tags,
860
+ extra_headers=extra_headers,
861
+ extra_query=extra_query,
862
+ extra_body=extra_body,
863
+ timeout=timeout,
864
+ )
865
+ if not response.tasks:
866
+ raise ValueError("Expected at least one task to be created")
867
+ await self._client.cloud.tasks.poll(
868
+ task_id=response.tasks[0],
869
+ extra_headers=extra_headers,
870
+ polling_interval_seconds=polling_interval_seconds,
871
+ polling_timeout_seconds=polling_timeout_seconds,
872
+ )
873
+ return await self.get(
874
+ file_share_id,
875
+ project_id=project_id,
876
+ region_id=region_id,
877
+ extra_headers=extra_headers,
878
+ extra_query=extra_query,
879
+ extra_body=extra_body,
880
+ timeout=timeout,
794
881
  )
795
882
 
796
883
  def list(
@@ -1006,10 +1093,11 @@ class FileSharesResourceWithRawResponse:
1006
1093
  self.create = to_raw_response_wrapper(
1007
1094
  file_shares.create,
1008
1095
  )
1009
- self.update = ( # pyright: ignore[reportDeprecated]
1010
- to_raw_response_wrapper(
1011
- file_shares.update, # pyright: ignore[reportDeprecated],
1012
- )
1096
+ self.update = to_raw_response_wrapper(
1097
+ file_shares.update,
1098
+ )
1099
+ self.update_and_poll = to_raw_response_wrapper(
1100
+ file_shares.update_and_poll,
1013
1101
  )
1014
1102
  self.list = to_raw_response_wrapper(
1015
1103
  file_shares.list,
@@ -1036,10 +1124,11 @@ class AsyncFileSharesResourceWithRawResponse:
1036
1124
  self.create = async_to_raw_response_wrapper(
1037
1125
  file_shares.create,
1038
1126
  )
1039
- self.update = ( # pyright: ignore[reportDeprecated]
1040
- async_to_raw_response_wrapper(
1041
- file_shares.update, # pyright: ignore[reportDeprecated],
1042
- )
1127
+ self.update = async_to_raw_response_wrapper(
1128
+ file_shares.update,
1129
+ )
1130
+ self.update_and_poll = async_to_raw_response_wrapper(
1131
+ file_shares.update_and_poll,
1043
1132
  )
1044
1133
  self.list = async_to_raw_response_wrapper(
1045
1134
  file_shares.list,
@@ -1066,10 +1155,11 @@ class FileSharesResourceWithStreamingResponse:
1066
1155
  self.create = to_streamed_response_wrapper(
1067
1156
  file_shares.create,
1068
1157
  )
1069
- self.update = ( # pyright: ignore[reportDeprecated]
1070
- to_streamed_response_wrapper(
1071
- file_shares.update, # pyright: ignore[reportDeprecated],
1072
- )
1158
+ self.update = to_streamed_response_wrapper(
1159
+ file_shares.update,
1160
+ )
1161
+ self.update_and_poll = to_streamed_response_wrapper(
1162
+ file_shares.update_and_poll,
1073
1163
  )
1074
1164
  self.list = to_streamed_response_wrapper(
1075
1165
  file_shares.list,
@@ -1096,10 +1186,11 @@ class AsyncFileSharesResourceWithStreamingResponse:
1096
1186
  self.create = async_to_streamed_response_wrapper(
1097
1187
  file_shares.create,
1098
1188
  )
1099
- self.update = ( # pyright: ignore[reportDeprecated]
1100
- async_to_streamed_response_wrapper(
1101
- file_shares.update, # pyright: ignore[reportDeprecated],
1102
- )
1189
+ self.update = async_to_streamed_response_wrapper(
1190
+ file_shares.update,
1191
+ )
1192
+ self.update_and_pol = async_to_streamed_response_wrapper(
1193
+ file_shares.update_and_poll,
1103
1194
  )
1104
1195
  self.list = async_to_streamed_response_wrapper(
1105
1196
  file_shares.list,
@@ -445,6 +445,7 @@ class FloatingIPsResource(SyncAPIResource):
445
445
  port_id: Optional[str] | Omit = omit,
446
446
  tags: Dict[str, str] | Omit = omit,
447
447
  polling_interval_seconds: int | Omit = omit,
448
+ polling_timeout_seconds: int | Omit = omit,
448
449
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
449
450
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
450
451
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -472,6 +473,7 @@ class FloatingIPsResource(SyncAPIResource):
472
473
  task_id=response.tasks[0],
473
474
  extra_headers=extra_headers,
474
475
  polling_interval_seconds=polling_interval_seconds,
476
+ polling_timeout_seconds=polling_timeout_seconds,
475
477
  )
476
478
  if task.created_resources is None or task.created_resources.floatingips is None:
477
479
  raise ValueError("Task completed but created_resources or floatingips is missing")
@@ -493,6 +495,7 @@ class FloatingIPsResource(SyncAPIResource):
493
495
  project_id: int | None = None,
494
496
  region_id: int | None = None,
495
497
  polling_interval_seconds: int | Omit = omit,
498
+ polling_timeout_seconds: int | Omit = omit,
496
499
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
497
500
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
498
501
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -518,6 +521,7 @@ class FloatingIPsResource(SyncAPIResource):
518
521
  task_id=response.tasks[0],
519
522
  extra_headers=extra_headers,
520
523
  polling_interval_seconds=polling_interval_seconds,
524
+ polling_timeout_seconds=polling_timeout_seconds,
521
525
  )
522
526
 
523
527
 
@@ -934,6 +938,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
934
938
  port_id: Optional[str] | Omit = omit,
935
939
  tags: Dict[str, str] | Omit = omit,
936
940
  polling_interval_seconds: int | Omit = omit,
941
+ polling_timeout_seconds: int | Omit = omit,
937
942
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
938
943
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
939
944
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -961,6 +966,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
961
966
  task_id=response.tasks[0],
962
967
  extra_headers=extra_headers,
963
968
  polling_interval_seconds=polling_interval_seconds,
969
+ polling_timeout_seconds=polling_timeout_seconds,
964
970
  )
965
971
  if task.created_resources is None or task.created_resources.floatingips is None:
966
972
  raise ValueError("Task completed but created_resources or floatingips is missing")
@@ -982,6 +988,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
982
988
  project_id: int | None = None,
983
989
  region_id: int | None = None,
984
990
  polling_interval_seconds: int | Omit = omit,
991
+ polling_timeout_seconds: int | Omit = omit,
985
992
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
986
993
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
987
994
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1007,6 +1014,7 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
1007
1014
  task_id=response.tasks[0],
1008
1015
  extra_headers=extra_headers,
1009
1016
  polling_interval_seconds=polling_interval_seconds,
1017
+ polling_timeout_seconds=polling_timeout_seconds,
1010
1018
  )
1011
1019
 
1012
1020
 
@@ -635,6 +635,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
635
635
  servers_settings: gpu_baremetal_cluster_create_params.ServersSettings,
636
636
  tags: Dict[str, str] | Omit = omit,
637
637
  polling_interval_seconds: int | Omit = omit,
638
+ polling_timeout_seconds: int | Omit = omit,
638
639
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
639
640
  # The extra values given here take precedence over values defined on the client or passed to this method.
640
641
  extra_headers: Headers | None = None,
@@ -667,6 +668,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
667
668
  extra_query=extra_query,
668
669
  extra_body=extra_body,
669
670
  polling_interval_seconds=polling_interval_seconds,
671
+ polling_timeout_seconds=polling_timeout_seconds,
670
672
  )
671
673
  if not task.created_resources or not task.created_resources.ai_clusters:
672
674
  raise ValueError("No cluster was created")
@@ -691,6 +693,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
691
693
  image_id: Optional[str] | Omit = omit,
692
694
  user_data: Optional[str] | Omit = omit,
693
695
  polling_interval_seconds: int | Omit = omit,
696
+ polling_timeout_seconds: int | Omit = omit,
694
697
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
695
698
  # The extra values given here take precedence over values defined on the client or passed to this method.
696
699
  extra_headers: Headers | None = None,
@@ -721,6 +724,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
721
724
  extra_query=extra_query,
722
725
  extra_body=extra_body,
723
726
  polling_interval_seconds=polling_interval_seconds,
727
+ polling_timeout_seconds=polling_timeout_seconds,
724
728
  )
725
729
  return self.get( # pyright: ignore[reportDeprecated]
726
730
  cluster_id=cluster_id,
@@ -740,6 +744,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
740
744
  region_id: int | None = None,
741
745
  instances_count: int,
742
746
  polling_interval_seconds: int | Omit = omit,
747
+ polling_timeout_seconds: int | Omit = omit,
743
748
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
744
749
  # The extra values given here take precedence over values defined on the client or passed to this method.
745
750
  extra_headers: Headers | None = None,
@@ -768,6 +773,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
768
773
  extra_query=extra_query,
769
774
  extra_body=extra_body,
770
775
  polling_interval_seconds=polling_interval_seconds,
776
+ polling_timeout_seconds=polling_timeout_seconds,
771
777
  )
772
778
  return self.get( # pyright: ignore[reportDeprecated]
773
779
  cluster_id=cluster_id,
@@ -1348,6 +1354,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
1348
1354
  servers_settings: gpu_baremetal_cluster_create_params.ServersSettings,
1349
1355
  tags: Dict[str, str] | Omit = omit,
1350
1356
  polling_interval_seconds: int | Omit = omit,
1357
+ polling_timeout_seconds: int | Omit = omit,
1351
1358
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1352
1359
  # The extra values given here take precedence over values defined on the client or passed to this method.
1353
1360
  extra_headers: Headers | None = None,
@@ -1380,6 +1387,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
1380
1387
  extra_query=extra_query,
1381
1388
  extra_body=extra_body,
1382
1389
  polling_interval_seconds=polling_interval_seconds,
1390
+ polling_timeout_seconds=polling_timeout_seconds,
1383
1391
  )
1384
1392
  if not task.created_resources or not task.created_resources.ai_clusters:
1385
1393
  raise ValueError("No cluster was created")
@@ -1404,6 +1412,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
1404
1412
  image_id: Optional[str] | Omit = omit,
1405
1413
  user_data: Optional[str] | Omit = omit,
1406
1414
  polling_interval_seconds: int | Omit = omit,
1415
+ polling_timeout_seconds: int | Omit = omit,
1407
1416
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1408
1417
  # The extra values given here take precedence over values defined on the client or passed to this method.
1409
1418
  extra_headers: Headers | None = None,
@@ -1434,6 +1443,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
1434
1443
  extra_query=extra_query,
1435
1444
  extra_body=extra_body,
1436
1445
  polling_interval_seconds=polling_interval_seconds,
1446
+ polling_timeout_seconds=polling_timeout_seconds,
1437
1447
  )
1438
1448
  return await self.get( # pyright: ignore[reportDeprecated]
1439
1449
  cluster_id=cluster_id,
@@ -1453,6 +1463,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
1453
1463
  region_id: int | None = None,
1454
1464
  instances_count: int,
1455
1465
  polling_interval_seconds: int | Omit = omit,
1466
+ polling_timeout_seconds: int | Omit = omit,
1456
1467
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1457
1468
  # The extra values given here take precedence over values defined on the client or passed to this method.
1458
1469
  extra_headers: Headers | None = None,
@@ -1481,6 +1492,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
1481
1492
  extra_query=extra_query,
1482
1493
  extra_body=extra_body,
1483
1494
  polling_interval_seconds=polling_interval_seconds,
1495
+ polling_timeout_seconds=polling_timeout_seconds,
1484
1496
  )
1485
1497
  return await self.get( # pyright: ignore[reportDeprecated]
1486
1498
  cluster_id=cluster_id,
@@ -138,6 +138,7 @@ class ImagesResource(SyncAPIResource):
138
138
  project_id: int | None = None,
139
139
  region_id: int | None = None,
140
140
  polling_interval_seconds: int | Omit = omit,
141
+ polling_timeout_seconds: int | Omit = omit,
141
142
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
142
143
  # The extra values given here take precedence over values defined on the client or passed to this method.
143
144
  extra_headers: Headers | None = None,
@@ -165,6 +166,7 @@ class ImagesResource(SyncAPIResource):
165
166
  extra_query=extra_query,
166
167
  extra_body=extra_body,
167
168
  polling_interval_seconds=polling_interval_seconds,
169
+ polling_timeout_seconds=polling_timeout_seconds,
168
170
  )
169
171
 
170
172
  def get(
@@ -318,6 +320,7 @@ class ImagesResource(SyncAPIResource):
318
320
  ssh_key: Literal["allow", "deny", "required"] | Omit = omit,
319
321
  tags: Dict[str, str] | Omit = omit,
320
322
  polling_interval_seconds: int | Omit = omit,
323
+ polling_timeout_seconds: int | Omit = omit,
321
324
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
322
325
  # The extra values given here take precedence over values defined on the client or passed to this method.
323
326
  extra_headers: Headers | None = None,
@@ -354,6 +357,7 @@ class ImagesResource(SyncAPIResource):
354
357
  extra_query=extra_query,
355
358
  extra_body=extra_body,
356
359
  polling_interval_seconds=polling_interval_seconds,
360
+ polling_timeout_seconds=polling_timeout_seconds,
357
361
  )
358
362
  if not task.created_resources or not task.created_resources.images:
359
363
  raise ValueError("No image was created")
@@ -481,6 +485,7 @@ class AsyncImagesResource(AsyncAPIResource):
481
485
  project_id: int | None = None,
482
486
  region_id: int | None = None,
483
487
  polling_interval_seconds: int | Omit = omit,
488
+ polling_timeout_seconds: int | Omit = omit,
484
489
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
485
490
  # The extra values given here take precedence over values defined on the client or passed to this method.
486
491
  extra_headers: Headers | None = None,
@@ -508,6 +513,7 @@ class AsyncImagesResource(AsyncAPIResource):
508
513
  extra_query=extra_query,
509
514
  extra_body=extra_body,
510
515
  polling_interval_seconds=polling_interval_seconds,
516
+ polling_timeout_seconds=polling_timeout_seconds,
511
517
  )
512
518
 
513
519
  async def get(
@@ -661,6 +667,7 @@ class AsyncImagesResource(AsyncAPIResource):
661
667
  ssh_key: Literal["allow", "deny", "required"] | Omit = omit,
662
668
  tags: Dict[str, str] | Omit = omit,
663
669
  polling_interval_seconds: int | Omit = omit,
670
+ polling_timeout_seconds: int | Omit = omit,
664
671
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
665
672
  # The extra values given here take precedence over values defined on the client or passed to this method.
666
673
  extra_headers: Headers | None = None,
@@ -697,6 +704,7 @@ class AsyncImagesResource(AsyncAPIResource):
697
704
  extra_query=extra_query,
698
705
  extra_body=extra_body,
699
706
  polling_interval_seconds=polling_interval_seconds,
707
+ polling_timeout_seconds=polling_timeout_seconds,
700
708
  )
701
709
  if not task.created_resources or not task.created_resources.images:
702
710
  raise ValueError("No image was created")
@@ -229,6 +229,7 @@ class ServersResource(SyncAPIResource):
229
229
  cluster_id: str,
230
230
  delete_floatings: bool | Omit = omit,
231
231
  polling_interval_seconds: int | Omit = omit,
232
+ polling_timeout_seconds: int | Omit = omit,
232
233
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
233
234
  # The extra values given here take precedence over values defined on the client or passed to this method.
234
235
  extra_headers: Headers | None = None,
@@ -258,6 +259,7 @@ class ServersResource(SyncAPIResource):
258
259
  extra_query=extra_query,
259
260
  extra_body=extra_body,
260
261
  polling_interval_seconds=polling_interval_seconds,
262
+ polling_timeout_seconds=polling_timeout_seconds,
261
263
  )
262
264
 
263
265
  @overload
@@ -876,6 +878,7 @@ class AsyncServersResource(AsyncAPIResource):
876
878
  cluster_id: str,
877
879
  delete_floatings: bool | Omit = omit,
878
880
  polling_interval_seconds: int | Omit = omit,
881
+ polling_timeout_seconds: int | Omit = omit,
879
882
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
880
883
  # The extra values given here take precedence over values defined on the client or passed to this method.
881
884
  extra_headers: Headers | None = None,
@@ -905,6 +908,7 @@ class AsyncServersResource(AsyncAPIResource):
905
908
  extra_query=extra_query,
906
909
  extra_body=extra_body,
907
910
  polling_interval_seconds=polling_interval_seconds,
911
+ polling_timeout_seconds=polling_timeout_seconds,
908
912
  )
909
913
 
910
914
  @overload
@@ -580,6 +580,7 @@ class DeploymentsResource(SyncAPIResource):
580
580
  probes: Optional[deployment_create_params.Probes] | Omit = omit,
581
581
  api_timeout: Optional[int] | Omit = omit,
582
582
  polling_interval_seconds: int | Omit = omit,
583
+ polling_timeout_seconds: int | Omit = omit,
583
584
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
584
585
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
585
586
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -615,6 +616,7 @@ class DeploymentsResource(SyncAPIResource):
615
616
  task_id=response.tasks[0],
616
617
  extra_headers=extra_headers,
617
618
  polling_interval_seconds=polling_interval_seconds,
619
+ polling_timeout_seconds=polling_timeout_seconds,
618
620
  )
619
621
  if (
620
622
  not task.created_resources
@@ -649,6 +651,7 @@ class DeploymentsResource(SyncAPIResource):
649
651
  probes: Optional[deployment_update_params.Probes] | Omit = omit,
650
652
  api_timeout: Optional[int] | Omit = omit,
651
653
  polling_interval_seconds: int | Omit = omit,
654
+ polling_timeout_seconds: int | Omit = omit,
652
655
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
653
656
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
654
657
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -687,6 +690,7 @@ class DeploymentsResource(SyncAPIResource):
687
690
  task_id=response.tasks[0],
688
691
  extra_headers=extra_headers,
689
692
  polling_interval_seconds=polling_interval_seconds,
693
+ polling_timeout_seconds=polling_timeout_seconds,
690
694
  )
691
695
  return self.get(
692
696
  deployment_name=deployment_name,
@@ -701,6 +705,7 @@ class DeploymentsResource(SyncAPIResource):
701
705
  *,
702
706
  project_id: int | None = None,
703
707
  polling_interval_seconds: int | Omit = omit,
708
+ polling_timeout_seconds: int | Omit = omit,
704
709
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
705
710
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
706
711
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -725,6 +730,7 @@ class DeploymentsResource(SyncAPIResource):
725
730
  task_id=response.tasks[0],
726
731
  extra_headers=extra_headers,
727
732
  polling_interval_seconds=polling_interval_seconds,
733
+ polling_timeout_seconds=polling_timeout_seconds,
728
734
  )
729
735
 
730
736
 
@@ -1273,6 +1279,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
1273
1279
  probes: Optional[deployment_create_params.Probes] | Omit = omit,
1274
1280
  api_timeout: Optional[int] | Omit = omit,
1275
1281
  polling_interval_seconds: int | Omit = omit,
1282
+ polling_timeout_seconds: int | Omit = omit,
1276
1283
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1277
1284
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1278
1285
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1308,6 +1315,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
1308
1315
  task_id=response.tasks[0],
1309
1316
  extra_headers=extra_headers,
1310
1317
  polling_interval_seconds=polling_interval_seconds,
1318
+ polling_timeout_seconds=polling_timeout_seconds,
1311
1319
  )
1312
1320
  if (
1313
1321
  not task.created_resources
@@ -1342,6 +1350,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
1342
1350
  probes: Optional[deployment_update_params.Probes] | Omit = omit,
1343
1351
  api_timeout: Optional[int] | Omit = omit,
1344
1352
  polling_interval_seconds: int | Omit = omit,
1353
+ polling_timeout_seconds: int | Omit = omit,
1345
1354
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1346
1355
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1347
1356
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1380,6 +1389,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
1380
1389
  task_id=response.tasks[0],
1381
1390
  extra_headers=extra_headers,
1382
1391
  polling_interval_seconds=polling_interval_seconds,
1392
+ polling_timeout_seconds=polling_timeout_seconds,
1383
1393
  )
1384
1394
  return await self.get(
1385
1395
  deployment_name=deployment_name,
@@ -1394,6 +1404,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
1394
1404
  *,
1395
1405
  project_id: int | None = None,
1396
1406
  polling_interval_seconds: int | Omit = omit,
1407
+ polling_timeout_seconds: int | Omit = omit,
1397
1408
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1398
1409
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1399
1410
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1418,6 +1429,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
1418
1429
  task_id=response.tasks[0],
1419
1430
  extra_headers=extra_headers,
1420
1431
  polling_interval_seconds=polling_interval_seconds,
1432
+ polling_timeout_seconds=polling_timeout_seconds,
1421
1433
  )
1422
1434
 
1423
1435