gcore 0.10.0__py3-none-any.whl → 0.11.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 (319) hide show
  1. gcore/_base_client.py +3 -3
  2. gcore/_client.py +18 -0
  3. gcore/_compat.py +48 -48
  4. gcore/_models.py +41 -41
  5. gcore/_types.py +35 -1
  6. gcore/_utils/__init__.py +9 -2
  7. gcore/_utils/_compat.py +45 -0
  8. gcore/_utils/_datetime_parse.py +136 -0
  9. gcore/_utils/_transform.py +11 -1
  10. gcore/_utils/_typing.py +6 -1
  11. gcore/_utils/_utils.py +0 -1
  12. gcore/_version.py +1 -1
  13. gcore/resources/__init__.py +28 -0
  14. gcore/resources/cloud/__init__.py +14 -0
  15. gcore/resources/cloud/audit_logs.py +3 -3
  16. gcore/resources/cloud/baremetal/images.py +3 -4
  17. gcore/resources/cloud/baremetal/servers.py +16 -4
  18. gcore/resources/cloud/cloud.py +32 -0
  19. gcore/resources/cloud/cost_reports.py +24 -16
  20. gcore/resources/cloud/file_shares/access_rules.py +2 -2
  21. gcore/resources/cloud/file_shares/file_shares.py +30 -14
  22. gcore/resources/cloud/floating_ips.py +196 -4
  23. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +1 -1
  24. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +166 -190
  25. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +268 -12
  26. gcore/resources/cloud/inference/__init__.py +14 -14
  27. gcore/resources/cloud/inference/applications/__init__.py +47 -0
  28. gcore/resources/cloud/inference/applications/applications.py +134 -0
  29. gcore/resources/cloud/inference/applications/deployments.py +649 -0
  30. gcore/resources/cloud/inference/applications/templates.py +238 -0
  31. gcore/resources/cloud/inference/deployments/deployments.py +41 -22
  32. gcore/resources/cloud/inference/inference.py +32 -32
  33. gcore/resources/cloud/inference/registry_credentials.py +8 -9
  34. gcore/resources/cloud/instances/images.py +4 -4
  35. gcore/resources/cloud/instances/instances.py +254 -4
  36. gcore/resources/cloud/instances/interfaces.py +544 -0
  37. gcore/resources/cloud/k8s/__init__.py +47 -0
  38. gcore/resources/cloud/k8s/clusters/__init__.py +47 -0
  39. gcore/resources/cloud/k8s/clusters/clusters.py +1391 -0
  40. gcore/resources/cloud/k8s/clusters/nodes.py +291 -0
  41. gcore/resources/cloud/k8s/clusters/pools/__init__.py +33 -0
  42. gcore/resources/cloud/k8s/clusters/pools/nodes.py +303 -0
  43. gcore/resources/cloud/k8s/clusters/pools/pools.py +870 -0
  44. gcore/resources/cloud/k8s/flavors.py +209 -0
  45. gcore/resources/cloud/k8s/k8s.py +233 -0
  46. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +11 -12
  47. gcore/resources/cloud/load_balancers/l7_policies/rules.py +9 -10
  48. gcore/resources/cloud/load_balancers/listeners.py +18 -18
  49. gcore/resources/cloud/load_balancers/load_balancers.py +4 -4
  50. gcore/resources/cloud/load_balancers/pools/health_monitors.py +18 -6
  51. gcore/resources/cloud/load_balancers/pools/members.py +32 -2
  52. gcore/resources/cloud/load_balancers/pools/pools.py +32 -8
  53. gcore/resources/cloud/networks/networks.py +192 -4
  54. gcore/resources/cloud/networks/subnets.py +140 -8
  55. gcore/resources/cloud/reserved_fixed_ips/vip.py +5 -7
  56. gcore/resources/cloud/security_groups/security_groups.py +6 -6
  57. gcore/resources/cloud/tasks.py +46 -46
  58. gcore/resources/cloud/users/role_assignments.py +5 -4
  59. gcore/resources/cloud/volumes.py +4 -4
  60. gcore/resources/dns/__init__.py +75 -0
  61. gcore/resources/dns/dns.py +374 -0
  62. gcore/resources/dns/locations.py +288 -0
  63. gcore/resources/dns/metrics.py +214 -0
  64. gcore/resources/dns/pickers/__init__.py +33 -0
  65. gcore/resources/dns/pickers/pickers.py +167 -0
  66. gcore/resources/dns/pickers/presets.py +135 -0
  67. gcore/resources/dns/zones/__init__.py +47 -0
  68. gcore/resources/{cloud/inference/models.py → dns/zones/dnssec.py} +80 -122
  69. gcore/resources/dns/zones/rrsets.py +1005 -0
  70. gcore/resources/dns/zones/zones.py +1493 -0
  71. gcore/resources/storage/__init__.py +75 -0
  72. gcore/resources/storage/buckets/__init__.py +61 -0
  73. gcore/resources/storage/buckets/buckets.py +470 -0
  74. gcore/resources/storage/buckets/cors.py +265 -0
  75. gcore/resources/storage/buckets/lifecycle.py +276 -0
  76. gcore/resources/storage/buckets/policy.py +345 -0
  77. gcore/resources/storage/credentials.py +221 -0
  78. gcore/resources/storage/locations.py +190 -0
  79. gcore/resources/storage/statistics.py +364 -0
  80. gcore/resources/storage/storage.py +1042 -0
  81. gcore/resources/streaming/ai_tasks.py +56 -70
  82. gcore/resources/streaming/playlists.py +18 -18
  83. gcore/resources/streaming/quality_sets.py +8 -8
  84. gcore/resources/streaming/statistics.py +4 -122
  85. gcore/resources/streaming/streams/overlays.py +6 -6
  86. gcore/resources/streaming/streams/streams.py +40 -64
  87. gcore/resources/streaming/videos/subtitles.py +32 -30
  88. gcore/resources/streaming/videos/videos.py +78 -72
  89. gcore/resources/waap/domains/advanced_rules.py +2 -2
  90. gcore/resources/waap/domains/api_paths.py +13 -13
  91. gcore/resources/waap/domains/custom_rules.py +2 -2
  92. gcore/resources/waap/domains/domains.py +4 -4
  93. gcore/resources/waap/domains/firewall_rules.py +2 -2
  94. gcore/resources/waap/domains/insight_silences.py +6 -6
  95. gcore/resources/waap/domains/insights.py +7 -7
  96. gcore/resources/waap/domains/statistics.py +47 -47
  97. gcore/types/cloud/__init__.py +2 -4
  98. gcore/types/cloud/audit_log_list_params.py +2 -1
  99. gcore/types/cloud/baremetal/image_list_params.py +3 -2
  100. gcore/types/cloud/baremetal/server_create_params.py +8 -6
  101. gcore/types/cloud/baremetal/server_list_params.py +3 -2
  102. gcore/types/cloud/baremetal/server_rebuild_params.py +2 -0
  103. gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +35 -31
  104. gcore/types/cloud/cost_report_get_aggregated_params.py +26 -25
  105. gcore/types/cloud/cost_report_get_detailed_params.py +26 -25
  106. gcore/types/cloud/ddos_profile.py +13 -7
  107. gcore/types/cloud/ddos_profile_field.py +21 -8
  108. gcore/types/cloud/ddos_profile_option_list.py +7 -6
  109. gcore/types/cloud/ddos_profile_status.py +2 -2
  110. gcore/types/cloud/ddos_profile_template.py +7 -3
  111. gcore/types/cloud/ddos_profile_template_field.py +12 -3
  112. gcore/types/cloud/file_share.py +2 -2
  113. gcore/types/cloud/file_share_create_params.py +12 -6
  114. gcore/types/cloud/floating_ip_list_params.py +3 -2
  115. gcore/types/cloud/gpu_baremetal_cluster.py +101 -74
  116. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +76 -93
  117. gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +17 -10
  118. gcore/types/cloud/gpu_baremetal_cluster_list_params.py +14 -3
  119. gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +4 -2
  120. gcore/types/cloud/gpu_baremetal_clusters/__init__.py +6 -0
  121. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +74 -0
  122. gcore/types/cloud/{gpu_baremetal_cluster_server.py → gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1.py} +10 -10
  123. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1_list.py +16 -0
  124. gcore/types/cloud/{gpu_baremetal_flavor.py → gpu_baremetal_clusters/gpu_baremetal_flavor.py} +1 -1
  125. gcore/types/cloud/{gpu_baremetal_flavor_list.py → gpu_baremetal_clusters/gpu_baremetal_flavor_list.py} +1 -1
  126. gcore/types/cloud/gpu_baremetal_clusters/server_list_params.py +75 -0
  127. gcore/types/cloud/inference/__init__.py +0 -5
  128. gcore/types/cloud/inference/applications/__init__.py +12 -0
  129. gcore/types/cloud/inference/applications/deployment_create_params.py +68 -0
  130. gcore/types/cloud/inference/applications/deployment_patch_params.py +62 -0
  131. gcore/types/cloud/inference/applications/inference_application_deployment.py +111 -0
  132. gcore/types/cloud/inference/applications/inference_application_deployment_list.py +16 -0
  133. gcore/types/cloud/inference/applications/inference_application_template.py +94 -0
  134. gcore/types/cloud/inference/applications/inference_application_template_list.py +16 -0
  135. gcore/types/cloud/inference/deployment_create_params.py +7 -6
  136. gcore/types/cloud/inference/deployment_update_params.py +7 -6
  137. gcore/types/cloud/instance_assign_security_group_params.py +4 -2
  138. gcore/types/cloud/instance_list_params.py +3 -2
  139. gcore/types/cloud/instance_unassign_security_group_params.py +4 -2
  140. gcore/types/cloud/instances/image_list_params.py +3 -2
  141. gcore/types/cloud/k8s/__init__.py +13 -0
  142. gcore/types/cloud/k8s/cluster_create_params.py +299 -0
  143. gcore/types/cloud/k8s/cluster_delete_params.py +16 -0
  144. gcore/types/cloud/k8s/cluster_update_params.py +203 -0
  145. gcore/types/cloud/k8s/cluster_upgrade_params.py +16 -0
  146. gcore/types/cloud/k8s/clusters/__init__.py +10 -0
  147. gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +66 -0
  148. gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +16 -0
  149. gcore/types/cloud/k8s/clusters/node_list_params.py +16 -0
  150. gcore/types/cloud/k8s/clusters/pool_create_params.py +53 -0
  151. gcore/types/cloud/k8s/clusters/pool_resize_params.py +18 -0
  152. gcore/types/cloud/k8s/clusters/pool_update_params.py +34 -0
  153. gcore/types/cloud/k8s/clusters/pools/__init__.py +5 -0
  154. gcore/types/cloud/k8s/clusters/pools/node_list_params.py +18 -0
  155. gcore/types/cloud/k8s/flavor_list_params.py +19 -0
  156. gcore/types/cloud/k8s/k8s_cluster.py +209 -0
  157. gcore/types/cloud/k8s/k8s_cluster_certificate.py +13 -0
  158. gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +19 -0
  159. gcore/types/cloud/k8s/k8s_cluster_list.py +16 -0
  160. gcore/types/cloud/k8s_cluster_version.py +10 -0
  161. gcore/types/cloud/{gpu_baremetal_cluster_server_list.py → k8s_cluster_version_list.py} +4 -4
  162. gcore/types/cloud/load_balancer_create_params.py +23 -4
  163. gcore/types/cloud/load_balancer_list_params.py +3 -2
  164. gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +3 -2
  165. gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +3 -2
  166. gcore/types/cloud/load_balancers/l7_policy_create_params.py +3 -2
  167. gcore/types/cloud/load_balancers/l7_policy_replace_params.py +3 -2
  168. gcore/types/cloud/load_balancers/listener_create_params.py +4 -3
  169. gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
  170. gcore/types/cloud/load_balancers/pool_create_params.py +19 -1
  171. gcore/types/cloud/load_balancers/pool_update_params.py +19 -1
  172. gcore/types/cloud/load_balancers/pools/member_add_params.py +19 -1
  173. gcore/types/cloud/member.py +19 -1
  174. gcore/types/cloud/network_list_params.py +3 -2
  175. gcore/types/cloud/networks/subnet_create_params.py +3 -2
  176. gcore/types/cloud/networks/subnet_list_params.py +3 -2
  177. gcore/types/cloud/networks/subnet_update_params.py +3 -2
  178. gcore/types/cloud/project.py +9 -9
  179. gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +3 -2
  180. gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +3 -2
  181. gcore/types/cloud/security_group_create_params.py +4 -2
  182. gcore/types/cloud/security_group_list_params.py +3 -2
  183. gcore/types/cloud/task_id_list.py +8 -1
  184. gcore/types/cloud/task_list_params.py +23 -23
  185. gcore/types/cloud/usage_report_get_params.py +26 -25
  186. gcore/types/cloud/users/role_assignment.py +2 -1
  187. gcore/types/cloud/users/role_assignment_create_params.py +4 -2
  188. gcore/types/cloud/users/role_assignment_update_params.py +4 -2
  189. gcore/types/cloud/volume_list_params.py +3 -2
  190. gcore/types/dns/__init__.py +31 -0
  191. gcore/types/dns/dns_get_account_overview_response.py +21 -0
  192. gcore/types/dns/dns_label_name.py +13 -0
  193. gcore/types/dns/dns_location_translations.py +11 -0
  194. gcore/types/dns/dns_lookup_params.py +15 -0
  195. gcore/types/dns/dns_lookup_response.py +21 -0
  196. gcore/types/dns/dns_name_server.py +17 -0
  197. gcore/types/dns/location_list_continents_response.py +10 -0
  198. gcore/types/dns/location_list_countries_response.py +10 -0
  199. gcore/types/dns/location_list_regions_response.py +10 -0
  200. gcore/types/dns/location_list_response.py +16 -0
  201. gcore/types/dns/metric_list_params.py +24 -0
  202. gcore/types/dns/metric_list_response.py +7 -0
  203. gcore/types/dns/picker_list_response.py +10 -0
  204. gcore/types/dns/pickers/__init__.py +5 -0
  205. gcore/types/dns/pickers/preset_list_response.py +10 -0
  206. gcore/types/dns/zone_check_delegation_status_response.py +20 -0
  207. gcore/types/dns/zone_create_params.py +59 -0
  208. gcore/types/dns/zone_create_response.py +13 -0
  209. gcore/types/dns/zone_export_response.py +11 -0
  210. gcore/types/dns/zone_get_response.py +106 -0
  211. gcore/types/dns/zone_get_statistics_params.py +43 -0
  212. gcore/types/dns/zone_get_statistics_response.py +19 -0
  213. gcore/types/dns/zone_import_params.py +32 -0
  214. gcore/types/dns/zone_import_response.py +26 -0
  215. gcore/types/dns/zone_list_params.py +57 -0
  216. gcore/types/dns/zone_list_response.py +105 -0
  217. gcore/types/dns/zone_replace_params.py +61 -0
  218. gcore/types/dns/zones/__init__.py +15 -0
  219. gcore/types/dns/zones/dns_failover_log.py +19 -0
  220. gcore/types/dns/zones/dns_output_rrset.py +123 -0
  221. gcore/types/dns/zones/dnssec_get_response.py +38 -0
  222. gcore/types/dns/zones/dnssec_update_params.py +11 -0
  223. gcore/types/dns/zones/dnssec_update_response.py +38 -0
  224. gcore/types/dns/zones/rrset_create_params.py +82 -0
  225. gcore/types/dns/zones/rrset_get_failover_logs_params.py +21 -0
  226. gcore/types/dns/zones/rrset_get_failover_logs_response.py +15 -0
  227. gcore/types/dns/zones/rrset_list_params.py +21 -0
  228. gcore/types/dns/zones/rrset_list_response.py +14 -0
  229. gcore/types/dns/zones/rrset_replace_params.py +82 -0
  230. gcore/types/security/client_profile.py +1 -1
  231. gcore/types/security/profile_create_params.py +2 -2
  232. gcore/types/security/profile_recreate_params.py +2 -2
  233. gcore/types/security/profile_replace_params.py +2 -2
  234. gcore/types/storage/__init__.py +21 -0
  235. gcore/types/storage/bucket.py +15 -0
  236. gcore/types/storage/bucket_list_params.py +15 -0
  237. gcore/types/storage/buckets/__init__.py +9 -0
  238. gcore/types/storage/buckets/bucket_cors.py +18 -0
  239. gcore/types/storage/buckets/bucket_policy.py +7 -0
  240. gcore/types/storage/buckets/cor_create_params.py +17 -0
  241. gcore/types/storage/buckets/lifecycle_create_params.py +18 -0
  242. gcore/types/storage/buckets/policy_get_response.py +7 -0
  243. gcore/types/storage/credential_recreate_params.py +36 -0
  244. gcore/types/storage/location.py +24 -0
  245. gcore/types/storage/location_list_params.py +13 -0
  246. gcore/types/storage/statistic_get_usage_aggregated_params.py +24 -0
  247. gcore/types/storage/statistic_get_usage_series_params.py +38 -0
  248. gcore/types/storage/statistic_get_usage_series_response.py +12 -0
  249. gcore/types/storage/storage.py +101 -0
  250. gcore/types/storage/storage_create_params.py +44 -0
  251. gcore/types/storage/storage_list_params.py +39 -0
  252. gcore/types/storage/storage_restore_params.py +11 -0
  253. gcore/types/storage/storage_update_params.py +18 -0
  254. gcore/types/storage/usage_series.py +201 -0
  255. gcore/types/storage/usage_total.py +54 -0
  256. gcore/types/streaming/__init__.py +0 -4
  257. gcore/types/streaming/ai_contentmoderation_hardnudity.py +1 -1
  258. gcore/types/streaming/ai_contentmoderation_nsfw.py +1 -1
  259. gcore/types/streaming/ai_contentmoderation_softnudity.py +1 -1
  260. gcore/types/streaming/ai_contentmoderation_sport.py +1 -1
  261. gcore/types/streaming/ai_task.py +1 -5
  262. gcore/types/streaming/ai_task_create_params.py +2 -2
  263. gcore/types/streaming/ai_task_get_response.py +0 -46
  264. gcore/types/streaming/clip.py +2 -1
  265. gcore/types/streaming/create_video_param.py +13 -12
  266. gcore/types/streaming/max_stream_series.py +5 -5
  267. gcore/types/streaming/playlist.py +1 -1
  268. gcore/types/streaming/playlist_create_params.py +1 -1
  269. gcore/types/streaming/playlist_update_params.py +1 -1
  270. gcore/types/streaming/playlist_video.py +13 -12
  271. gcore/types/streaming/storage_series.py +5 -5
  272. gcore/types/streaming/stream.py +86 -49
  273. gcore/types/streaming/stream_create_clip_params.py +2 -1
  274. gcore/types/streaming/stream_create_params.py +9 -23
  275. gcore/types/streaming/stream_series.py +5 -5
  276. gcore/types/streaming/stream_update_params.py +9 -23
  277. gcore/types/streaming/video.py +53 -42
  278. gcore/types/streaming/video_update_params.py +13 -12
  279. gcore/types/streaming/vod_statistics_series.py +5 -5
  280. gcore/types/streaming/vod_total_stream_duration_series.py +3 -3
  281. gcore/types/waap/domain_list_params.py +1 -1
  282. gcore/types/waap/domain_update_params.py +1 -1
  283. gcore/types/waap/domains/advanced_rule_create_params.py +7 -4
  284. gcore/types/waap/domains/advanced_rule_update_params.py +6 -3
  285. gcore/types/waap/domains/api_path_create_params.py +4 -3
  286. gcore/types/waap/domains/api_path_list_params.py +3 -1
  287. gcore/types/waap/domains/api_path_update_params.py +5 -4
  288. gcore/types/waap/domains/custom_rule_create_params.py +13 -14
  289. gcore/types/waap/domains/custom_rule_update_params.py +12 -13
  290. gcore/types/waap/domains/firewall_rule_create_params.py +3 -2
  291. gcore/types/waap/domains/firewall_rule_update_params.py +2 -1
  292. gcore/types/waap/domains/insight_list_params.py +4 -2
  293. gcore/types/waap/domains/insight_replace_params.py +1 -1
  294. gcore/types/waap/domains/insight_silence_list_params.py +5 -3
  295. gcore/types/waap/domains/setting_update_params.py +3 -2
  296. gcore/types/waap/domains/statistic_get_ddos_info_params.py +6 -9
  297. gcore/types/waap/domains/statistic_get_events_aggregated_params.py +9 -10
  298. gcore/types/waap/domains/statistic_get_requests_series_params.py +8 -9
  299. gcore/types/waap/domains/statistic_get_traffic_series_params.py +6 -9
  300. gcore/types/waap/domains/waap_advanced_rule.py +3 -2
  301. gcore/types/waap/domains/waap_api_path.py +4 -4
  302. gcore/types/waap/domains/waap_api_scan_result.py +2 -2
  303. gcore/types/waap/domains/waap_custom_rule.py +4 -7
  304. gcore/types/waap/domains/waap_firewall_rule.py +3 -2
  305. gcore/types/waap/domains/waap_insight.py +1 -1
  306. gcore/types/waap/domains/waap_request_details.py +5 -4
  307. gcore/types/waap/waap_ip_ddos_info_model.py +3 -3
  308. gcore/types/waap/waap_rule_set.py +1 -1
  309. {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/METADATA +7 -2
  310. {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/RECORD +312 -192
  311. gcore/types/cloud/inference/inference_model.py +0 -65
  312. gcore/types/cloud/inference/inference_registry_credentials_create.py +0 -22
  313. gcore/types/cloud/inference/model_list_params.py +0 -21
  314. gcore/types/streaming/ai_contentmoderation_casm.py +0 -39
  315. gcore/types/streaming/ai_contentmoderation_weapon.py +0 -39
  316. gcore/types/streaming/meet_series.py +0 -23
  317. gcore/types/streaming/statistic_get_meet_series_params.py +0 -20
  318. {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/WHEEL +0 -0
  319. {gcore-0.10.0.dist-info → gcore-0.11.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,12 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Optional
5
+ from typing import Dict, Optional
6
6
  from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
10
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
11
11
  from ...._utils import maybe_transform, async_maybe_transform
12
12
  from ...._compat import cached_property
13
13
  from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -136,7 +136,7 @@ class ImagesResource(SyncAPIResource):
136
136
  region_id: int | None = None,
137
137
  include_prices: bool | NotGiven = NOT_GIVEN,
138
138
  private: str | NotGiven = NOT_GIVEN,
139
- tag_key: List[str] | NotGiven = NOT_GIVEN,
139
+ tag_key: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
140
140
  tag_key_value: str | NotGiven = NOT_GIVEN,
141
141
  visibility: Literal["private", "public", "shared"] | NotGiven = NOT_GIVEN,
142
142
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -728,7 +728,7 @@ class AsyncImagesResource(AsyncAPIResource):
728
728
  region_id: int | None = None,
729
729
  include_prices: bool | NotGiven = NOT_GIVEN,
730
730
  private: str | NotGiven = NOT_GIVEN,
731
- tag_key: List[str] | NotGiven = NOT_GIVEN,
731
+ tag_key: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
732
732
  tag_key_value: str | NotGiven = NOT_GIVEN,
733
733
  visibility: Literal["private", "public", "shared"] | NotGiven = NOT_GIVEN,
734
734
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Union, Iterable, Optional
5
+ from typing import Dict, Union, Iterable, Optional
6
6
  from datetime import datetime
7
7
  from typing_extensions import Literal, overload
8
8
 
@@ -32,7 +32,7 @@ from .metrics import (
32
32
  MetricsResourceWithStreamingResponse,
33
33
  AsyncMetricsResourceWithStreamingResponse,
34
34
  )
35
- from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
35
+ from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr
36
36
  from ...._utils import required_args, maybe_transform, async_maybe_transform
37
37
  from ...._compat import cached_property
38
38
  from .interfaces import (
@@ -417,7 +417,7 @@ class InstancesResource(SyncAPIResource):
417
417
  ]
418
418
  | NotGiven = NOT_GIVEN,
419
419
  tag_key_value: str | NotGiven = NOT_GIVEN,
420
- tag_value: List[str] | NotGiven = NOT_GIVEN,
420
+ tag_value: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
421
421
  type_ddos_profile: Literal["basic", "advanced"] | NotGiven = NOT_GIVEN,
422
422
  uuid: str | NotGiven = NOT_GIVEN,
423
423
  with_ddos: bool | NotGiven = NOT_GIVEN,
@@ -773,6 +773,125 @@ class InstancesResource(SyncAPIResource):
773
773
  cast_to=TaskIDList,
774
774
  )
775
775
 
776
+ @overload
777
+ def action_and_poll(
778
+ self,
779
+ instance_id: str,
780
+ *,
781
+ project_id: int | None = None,
782
+ region_id: int | None = None,
783
+ action: Literal["start"],
784
+ activate_profile: Optional[bool] | NotGiven = NOT_GIVEN,
785
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
786
+ # The extra values given here take precedence over values defined on the client or passed to this method.
787
+ extra_headers: Headers | None = None,
788
+ extra_query: Query | None = None,
789
+ extra_body: Body | None = None,
790
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
791
+ ) -> Instance:
792
+ """
793
+ The action can be one of: start, stop, reboot, powercycle, suspend or resume.
794
+ Suspend and resume are not available for bare metal instances.
795
+
796
+ Args:
797
+ action: Instance action name
798
+
799
+ activate_profile: Used on start instance to activate Advanced DDoS profile
800
+
801
+ extra_headers: Send extra headers
802
+
803
+ extra_query: Add additional query parameters to the request
804
+
805
+ extra_body: Add additional JSON properties to the request
806
+
807
+ timeout: Override the client-level default timeout for this request, in seconds
808
+ """
809
+ ...
810
+
811
+ @overload
812
+ def action_and_poll(
813
+ self,
814
+ instance_id: str,
815
+ *,
816
+ project_id: int | None = None,
817
+ region_id: int | None = None,
818
+ action: Literal["reboot", "reboot_hard", "resume", "stop", "suspend"],
819
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
820
+ # The extra values given here take precedence over values defined on the client or passed to this method.
821
+ extra_headers: Headers | None = None,
822
+ extra_query: Query | None = None,
823
+ extra_body: Body | None = None,
824
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
825
+ ) -> Instance:
826
+ """
827
+ The action can be one of: start, stop, reboot, powercycle, suspend or resume.
828
+ Suspend and resume are not available for bare metal instances.
829
+
830
+ Args:
831
+ action: Instance action name
832
+
833
+ extra_headers: Send extra headers
834
+
835
+ extra_query: Add additional query parameters to the request
836
+
837
+ extra_body: Add additional JSON properties to the request
838
+
839
+ timeout: Override the client-level default timeout for this request, in seconds
840
+ """
841
+ ...
842
+
843
+ @required_args(["action"])
844
+ def action_and_poll(
845
+ self,
846
+ instance_id: str,
847
+ *,
848
+ project_id: int | None = None,
849
+ region_id: int | None = None,
850
+ action: Literal["start", "reboot", "reboot_hard", "resume", "stop", "suspend"],
851
+ activate_profile: Optional[bool] | NotGiven = NOT_GIVEN,
852
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
853
+ # The extra values given here take precedence over values defined on the client or passed to this method.
854
+ extra_headers: Headers | None = None,
855
+ extra_query: Query | None = None,
856
+ extra_body: Body | None = None,
857
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
858
+ ) -> Instance:
859
+ """
860
+ Perform the action on the instance and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
861
+ """
862
+ if project_id is None:
863
+ project_id = self._client._get_cloud_project_id_path_param()
864
+ if region_id is None:
865
+ region_id = self._client._get_cloud_region_id_path_param()
866
+ if not instance_id:
867
+ raise ValueError(f"Expected a non-empty value for `instance_id` but received {instance_id!r}")
868
+ response = self._post(
869
+ f"/cloud/v2/instances/{project_id}/{region_id}/{instance_id}/action",
870
+ body=maybe_transform(
871
+ {
872
+ "action": action,
873
+ "activate_profile": activate_profile,
874
+ },
875
+ instance_action_params.InstanceActionParams,
876
+ ),
877
+ options=make_request_options(
878
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
879
+ ),
880
+ cast_to=TaskIDList,
881
+ )
882
+ if not response.tasks:
883
+ raise ValueError("Expected at least one task to be created")
884
+ self._client.cloud.tasks.poll(
885
+ task_id=response.tasks[0],
886
+ extra_headers=extra_headers,
887
+ )
888
+ return self.get(
889
+ instance_id=instance_id,
890
+ project_id=project_id,
891
+ region_id=region_id,
892
+ extra_headers=extra_headers,
893
+ )
894
+
776
895
  def add_to_placement_group(
777
896
  self,
778
897
  instance_id: str,
@@ -1667,7 +1786,7 @@ class AsyncInstancesResource(AsyncAPIResource):
1667
1786
  ]
1668
1787
  | NotGiven = NOT_GIVEN,
1669
1788
  tag_key_value: str | NotGiven = NOT_GIVEN,
1670
- tag_value: List[str] | NotGiven = NOT_GIVEN,
1789
+ tag_value: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
1671
1790
  type_ddos_profile: Literal["basic", "advanced"] | NotGiven = NOT_GIVEN,
1672
1791
  uuid: str | NotGiven = NOT_GIVEN,
1673
1792
  with_ddos: bool | NotGiven = NOT_GIVEN,
@@ -2023,6 +2142,125 @@ class AsyncInstancesResource(AsyncAPIResource):
2023
2142
  cast_to=TaskIDList,
2024
2143
  )
2025
2144
 
2145
+ @overload
2146
+ async def action_and_poll(
2147
+ self,
2148
+ instance_id: str,
2149
+ *,
2150
+ project_id: int | None = None,
2151
+ region_id: int | None = None,
2152
+ action: Literal["start"],
2153
+ activate_profile: Optional[bool] | NotGiven = NOT_GIVEN,
2154
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2155
+ # The extra values given here take precedence over values defined on the client or passed to this method.
2156
+ extra_headers: Headers | None = None,
2157
+ extra_query: Query | None = None,
2158
+ extra_body: Body | None = None,
2159
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2160
+ ) -> Instance:
2161
+ """
2162
+ The action can be one of: start, stop, reboot, powercycle, suspend or resume.
2163
+ Suspend and resume are not available for bare metal instances.
2164
+
2165
+ Args:
2166
+ action: Instance action name
2167
+
2168
+ activate_profile: Used on start instance to activate Advanced DDoS profile
2169
+
2170
+ extra_headers: Send extra headers
2171
+
2172
+ extra_query: Add additional query parameters to the request
2173
+
2174
+ extra_body: Add additional JSON properties to the request
2175
+
2176
+ timeout: Override the client-level default timeout for this request, in seconds
2177
+ """
2178
+ ...
2179
+
2180
+ @overload
2181
+ async def action_and_poll(
2182
+ self,
2183
+ instance_id: str,
2184
+ *,
2185
+ project_id: int | None = None,
2186
+ region_id: int | None = None,
2187
+ action: Literal["reboot", "reboot_hard", "resume", "stop", "suspend"],
2188
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2189
+ # The extra values given here take precedence over values defined on the client or passed to this method.
2190
+ extra_headers: Headers | None = None,
2191
+ extra_query: Query | None = None,
2192
+ extra_body: Body | None = None,
2193
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2194
+ ) -> Instance:
2195
+ """
2196
+ The action can be one of: start, stop, reboot, powercycle, suspend or resume.
2197
+ Suspend and resume are not available for bare metal instances.
2198
+
2199
+ Args:
2200
+ action: Instance action name
2201
+
2202
+ extra_headers: Send extra headers
2203
+
2204
+ extra_query: Add additional query parameters to the request
2205
+
2206
+ extra_body: Add additional JSON properties to the request
2207
+
2208
+ timeout: Override the client-level default timeout for this request, in seconds
2209
+ """
2210
+ ...
2211
+
2212
+ @required_args(["action"])
2213
+ async def action_and_poll(
2214
+ self,
2215
+ instance_id: str,
2216
+ *,
2217
+ project_id: int | None = None,
2218
+ region_id: int | None = None,
2219
+ action: Literal["start", "reboot", "reboot_hard", "resume", "stop", "suspend"],
2220
+ activate_profile: Optional[bool] | NotGiven = NOT_GIVEN,
2221
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2222
+ # The extra values given here take precedence over values defined on the client or passed to this method.
2223
+ extra_headers: Headers | None = None,
2224
+ extra_query: Query | None = None,
2225
+ extra_body: Body | None = None,
2226
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
2227
+ ) -> Instance:
2228
+ """
2229
+ Perform the action on the instance and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
2230
+ """
2231
+ if project_id is None:
2232
+ project_id = self._client._get_cloud_project_id_path_param()
2233
+ if region_id is None:
2234
+ region_id = self._client._get_cloud_region_id_path_param()
2235
+ if not instance_id:
2236
+ raise ValueError(f"Expected a non-empty value for `instance_id` but received {instance_id!r}")
2237
+ response = await self._post(
2238
+ f"/cloud/v2/instances/{project_id}/{region_id}/{instance_id}/action",
2239
+ body=await async_maybe_transform(
2240
+ {
2241
+ "action": action,
2242
+ "activate_profile": activate_profile,
2243
+ },
2244
+ instance_action_params.InstanceActionParams,
2245
+ ),
2246
+ options=make_request_options(
2247
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
2248
+ ),
2249
+ cast_to=TaskIDList,
2250
+ )
2251
+ if not response.tasks:
2252
+ raise ValueError("Expected at least one task to be created")
2253
+ await self._client.cloud.tasks.poll(
2254
+ task_id=response.tasks[0],
2255
+ extra_headers=extra_headers,
2256
+ )
2257
+ return await self.get(
2258
+ instance_id=instance_id,
2259
+ project_id=project_id,
2260
+ region_id=region_id,
2261
+ extra_headers=extra_headers,
2262
+ )
2263
+
2026
2264
  async def add_to_placement_group(
2027
2265
  self,
2028
2266
  instance_id: str,
@@ -2591,6 +2829,9 @@ class InstancesResourceWithRawResponse:
2591
2829
  self.action = to_raw_response_wrapper(
2592
2830
  instances.action,
2593
2831
  )
2832
+ self.action_and_poll = to_raw_response_wrapper(
2833
+ instances.action_and_poll,
2834
+ )
2594
2835
  self.add_to_placement_group = to_raw_response_wrapper(
2595
2836
  instances.add_to_placement_group,
2596
2837
  )
@@ -2655,6 +2896,9 @@ class AsyncInstancesResourceWithRawResponse:
2655
2896
  self.action = async_to_raw_response_wrapper(
2656
2897
  instances.action,
2657
2898
  )
2899
+ self.action_and_poll = async_to_raw_response_wrapper(
2900
+ instances.action_and_poll,
2901
+ )
2658
2902
  self.add_to_placement_group = async_to_raw_response_wrapper(
2659
2903
  instances.add_to_placement_group,
2660
2904
  )
@@ -2719,6 +2963,9 @@ class InstancesResourceWithStreamingResponse:
2719
2963
  self.action = to_streamed_response_wrapper(
2720
2964
  instances.action,
2721
2965
  )
2966
+ self.action_and_poll = to_streamed_response_wrapper(
2967
+ instances.action_and_poll,
2968
+ )
2722
2969
  self.add_to_placement_group = to_streamed_response_wrapper(
2723
2970
  instances.add_to_placement_group,
2724
2971
  )
@@ -2783,6 +3030,9 @@ class AsyncInstancesResourceWithStreamingResponse:
2783
3030
  self.action = async_to_streamed_response_wrapper(
2784
3031
  instances.action,
2785
3032
  )
3033
+ self.action_and_poll = async_to_streamed_response_wrapper(
3034
+ instances.action_and_poll,
3035
+ )
2786
3036
  self.add_to_placement_group = async_to_streamed_response_wrapper(
2787
3037
  instances.add_to_placement_group,
2788
3038
  )