gcore 0.16.0__py3-none-any.whl → 0.23.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 (220) hide show
  1. gcore/_client.py +16 -0
  2. gcore/_models.py +37 -15
  3. gcore/_streaming.py +12 -12
  4. gcore/_utils/_sync.py +3 -31
  5. gcore/_utils/_utils.py +1 -1
  6. gcore/_version.py +1 -1
  7. gcore/resources/cdn/audit_log.py +4 -4
  8. gcore/resources/cdn/cdn.py +120 -21
  9. gcore/resources/cdn/ip_ranges.py +97 -5
  10. gcore/resources/cdn/{logs/logs.py → logs.py} +9 -9
  11. gcore/resources/cdn/resources/resources.py +20 -20
  12. gcore/resources/cdn/statistics.py +56 -58
  13. gcore/resources/cloud/__init__.py +40 -12
  14. gcore/resources/cloud/audit_logs.py +20 -0
  15. gcore/resources/cloud/baremetal/servers.py +48 -14
  16. gcore/resources/cloud/billing_reservations.py +2 -2
  17. gcore/resources/cloud/cloud.py +100 -18
  18. gcore/resources/cloud/databases/__init__.py +33 -0
  19. gcore/resources/cloud/databases/databases.py +102 -0
  20. gcore/resources/cloud/databases/postgres/__init__.py +61 -0
  21. gcore/resources/cloud/databases/postgres/clusters/__init__.py +33 -0
  22. gcore/resources/cloud/databases/postgres/clusters/clusters.py +716 -0
  23. gcore/resources/cloud/databases/postgres/clusters/user_credentials.py +281 -0
  24. gcore/resources/cloud/databases/postgres/configurations.py +169 -0
  25. gcore/resources/cloud/databases/postgres/custom_configurations.py +197 -0
  26. gcore/resources/cloud/databases/postgres/postgres.py +166 -0
  27. gcore/resources/cloud/file_shares/file_shares.py +154 -49
  28. gcore/resources/cloud/floating_ips.py +42 -10
  29. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +70 -10
  30. gcore/resources/cloud/gpu_baremetal_clusters/images.py +40 -6
  31. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +16 -0
  32. gcore/resources/cloud/gpu_virtual_clusters/__init__.py +89 -0
  33. gcore/resources/cloud/gpu_virtual_clusters/flavors.py +211 -0
  34. gcore/resources/cloud/gpu_virtual_clusters/gpu_virtual_clusters.py +1551 -0
  35. gcore/resources/cloud/gpu_virtual_clusters/images.py +582 -0
  36. gcore/resources/cloud/gpu_virtual_clusters/interfaces.py +187 -0
  37. gcore/resources/cloud/gpu_virtual_clusters/servers.py +506 -0
  38. gcore/resources/cloud/gpu_virtual_clusters/volumes.py +187 -0
  39. gcore/resources/cloud/inference/deployments/deployments.py +52 -4
  40. gcore/resources/cloud/instances/images.py +72 -18
  41. gcore/resources/cloud/instances/instances.py +110 -18
  42. gcore/resources/cloud/instances/interfaces.py +12 -0
  43. gcore/resources/cloud/k8s/__init__.py +12 -12
  44. gcore/resources/cloud/k8s/clusters/clusters.py +25 -25
  45. gcore/resources/cloud/k8s/clusters/pools/pools.py +14 -14
  46. gcore/resources/cloud/k8s/k8s.py +24 -24
  47. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +1420 -218
  48. gcore/resources/cloud/load_balancers/l7_policies/rules.py +134 -22
  49. gcore/resources/cloud/load_balancers/listeners.py +77 -6
  50. gcore/resources/cloud/load_balancers/load_balancers.py +92 -14
  51. gcore/resources/cloud/load_balancers/pools/pools.py +52 -4
  52. gcore/resources/cloud/networks/networks.py +30 -10
  53. gcore/resources/cloud/networks/subnets.py +26 -10
  54. gcore/resources/cloud/placement_groups.py +8 -0
  55. gcore/resources/cloud/projects.py +99 -119
  56. gcore/resources/cloud/quotas/requests.py +0 -8
  57. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +18 -0
  58. gcore/resources/cloud/secrets.py +16 -0
  59. gcore/resources/cloud/security_groups/security_groups.py +38 -12
  60. gcore/resources/cloud/ssh_keys.py +10 -0
  61. gcore/resources/cloud/tasks.py +22 -7
  62. gcore/resources/cloud/volumes.py +65 -23
  63. gcore/resources/dns/zones/rrsets.py +10 -10
  64. gcore/resources/dns/zones/zones.py +2 -2
  65. gcore/resources/security/bgp_announces.py +0 -4
  66. gcore/resources/security/profiles.py +31 -7
  67. gcore/resources/storage/credentials.py +0 -28
  68. gcore/resources/storage/storage.py +2 -2
  69. gcore/types/cdn/__init__.py +5 -0
  70. gcore/types/cdn/alibaba_regions.py +22 -0
  71. gcore/types/cdn/audit_log_list_params.py +2 -2
  72. gcore/types/cdn/aws_regions.py +22 -0
  73. gcore/types/cdn/cdn_list_purge_statuses_response.py +10 -0
  74. gcore/types/cdn/cdn_resource.py +17 -12
  75. gcore/types/cdn/ip_range_list_ips_params.py +19 -0
  76. gcore/types/cdn/ip_range_list_params.py +19 -0
  77. gcore/types/cdn/resource_create_params.py +17 -12
  78. gcore/types/cdn/resource_purge_params.py +4 -4
  79. gcore/types/cdn/resource_replace_params.py +17 -12
  80. gcore/types/cdn/resource_update_params.py +17 -12
  81. gcore/types/cdn/resource_usage_stats.py +16 -15
  82. gcore/types/cdn/resources/cdn_resource_rule.py +15 -10
  83. gcore/types/cdn/resources/rule_create_params.py +15 -10
  84. gcore/types/cdn/resources/rule_replace_params.py +15 -10
  85. gcore/types/cdn/resources/rule_update_params.py +15 -10
  86. gcore/types/cdn/rule_template.py +15 -10
  87. gcore/types/cdn/rule_template_create_params.py +15 -10
  88. gcore/types/cdn/rule_template_replace_params.py +15 -10
  89. gcore/types/cdn/rule_template_update_params.py +15 -10
  90. gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +4 -1
  91. gcore/types/cdn/statistic_get_logs_usage_series_params.py +5 -12
  92. gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +10 -21
  93. gcore/types/cdn/statistic_get_resource_usage_series_params.py +6 -1
  94. gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +5 -2
  95. gcore/types/cdn/statistic_get_shield_usage_series_params.py +3 -0
  96. gcore/types/cloud/__init__.py +9 -3
  97. gcore/types/cloud/audit_log_entry.py +9 -3
  98. gcore/types/cloud/audit_log_list_params.py +12 -0
  99. gcore/types/cloud/baremetal/server_create_params.py +7 -7
  100. gcore/types/cloud/baremetal_flavor.py +0 -6
  101. gcore/types/cloud/billing_reservation_list_params.py +1 -1
  102. gcore/types/cloud/blackhole_port.py +4 -1
  103. gcore/types/cloud/databases/postgres/__init__.py +12 -0
  104. gcore/types/cloud/databases/postgres/cluster_create_params.py +108 -0
  105. gcore/types/cloud/databases/postgres/cluster_list_params.py +19 -0
  106. gcore/types/cloud/databases/postgres/cluster_update_params.py +102 -0
  107. gcore/types/cloud/databases/postgres/clusters/__init__.py +5 -0
  108. gcore/types/cloud/databases/postgres/clusters/postgres_user_credentials.py +13 -0
  109. gcore/types/cloud/databases/postgres/custom_configuration_validate_params.py +19 -0
  110. gcore/types/cloud/databases/postgres/pg_conf_validation.py +15 -0
  111. gcore/types/cloud/databases/postgres/postgres_cluster.py +118 -0
  112. gcore/types/cloud/databases/postgres/postgres_cluster_short.py +22 -0
  113. gcore/types/cloud/databases/postgres/postgres_configuration.py +31 -0
  114. gcore/types/cloud/file_share_create_params.py +8 -8
  115. gcore/types/cloud/file_share_update_params.py +7 -2
  116. gcore/types/cloud/floating_ip.py +5 -1
  117. gcore/types/cloud/floating_ip_create_params.py +4 -4
  118. gcore/types/cloud/floating_ip_detailed.py +5 -1
  119. gcore/types/cloud/floating_ip_list_params.py +8 -0
  120. gcore/types/cloud/floating_ip_update_params.py +7 -2
  121. gcore/types/cloud/gpu_baremetal_cluster.py +18 -3
  122. gcore/types/cloud/gpu_baremetal_cluster_action_params.py +7 -2
  123. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +16 -4
  124. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +5 -2
  125. gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +4 -4
  126. gcore/types/cloud/gpu_image.py +9 -0
  127. gcore/types/cloud/gpu_virtual_cluster.py +189 -0
  128. gcore/types/cloud/gpu_virtual_cluster_action_params.py +127 -0
  129. gcore/types/cloud/gpu_virtual_cluster_create_params.py +213 -0
  130. gcore/types/cloud/gpu_virtual_cluster_delete_params.py +41 -0
  131. gcore/types/cloud/gpu_virtual_cluster_list_params.py +21 -0
  132. gcore/types/cloud/gpu_virtual_cluster_update_params.py +18 -0
  133. gcore/types/cloud/gpu_virtual_clusters/__init__.py +16 -0
  134. gcore/types/cloud/gpu_virtual_clusters/flavor_list_params.py +21 -0
  135. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_server.py +77 -0
  136. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_server_list.py +16 -0
  137. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_volume.py +64 -0
  138. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_volume_list.py +16 -0
  139. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_flavor.py +155 -0
  140. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_flavor_list.py +16 -0
  141. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_interface.py +190 -0
  142. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_interface_list.py +16 -0
  143. gcore/types/cloud/gpu_virtual_clusters/image_upload_params.py +56 -0
  144. gcore/types/cloud/gpu_virtual_clusters/server_delete_params.py +44 -0
  145. gcore/types/cloud/gpu_virtual_clusters/server_list_params.py +75 -0
  146. gcore/types/cloud/image.py +9 -0
  147. gcore/types/cloud/inference/deployment_create_params.py +1 -1
  148. gcore/types/cloud/inference/deployment_update_params.py +1 -1
  149. gcore/types/cloud/inference/inference_deployment.py +1 -1
  150. gcore/types/cloud/instance_create_params.py +27 -27
  151. gcore/types/cloud/instance_update_params.py +7 -2
  152. gcore/types/cloud/instances/image_create_from_volume_params.py +4 -4
  153. gcore/types/cloud/instances/image_update_params.py +4 -4
  154. gcore/types/cloud/instances/image_upload_params.py +4 -4
  155. gcore/types/cloud/k8s/__init__.py +4 -4
  156. gcore/types/cloud/k8s/cluster_update_params.py +5 -5
  157. gcore/types/cloud/k8s/clusters/__init__.py +2 -2
  158. gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +2 -2
  159. gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +4 -4
  160. gcore/types/cloud/k8s/k8s_cluster.py +4 -4
  161. gcore/types/cloud/k8s/k8s_cluster_certificate.py +2 -2
  162. gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +14 -2
  163. gcore/types/cloud/k8s/k8s_cluster_list.py +4 -4
  164. gcore/types/cloud/k8s_cluster_version.py +2 -2
  165. gcore/types/cloud/k8s_cluster_version_list.py +4 -4
  166. gcore/types/cloud/load_balancer_create_params.py +14 -8
  167. gcore/types/cloud/load_balancer_flavor_detail.py +2 -2
  168. gcore/types/cloud/load_balancer_l7_policy.py +29 -16
  169. gcore/types/cloud/load_balancer_l7_policy_list.py +3 -3
  170. gcore/types/cloud/load_balancer_l7_rule.py +14 -23
  171. gcore/types/cloud/load_balancer_l7_rule_list.py +3 -3
  172. gcore/types/cloud/load_balancer_listener_detail.py +2 -2
  173. gcore/types/cloud/load_balancer_update_params.py +7 -2
  174. gcore/types/cloud/load_balancers/__init__.py +1 -0
  175. gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +5 -10
  176. gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +7 -11
  177. gcore/types/cloud/load_balancers/l7_policy_create_params.py +102 -18
  178. gcore/types/cloud/load_balancers/l7_policy_replace_params.py +94 -16
  179. gcore/types/cloud/load_balancers/listener_create_params.py +4 -1
  180. gcore/types/cloud/load_balancers/listener_delete_params.py +18 -0
  181. gcore/types/cloud/load_balancers/listener_update_params.py +4 -1
  182. gcore/types/cloud/load_balancers/pool_create_params.py +1 -1
  183. gcore/types/cloud/network_create_params.py +4 -4
  184. gcore/types/cloud/network_update_params.py +7 -2
  185. gcore/types/cloud/networks/subnet_create_params.py +4 -4
  186. gcore/types/cloud/networks/subnet_update_params.py +7 -2
  187. gcore/types/cloud/project_create_params.py +0 -6
  188. gcore/types/cloud/{project_replace_params.py → project_update_params.py} +2 -2
  189. gcore/types/cloud/quotas/request_create_params.py +0 -3
  190. gcore/types/cloud/region.py +3 -3
  191. gcore/types/cloud/security_group.py +8 -1
  192. gcore/types/cloud/security_group_create_params.py +7 -5
  193. gcore/types/cloud/security_group_list_params.py +6 -4
  194. gcore/types/cloud/security_group_update_params.py +7 -2
  195. gcore/types/cloud/ssh_key_list_params.py +7 -0
  196. gcore/types/cloud/tag.py +2 -2
  197. gcore/types/cloud/task_id_list.py +3 -3
  198. gcore/types/cloud/volume_create_params.py +12 -12
  199. gcore/types/cloud/volume_update_params.py +7 -2
  200. gcore/types/dns/zone_list_params.py +1 -1
  201. gcore/types/iam/api_token_create.py +70 -1
  202. gcore/types/security/bgp_announce_list_params.py +0 -2
  203. gcore/types/security/client_profile.py +1 -0
  204. gcore/types/security/profile_create_params.py +4 -2
  205. gcore/types/security/profile_recreate_params.py +4 -2
  206. gcore/types/security/profile_replace_params.py +4 -2
  207. gcore/types/storage/credential_recreate_params.py +0 -17
  208. gcore/types/storage/storage.py +1 -1
  209. gcore/types/storage/storage_create_params.py +1 -1
  210. gcore/types/streaming/stream.py +3 -2
  211. gcore/types/streaming/video.py +1 -1
  212. gcore/types/waap/domains/custom_rule_create_params.py +1 -1
  213. gcore/types/waap/domains/custom_rule_update_params.py +1 -1
  214. gcore/types/waap/domains/waap_custom_rule.py +1 -1
  215. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/METADATA +14 -14
  216. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/RECORD +219 -168
  217. gcore/resources/cdn/logs/__init__.py +0 -19
  218. /gcore/types/{cdn/logs → cloud/databases}/__init__.py +0 -0
  219. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/WHEEL +0 -0
  220. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/licenses/LICENSE +0 -0
@@ -513,6 +513,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
513
513
  ip_family: Optional[InterfaceIPFamily] | Omit = omit,
514
514
  is_vip: bool | Omit = omit,
515
515
  polling_interval_seconds: int | Omit = omit,
516
+ polling_timeout_seconds: int | Omit = omit,
516
517
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
517
518
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
518
519
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -550,6 +551,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
550
551
  type: Literal["subnet"],
551
552
  is_vip: bool | Omit = omit,
552
553
  polling_interval_seconds: int | Omit = omit,
554
+ polling_timeout_seconds: int | Omit = omit,
553
555
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
554
556
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
555
557
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -588,6 +590,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
588
590
  ip_family: Optional[InterfaceIPFamily] | Omit = omit,
589
591
  is_vip: bool | Omit = omit,
590
592
  polling_interval_seconds: int | Omit = omit,
593
+ polling_timeout_seconds: int | Omit = omit,
591
594
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
592
595
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
593
596
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -628,6 +631,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
628
631
  type: Literal["ip_address"],
629
632
  is_vip: bool | Omit = omit,
630
633
  polling_interval_seconds: int | Omit = omit,
634
+ polling_timeout_seconds: int | Omit = omit,
631
635
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
632
636
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
633
637
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -666,6 +670,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
666
670
  port_id: str,
667
671
  type: Literal["port"],
668
672
  polling_interval_seconds: int | Omit = omit,
673
+ polling_timeout_seconds: int | Omit = omit,
669
674
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
670
675
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
671
676
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -712,6 +717,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
712
717
  ip_address: str | Omit = omit,
713
718
  port_id: str | Omit = omit,
714
719
  polling_interval_seconds: int | Omit = omit,
720
+ polling_timeout_seconds: int | Omit = omit,
715
721
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
716
722
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
717
723
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -743,6 +749,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
743
749
  task_id=response.tasks[0], # type: ignore
744
750
  extra_headers=extra_headers,
745
751
  polling_interval_seconds=polling_interval_seconds,
752
+ polling_timeout_seconds=polling_timeout_seconds,
746
753
  )
747
754
  if (
748
755
  task.created_resources is None
@@ -768,6 +775,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
768
775
  project_id: int | None = None,
769
776
  region_id: int | None = None,
770
777
  polling_interval_seconds: int | Omit = omit,
778
+ polling_timeout_seconds: int | Omit = omit,
771
779
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
772
780
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
773
781
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -793,6 +801,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
793
801
  task_id=response.tasks[0],
794
802
  extra_headers=extra_headers,
795
803
  polling_interval_seconds=polling_interval_seconds,
804
+ polling_timeout_seconds=polling_timeout_seconds,
796
805
  )
797
806
 
798
807
 
@@ -1271,6 +1280,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1271
1280
  ip_family: Optional[InterfaceIPFamily] | Omit = omit,
1272
1281
  is_vip: bool | Omit = omit,
1273
1282
  polling_interval_seconds: int | Omit = omit,
1283
+ polling_timeout_seconds: int | Omit = omit,
1274
1284
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1275
1285
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1276
1286
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1308,6 +1318,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1308
1318
  type: Literal["subnet"],
1309
1319
  is_vip: bool | Omit = omit,
1310
1320
  polling_interval_seconds: int | Omit = omit,
1321
+ polling_timeout_seconds: int | Omit = omit,
1311
1322
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1312
1323
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1313
1324
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1346,6 +1357,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1346
1357
  ip_family: Optional[InterfaceIPFamily] | Omit = omit,
1347
1358
  is_vip: bool | Omit = omit,
1348
1359
  polling_interval_seconds: int | Omit = omit,
1360
+ polling_timeout_seconds: int | Omit = omit,
1349
1361
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1350
1362
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1351
1363
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1386,6 +1398,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1386
1398
  type: Literal["ip_address"],
1387
1399
  is_vip: bool | Omit = omit,
1388
1400
  polling_interval_seconds: int | Omit = omit,
1401
+ polling_timeout_seconds: int | Omit = omit,
1389
1402
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1390
1403
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1391
1404
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1424,6 +1437,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1424
1437
  port_id: str,
1425
1438
  type: Literal["port"],
1426
1439
  polling_interval_seconds: int | Omit = omit,
1440
+ polling_timeout_seconds: int | Omit = omit,
1427
1441
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1428
1442
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1429
1443
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1470,6 +1484,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1470
1484
  ip_address: str | Omit = omit,
1471
1485
  port_id: str | Omit = omit,
1472
1486
  polling_interval_seconds: int | Omit = omit,
1487
+ polling_timeout_seconds: int | Omit = omit,
1473
1488
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1474
1489
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1475
1490
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1501,6 +1516,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1501
1516
  task_id=response.tasks[0], # type: ignore
1502
1517
  extra_headers=extra_headers,
1503
1518
  polling_interval_seconds=polling_interval_seconds,
1519
+ polling_timeout_seconds=polling_timeout_seconds,
1504
1520
  )
1505
1521
  if (
1506
1522
  task.created_resources is None
@@ -1526,6 +1542,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1526
1542
  project_id: int | None = None,
1527
1543
  region_id: int | None = None,
1528
1544
  polling_interval_seconds: int | Omit = omit,
1545
+ polling_timeout_seconds: int | Omit = omit,
1529
1546
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1530
1547
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1531
1548
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1551,6 +1568,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
1551
1568
  task_id=response.tasks[0],
1552
1569
  extra_headers=extra_headers,
1553
1570
  polling_interval_seconds=polling_interval_seconds,
1571
+ polling_timeout_seconds=polling_timeout_seconds,
1554
1572
  )
1555
1573
 
1556
1574
 
@@ -260,6 +260,7 @@ class SecretsResource(SyncAPIResource):
260
260
  payload: secret_upload_tls_certificate_params.Payload,
261
261
  expiration: Union[str, datetime, None] | Omit = omit,
262
262
  polling_interval_seconds: int | Omit = omit,
263
+ polling_timeout_seconds: int | Omit = omit,
263
264
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
264
265
  # The extra values given here take precedence over values defined on the client or passed to this method.
265
266
  extra_headers: Headers | None = None,
@@ -282,6 +283,7 @@ class SecretsResource(SyncAPIResource):
282
283
  task_id=response.tasks[0],
283
284
  extra_headers=extra_headers,
284
285
  polling_interval_seconds=polling_interval_seconds,
286
+ polling_timeout_seconds=polling_timeout_seconds,
285
287
  )
286
288
  if not task.created_resources or not task.created_resources.secrets or len(task.created_resources.secrets) != 1:
287
289
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -527,6 +529,7 @@ class AsyncSecretsResource(AsyncAPIResource):
527
529
  payload: secret_upload_tls_certificate_params.Payload,
528
530
  expiration: Union[str, datetime, None] | Omit = omit,
529
531
  polling_interval_seconds: int | Omit = omit,
532
+ polling_timeout_seconds: int | Omit = omit,
530
533
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
531
534
  # The extra values given here take precedence over values defined on the client or passed to this method.
532
535
  extra_headers: Headers | None = None,
@@ -549,6 +552,7 @@ class AsyncSecretsResource(AsyncAPIResource):
549
552
  task_id=response.tasks[0],
550
553
  extra_headers=extra_headers,
551
554
  polling_interval_seconds=polling_interval_seconds,
555
+ polling_timeout_seconds=polling_timeout_seconds,
552
556
  )
553
557
  if not task.created_resources or not task.created_resources.secrets or len(task.created_resources.secrets) != 1:
554
558
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -576,6 +580,9 @@ class SecretsResourceWithRawResponse:
576
580
  self.upload_tls_certificate = to_raw_response_wrapper(
577
581
  secrets.upload_tls_certificate,
578
582
  )
583
+ self.upload_tls_certificate_and_poll = to_raw_response_wrapper(
584
+ secrets.upload_tls_certificate_and_poll,
585
+ )
579
586
 
580
587
 
581
588
  class AsyncSecretsResourceWithRawResponse:
@@ -594,6 +601,9 @@ class AsyncSecretsResourceWithRawResponse:
594
601
  self.upload_tls_certificate = async_to_raw_response_wrapper(
595
602
  secrets.upload_tls_certificate,
596
603
  )
604
+ self.upload_tls_certificate_and_poll = async_to_raw_response_wrapper(
605
+ secrets.upload_tls_certificate_and_poll,
606
+ )
597
607
 
598
608
 
599
609
  class SecretsResourceWithStreamingResponse:
@@ -612,6 +622,9 @@ class SecretsResourceWithStreamingResponse:
612
622
  self.upload_tls_certificate = to_streamed_response_wrapper(
613
623
  secrets.upload_tls_certificate,
614
624
  )
625
+ self.upload_tls_certificate_and_poll = to_streamed_response_wrapper(
626
+ secrets.upload_tls_certificate_and_poll,
627
+ )
615
628
 
616
629
 
617
630
  class AsyncSecretsResourceWithStreamingResponse:
@@ -630,3 +643,6 @@ class AsyncSecretsResourceWithStreamingResponse:
630
643
  self.upload_tls_certificate = async_to_streamed_response_wrapper(
631
644
  secrets.upload_tls_certificate,
632
645
  )
646
+ self.upload_tls_certificate_and_poll = async_to_streamed_response_wrapper(
647
+ secrets.upload_tls_certificate_and_poll,
648
+ )
@@ -80,6 +80,10 @@ class SecurityGroupsResource(SyncAPIResource):
80
80
  Create a new security group with the specified configuration.
81
81
 
82
82
  Args:
83
+ project_id: Project ID
84
+
85
+ region_id: Region ID
86
+
83
87
  security_group: Security group
84
88
 
85
89
  instances: List of instances
@@ -145,15 +149,20 @@ class SecurityGroupsResource(SyncAPIResource):
145
149
  - **Add/update tags:**
146
150
  `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
147
151
  updates existing ones.
148
- - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
152
+
153
+ - **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
154
+
149
155
  - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
150
156
  tags are preserved).
157
+
151
158
  - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
152
159
  specified tags.
160
+
153
161
  - **Mixed operations:**
154
- `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
162
+ `{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
155
163
  adds/updates 'environment' and '`cost_center`' while removing
156
164
  '`deprecated_tag`', preserving other existing tags.
165
+
157
166
  - **Replace all:** first delete existing tags with null values, then add new
158
167
  ones in the same request.
159
168
 
@@ -207,13 +216,17 @@ class SecurityGroupsResource(SyncAPIResource):
207
216
  List all security groups in the specified project and region.
208
217
 
209
218
  Args:
210
- limit: Limit the number of returned security groups
219
+ project_id: Project ID
220
+
221
+ region_id: Region ID
222
+
223
+ limit: Limit of items on a single page
211
224
 
212
- offset: Offset value is used to exclude the first set of records from the result
225
+ offset: Offset in results list
213
226
 
214
- tag_key: Filter by tag keys.
227
+ tag_key: Optional. Filter by tag keys.
215
228
 
216
- tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
229
+ tag_key_value: Optional. Filter by tag key-value pairs. Must be a valid JSON string.
217
230
 
218
231
  extra_headers: Send extra headers
219
232
 
@@ -452,6 +465,10 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
452
465
  Create a new security group with the specified configuration.
453
466
 
454
467
  Args:
468
+ project_id: Project ID
469
+
470
+ region_id: Region ID
471
+
455
472
  security_group: Security group
456
473
 
457
474
  instances: List of instances
@@ -517,15 +534,20 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
517
534
  - **Add/update tags:**
518
535
  `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
519
536
  updates existing ones.
520
- - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
537
+
538
+ - **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
539
+
521
540
  - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
522
541
  tags are preserved).
542
+
523
543
  - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
524
544
  specified tags.
545
+
525
546
  - **Mixed operations:**
526
- `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
547
+ `{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
527
548
  adds/updates 'environment' and '`cost_center`' while removing
528
549
  '`deprecated_tag`', preserving other existing tags.
550
+
529
551
  - **Replace all:** first delete existing tags with null values, then add new
530
552
  ones in the same request.
531
553
 
@@ -579,13 +601,17 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
579
601
  List all security groups in the specified project and region.
580
602
 
581
603
  Args:
582
- limit: Limit the number of returned security groups
604
+ project_id: Project ID
605
+
606
+ region_id: Region ID
607
+
608
+ limit: Limit of items on a single page
583
609
 
584
- offset: Offset value is used to exclude the first set of records from the result
610
+ offset: Offset in results list
585
611
 
586
- tag_key: Filter by tag keys.
612
+ tag_key: Optional. Filter by tag keys.
587
613
 
588
- tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
614
+ tag_key_value: Optional. Filter by tag key-value pairs. Must be a valid JSON string.
589
615
 
590
616
  extra_headers: Send extra headers
591
617
 
@@ -154,6 +154,7 @@ class SSHKeysResource(SyncAPIResource):
154
154
  *,
155
155
  project_id: int | None = None,
156
156
  limit: int | Omit = omit,
157
+ name: str | Omit = omit,
157
158
  offset: int | Omit = omit,
158
159
  order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"] | Omit = omit,
159
160
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -171,6 +172,9 @@ class SSHKeysResource(SyncAPIResource):
171
172
 
172
173
  limit: Maximum number of SSH keys to return
173
174
 
175
+ name: SSH key name. Partial substring match. Example: `name=abc` matches any key
176
+ containing `abc` in name.
177
+
174
178
  offset: Offset for pagination
175
179
 
176
180
  order_by: Sort order for the SSH keys
@@ -196,6 +200,7 @@ class SSHKeysResource(SyncAPIResource):
196
200
  query=maybe_transform(
197
201
  {
198
202
  "limit": limit,
203
+ "name": name,
199
204
  "offset": offset,
200
205
  "order_by": order_by,
201
206
  },
@@ -418,6 +423,7 @@ class AsyncSSHKeysResource(AsyncAPIResource):
418
423
  *,
419
424
  project_id: int | None = None,
420
425
  limit: int | Omit = omit,
426
+ name: str | Omit = omit,
421
427
  offset: int | Omit = omit,
422
428
  order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"] | Omit = omit,
423
429
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -435,6 +441,9 @@ class AsyncSSHKeysResource(AsyncAPIResource):
435
441
 
436
442
  limit: Maximum number of SSH keys to return
437
443
 
444
+ name: SSH key name. Partial substring match. Example: `name=abc` matches any key
445
+ containing `abc` in name.
446
+
438
447
  offset: Offset for pagination
439
448
 
440
449
  order_by: Sort order for the SSH keys
@@ -460,6 +469,7 @@ class AsyncSSHKeysResource(AsyncAPIResource):
460
469
  query=maybe_transform(
461
470
  {
462
471
  "limit": limit,
472
+ "name": name,
463
473
  "offset": offset,
464
474
  "order_by": order_by,
465
475
  },
@@ -20,7 +20,6 @@ from ..._response import (
20
20
  async_to_streamed_response_wrapper,
21
21
  )
22
22
  from ...pagination import SyncOffsetPage, AsyncOffsetPage
23
- from ...lib.polling import extract_timeout_value
24
23
  from ...types.cloud import task_list_params, task_acknowledge_all_params
25
24
  from ..._base_client import AsyncPaginator, make_request_options
26
25
  from ...types.cloud.task import Task
@@ -53,6 +52,7 @@ class TasksResource(SyncAPIResource):
53
52
  task_id: str,
54
53
  *,
55
54
  polling_interval_seconds: int | Omit = omit,
55
+ polling_timeout_seconds: int | Omit = omit,
56
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
58
58
  extra_headers: Headers | None = None,
@@ -65,16 +65,22 @@ class TasksResource(SyncAPIResource):
65
65
  # Ensure the polling interval is at least 1 second
66
66
  polling_interval_seconds = max(1, polling_interval_seconds)
67
67
 
68
- if not is_given(timeout):
69
- timeout = extract_timeout_value(self._client.timeout)
68
+ if not is_given(polling_timeout_seconds):
69
+ polling_timeout_seconds = cast(int, self._client.cloud_polling_timeout_seconds)
70
70
 
71
- end_time = time.time() + timeout
71
+ if polling_timeout_seconds <= polling_interval_seconds:
72
+ raise ValueError(
73
+ f"`polling_timeout_seconds` must be greater than `polling_interval_seconds` ({polling_interval_seconds})"
74
+ )
75
+
76
+ end_time = time.time() + polling_timeout_seconds
72
77
  while time.time() <= end_time:
73
78
  task = self.get(
74
79
  task_id,
75
80
  extra_headers=extra_headers,
76
81
  extra_query=extra_query,
77
82
  extra_body=extra_body,
83
+ timeout=timeout,
78
84
  )
79
85
  if task.state == "ERROR":
80
86
  raise ValueError(task.error or f"Task {task_id} failed")
@@ -364,6 +370,7 @@ class AsyncTasksResource(AsyncAPIResource):
364
370
  task_id: str,
365
371
  *,
366
372
  polling_interval_seconds: int | Omit = omit,
373
+ polling_timeout_seconds: int | Omit = omit,
367
374
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
368
375
  # The extra values given here take precedence over values defined on the client or passed to this method.
369
376
  extra_headers: Headers | None = None,
@@ -373,17 +380,25 @@ class AsyncTasksResource(AsyncAPIResource):
373
380
  ) -> Task:
374
381
  if not is_given(polling_interval_seconds):
375
382
  polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
383
+ # Ensure the polling interval is at least 1 second
384
+ polling_interval_seconds = max(1, polling_interval_seconds)
385
+
386
+ if not is_given(polling_timeout_seconds):
387
+ polling_timeout_seconds = cast(int, self._client.cloud_polling_timeout_seconds)
376
388
 
377
- if not is_given(timeout):
378
- timeout = extract_timeout_value(self._client.timeout)
389
+ if polling_timeout_seconds <= polling_interval_seconds:
390
+ raise ValueError(
391
+ f"`polling_timeout_seconds` must be greater than `polling_interval_seconds` ({polling_interval_seconds})"
392
+ )
379
393
 
380
- end_time = time.time() + timeout
394
+ end_time = time.time() + polling_timeout_seconds
381
395
  while time.time() <= end_time:
382
396
  task = await self.get(
383
397
  task_id,
384
398
  extra_headers=extra_headers,
385
399
  extra_query=extra_query,
386
400
  extra_body=extra_body,
401
+ timeout=timeout,
387
402
  )
388
403
  if task.state == "ERROR":
389
404
  raise ValueError(task.error or f"Task {task_id} failed")