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
@@ -0,0 +1,649 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Dict, Iterable, Optional
6
+
7
+ import httpx
8
+
9
+ from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
10
+ from ....._utils import maybe_transform, async_maybe_transform
11
+ from ....._compat import cached_property
12
+ from ....._resource import SyncAPIResource, AsyncAPIResource
13
+ from ....._response import (
14
+ to_raw_response_wrapper,
15
+ to_streamed_response_wrapper,
16
+ async_to_raw_response_wrapper,
17
+ async_to_streamed_response_wrapper,
18
+ )
19
+ from ....._base_client import make_request_options
20
+ from .....types.cloud.task_id_list import TaskIDList
21
+ from .....types.cloud.inference.applications import deployment_patch_params, deployment_create_params
22
+ from .....types.cloud.inference.applications.inference_application_deployment import InferenceApplicationDeployment
23
+ from .....types.cloud.inference.applications.inference_application_deployment_list import (
24
+ InferenceApplicationDeploymentList,
25
+ )
26
+
27
+ __all__ = ["DeploymentsResource", "AsyncDeploymentsResource"]
28
+
29
+
30
+ class DeploymentsResource(SyncAPIResource):
31
+ @cached_property
32
+ def with_raw_response(self) -> DeploymentsResourceWithRawResponse:
33
+ """
34
+ This property can be used as a prefix for any HTTP method call to return
35
+ the raw response object instead of the parsed content.
36
+
37
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
38
+ """
39
+ return DeploymentsResourceWithRawResponse(self)
40
+
41
+ @cached_property
42
+ def with_streaming_response(self) -> DeploymentsResourceWithStreamingResponse:
43
+ """
44
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
45
+
46
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
47
+ """
48
+ return DeploymentsResourceWithStreamingResponse(self)
49
+
50
+ def create(
51
+ self,
52
+ *,
53
+ project_id: int | None = None,
54
+ application_name: str,
55
+ components_configuration: Dict[str, deployment_create_params.ComponentsConfiguration],
56
+ name: str,
57
+ regions: Iterable[int],
58
+ api_keys: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
59
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
60
+ # The extra values given here take precedence over values defined on the client or passed to this method.
61
+ extra_headers: Headers | None = None,
62
+ extra_query: Query | None = None,
63
+ extra_body: Body | None = None,
64
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
65
+ ) -> TaskIDList:
66
+ """
67
+ Creates a new application deployment based on a selected catalog application.
68
+ Specify the desired deployment name, target regions, and configuration for each
69
+ component. The platform will provision the necessary resources and initialize
70
+ the application accordingly.
71
+
72
+ Args:
73
+ project_id: Project ID
74
+
75
+ application_name: Identifier of the application from the catalog
76
+
77
+ components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
78
+
79
+ name: Desired name for the new deployment
80
+
81
+ regions: Geographical regions where the deployment should be created
82
+
83
+ api_keys: List of API keys for the application
84
+
85
+ extra_headers: Send extra headers
86
+
87
+ extra_query: Add additional query parameters to the request
88
+
89
+ extra_body: Add additional JSON properties to the request
90
+
91
+ timeout: Override the client-level default timeout for this request, in seconds
92
+ """
93
+ if project_id is None:
94
+ project_id = self._client._get_cloud_project_id_path_param()
95
+ return self._post(
96
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
97
+ body=maybe_transform(
98
+ {
99
+ "application_name": application_name,
100
+ "components_configuration": components_configuration,
101
+ "name": name,
102
+ "regions": regions,
103
+ "api_keys": api_keys,
104
+ },
105
+ deployment_create_params.DeploymentCreateParams,
106
+ ),
107
+ options=make_request_options(
108
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
109
+ ),
110
+ cast_to=TaskIDList,
111
+ )
112
+
113
+ def list(
114
+ self,
115
+ *,
116
+ project_id: int | None = None,
117
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
118
+ # The extra values given here take precedence over values defined on the client or passed to this method.
119
+ extra_headers: Headers | None = None,
120
+ extra_query: Query | None = None,
121
+ extra_body: Body | None = None,
122
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
123
+ ) -> InferenceApplicationDeploymentList:
124
+ """
125
+ Returns a list of your application deployments, including deployment names,
126
+ associated catalog applications, regions, component configurations, and current
127
+ status. Useful for monitoring and managing all active AI application instances.
128
+
129
+ Args:
130
+ project_id: Project ID
131
+
132
+ extra_headers: Send extra headers
133
+
134
+ extra_query: Add additional query parameters to the request
135
+
136
+ extra_body: Add additional JSON properties to the request
137
+
138
+ timeout: Override the client-level default timeout for this request, in seconds
139
+ """
140
+ if project_id is None:
141
+ project_id = self._client._get_cloud_project_id_path_param()
142
+ return self._get(
143
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
144
+ options=make_request_options(
145
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
146
+ ),
147
+ cast_to=InferenceApplicationDeploymentList,
148
+ )
149
+
150
+ def delete(
151
+ self,
152
+ deployment_name: str,
153
+ *,
154
+ project_id: int | None = None,
155
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
156
+ # The extra values given here take precedence over values defined on the client or passed to this method.
157
+ extra_headers: Headers | None = None,
158
+ extra_query: Query | None = None,
159
+ extra_body: Body | None = None,
160
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
161
+ ) -> TaskIDList:
162
+ """
163
+ Deletes an existing application deployment along with all associated resources.
164
+ This action will permanently remove the deployment and **terminate all related
165
+ inference instances** that are part of the application.
166
+
167
+ Args:
168
+ project_id: Project ID
169
+
170
+ deployment_name: Name of deployment
171
+
172
+ extra_headers: Send extra headers
173
+
174
+ extra_query: Add additional query parameters to the request
175
+
176
+ extra_body: Add additional JSON properties to the request
177
+
178
+ timeout: Override the client-level default timeout for this request, in seconds
179
+ """
180
+ if project_id is None:
181
+ project_id = self._client._get_cloud_project_id_path_param()
182
+ if not deployment_name:
183
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
184
+ return self._delete(
185
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
186
+ options=make_request_options(
187
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
188
+ ),
189
+ cast_to=TaskIDList,
190
+ )
191
+
192
+ def get(
193
+ self,
194
+ deployment_name: str,
195
+ *,
196
+ project_id: int | None = None,
197
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
198
+ # The extra values given here take precedence over values defined on the client or passed to this method.
199
+ extra_headers: Headers | None = None,
200
+ extra_query: Query | None = None,
201
+ extra_body: Body | None = None,
202
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
203
+ ) -> InferenceApplicationDeployment:
204
+ """Retrieves detailed information about a specific application deployment.
205
+
206
+ The
207
+ response includes the catalog application it was created from, deployment name,
208
+ active regions, configuration of each component, and the current status of the
209
+ deployment.
210
+
211
+ Args:
212
+ project_id: Project ID
213
+
214
+ deployment_name: Name of deployment
215
+
216
+ extra_headers: Send extra headers
217
+
218
+ extra_query: Add additional query parameters to the request
219
+
220
+ extra_body: Add additional JSON properties to the request
221
+
222
+ timeout: Override the client-level default timeout for this request, in seconds
223
+ """
224
+ if project_id is None:
225
+ project_id = self._client._get_cloud_project_id_path_param()
226
+ if not deployment_name:
227
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
228
+ return self._get(
229
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
230
+ options=make_request_options(
231
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
232
+ ),
233
+ cast_to=InferenceApplicationDeployment,
234
+ )
235
+
236
+ def patch(
237
+ self,
238
+ deployment_name: str,
239
+ *,
240
+ project_id: int | None = None,
241
+ api_keys: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
242
+ components_configuration: Dict[str, Optional[deployment_patch_params.ComponentsConfiguration]]
243
+ | NotGiven = NOT_GIVEN,
244
+ regions: Iterable[int] | NotGiven = NOT_GIVEN,
245
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
246
+ # The extra values given here take precedence over values defined on the client or passed to this method.
247
+ extra_headers: Headers | None = None,
248
+ extra_query: Query | None = None,
249
+ extra_body: Body | None = None,
250
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
251
+ ) -> TaskIDList:
252
+ """Updates an existing application deployment.
253
+
254
+ You can modify the target regions
255
+ and update configurations for individual components. To disable a component, set
256
+ its value to null. Only the provided fields will be updated; all others remain
257
+ unchanged.
258
+
259
+ Args:
260
+ project_id: Project ID
261
+
262
+ deployment_name: Name of deployment
263
+
264
+ api_keys: List of API keys for the application
265
+
266
+ components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
267
+
268
+ regions: Geographical regions to be updated for the deployment
269
+
270
+ extra_headers: Send extra headers
271
+
272
+ extra_query: Add additional query parameters to the request
273
+
274
+ extra_body: Add additional JSON properties to the request
275
+
276
+ timeout: Override the client-level default timeout for this request, in seconds
277
+ """
278
+ if project_id is None:
279
+ project_id = self._client._get_cloud_project_id_path_param()
280
+ if not deployment_name:
281
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
282
+ return self._patch(
283
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
284
+ body=maybe_transform(
285
+ {
286
+ "api_keys": api_keys,
287
+ "components_configuration": components_configuration,
288
+ "regions": regions,
289
+ },
290
+ deployment_patch_params.DeploymentPatchParams,
291
+ ),
292
+ options=make_request_options(
293
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
294
+ ),
295
+ cast_to=TaskIDList,
296
+ )
297
+
298
+
299
+ class AsyncDeploymentsResource(AsyncAPIResource):
300
+ @cached_property
301
+ def with_raw_response(self) -> AsyncDeploymentsResourceWithRawResponse:
302
+ """
303
+ This property can be used as a prefix for any HTTP method call to return
304
+ the raw response object instead of the parsed content.
305
+
306
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
307
+ """
308
+ return AsyncDeploymentsResourceWithRawResponse(self)
309
+
310
+ @cached_property
311
+ def with_streaming_response(self) -> AsyncDeploymentsResourceWithStreamingResponse:
312
+ """
313
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
314
+
315
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
316
+ """
317
+ return AsyncDeploymentsResourceWithStreamingResponse(self)
318
+
319
+ async def create(
320
+ self,
321
+ *,
322
+ project_id: int | None = None,
323
+ application_name: str,
324
+ components_configuration: Dict[str, deployment_create_params.ComponentsConfiguration],
325
+ name: str,
326
+ regions: Iterable[int],
327
+ api_keys: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
328
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
329
+ # The extra values given here take precedence over values defined on the client or passed to this method.
330
+ extra_headers: Headers | None = None,
331
+ extra_query: Query | None = None,
332
+ extra_body: Body | None = None,
333
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
334
+ ) -> TaskIDList:
335
+ """
336
+ Creates a new application deployment based on a selected catalog application.
337
+ Specify the desired deployment name, target regions, and configuration for each
338
+ component. The platform will provision the necessary resources and initialize
339
+ the application accordingly.
340
+
341
+ Args:
342
+ project_id: Project ID
343
+
344
+ application_name: Identifier of the application from the catalog
345
+
346
+ components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
347
+
348
+ name: Desired name for the new deployment
349
+
350
+ regions: Geographical regions where the deployment should be created
351
+
352
+ api_keys: List of API keys for the application
353
+
354
+ extra_headers: Send extra headers
355
+
356
+ extra_query: Add additional query parameters to the request
357
+
358
+ extra_body: Add additional JSON properties to the request
359
+
360
+ timeout: Override the client-level default timeout for this request, in seconds
361
+ """
362
+ if project_id is None:
363
+ project_id = self._client._get_cloud_project_id_path_param()
364
+ return await self._post(
365
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
366
+ body=await async_maybe_transform(
367
+ {
368
+ "application_name": application_name,
369
+ "components_configuration": components_configuration,
370
+ "name": name,
371
+ "regions": regions,
372
+ "api_keys": api_keys,
373
+ },
374
+ deployment_create_params.DeploymentCreateParams,
375
+ ),
376
+ options=make_request_options(
377
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
378
+ ),
379
+ cast_to=TaskIDList,
380
+ )
381
+
382
+ async def list(
383
+ self,
384
+ *,
385
+ project_id: int | None = None,
386
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
387
+ # The extra values given here take precedence over values defined on the client or passed to this method.
388
+ extra_headers: Headers | None = None,
389
+ extra_query: Query | None = None,
390
+ extra_body: Body | None = None,
391
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
392
+ ) -> InferenceApplicationDeploymentList:
393
+ """
394
+ Returns a list of your application deployments, including deployment names,
395
+ associated catalog applications, regions, component configurations, and current
396
+ status. Useful for monitoring and managing all active AI application instances.
397
+
398
+ Args:
399
+ project_id: Project ID
400
+
401
+ extra_headers: Send extra headers
402
+
403
+ extra_query: Add additional query parameters to the request
404
+
405
+ extra_body: Add additional JSON properties to the request
406
+
407
+ timeout: Override the client-level default timeout for this request, in seconds
408
+ """
409
+ if project_id is None:
410
+ project_id = self._client._get_cloud_project_id_path_param()
411
+ return await self._get(
412
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
413
+ options=make_request_options(
414
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
415
+ ),
416
+ cast_to=InferenceApplicationDeploymentList,
417
+ )
418
+
419
+ async def delete(
420
+ self,
421
+ deployment_name: str,
422
+ *,
423
+ project_id: int | None = None,
424
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
425
+ # The extra values given here take precedence over values defined on the client or passed to this method.
426
+ extra_headers: Headers | None = None,
427
+ extra_query: Query | None = None,
428
+ extra_body: Body | None = None,
429
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
430
+ ) -> TaskIDList:
431
+ """
432
+ Deletes an existing application deployment along with all associated resources.
433
+ This action will permanently remove the deployment and **terminate all related
434
+ inference instances** that are part of the application.
435
+
436
+ Args:
437
+ project_id: Project ID
438
+
439
+ deployment_name: Name of deployment
440
+
441
+ extra_headers: Send extra headers
442
+
443
+ extra_query: Add additional query parameters to the request
444
+
445
+ extra_body: Add additional JSON properties to the request
446
+
447
+ timeout: Override the client-level default timeout for this request, in seconds
448
+ """
449
+ if project_id is None:
450
+ project_id = self._client._get_cloud_project_id_path_param()
451
+ if not deployment_name:
452
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
453
+ return await self._delete(
454
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
455
+ options=make_request_options(
456
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
457
+ ),
458
+ cast_to=TaskIDList,
459
+ )
460
+
461
+ async def get(
462
+ self,
463
+ deployment_name: str,
464
+ *,
465
+ project_id: int | None = None,
466
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
467
+ # The extra values given here take precedence over values defined on the client or passed to this method.
468
+ extra_headers: Headers | None = None,
469
+ extra_query: Query | None = None,
470
+ extra_body: Body | None = None,
471
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
472
+ ) -> InferenceApplicationDeployment:
473
+ """Retrieves detailed information about a specific application deployment.
474
+
475
+ The
476
+ response includes the catalog application it was created from, deployment name,
477
+ active regions, configuration of each component, and the current status of the
478
+ deployment.
479
+
480
+ Args:
481
+ project_id: Project ID
482
+
483
+ deployment_name: Name of deployment
484
+
485
+ extra_headers: Send extra headers
486
+
487
+ extra_query: Add additional query parameters to the request
488
+
489
+ extra_body: Add additional JSON properties to the request
490
+
491
+ timeout: Override the client-level default timeout for this request, in seconds
492
+ """
493
+ if project_id is None:
494
+ project_id = self._client._get_cloud_project_id_path_param()
495
+ if not deployment_name:
496
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
497
+ return await self._get(
498
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
499
+ options=make_request_options(
500
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
501
+ ),
502
+ cast_to=InferenceApplicationDeployment,
503
+ )
504
+
505
+ async def patch(
506
+ self,
507
+ deployment_name: str,
508
+ *,
509
+ project_id: int | None = None,
510
+ api_keys: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
511
+ components_configuration: Dict[str, Optional[deployment_patch_params.ComponentsConfiguration]]
512
+ | NotGiven = NOT_GIVEN,
513
+ regions: Iterable[int] | NotGiven = NOT_GIVEN,
514
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
515
+ # The extra values given here take precedence over values defined on the client or passed to this method.
516
+ extra_headers: Headers | None = None,
517
+ extra_query: Query | None = None,
518
+ extra_body: Body | None = None,
519
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
520
+ ) -> TaskIDList:
521
+ """Updates an existing application deployment.
522
+
523
+ You can modify the target regions
524
+ and update configurations for individual components. To disable a component, set
525
+ its value to null. Only the provided fields will be updated; all others remain
526
+ unchanged.
527
+
528
+ Args:
529
+ project_id: Project ID
530
+
531
+ deployment_name: Name of deployment
532
+
533
+ api_keys: List of API keys for the application
534
+
535
+ components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
536
+
537
+ regions: Geographical regions to be updated for the deployment
538
+
539
+ extra_headers: Send extra headers
540
+
541
+ extra_query: Add additional query parameters to the request
542
+
543
+ extra_body: Add additional JSON properties to the request
544
+
545
+ timeout: Override the client-level default timeout for this request, in seconds
546
+ """
547
+ if project_id is None:
548
+ project_id = self._client._get_cloud_project_id_path_param()
549
+ if not deployment_name:
550
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
551
+ return await self._patch(
552
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
553
+ body=await async_maybe_transform(
554
+ {
555
+ "api_keys": api_keys,
556
+ "components_configuration": components_configuration,
557
+ "regions": regions,
558
+ },
559
+ deployment_patch_params.DeploymentPatchParams,
560
+ ),
561
+ options=make_request_options(
562
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
563
+ ),
564
+ cast_to=TaskIDList,
565
+ )
566
+
567
+
568
+ class DeploymentsResourceWithRawResponse:
569
+ def __init__(self, deployments: DeploymentsResource) -> None:
570
+ self._deployments = deployments
571
+
572
+ self.create = to_raw_response_wrapper(
573
+ deployments.create,
574
+ )
575
+ self.list = to_raw_response_wrapper(
576
+ deployments.list,
577
+ )
578
+ self.delete = to_raw_response_wrapper(
579
+ deployments.delete,
580
+ )
581
+ self.get = to_raw_response_wrapper(
582
+ deployments.get,
583
+ )
584
+ self.patch = to_raw_response_wrapper(
585
+ deployments.patch,
586
+ )
587
+
588
+
589
+ class AsyncDeploymentsResourceWithRawResponse:
590
+ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
591
+ self._deployments = deployments
592
+
593
+ self.create = async_to_raw_response_wrapper(
594
+ deployments.create,
595
+ )
596
+ self.list = async_to_raw_response_wrapper(
597
+ deployments.list,
598
+ )
599
+ self.delete = async_to_raw_response_wrapper(
600
+ deployments.delete,
601
+ )
602
+ self.get = async_to_raw_response_wrapper(
603
+ deployments.get,
604
+ )
605
+ self.patch = async_to_raw_response_wrapper(
606
+ deployments.patch,
607
+ )
608
+
609
+
610
+ class DeploymentsResourceWithStreamingResponse:
611
+ def __init__(self, deployments: DeploymentsResource) -> None:
612
+ self._deployments = deployments
613
+
614
+ self.create = to_streamed_response_wrapper(
615
+ deployments.create,
616
+ )
617
+ self.list = to_streamed_response_wrapper(
618
+ deployments.list,
619
+ )
620
+ self.delete = to_streamed_response_wrapper(
621
+ deployments.delete,
622
+ )
623
+ self.get = to_streamed_response_wrapper(
624
+ deployments.get,
625
+ )
626
+ self.patch = to_streamed_response_wrapper(
627
+ deployments.patch,
628
+ )
629
+
630
+
631
+ class AsyncDeploymentsResourceWithStreamingResponse:
632
+ def __init__(self, deployments: AsyncDeploymentsResource) -> None:
633
+ self._deployments = deployments
634
+
635
+ self.create = async_to_streamed_response_wrapper(
636
+ deployments.create,
637
+ )
638
+ self.list = async_to_streamed_response_wrapper(
639
+ deployments.list,
640
+ )
641
+ self.delete = async_to_streamed_response_wrapper(
642
+ deployments.delete,
643
+ )
644
+ self.get = async_to_streamed_response_wrapper(
645
+ deployments.get,
646
+ )
647
+ self.patch = async_to_streamed_response_wrapper(
648
+ deployments.patch,
649
+ )