gcore 0.1.0a1__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 (420) hide show
  1. gcore/__init__.py +84 -0
  2. gcore/_base_client.py +1943 -0
  3. gcore/_client.py +484 -0
  4. gcore/_compat.py +219 -0
  5. gcore/_constants.py +16 -0
  6. gcore/_exceptions.py +108 -0
  7. gcore/_files.py +123 -0
  8. gcore/_models.py +803 -0
  9. gcore/_qs.py +150 -0
  10. gcore/_resource.py +43 -0
  11. gcore/_response.py +830 -0
  12. gcore/_streaming.py +333 -0
  13. gcore/_types.py +217 -0
  14. gcore/_utils/__init__.py +57 -0
  15. gcore/_utils/_logs.py +25 -0
  16. gcore/_utils/_proxy.py +62 -0
  17. gcore/_utils/_reflection.py +42 -0
  18. gcore/_utils/_streams.py +12 -0
  19. gcore/_utils/_sync.py +86 -0
  20. gcore/_utils/_transform.py +447 -0
  21. gcore/_utils/_typing.py +151 -0
  22. gcore/_utils/_utils.py +422 -0
  23. gcore/_version.py +4 -0
  24. gcore/lib/.keep +4 -0
  25. gcore/lib/polling.py +19 -0
  26. gcore/pagination.py +70 -0
  27. gcore/py.typed +0 -0
  28. gcore/resources/__init__.py +19 -0
  29. gcore/resources/cloud/__init__.py +327 -0
  30. gcore/resources/cloud/baremetal/__init__.py +61 -0
  31. gcore/resources/cloud/baremetal/baremetal.py +166 -0
  32. gcore/resources/cloud/baremetal/flavors.py +371 -0
  33. gcore/resources/cloud/baremetal/images.py +238 -0
  34. gcore/resources/cloud/baremetal/servers.py +808 -0
  35. gcore/resources/cloud/billing_reservations.py +362 -0
  36. gcore/resources/cloud/cloud.py +774 -0
  37. gcore/resources/cloud/file_shares/__init__.py +33 -0
  38. gcore/resources/cloud/file_shares/access_rules.py +434 -0
  39. gcore/resources/cloud/file_shares/file_shares.py +994 -0
  40. gcore/resources/cloud/floating_ips.py +765 -0
  41. gcore/resources/cloud/gpu_baremetal_clusters/__init__.py +75 -0
  42. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +211 -0
  43. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +1143 -0
  44. gcore/resources/cloud/gpu_baremetal_clusters/images.py +581 -0
  45. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +175 -0
  46. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +1098 -0
  47. gcore/resources/cloud/inference/__init__.py +89 -0
  48. gcore/resources/cloud/inference/deployments/__init__.py +33 -0
  49. gcore/resources/cloud/inference/deployments/deployments.py +1187 -0
  50. gcore/resources/cloud/inference/deployments/logs.py +235 -0
  51. gcore/resources/cloud/inference/flavors.py +280 -0
  52. gcore/resources/cloud/inference/inference.py +295 -0
  53. gcore/resources/cloud/inference/models.py +289 -0
  54. gcore/resources/cloud/inference/registry_credentials.py +649 -0
  55. gcore/resources/cloud/inference/secrets.py +629 -0
  56. gcore/resources/cloud/instances/__init__.py +75 -0
  57. gcore/resources/cloud/instances/flavors.py +449 -0
  58. gcore/resources/cloud/instances/images.py +987 -0
  59. gcore/resources/cloud/instances/instances.py +2349 -0
  60. gcore/resources/cloud/instances/interfaces.py +797 -0
  61. gcore/resources/cloud/instances/metrics.py +217 -0
  62. gcore/resources/cloud/ip_ranges.py +135 -0
  63. gcore/resources/cloud/load_balancers/__init__.py +103 -0
  64. gcore/resources/cloud/load_balancers/flavors.py +193 -0
  65. gcore/resources/cloud/load_balancers/l7_policies/__init__.py +33 -0
  66. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +738 -0
  67. gcore/resources/cloud/load_balancers/l7_policies/rules.py +722 -0
  68. gcore/resources/cloud/load_balancers/listeners.py +788 -0
  69. gcore/resources/cloud/load_balancers/load_balancers.py +1237 -0
  70. gcore/resources/cloud/load_balancers/metrics.py +205 -0
  71. gcore/resources/cloud/load_balancers/pools/__init__.py +47 -0
  72. gcore/resources/cloud/load_balancers/pools/health_monitors.py +352 -0
  73. gcore/resources/cloud/load_balancers/pools/members.py +353 -0
  74. gcore/resources/cloud/load_balancers/pools/pools.py +872 -0
  75. gcore/resources/cloud/load_balancers/statuses.py +260 -0
  76. gcore/resources/cloud/networks/__init__.py +47 -0
  77. gcore/resources/cloud/networks/networks.py +715 -0
  78. gcore/resources/cloud/networks/routers.py +875 -0
  79. gcore/resources/cloud/networks/subnets.py +865 -0
  80. gcore/resources/cloud/placement_groups.py +465 -0
  81. gcore/resources/cloud/projects.py +608 -0
  82. gcore/resources/cloud/quotas/__init__.py +33 -0
  83. gcore/resources/cloud/quotas/quotas.py +335 -0
  84. gcore/resources/cloud/quotas/requests.py +482 -0
  85. gcore/resources/cloud/regions.py +328 -0
  86. gcore/resources/cloud/registries/__init__.py +75 -0
  87. gcore/resources/cloud/registries/artifacts.py +277 -0
  88. gcore/resources/cloud/registries/registries.py +688 -0
  89. gcore/resources/cloud/registries/repositories.py +265 -0
  90. gcore/resources/cloud/registries/tags.py +190 -0
  91. gcore/resources/cloud/registries/users.py +701 -0
  92. gcore/resources/cloud/reserved_fixed_ips/__init__.py +33 -0
  93. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +965 -0
  94. gcore/resources/cloud/reserved_fixed_ips/vip.py +577 -0
  95. gcore/resources/cloud/secrets.py +797 -0
  96. gcore/resources/cloud/security_groups/__init__.py +33 -0
  97. gcore/resources/cloud/security_groups/rules.py +626 -0
  98. gcore/resources/cloud/security_groups/security_groups.py +863 -0
  99. gcore/resources/cloud/ssh_keys.py +635 -0
  100. gcore/resources/cloud/tasks.py +699 -0
  101. gcore/resources/cloud/users/__init__.py +33 -0
  102. gcore/resources/cloud/users/role_assignments.py +533 -0
  103. gcore/resources/cloud/users/users.py +102 -0
  104. gcore/resources/cloud/volumes.py +1710 -0
  105. gcore/types/__init__.py +3 -0
  106. gcore/types/cloud/__init__.py +199 -0
  107. gcore/types/cloud/allowed_address_pairs.py +15 -0
  108. gcore/types/cloud/aws_iam_data.py +13 -0
  109. gcore/types/cloud/aws_iam_data_param.py +15 -0
  110. gcore/types/cloud/baremetal/__init__.py +13 -0
  111. gcore/types/cloud/baremetal/baremetal_fixed_address.py +30 -0
  112. gcore/types/cloud/baremetal/baremetal_floating_address.py +15 -0
  113. gcore/types/cloud/baremetal/baremetal_server.py +178 -0
  114. gcore/types/cloud/baremetal/flavor_list_params.py +35 -0
  115. gcore/types/cloud/baremetal/flavor_list_suitable_params.py +22 -0
  116. gcore/types/cloud/baremetal/image_list_params.py +33 -0
  117. gcore/types/cloud/baremetal/server_create_params.py +370 -0
  118. gcore/types/cloud/baremetal/server_list_params.py +114 -0
  119. gcore/types/cloud/baremetal/server_rebuild_params.py +23 -0
  120. gcore/types/cloud/baremetal_flavor.py +58 -0
  121. gcore/types/cloud/baremetal_flavor_list.py +16 -0
  122. gcore/types/cloud/billing_reservation.py +153 -0
  123. gcore/types/cloud/billing_reservation_list_params.py +54 -0
  124. gcore/types/cloud/blackhole_port.py +66 -0
  125. gcore/types/cloud/capacity.py +13 -0
  126. gcore/types/cloud/console.py +18 -0
  127. gcore/types/cloud/container_probe.py +36 -0
  128. gcore/types/cloud/container_probe_config.py +16 -0
  129. gcore/types/cloud/container_probe_config_create_param.py +18 -0
  130. gcore/types/cloud/container_probe_create_param.py +38 -0
  131. gcore/types/cloud/container_probe_exec.py +12 -0
  132. gcore/types/cloud/container_probe_exec_create_param.py +13 -0
  133. gcore/types/cloud/container_probe_http_get.py +26 -0
  134. gcore/types/cloud/container_probe_http_get_create_param.py +25 -0
  135. gcore/types/cloud/container_probe_tcp_socket.py +10 -0
  136. gcore/types/cloud/container_probe_tcp_socket_create_param.py +12 -0
  137. gcore/types/cloud/container_scale.py +25 -0
  138. gcore/types/cloud/container_scale_trigger_rate.py +13 -0
  139. gcore/types/cloud/container_scale_trigger_sqs.py +33 -0
  140. gcore/types/cloud/container_scale_trigger_threshold.py +10 -0
  141. gcore/types/cloud/container_scale_triggers.py +36 -0
  142. gcore/types/cloud/ddos_profile.py +33 -0
  143. gcore/types/cloud/ddos_profile_field.py +31 -0
  144. gcore/types/cloud/ddos_profile_option_list.py +15 -0
  145. gcore/types/cloud/ddos_profile_status.py +13 -0
  146. gcore/types/cloud/ddos_profile_template.py +18 -0
  147. gcore/types/cloud/ddos_profile_template_field.py +23 -0
  148. gcore/types/cloud/deploy_status.py +13 -0
  149. gcore/types/cloud/file_share.py +111 -0
  150. gcore/types/cloud/file_share_create_params.py +104 -0
  151. gcore/types/cloud/file_share_list_params.py +24 -0
  152. gcore/types/cloud/file_share_resize_params.py +18 -0
  153. gcore/types/cloud/file_share_update_params.py +18 -0
  154. gcore/types/cloud/file_shares/__init__.py +7 -0
  155. gcore/types/cloud/file_shares/access_rule.py +21 -0
  156. gcore/types/cloud/file_shares/access_rule_create_params.py +21 -0
  157. gcore/types/cloud/file_shares/access_rule_list.py +16 -0
  158. gcore/types/cloud/fixed_address.py +38 -0
  159. gcore/types/cloud/fixed_address_short.py +24 -0
  160. gcore/types/cloud/flavor_hardware_description.py +27 -0
  161. gcore/types/cloud/floating_address.py +15 -0
  162. gcore/types/cloud/floating_ip.py +77 -0
  163. gcore/types/cloud/floating_ip_assign_params.py +20 -0
  164. gcore/types/cloud/floating_ip_create_params.py +40 -0
  165. gcore/types/cloud/floating_ip_detailed.py +222 -0
  166. gcore/types/cloud/floating_ip_list_params.py +35 -0
  167. gcore/types/cloud/floating_ip_status.py +7 -0
  168. gcore/types/cloud/gpu_baremetal_cluster.py +116 -0
  169. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +135 -0
  170. gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +28 -0
  171. gcore/types/cloud/gpu_baremetal_cluster_list_params.py +19 -0
  172. gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +26 -0
  173. gcore/types/cloud/gpu_baremetal_cluster_resize_params.py +16 -0
  174. gcore/types/cloud/gpu_baremetal_cluster_server.py +200 -0
  175. gcore/types/cloud/gpu_baremetal_cluster_server_list.py +16 -0
  176. gcore/types/cloud/gpu_baremetal_clusters/__init__.py +9 -0
  177. gcore/types/cloud/gpu_baremetal_clusters/flavor_list_params.py +21 -0
  178. gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +58 -0
  179. gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +253 -0
  180. gcore/types/cloud/gpu_baremetal_clusters/server_delete_params.py +21 -0
  181. gcore/types/cloud/gpu_baremetal_clusters/server_detach_interface_params.py +19 -0
  182. gcore/types/cloud/gpu_baremetal_flavor.py +133 -0
  183. gcore/types/cloud/gpu_baremetal_flavor_list.py +16 -0
  184. gcore/types/cloud/gpu_image.py +70 -0
  185. gcore/types/cloud/gpu_image_list.py +16 -0
  186. gcore/types/cloud/health_monitor.py +48 -0
  187. gcore/types/cloud/health_monitor_status.py +22 -0
  188. gcore/types/cloud/http_method.py +7 -0
  189. gcore/types/cloud/image.py +100 -0
  190. gcore/types/cloud/image_list.py +16 -0
  191. gcore/types/cloud/inference/__init__.py +25 -0
  192. gcore/types/cloud/inference/container.py +26 -0
  193. gcore/types/cloud/inference/deployment_create_params.py +222 -0
  194. gcore/types/cloud/inference/deployment_list_params.py +21 -0
  195. gcore/types/cloud/inference/deployment_update_params.py +215 -0
  196. gcore/types/cloud/inference/deployments/__init__.py +5 -0
  197. gcore/types/cloud/inference/deployments/log_list_params.py +28 -0
  198. gcore/types/cloud/inference/flavor_list_params.py +18 -0
  199. gcore/types/cloud/inference/inference.py +95 -0
  200. gcore/types/cloud/inference/inference_apikey_secret.py +15 -0
  201. gcore/types/cloud/inference/inference_flavor.py +34 -0
  202. gcore/types/cloud/inference/inference_log.py +21 -0
  203. gcore/types/cloud/inference/inference_registry_credential.py +19 -0
  204. gcore/types/cloud/inference/inference_registry_credential_full.py +22 -0
  205. gcore/types/cloud/inference/inference_secret.py +17 -0
  206. gcore/types/cloud/inference/mlcatalog_model_card.py +65 -0
  207. gcore/types/cloud/inference/mlcatalog_order_by_choices.py +7 -0
  208. gcore/types/cloud/inference/model_list_params.py +23 -0
  209. gcore/types/cloud/inference/registry_credential_create_params.py +24 -0
  210. gcore/types/cloud/inference/registry_credential_list_params.py +21 -0
  211. gcore/types/cloud/inference/registry_credential_replace_params.py +21 -0
  212. gcore/types/cloud/inference/secret_create_params.py +23 -0
  213. gcore/types/cloud/inference/secret_list_params.py +21 -0
  214. gcore/types/cloud/inference/secret_replace_params.py +20 -0
  215. gcore/types/cloud/inference_probes.py +19 -0
  216. gcore/types/cloud/ingress_opts_out.py +16 -0
  217. gcore/types/cloud/ingress_opts_param.py +18 -0
  218. gcore/types/cloud/instance.py +296 -0
  219. gcore/types/cloud/instance_action_params.py +32 -0
  220. gcore/types/cloud/instance_add_to_placement_group_params.py +16 -0
  221. gcore/types/cloud/instance_assign_security_group_params.py +28 -0
  222. gcore/types/cloud/instance_create_params.py +622 -0
  223. gcore/types/cloud/instance_delete_params.py +33 -0
  224. gcore/types/cloud/instance_get_console_params.py +16 -0
  225. gcore/types/cloud/instance_interface.py +40 -0
  226. gcore/types/cloud/instance_isolation.py +12 -0
  227. gcore/types/cloud/instance_list.py +16 -0
  228. gcore/types/cloud/instance_list_params.py +146 -0
  229. gcore/types/cloud/instance_metrics_time_unit.py +7 -0
  230. gcore/types/cloud/instance_resize_params.py +16 -0
  231. gcore/types/cloud/instance_unassign_security_group_params.py +28 -0
  232. gcore/types/cloud/instance_update_params.py +18 -0
  233. gcore/types/cloud/instances/__init__.py +19 -0
  234. gcore/types/cloud/instances/flavor_list_for_resize_params.py +16 -0
  235. gcore/types/cloud/instances/flavor_list_params.py +25 -0
  236. gcore/types/cloud/instances/flavor_list_suitable_params.py +56 -0
  237. gcore/types/cloud/instances/image_create_from_volume_params.py +53 -0
  238. gcore/types/cloud/instances/image_get_params.py +16 -0
  239. gcore/types/cloud/instances/image_list_params.py +33 -0
  240. gcore/types/cloud/instances/image_update_params.py +43 -0
  241. gcore/types/cloud/instances/image_upload_params.py +62 -0
  242. gcore/types/cloud/instances/instance_flavor.py +49 -0
  243. gcore/types/cloud/instances/instance_flavor_list.py +16 -0
  244. gcore/types/cloud/instances/interface_attach_params.py +253 -0
  245. gcore/types/cloud/instances/interface_detach_params.py +19 -0
  246. gcore/types/cloud/instances/metric_list_params.py +23 -0
  247. gcore/types/cloud/instances/metrics.py +52 -0
  248. gcore/types/cloud/instances/metrics_list.py +16 -0
  249. gcore/types/cloud/interface_ip_family.py +7 -0
  250. gcore/types/cloud/ip_assignment.py +13 -0
  251. gcore/types/cloud/ip_ranges.py +12 -0
  252. gcore/types/cloud/ip_version.py +7 -0
  253. gcore/types/cloud/laas_index_retention_policy.py +12 -0
  254. gcore/types/cloud/laas_index_retention_policy_param.py +13 -0
  255. gcore/types/cloud/lb_algorithm.py +7 -0
  256. gcore/types/cloud/lb_health_monitor_type.py +7 -0
  257. gcore/types/cloud/lb_listener_protocol.py +7 -0
  258. gcore/types/cloud/lb_pool_protocol.py +7 -0
  259. gcore/types/cloud/lb_session_persistence_type.py +7 -0
  260. gcore/types/cloud/listener_status.py +27 -0
  261. gcore/types/cloud/load_balancer.py +144 -0
  262. gcore/types/cloud/load_balancer_create_params.py +327 -0
  263. gcore/types/cloud/load_balancer_failover_params.py +16 -0
  264. gcore/types/cloud/load_balancer_flavor_detail.py +40 -0
  265. gcore/types/cloud/load_balancer_flavor_list.py +16 -0
  266. gcore/types/cloud/load_balancer_get_params.py +19 -0
  267. gcore/types/cloud/load_balancer_instance_role.py +7 -0
  268. gcore/types/cloud/load_balancer_l7_policy.py +86 -0
  269. gcore/types/cloud/load_balancer_l7_policy_list.py +16 -0
  270. gcore/types/cloud/load_balancer_l7_rule.py +72 -0
  271. gcore/types/cloud/load_balancer_l7_rule_list.py +16 -0
  272. gcore/types/cloud/load_balancer_list_params.py +53 -0
  273. gcore/types/cloud/load_balancer_listener_detail.py +97 -0
  274. gcore/types/cloud/load_balancer_listener_list.py +16 -0
  275. gcore/types/cloud/load_balancer_member_connectivity.py +7 -0
  276. gcore/types/cloud/load_balancer_metrics.py +32 -0
  277. gcore/types/cloud/load_balancer_metrics_list.py +16 -0
  278. gcore/types/cloud/load_balancer_operating_status.py +7 -0
  279. gcore/types/cloud/load_balancer_pool.py +87 -0
  280. gcore/types/cloud/load_balancer_pool_list.py +16 -0
  281. gcore/types/cloud/load_balancer_resize_params.py +16 -0
  282. gcore/types/cloud/load_balancer_statistics.py +22 -0
  283. gcore/types/cloud/load_balancer_status.py +38 -0
  284. gcore/types/cloud/load_balancer_status_list.py +16 -0
  285. gcore/types/cloud/load_balancer_update_params.py +43 -0
  286. gcore/types/cloud/load_balancers/__init__.py +15 -0
  287. gcore/types/cloud/load_balancers/flavor_list_params.py +16 -0
  288. gcore/types/cloud/load_balancers/l7_policies/__init__.py +6 -0
  289. gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +50 -0
  290. gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +43 -0
  291. gcore/types/cloud/load_balancers/l7_policy_create_params.py +54 -0
  292. gcore/types/cloud/load_balancers/l7_policy_replace_params.py +51 -0
  293. gcore/types/cloud/load_balancers/listener_create_params.py +72 -0
  294. gcore/types/cloud/load_balancers/listener_get_params.py +16 -0
  295. gcore/types/cloud/load_balancers/listener_list_params.py +19 -0
  296. gcore/types/cloud/load_balancers/listener_update_params.py +55 -0
  297. gcore/types/cloud/load_balancers/metric_list_params.py +21 -0
  298. gcore/types/cloud/load_balancers/pool_create_params.py +141 -0
  299. gcore/types/cloud/load_balancers/pool_list_params.py +25 -0
  300. gcore/types/cloud/load_balancers/pool_update_params.py +139 -0
  301. gcore/types/cloud/load_balancers/pools/__init__.py +6 -0
  302. gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +49 -0
  303. gcore/types/cloud/load_balancers/pools/member_add_params.py +44 -0
  304. gcore/types/cloud/logging.py +22 -0
  305. gcore/types/cloud/member.py +47 -0
  306. gcore/types/cloud/member_status.py +24 -0
  307. gcore/types/cloud/network.py +79 -0
  308. gcore/types/cloud/network_create_params.py +34 -0
  309. gcore/types/cloud/network_details.py +79 -0
  310. gcore/types/cloud/network_interface.py +78 -0
  311. gcore/types/cloud/network_interface_list.py +16 -0
  312. gcore/types/cloud/network_list_params.py +36 -0
  313. gcore/types/cloud/network_update_params.py +16 -0
  314. gcore/types/cloud/networks/__init__.py +14 -0
  315. gcore/types/cloud/networks/router.py +83 -0
  316. gcore/types/cloud/networks/router_attach_subnet_params.py +24 -0
  317. gcore/types/cloud/networks/router_create_params.py +75 -0
  318. gcore/types/cloud/networks/router_detach_subnet_params.py +16 -0
  319. gcore/types/cloud/networks/router_list.py +16 -0
  320. gcore/types/cloud/networks/router_list_params.py +19 -0
  321. gcore/types/cloud/networks/router_update_params.py +45 -0
  322. gcore/types/cloud/networks/subnet_create_params.py +82 -0
  323. gcore/types/cloud/networks/subnet_list_params.py +58 -0
  324. gcore/types/cloud/networks/subnet_update_params.py +47 -0
  325. gcore/types/cloud/placement_group.py +41 -0
  326. gcore/types/cloud/placement_group_create_params.py +19 -0
  327. gcore/types/cloud/placement_group_list.py +16 -0
  328. gcore/types/cloud/pool_status.py +31 -0
  329. gcore/types/cloud/project.py +47 -0
  330. gcore/types/cloud/project_create_params.py +22 -0
  331. gcore/types/cloud/project_list_params.py +27 -0
  332. gcore/types/cloud/project_replace_params.py +18 -0
  333. gcore/types/cloud/provisioning_status.py +9 -0
  334. gcore/types/cloud/quota_get_all_response.py +340 -0
  335. gcore/types/cloud/quota_get_by_region_response.py +288 -0
  336. gcore/types/cloud/quota_get_global_response.py +51 -0
  337. gcore/types/cloud/quotas/__init__.py +8 -0
  338. gcore/types/cloud/quotas/request_create_params.py +193 -0
  339. gcore/types/cloud/quotas/request_get_response.py +205 -0
  340. gcore/types/cloud/quotas/request_list_params.py +22 -0
  341. gcore/types/cloud/quotas/request_list_response.py +205 -0
  342. gcore/types/cloud/region.py +101 -0
  343. gcore/types/cloud/region_capacity.py +16 -0
  344. gcore/types/cloud/region_capacity_list.py +16 -0
  345. gcore/types/cloud/region_get_params.py +18 -0
  346. gcore/types/cloud/region_list_params.py +31 -0
  347. gcore/types/cloud/registries/__init__.py +14 -0
  348. gcore/types/cloud/registries/registry_artifact.py +35 -0
  349. gcore/types/cloud/registries/registry_artifact_list.py +16 -0
  350. gcore/types/cloud/registries/registry_repository.py +30 -0
  351. gcore/types/cloud/registries/registry_repository_list.py +16 -0
  352. gcore/types/cloud/registries/registry_user.py +28 -0
  353. gcore/types/cloud/registries/registry_user_created.py +31 -0
  354. gcore/types/cloud/registries/registry_user_list.py +16 -0
  355. gcore/types/cloud/registries/user_create_multiple_params.py +36 -0
  356. gcore/types/cloud/registries/user_create_params.py +30 -0
  357. gcore/types/cloud/registries/user_update_params.py +21 -0
  358. gcore/types/cloud/registry.py +33 -0
  359. gcore/types/cloud/registry_create_params.py +24 -0
  360. gcore/types/cloud/registry_list.py +16 -0
  361. gcore/types/cloud/registry_resize_params.py +16 -0
  362. gcore/types/cloud/registry_tag.py +27 -0
  363. gcore/types/cloud/reserved_fixed_ip.py +98 -0
  364. gcore/types/cloud/reserved_fixed_ip_create_params.py +107 -0
  365. gcore/types/cloud/reserved_fixed_ip_list_params.py +47 -0
  366. gcore/types/cloud/reserved_fixed_ips/__init__.py +12 -0
  367. gcore/types/cloud/reserved_fixed_ips/candidate_port.py +26 -0
  368. gcore/types/cloud/reserved_fixed_ips/candidate_port_list.py +16 -0
  369. gcore/types/cloud/reserved_fixed_ips/connected_port.py +26 -0
  370. gcore/types/cloud/reserved_fixed_ips/connected_port_list.py +16 -0
  371. gcore/types/cloud/reserved_fixed_ips/ip_with_subnet.py +17 -0
  372. gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +17 -0
  373. gcore/types/cloud/reserved_fixed_ips/vip_toggle_params.py +16 -0
  374. gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +17 -0
  375. gcore/types/cloud/route.py +16 -0
  376. gcore/types/cloud/secret.py +64 -0
  377. gcore/types/cloud/secret_create_params.py +66 -0
  378. gcore/types/cloud/secret_list_response.py +16 -0
  379. gcore/types/cloud/secret_upload_tls_certificate_params.py +39 -0
  380. gcore/types/cloud/security_group.py +45 -0
  381. gcore/types/cloud/security_group_copy_params.py +16 -0
  382. gcore/types/cloud/security_group_create_params.py +94 -0
  383. gcore/types/cloud/security_group_list_params.py +30 -0
  384. gcore/types/cloud/security_group_rule.py +83 -0
  385. gcore/types/cloud/security_group_update_params.py +83 -0
  386. gcore/types/cloud/security_groups/__init__.py +6 -0
  387. gcore/types/cloud/security_groups/rule_create_params.py +65 -0
  388. gcore/types/cloud/security_groups/rule_replace_params.py +72 -0
  389. gcore/types/cloud/session_persistence.py +22 -0
  390. gcore/types/cloud/ssh_key.py +39 -0
  391. gcore/types/cloud/ssh_key_create_params.py +31 -0
  392. gcore/types/cloud/ssh_key_created.py +53 -0
  393. gcore/types/cloud/ssh_key_list_params.py +21 -0
  394. gcore/types/cloud/ssh_key_update_params.py +15 -0
  395. gcore/types/cloud/subnet.py +87 -0
  396. gcore/types/cloud/tag.py +16 -0
  397. gcore/types/cloud/tag_update_map_param.py +10 -0
  398. gcore/types/cloud/task.py +191 -0
  399. gcore/types/cloud/task_acknowledge_all_params.py +16 -0
  400. gcore/types/cloud/task_id_list.py +12 -0
  401. gcore/types/cloud/task_list_params.py +104 -0
  402. gcore/types/cloud/users/__init__.py +9 -0
  403. gcore/types/cloud/users/role_assignment.py +33 -0
  404. gcore/types/cloud/users/role_assignment_create_params.py +22 -0
  405. gcore/types/cloud/users/role_assignment_list_params.py +25 -0
  406. gcore/types/cloud/users/role_assignment_update_delete.py +10 -0
  407. gcore/types/cloud/users/role_assignment_update_params.py +22 -0
  408. gcore/types/cloud/volume.py +141 -0
  409. gcore/types/cloud/volume_attach_to_instance_params.py +21 -0
  410. gcore/types/cloud/volume_change_type_params.py +18 -0
  411. gcore/types/cloud/volume_create_params.py +176 -0
  412. gcore/types/cloud/volume_delete_params.py +18 -0
  413. gcore/types/cloud/volume_detach_from_instance_params.py +18 -0
  414. gcore/types/cloud/volume_list_params.py +56 -0
  415. gcore/types/cloud/volume_resize_params.py +18 -0
  416. gcore/types/cloud/volume_update_params.py +18 -0
  417. gcore-0.1.0a1.dist-info/METADATA +485 -0
  418. gcore-0.1.0a1.dist-info/RECORD +420 -0
  419. gcore-0.1.0a1.dist-info/WHEEL +4 -0
  420. gcore-0.1.0a1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,1710 @@
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 List, Iterable
6
+ from typing_extensions import Literal, overload
7
+
8
+ import httpx
9
+
10
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
11
+ from ..._utils import required_args, maybe_transform, async_maybe_transform
12
+ from ..._compat import cached_property
13
+ from ..._resource import SyncAPIResource, AsyncAPIResource
14
+ from ..._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from ...pagination import SyncOffsetPage, AsyncOffsetPage
21
+ from ...types.cloud import (
22
+ volume_list_params,
23
+ volume_create_params,
24
+ volume_delete_params,
25
+ volume_resize_params,
26
+ volume_update_params,
27
+ volume_change_type_params,
28
+ volume_attach_to_instance_params,
29
+ volume_detach_from_instance_params,
30
+ )
31
+ from ..._base_client import AsyncPaginator, make_request_options
32
+ from ...types.cloud.volume import Volume
33
+ from ...types.cloud.task_id_list import TaskIDList
34
+ from ...types.cloud.tag_update_map_param import TagUpdateMapParam
35
+
36
+ __all__ = ["VolumesResource", "AsyncVolumesResource"]
37
+
38
+
39
+ class VolumesResource(SyncAPIResource):
40
+ @cached_property
41
+ def with_raw_response(self) -> VolumesResourceWithRawResponse:
42
+ """
43
+ This property can be used as a prefix for any HTTP method call to return
44
+ the raw response object instead of the parsed content.
45
+
46
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
47
+ """
48
+ return VolumesResourceWithRawResponse(self)
49
+
50
+ @cached_property
51
+ def with_streaming_response(self) -> VolumesResourceWithStreamingResponse:
52
+ """
53
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
54
+
55
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
56
+ """
57
+ return VolumesResourceWithStreamingResponse(self)
58
+
59
+ @overload
60
+ def create(
61
+ self,
62
+ *,
63
+ project_id: int | None = None,
64
+ region_id: int | None = None,
65
+ image_id: str,
66
+ name: str,
67
+ size: int,
68
+ source: Literal["image"],
69
+ attachment_tag: str | NotGiven = NOT_GIVEN,
70
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
71
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
72
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
73
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
74
+ | NotGiven = NOT_GIVEN,
75
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
76
+ # The extra values given here take precedence over values defined on the client or passed to this method.
77
+ extra_headers: Headers | None = None,
78
+ extra_query: Query | None = None,
79
+ extra_body: Body | None = None,
80
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
81
+ ) -> TaskIDList:
82
+ """
83
+ Create volume
84
+
85
+ Args:
86
+ project_id: Project ID
87
+
88
+ region_id: Region ID
89
+
90
+ image_id: Image ID
91
+
92
+ name: Volume name
93
+
94
+ size: Volume size in GiB
95
+
96
+ source: Volume source type
97
+
98
+ attachment_tag: Block device attachment tag (not exposed in the user tags). Only used in
99
+ conjunction with instance_id_to_attach_to
100
+
101
+ instance_id_to_attach_to: instance_id to attach newly-created volume to
102
+
103
+ lifecycle_policy_ids: List of lifecycle policy IDs (snapshot creation schedules) to associate with the
104
+ volume
105
+
106
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
107
+ can be associated with a resource, enabling efficient filtering and grouping for
108
+ better organization and management. Some tags are read-only and cannot be
109
+ modified by the user. Tags are also integrated with cost reports, allowing cost
110
+ data to be filtered based on tag keys or values.
111
+
112
+ type_name: Volume type. Defaults to `standard`. If not specified for source `snapshot`,
113
+ volume type will be derived from the snapshot volume.
114
+
115
+ extra_headers: Send extra headers
116
+
117
+ extra_query: Add additional query parameters to the request
118
+
119
+ extra_body: Add additional JSON properties to the request
120
+
121
+ timeout: Override the client-level default timeout for this request, in seconds
122
+ """
123
+ ...
124
+
125
+ @overload
126
+ def create(
127
+ self,
128
+ *,
129
+ project_id: int | None = None,
130
+ region_id: int | None = None,
131
+ name: str,
132
+ snapshot_id: str,
133
+ source: Literal["snapshot"],
134
+ attachment_tag: str | NotGiven = NOT_GIVEN,
135
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
136
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
137
+ size: int | NotGiven = NOT_GIVEN,
138
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
139
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
140
+ | NotGiven = NOT_GIVEN,
141
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
142
+ # The extra values given here take precedence over values defined on the client or passed to this method.
143
+ extra_headers: Headers | None = None,
144
+ extra_query: Query | None = None,
145
+ extra_body: Body | None = None,
146
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
147
+ ) -> TaskIDList:
148
+ """
149
+ Create volume
150
+
151
+ Args:
152
+ project_id: Project ID
153
+
154
+ region_id: Region ID
155
+
156
+ name: Volume name
157
+
158
+ snapshot_id: Snapshot ID
159
+
160
+ source: Volume source type
161
+
162
+ attachment_tag: Block device attachment tag (not exposed in the user tags). Only used in
163
+ conjunction with instance_id_to_attach_to
164
+
165
+ instance_id_to_attach_to: instance_id to attach newly-created volume to
166
+
167
+ lifecycle_policy_ids: List of lifecycle policy IDs (snapshot creation schedules) to associate with the
168
+ volume
169
+
170
+ size: Volume size in GiB. If specified, value must be equal to respective snapshot
171
+ size
172
+
173
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
174
+ can be associated with a resource, enabling efficient filtering and grouping for
175
+ better organization and management. Some tags are read-only and cannot be
176
+ modified by the user. Tags are also integrated with cost reports, allowing cost
177
+ data to be filtered based on tag keys or values.
178
+
179
+ type_name: Volume type. Defaults to `standard`. If not specified for source `snapshot`,
180
+ volume type will be derived from the snapshot volume.
181
+
182
+ extra_headers: Send extra headers
183
+
184
+ extra_query: Add additional query parameters to the request
185
+
186
+ extra_body: Add additional JSON properties to the request
187
+
188
+ timeout: Override the client-level default timeout for this request, in seconds
189
+ """
190
+ ...
191
+
192
+ @overload
193
+ def create(
194
+ self,
195
+ *,
196
+ project_id: int | None = None,
197
+ region_id: int | None = None,
198
+ name: str,
199
+ size: int,
200
+ source: Literal["new-volume"],
201
+ attachment_tag: str | NotGiven = NOT_GIVEN,
202
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
203
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
204
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
205
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
206
+ | NotGiven = NOT_GIVEN,
207
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
208
+ # The extra values given here take precedence over values defined on the client or passed to this method.
209
+ extra_headers: Headers | None = None,
210
+ extra_query: Query | None = None,
211
+ extra_body: Body | None = None,
212
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
213
+ ) -> TaskIDList:
214
+ """
215
+ Create volume
216
+
217
+ Args:
218
+ project_id: Project ID
219
+
220
+ region_id: Region ID
221
+
222
+ name: Volume name
223
+
224
+ size: Volume size in GiB
225
+
226
+ source: Volume source type
227
+
228
+ attachment_tag: Block device attachment tag (not exposed in the user tags). Only used in
229
+ conjunction with instance_id_to_attach_to
230
+
231
+ instance_id_to_attach_to: instance_id to attach newly-created volume to
232
+
233
+ lifecycle_policy_ids: List of lifecycle policy IDs (snapshot creation schedules) to associate with the
234
+ volume
235
+
236
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
237
+ can be associated with a resource, enabling efficient filtering and grouping for
238
+ better organization and management. Some tags are read-only and cannot be
239
+ modified by the user. Tags are also integrated with cost reports, allowing cost
240
+ data to be filtered based on tag keys or values.
241
+
242
+ type_name: Volume type. Defaults to `standard`. If not specified for source `snapshot`,
243
+ volume type will be derived from the snapshot volume.
244
+
245
+ extra_headers: Send extra headers
246
+
247
+ extra_query: Add additional query parameters to the request
248
+
249
+ extra_body: Add additional JSON properties to the request
250
+
251
+ timeout: Override the client-level default timeout for this request, in seconds
252
+ """
253
+ ...
254
+
255
+ @required_args(
256
+ ["image_id", "name", "size", "source"], ["name", "snapshot_id", "source"], ["name", "size", "source"]
257
+ )
258
+ def create(
259
+ self,
260
+ *,
261
+ project_id: int | None = None,
262
+ region_id: int | None = None,
263
+ image_id: str | NotGiven = NOT_GIVEN,
264
+ name: str,
265
+ size: int | NotGiven = NOT_GIVEN,
266
+ source: Literal["image"] | Literal["snapshot"] | Literal["new-volume"],
267
+ attachment_tag: str | NotGiven = NOT_GIVEN,
268
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
269
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
270
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
271
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
272
+ | NotGiven = NOT_GIVEN,
273
+ snapshot_id: str | NotGiven = NOT_GIVEN,
274
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
275
+ # The extra values given here take precedence over values defined on the client or passed to this method.
276
+ extra_headers: Headers | None = None,
277
+ extra_query: Query | None = None,
278
+ extra_body: Body | None = None,
279
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
280
+ ) -> TaskIDList:
281
+ if project_id is None:
282
+ project_id = self._client._get_cloud_project_id_path_param()
283
+ if region_id is None:
284
+ region_id = self._client._get_cloud_region_id_path_param()
285
+ return self._post(
286
+ f"/cloud/v1/volumes/{project_id}/{region_id}",
287
+ body=maybe_transform(
288
+ {
289
+ "image_id": image_id,
290
+ "name": name,
291
+ "size": size,
292
+ "source": source,
293
+ "attachment_tag": attachment_tag,
294
+ "instance_id_to_attach_to": instance_id_to_attach_to,
295
+ "lifecycle_policy_ids": lifecycle_policy_ids,
296
+ "tags": tags,
297
+ "type_name": type_name,
298
+ "snapshot_id": snapshot_id,
299
+ },
300
+ volume_create_params.VolumeCreateParams,
301
+ ),
302
+ options=make_request_options(
303
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
304
+ ),
305
+ cast_to=TaskIDList,
306
+ )
307
+
308
+ def update(
309
+ self,
310
+ volume_id: str,
311
+ *,
312
+ project_id: int | None = None,
313
+ region_id: int | None = None,
314
+ name: str,
315
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
316
+ # The extra values given here take precedence over values defined on the client or passed to this method.
317
+ extra_headers: Headers | None = None,
318
+ extra_query: Query | None = None,
319
+ extra_body: Body | None = None,
320
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
321
+ ) -> Volume:
322
+ """
323
+ Rename volume
324
+
325
+ Args:
326
+ project_id: Project ID
327
+
328
+ region_id: Region ID
329
+
330
+ volume_id: Volume ID
331
+
332
+ name: Name.
333
+
334
+ extra_headers: Send extra headers
335
+
336
+ extra_query: Add additional query parameters to the request
337
+
338
+ extra_body: Add additional JSON properties to the request
339
+
340
+ timeout: Override the client-level default timeout for this request, in seconds
341
+ """
342
+ if project_id is None:
343
+ project_id = self._client._get_cloud_project_id_path_param()
344
+ if region_id is None:
345
+ region_id = self._client._get_cloud_region_id_path_param()
346
+ if not volume_id:
347
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
348
+ return self._patch(
349
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}",
350
+ body=maybe_transform({"name": name}, volume_update_params.VolumeUpdateParams),
351
+ options=make_request_options(
352
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
353
+ ),
354
+ cast_to=Volume,
355
+ )
356
+
357
+ def list(
358
+ self,
359
+ *,
360
+ project_id: int | None = None,
361
+ region_id: int | None = None,
362
+ bootable: bool | NotGiven = NOT_GIVEN,
363
+ cluster_id: str | NotGiven = NOT_GIVEN,
364
+ has_attachments: bool | NotGiven = NOT_GIVEN,
365
+ id_part: str | NotGiven = NOT_GIVEN,
366
+ instance_id: str | NotGiven = NOT_GIVEN,
367
+ limit: int | NotGiven = NOT_GIVEN,
368
+ name_part: str | NotGiven = NOT_GIVEN,
369
+ offset: int | NotGiven = NOT_GIVEN,
370
+ tag_key: List[str] | NotGiven = NOT_GIVEN,
371
+ tag_key_value: str | NotGiven = NOT_GIVEN,
372
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
373
+ # The extra values given here take precedence over values defined on the client or passed to this method.
374
+ extra_headers: Headers | None = None,
375
+ extra_query: Query | None = None,
376
+ extra_body: Body | None = None,
377
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
378
+ ) -> SyncOffsetPage[Volume]:
379
+ """
380
+ List volumes
381
+
382
+ Args:
383
+ project_id: Project ID
384
+
385
+ region_id: Region ID
386
+
387
+ bootable: Filter by bootable field
388
+
389
+ cluster_id: Filter volumes by k8s cluster ID
390
+
391
+ has_attachments: Filter by the presence of attachments
392
+
393
+ id_part: Filter the volume list result by the ID part of the volume
394
+
395
+ instance_id: Filter volumes by instance ID
396
+
397
+ limit: Optional. Limit the number of returned items
398
+
399
+ name_part: Filter volumes by name_part inclusion in volume name.Any substring can be used
400
+ and volumes will be returned with names containing the substring.
401
+
402
+ offset: Optional. Offset value is used to exclude the first set of records from the
403
+ result
404
+
405
+ tag_key: Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
406
+
407
+ tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
408
+ "tag_key_value={"key": "value"}" --url
409
+ "https://example.com/cloud/v1/resource/1/1"
410
+
411
+ extra_headers: Send extra headers
412
+
413
+ extra_query: Add additional query parameters to the request
414
+
415
+ extra_body: Add additional JSON properties to the request
416
+
417
+ timeout: Override the client-level default timeout for this request, in seconds
418
+ """
419
+ if project_id is None:
420
+ project_id = self._client._get_cloud_project_id_path_param()
421
+ if region_id is None:
422
+ region_id = self._client._get_cloud_region_id_path_param()
423
+ return self._get_api_list(
424
+ f"/cloud/v1/volumes/{project_id}/{region_id}",
425
+ page=SyncOffsetPage[Volume],
426
+ options=make_request_options(
427
+ extra_headers=extra_headers,
428
+ extra_query=extra_query,
429
+ extra_body=extra_body,
430
+ timeout=timeout,
431
+ query=maybe_transform(
432
+ {
433
+ "bootable": bootable,
434
+ "cluster_id": cluster_id,
435
+ "has_attachments": has_attachments,
436
+ "id_part": id_part,
437
+ "instance_id": instance_id,
438
+ "limit": limit,
439
+ "name_part": name_part,
440
+ "offset": offset,
441
+ "tag_key": tag_key,
442
+ "tag_key_value": tag_key_value,
443
+ },
444
+ volume_list_params.VolumeListParams,
445
+ ),
446
+ ),
447
+ model=Volume,
448
+ )
449
+
450
+ def delete(
451
+ self,
452
+ volume_id: str,
453
+ *,
454
+ project_id: int | None = None,
455
+ region_id: int | None = None,
456
+ snapshots: str | NotGiven = NOT_GIVEN,
457
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
458
+ # The extra values given here take precedence over values defined on the client or passed to this method.
459
+ extra_headers: Headers | None = None,
460
+ extra_query: Query | None = None,
461
+ extra_body: Body | None = None,
462
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
463
+ ) -> TaskIDList:
464
+ """
465
+ Delete volume
466
+
467
+ Args:
468
+ project_id: Project ID
469
+
470
+ region_id: Region ID
471
+
472
+ volume_id: Volume ID
473
+
474
+ snapshots: Comma separated list of snapshot IDs to be deleted with the volume.
475
+
476
+ extra_headers: Send extra headers
477
+
478
+ extra_query: Add additional query parameters to the request
479
+
480
+ extra_body: Add additional JSON properties to the request
481
+
482
+ timeout: Override the client-level default timeout for this request, in seconds
483
+ """
484
+ if project_id is None:
485
+ project_id = self._client._get_cloud_project_id_path_param()
486
+ if region_id is None:
487
+ region_id = self._client._get_cloud_region_id_path_param()
488
+ if not volume_id:
489
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
490
+ return self._delete(
491
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}",
492
+ options=make_request_options(
493
+ extra_headers=extra_headers,
494
+ extra_query=extra_query,
495
+ extra_body=extra_body,
496
+ timeout=timeout,
497
+ query=maybe_transform({"snapshots": snapshots}, volume_delete_params.VolumeDeleteParams),
498
+ ),
499
+ cast_to=TaskIDList,
500
+ )
501
+
502
+ def attach_to_instance(
503
+ self,
504
+ volume_id: str,
505
+ *,
506
+ project_id: int | None = None,
507
+ region_id: int | None = None,
508
+ instance_id: str,
509
+ attachment_tag: str | NotGiven = NOT_GIVEN,
510
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
511
+ # The extra values given here take precedence over values defined on the client or passed to this method.
512
+ extra_headers: Headers | None = None,
513
+ extra_query: Query | None = None,
514
+ extra_body: Body | None = None,
515
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
516
+ ) -> TaskIDList:
517
+ """Attach the volume to instance.
518
+
519
+ Note: ultra volume can only be attached to an
520
+ instance with shared flavor
521
+
522
+ Args:
523
+ project_id: Project ID
524
+
525
+ region_id: Region ID
526
+
527
+ volume_id: Volume ID
528
+
529
+ instance_id: Instance ID.
530
+
531
+ attachment_tag: Block device attachment tag (not exposed in the normal tags).
532
+
533
+ extra_headers: Send extra headers
534
+
535
+ extra_query: Add additional query parameters to the request
536
+
537
+ extra_body: Add additional JSON properties to the request
538
+
539
+ timeout: Override the client-level default timeout for this request, in seconds
540
+ """
541
+ if project_id is None:
542
+ project_id = self._client._get_cloud_project_id_path_param()
543
+ if region_id is None:
544
+ region_id = self._client._get_cloud_region_id_path_param()
545
+ if not volume_id:
546
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
547
+ return self._post(
548
+ f"/cloud/v2/volumes/{project_id}/{region_id}/{volume_id}/attach",
549
+ body=maybe_transform(
550
+ {
551
+ "instance_id": instance_id,
552
+ "attachment_tag": attachment_tag,
553
+ },
554
+ volume_attach_to_instance_params.VolumeAttachToInstanceParams,
555
+ ),
556
+ options=make_request_options(
557
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
558
+ ),
559
+ cast_to=TaskIDList,
560
+ )
561
+
562
+ def change_type(
563
+ self,
564
+ volume_id: str,
565
+ *,
566
+ project_id: int | None = None,
567
+ region_id: int | None = None,
568
+ volume_type: Literal["ssd_hiiops", "standard"],
569
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
570
+ # The extra values given here take precedence over values defined on the client or passed to this method.
571
+ extra_headers: Headers | None = None,
572
+ extra_query: Query | None = None,
573
+ extra_body: Body | None = None,
574
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
575
+ ) -> Volume:
576
+ """
577
+ Change volume type
578
+
579
+ Args:
580
+ project_id: Project ID
581
+
582
+ region_id: Region ID
583
+
584
+ volume_id: Volume ID
585
+
586
+ volume_type: New volume type name
587
+
588
+ extra_headers: Send extra headers
589
+
590
+ extra_query: Add additional query parameters to the request
591
+
592
+ extra_body: Add additional JSON properties to the request
593
+
594
+ timeout: Override the client-level default timeout for this request, in seconds
595
+ """
596
+ if project_id is None:
597
+ project_id = self._client._get_cloud_project_id_path_param()
598
+ if region_id is None:
599
+ region_id = self._client._get_cloud_region_id_path_param()
600
+ if not volume_id:
601
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
602
+ return self._post(
603
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}/retype",
604
+ body=maybe_transform({"volume_type": volume_type}, volume_change_type_params.VolumeChangeTypeParams),
605
+ options=make_request_options(
606
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
607
+ ),
608
+ cast_to=Volume,
609
+ )
610
+
611
+ def detach_from_instance(
612
+ self,
613
+ volume_id: str,
614
+ *,
615
+ project_id: int | None = None,
616
+ region_id: int | None = None,
617
+ instance_id: str,
618
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
619
+ # The extra values given here take precedence over values defined on the client or passed to this method.
620
+ extra_headers: Headers | None = None,
621
+ extra_query: Query | None = None,
622
+ extra_body: Body | None = None,
623
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
624
+ ) -> TaskIDList:
625
+ """
626
+ Detach the volume from instance
627
+
628
+ Args:
629
+ project_id: Project ID
630
+
631
+ region_id: Region ID
632
+
633
+ volume_id: Volume ID
634
+
635
+ instance_id: Instance ID
636
+
637
+ extra_headers: Send extra headers
638
+
639
+ extra_query: Add additional query parameters to the request
640
+
641
+ extra_body: Add additional JSON properties to the request
642
+
643
+ timeout: Override the client-level default timeout for this request, in seconds
644
+ """
645
+ if project_id is None:
646
+ project_id = self._client._get_cloud_project_id_path_param()
647
+ if region_id is None:
648
+ region_id = self._client._get_cloud_region_id_path_param()
649
+ if not volume_id:
650
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
651
+ return self._post(
652
+ f"/cloud/v2/volumes/{project_id}/{region_id}/{volume_id}/detach",
653
+ body=maybe_transform(
654
+ {"instance_id": instance_id}, volume_detach_from_instance_params.VolumeDetachFromInstanceParams
655
+ ),
656
+ options=make_request_options(
657
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
658
+ ),
659
+ cast_to=TaskIDList,
660
+ )
661
+
662
+ def get(
663
+ self,
664
+ volume_id: str,
665
+ *,
666
+ project_id: int | None = None,
667
+ region_id: int | None = None,
668
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
669
+ # The extra values given here take precedence over values defined on the client or passed to this method.
670
+ extra_headers: Headers | None = None,
671
+ extra_query: Query | None = None,
672
+ extra_body: Body | None = None,
673
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
674
+ ) -> Volume:
675
+ """
676
+ Get volume
677
+
678
+ Args:
679
+ project_id: Project ID
680
+
681
+ region_id: Region ID
682
+
683
+ volume_id: Volume ID
684
+
685
+ extra_headers: Send extra headers
686
+
687
+ extra_query: Add additional query parameters to the request
688
+
689
+ extra_body: Add additional JSON properties to the request
690
+
691
+ timeout: Override the client-level default timeout for this request, in seconds
692
+ """
693
+ if project_id is None:
694
+ project_id = self._client._get_cloud_project_id_path_param()
695
+ if region_id is None:
696
+ region_id = self._client._get_cloud_region_id_path_param()
697
+ if not volume_id:
698
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
699
+ return self._get(
700
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}",
701
+ options=make_request_options(
702
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
703
+ ),
704
+ cast_to=Volume,
705
+ )
706
+
707
+ def resize(
708
+ self,
709
+ volume_id: str,
710
+ *,
711
+ project_id: int | None = None,
712
+ region_id: int | None = None,
713
+ size: int,
714
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
715
+ # The extra values given here take precedence over values defined on the client or passed to this method.
716
+ extra_headers: Headers | None = None,
717
+ extra_query: Query | None = None,
718
+ extra_body: Body | None = None,
719
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
720
+ ) -> TaskIDList:
721
+ """
722
+ Extend volume
723
+
724
+ Args:
725
+ project_id: Project ID
726
+
727
+ region_id: Region ID
728
+
729
+ volume_id: Volume ID
730
+
731
+ size: New volume size in GiB
732
+
733
+ extra_headers: Send extra headers
734
+
735
+ extra_query: Add additional query parameters to the request
736
+
737
+ extra_body: Add additional JSON properties to the request
738
+
739
+ timeout: Override the client-level default timeout for this request, in seconds
740
+ """
741
+ if project_id is None:
742
+ project_id = self._client._get_cloud_project_id_path_param()
743
+ if region_id is None:
744
+ region_id = self._client._get_cloud_region_id_path_param()
745
+ if not volume_id:
746
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
747
+ return self._post(
748
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}/extend",
749
+ body=maybe_transform({"size": size}, volume_resize_params.VolumeResizeParams),
750
+ options=make_request_options(
751
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
752
+ ),
753
+ cast_to=TaskIDList,
754
+ )
755
+
756
+ def revert_to_last_snapshot(
757
+ self,
758
+ volume_id: str,
759
+ *,
760
+ project_id: int | None = None,
761
+ region_id: int | None = None,
762
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
763
+ # The extra values given here take precedence over values defined on the client or passed to this method.
764
+ extra_headers: Headers | None = None,
765
+ extra_query: Query | None = None,
766
+ extra_body: Body | None = None,
767
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
768
+ ) -> None:
769
+ """
770
+ Revert volume to it's last snapshot
771
+
772
+ Args:
773
+ project_id: Project ID
774
+
775
+ region_id: Region ID
776
+
777
+ volume_id: Volume ID
778
+
779
+ extra_headers: Send extra headers
780
+
781
+ extra_query: Add additional query parameters to the request
782
+
783
+ extra_body: Add additional JSON properties to the request
784
+
785
+ timeout: Override the client-level default timeout for this request, in seconds
786
+ """
787
+ if project_id is None:
788
+ project_id = self._client._get_cloud_project_id_path_param()
789
+ if region_id is None:
790
+ region_id = self._client._get_cloud_region_id_path_param()
791
+ if not volume_id:
792
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
793
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
794
+ return self._post(
795
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}/revert",
796
+ options=make_request_options(
797
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
798
+ ),
799
+ cast_to=NoneType,
800
+ )
801
+
802
+
803
+ class AsyncVolumesResource(AsyncAPIResource):
804
+ @cached_property
805
+ def with_raw_response(self) -> AsyncVolumesResourceWithRawResponse:
806
+ """
807
+ This property can be used as a prefix for any HTTP method call to return
808
+ the raw response object instead of the parsed content.
809
+
810
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
811
+ """
812
+ return AsyncVolumesResourceWithRawResponse(self)
813
+
814
+ @cached_property
815
+ def with_streaming_response(self) -> AsyncVolumesResourceWithStreamingResponse:
816
+ """
817
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
818
+
819
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
820
+ """
821
+ return AsyncVolumesResourceWithStreamingResponse(self)
822
+
823
+ @overload
824
+ async def create(
825
+ self,
826
+ *,
827
+ project_id: int | None = None,
828
+ region_id: int | None = None,
829
+ image_id: str,
830
+ name: str,
831
+ size: int,
832
+ source: Literal["image"],
833
+ attachment_tag: str | NotGiven = NOT_GIVEN,
834
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
835
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
836
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
837
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
838
+ | NotGiven = NOT_GIVEN,
839
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
840
+ # The extra values given here take precedence over values defined on the client or passed to this method.
841
+ extra_headers: Headers | None = None,
842
+ extra_query: Query | None = None,
843
+ extra_body: Body | None = None,
844
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
845
+ ) -> TaskIDList:
846
+ """
847
+ Create volume
848
+
849
+ Args:
850
+ project_id: Project ID
851
+
852
+ region_id: Region ID
853
+
854
+ image_id: Image ID
855
+
856
+ name: Volume name
857
+
858
+ size: Volume size in GiB
859
+
860
+ source: Volume source type
861
+
862
+ attachment_tag: Block device attachment tag (not exposed in the user tags). Only used in
863
+ conjunction with instance_id_to_attach_to
864
+
865
+ instance_id_to_attach_to: instance_id to attach newly-created volume to
866
+
867
+ lifecycle_policy_ids: List of lifecycle policy IDs (snapshot creation schedules) to associate with the
868
+ volume
869
+
870
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
871
+ can be associated with a resource, enabling efficient filtering and grouping for
872
+ better organization and management. Some tags are read-only and cannot be
873
+ modified by the user. Tags are also integrated with cost reports, allowing cost
874
+ data to be filtered based on tag keys or values.
875
+
876
+ type_name: Volume type. Defaults to `standard`. If not specified for source `snapshot`,
877
+ volume type will be derived from the snapshot volume.
878
+
879
+ extra_headers: Send extra headers
880
+
881
+ extra_query: Add additional query parameters to the request
882
+
883
+ extra_body: Add additional JSON properties to the request
884
+
885
+ timeout: Override the client-level default timeout for this request, in seconds
886
+ """
887
+ ...
888
+
889
+ @overload
890
+ async def create(
891
+ self,
892
+ *,
893
+ project_id: int | None = None,
894
+ region_id: int | None = None,
895
+ name: str,
896
+ snapshot_id: str,
897
+ source: Literal["snapshot"],
898
+ attachment_tag: str | NotGiven = NOT_GIVEN,
899
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
900
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
901
+ size: int | NotGiven = NOT_GIVEN,
902
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
903
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
904
+ | NotGiven = NOT_GIVEN,
905
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
906
+ # The extra values given here take precedence over values defined on the client or passed to this method.
907
+ extra_headers: Headers | None = None,
908
+ extra_query: Query | None = None,
909
+ extra_body: Body | None = None,
910
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
911
+ ) -> TaskIDList:
912
+ """
913
+ Create volume
914
+
915
+ Args:
916
+ project_id: Project ID
917
+
918
+ region_id: Region ID
919
+
920
+ name: Volume name
921
+
922
+ snapshot_id: Snapshot ID
923
+
924
+ source: Volume source type
925
+
926
+ attachment_tag: Block device attachment tag (not exposed in the user tags). Only used in
927
+ conjunction with instance_id_to_attach_to
928
+
929
+ instance_id_to_attach_to: instance_id to attach newly-created volume to
930
+
931
+ lifecycle_policy_ids: List of lifecycle policy IDs (snapshot creation schedules) to associate with the
932
+ volume
933
+
934
+ size: Volume size in GiB. If specified, value must be equal to respective snapshot
935
+ size
936
+
937
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
938
+ can be associated with a resource, enabling efficient filtering and grouping for
939
+ better organization and management. Some tags are read-only and cannot be
940
+ modified by the user. Tags are also integrated with cost reports, allowing cost
941
+ data to be filtered based on tag keys or values.
942
+
943
+ type_name: Volume type. Defaults to `standard`. If not specified for source `snapshot`,
944
+ volume type will be derived from the snapshot volume.
945
+
946
+ extra_headers: Send extra headers
947
+
948
+ extra_query: Add additional query parameters to the request
949
+
950
+ extra_body: Add additional JSON properties to the request
951
+
952
+ timeout: Override the client-level default timeout for this request, in seconds
953
+ """
954
+ ...
955
+
956
+ @overload
957
+ async def create(
958
+ self,
959
+ *,
960
+ project_id: int | None = None,
961
+ region_id: int | None = None,
962
+ name: str,
963
+ size: int,
964
+ source: Literal["new-volume"],
965
+ attachment_tag: str | NotGiven = NOT_GIVEN,
966
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
967
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
968
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
969
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
970
+ | NotGiven = NOT_GIVEN,
971
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
972
+ # The extra values given here take precedence over values defined on the client or passed to this method.
973
+ extra_headers: Headers | None = None,
974
+ extra_query: Query | None = None,
975
+ extra_body: Body | None = None,
976
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
977
+ ) -> TaskIDList:
978
+ """
979
+ Create volume
980
+
981
+ Args:
982
+ project_id: Project ID
983
+
984
+ region_id: Region ID
985
+
986
+ name: Volume name
987
+
988
+ size: Volume size in GiB
989
+
990
+ source: Volume source type
991
+
992
+ attachment_tag: Block device attachment tag (not exposed in the user tags). Only used in
993
+ conjunction with instance_id_to_attach_to
994
+
995
+ instance_id_to_attach_to: instance_id to attach newly-created volume to
996
+
997
+ lifecycle_policy_ids: List of lifecycle policy IDs (snapshot creation schedules) to associate with the
998
+ volume
999
+
1000
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
1001
+ can be associated with a resource, enabling efficient filtering and grouping for
1002
+ better organization and management. Some tags are read-only and cannot be
1003
+ modified by the user. Tags are also integrated with cost reports, allowing cost
1004
+ data to be filtered based on tag keys or values.
1005
+
1006
+ type_name: Volume type. Defaults to `standard`. If not specified for source `snapshot`,
1007
+ volume type will be derived from the snapshot volume.
1008
+
1009
+ extra_headers: Send extra headers
1010
+
1011
+ extra_query: Add additional query parameters to the request
1012
+
1013
+ extra_body: Add additional JSON properties to the request
1014
+
1015
+ timeout: Override the client-level default timeout for this request, in seconds
1016
+ """
1017
+ ...
1018
+
1019
+ @required_args(
1020
+ ["image_id", "name", "size", "source"], ["name", "snapshot_id", "source"], ["name", "size", "source"]
1021
+ )
1022
+ async def create(
1023
+ self,
1024
+ *,
1025
+ project_id: int | None = None,
1026
+ region_id: int | None = None,
1027
+ image_id: str | NotGiven = NOT_GIVEN,
1028
+ name: str,
1029
+ size: int | NotGiven = NOT_GIVEN,
1030
+ source: Literal["image"] | Literal["snapshot"] | Literal["new-volume"],
1031
+ attachment_tag: str | NotGiven = NOT_GIVEN,
1032
+ instance_id_to_attach_to: str | NotGiven = NOT_GIVEN,
1033
+ lifecycle_policy_ids: Iterable[int] | NotGiven = NOT_GIVEN,
1034
+ tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
1035
+ type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"]
1036
+ | NotGiven = NOT_GIVEN,
1037
+ snapshot_id: str | NotGiven = NOT_GIVEN,
1038
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1039
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1040
+ extra_headers: Headers | None = None,
1041
+ extra_query: Query | None = None,
1042
+ extra_body: Body | None = None,
1043
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1044
+ ) -> TaskIDList:
1045
+ if project_id is None:
1046
+ project_id = self._client._get_cloud_project_id_path_param()
1047
+ if region_id is None:
1048
+ region_id = self._client._get_cloud_region_id_path_param()
1049
+ return await self._post(
1050
+ f"/cloud/v1/volumes/{project_id}/{region_id}",
1051
+ body=await async_maybe_transform(
1052
+ {
1053
+ "image_id": image_id,
1054
+ "name": name,
1055
+ "size": size,
1056
+ "source": source,
1057
+ "attachment_tag": attachment_tag,
1058
+ "instance_id_to_attach_to": instance_id_to_attach_to,
1059
+ "lifecycle_policy_ids": lifecycle_policy_ids,
1060
+ "tags": tags,
1061
+ "type_name": type_name,
1062
+ "snapshot_id": snapshot_id,
1063
+ },
1064
+ volume_create_params.VolumeCreateParams,
1065
+ ),
1066
+ options=make_request_options(
1067
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1068
+ ),
1069
+ cast_to=TaskIDList,
1070
+ )
1071
+
1072
+ async def update(
1073
+ self,
1074
+ volume_id: str,
1075
+ *,
1076
+ project_id: int | None = None,
1077
+ region_id: int | None = None,
1078
+ name: str,
1079
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1080
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1081
+ extra_headers: Headers | None = None,
1082
+ extra_query: Query | None = None,
1083
+ extra_body: Body | None = None,
1084
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1085
+ ) -> Volume:
1086
+ """
1087
+ Rename volume
1088
+
1089
+ Args:
1090
+ project_id: Project ID
1091
+
1092
+ region_id: Region ID
1093
+
1094
+ volume_id: Volume ID
1095
+
1096
+ name: Name.
1097
+
1098
+ extra_headers: Send extra headers
1099
+
1100
+ extra_query: Add additional query parameters to the request
1101
+
1102
+ extra_body: Add additional JSON properties to the request
1103
+
1104
+ timeout: Override the client-level default timeout for this request, in seconds
1105
+ """
1106
+ if project_id is None:
1107
+ project_id = self._client._get_cloud_project_id_path_param()
1108
+ if region_id is None:
1109
+ region_id = self._client._get_cloud_region_id_path_param()
1110
+ if not volume_id:
1111
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1112
+ return await self._patch(
1113
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}",
1114
+ body=await async_maybe_transform({"name": name}, volume_update_params.VolumeUpdateParams),
1115
+ options=make_request_options(
1116
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1117
+ ),
1118
+ cast_to=Volume,
1119
+ )
1120
+
1121
+ def list(
1122
+ self,
1123
+ *,
1124
+ project_id: int | None = None,
1125
+ region_id: int | None = None,
1126
+ bootable: bool | NotGiven = NOT_GIVEN,
1127
+ cluster_id: str | NotGiven = NOT_GIVEN,
1128
+ has_attachments: bool | NotGiven = NOT_GIVEN,
1129
+ id_part: str | NotGiven = NOT_GIVEN,
1130
+ instance_id: str | NotGiven = NOT_GIVEN,
1131
+ limit: int | NotGiven = NOT_GIVEN,
1132
+ name_part: str | NotGiven = NOT_GIVEN,
1133
+ offset: int | NotGiven = NOT_GIVEN,
1134
+ tag_key: List[str] | NotGiven = NOT_GIVEN,
1135
+ tag_key_value: str | NotGiven = NOT_GIVEN,
1136
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1137
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1138
+ extra_headers: Headers | None = None,
1139
+ extra_query: Query | None = None,
1140
+ extra_body: Body | None = None,
1141
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1142
+ ) -> AsyncPaginator[Volume, AsyncOffsetPage[Volume]]:
1143
+ """
1144
+ List volumes
1145
+
1146
+ Args:
1147
+ project_id: Project ID
1148
+
1149
+ region_id: Region ID
1150
+
1151
+ bootable: Filter by bootable field
1152
+
1153
+ cluster_id: Filter volumes by k8s cluster ID
1154
+
1155
+ has_attachments: Filter by the presence of attachments
1156
+
1157
+ id_part: Filter the volume list result by the ID part of the volume
1158
+
1159
+ instance_id: Filter volumes by instance ID
1160
+
1161
+ limit: Optional. Limit the number of returned items
1162
+
1163
+ name_part: Filter volumes by name_part inclusion in volume name.Any substring can be used
1164
+ and volumes will be returned with names containing the substring.
1165
+
1166
+ offset: Optional. Offset value is used to exclude the first set of records from the
1167
+ result
1168
+
1169
+ tag_key: Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
1170
+
1171
+ tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
1172
+ "tag_key_value={"key": "value"}" --url
1173
+ "https://example.com/cloud/v1/resource/1/1"
1174
+
1175
+ extra_headers: Send extra headers
1176
+
1177
+ extra_query: Add additional query parameters to the request
1178
+
1179
+ extra_body: Add additional JSON properties to the request
1180
+
1181
+ timeout: Override the client-level default timeout for this request, in seconds
1182
+ """
1183
+ if project_id is None:
1184
+ project_id = self._client._get_cloud_project_id_path_param()
1185
+ if region_id is None:
1186
+ region_id = self._client._get_cloud_region_id_path_param()
1187
+ return self._get_api_list(
1188
+ f"/cloud/v1/volumes/{project_id}/{region_id}",
1189
+ page=AsyncOffsetPage[Volume],
1190
+ options=make_request_options(
1191
+ extra_headers=extra_headers,
1192
+ extra_query=extra_query,
1193
+ extra_body=extra_body,
1194
+ timeout=timeout,
1195
+ query=maybe_transform(
1196
+ {
1197
+ "bootable": bootable,
1198
+ "cluster_id": cluster_id,
1199
+ "has_attachments": has_attachments,
1200
+ "id_part": id_part,
1201
+ "instance_id": instance_id,
1202
+ "limit": limit,
1203
+ "name_part": name_part,
1204
+ "offset": offset,
1205
+ "tag_key": tag_key,
1206
+ "tag_key_value": tag_key_value,
1207
+ },
1208
+ volume_list_params.VolumeListParams,
1209
+ ),
1210
+ ),
1211
+ model=Volume,
1212
+ )
1213
+
1214
+ async def delete(
1215
+ self,
1216
+ volume_id: str,
1217
+ *,
1218
+ project_id: int | None = None,
1219
+ region_id: int | None = None,
1220
+ snapshots: str | NotGiven = NOT_GIVEN,
1221
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1222
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1223
+ extra_headers: Headers | None = None,
1224
+ extra_query: Query | None = None,
1225
+ extra_body: Body | None = None,
1226
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1227
+ ) -> TaskIDList:
1228
+ """
1229
+ Delete volume
1230
+
1231
+ Args:
1232
+ project_id: Project ID
1233
+
1234
+ region_id: Region ID
1235
+
1236
+ volume_id: Volume ID
1237
+
1238
+ snapshots: Comma separated list of snapshot IDs to be deleted with the volume.
1239
+
1240
+ extra_headers: Send extra headers
1241
+
1242
+ extra_query: Add additional query parameters to the request
1243
+
1244
+ extra_body: Add additional JSON properties to the request
1245
+
1246
+ timeout: Override the client-level default timeout for this request, in seconds
1247
+ """
1248
+ if project_id is None:
1249
+ project_id = self._client._get_cloud_project_id_path_param()
1250
+ if region_id is None:
1251
+ region_id = self._client._get_cloud_region_id_path_param()
1252
+ if not volume_id:
1253
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1254
+ return await self._delete(
1255
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}",
1256
+ options=make_request_options(
1257
+ extra_headers=extra_headers,
1258
+ extra_query=extra_query,
1259
+ extra_body=extra_body,
1260
+ timeout=timeout,
1261
+ query=await async_maybe_transform({"snapshots": snapshots}, volume_delete_params.VolumeDeleteParams),
1262
+ ),
1263
+ cast_to=TaskIDList,
1264
+ )
1265
+
1266
+ async def attach_to_instance(
1267
+ self,
1268
+ volume_id: str,
1269
+ *,
1270
+ project_id: int | None = None,
1271
+ region_id: int | None = None,
1272
+ instance_id: str,
1273
+ attachment_tag: str | NotGiven = NOT_GIVEN,
1274
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1275
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1276
+ extra_headers: Headers | None = None,
1277
+ extra_query: Query | None = None,
1278
+ extra_body: Body | None = None,
1279
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1280
+ ) -> TaskIDList:
1281
+ """Attach the volume to instance.
1282
+
1283
+ Note: ultra volume can only be attached to an
1284
+ instance with shared flavor
1285
+
1286
+ Args:
1287
+ project_id: Project ID
1288
+
1289
+ region_id: Region ID
1290
+
1291
+ volume_id: Volume ID
1292
+
1293
+ instance_id: Instance ID.
1294
+
1295
+ attachment_tag: Block device attachment tag (not exposed in the normal tags).
1296
+
1297
+ extra_headers: Send extra headers
1298
+
1299
+ extra_query: Add additional query parameters to the request
1300
+
1301
+ extra_body: Add additional JSON properties to the request
1302
+
1303
+ timeout: Override the client-level default timeout for this request, in seconds
1304
+ """
1305
+ if project_id is None:
1306
+ project_id = self._client._get_cloud_project_id_path_param()
1307
+ if region_id is None:
1308
+ region_id = self._client._get_cloud_region_id_path_param()
1309
+ if not volume_id:
1310
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1311
+ return await self._post(
1312
+ f"/cloud/v2/volumes/{project_id}/{region_id}/{volume_id}/attach",
1313
+ body=await async_maybe_transform(
1314
+ {
1315
+ "instance_id": instance_id,
1316
+ "attachment_tag": attachment_tag,
1317
+ },
1318
+ volume_attach_to_instance_params.VolumeAttachToInstanceParams,
1319
+ ),
1320
+ options=make_request_options(
1321
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1322
+ ),
1323
+ cast_to=TaskIDList,
1324
+ )
1325
+
1326
+ async def change_type(
1327
+ self,
1328
+ volume_id: str,
1329
+ *,
1330
+ project_id: int | None = None,
1331
+ region_id: int | None = None,
1332
+ volume_type: Literal["ssd_hiiops", "standard"],
1333
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1334
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1335
+ extra_headers: Headers | None = None,
1336
+ extra_query: Query | None = None,
1337
+ extra_body: Body | None = None,
1338
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1339
+ ) -> Volume:
1340
+ """
1341
+ Change volume type
1342
+
1343
+ Args:
1344
+ project_id: Project ID
1345
+
1346
+ region_id: Region ID
1347
+
1348
+ volume_id: Volume ID
1349
+
1350
+ volume_type: New volume type name
1351
+
1352
+ extra_headers: Send extra headers
1353
+
1354
+ extra_query: Add additional query parameters to the request
1355
+
1356
+ extra_body: Add additional JSON properties to the request
1357
+
1358
+ timeout: Override the client-level default timeout for this request, in seconds
1359
+ """
1360
+ if project_id is None:
1361
+ project_id = self._client._get_cloud_project_id_path_param()
1362
+ if region_id is None:
1363
+ region_id = self._client._get_cloud_region_id_path_param()
1364
+ if not volume_id:
1365
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1366
+ return await self._post(
1367
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}/retype",
1368
+ body=await async_maybe_transform(
1369
+ {"volume_type": volume_type}, volume_change_type_params.VolumeChangeTypeParams
1370
+ ),
1371
+ options=make_request_options(
1372
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1373
+ ),
1374
+ cast_to=Volume,
1375
+ )
1376
+
1377
+ async def detach_from_instance(
1378
+ self,
1379
+ volume_id: str,
1380
+ *,
1381
+ project_id: int | None = None,
1382
+ region_id: int | None = None,
1383
+ instance_id: str,
1384
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1385
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1386
+ extra_headers: Headers | None = None,
1387
+ extra_query: Query | None = None,
1388
+ extra_body: Body | None = None,
1389
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1390
+ ) -> TaskIDList:
1391
+ """
1392
+ Detach the volume from instance
1393
+
1394
+ Args:
1395
+ project_id: Project ID
1396
+
1397
+ region_id: Region ID
1398
+
1399
+ volume_id: Volume ID
1400
+
1401
+ instance_id: Instance ID
1402
+
1403
+ extra_headers: Send extra headers
1404
+
1405
+ extra_query: Add additional query parameters to the request
1406
+
1407
+ extra_body: Add additional JSON properties to the request
1408
+
1409
+ timeout: Override the client-level default timeout for this request, in seconds
1410
+ """
1411
+ if project_id is None:
1412
+ project_id = self._client._get_cloud_project_id_path_param()
1413
+ if region_id is None:
1414
+ region_id = self._client._get_cloud_region_id_path_param()
1415
+ if not volume_id:
1416
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1417
+ return await self._post(
1418
+ f"/cloud/v2/volumes/{project_id}/{region_id}/{volume_id}/detach",
1419
+ body=await async_maybe_transform(
1420
+ {"instance_id": instance_id}, volume_detach_from_instance_params.VolumeDetachFromInstanceParams
1421
+ ),
1422
+ options=make_request_options(
1423
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1424
+ ),
1425
+ cast_to=TaskIDList,
1426
+ )
1427
+
1428
+ async def get(
1429
+ self,
1430
+ volume_id: str,
1431
+ *,
1432
+ project_id: int | None = None,
1433
+ region_id: int | None = None,
1434
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1435
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1436
+ extra_headers: Headers | None = None,
1437
+ extra_query: Query | None = None,
1438
+ extra_body: Body | None = None,
1439
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1440
+ ) -> Volume:
1441
+ """
1442
+ Get volume
1443
+
1444
+ Args:
1445
+ project_id: Project ID
1446
+
1447
+ region_id: Region ID
1448
+
1449
+ volume_id: Volume ID
1450
+
1451
+ extra_headers: Send extra headers
1452
+
1453
+ extra_query: Add additional query parameters to the request
1454
+
1455
+ extra_body: Add additional JSON properties to the request
1456
+
1457
+ timeout: Override the client-level default timeout for this request, in seconds
1458
+ """
1459
+ if project_id is None:
1460
+ project_id = self._client._get_cloud_project_id_path_param()
1461
+ if region_id is None:
1462
+ region_id = self._client._get_cloud_region_id_path_param()
1463
+ if not volume_id:
1464
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1465
+ return await self._get(
1466
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}",
1467
+ options=make_request_options(
1468
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1469
+ ),
1470
+ cast_to=Volume,
1471
+ )
1472
+
1473
+ async def resize(
1474
+ self,
1475
+ volume_id: str,
1476
+ *,
1477
+ project_id: int | None = None,
1478
+ region_id: int | None = None,
1479
+ size: int,
1480
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1481
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1482
+ extra_headers: Headers | None = None,
1483
+ extra_query: Query | None = None,
1484
+ extra_body: Body | None = None,
1485
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1486
+ ) -> TaskIDList:
1487
+ """
1488
+ Extend volume
1489
+
1490
+ Args:
1491
+ project_id: Project ID
1492
+
1493
+ region_id: Region ID
1494
+
1495
+ volume_id: Volume ID
1496
+
1497
+ size: New volume size in GiB
1498
+
1499
+ extra_headers: Send extra headers
1500
+
1501
+ extra_query: Add additional query parameters to the request
1502
+
1503
+ extra_body: Add additional JSON properties to the request
1504
+
1505
+ timeout: Override the client-level default timeout for this request, in seconds
1506
+ """
1507
+ if project_id is None:
1508
+ project_id = self._client._get_cloud_project_id_path_param()
1509
+ if region_id is None:
1510
+ region_id = self._client._get_cloud_region_id_path_param()
1511
+ if not volume_id:
1512
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1513
+ return await self._post(
1514
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}/extend",
1515
+ body=await async_maybe_transform({"size": size}, volume_resize_params.VolumeResizeParams),
1516
+ options=make_request_options(
1517
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1518
+ ),
1519
+ cast_to=TaskIDList,
1520
+ )
1521
+
1522
+ async def revert_to_last_snapshot(
1523
+ self,
1524
+ volume_id: str,
1525
+ *,
1526
+ project_id: int | None = None,
1527
+ region_id: int | None = None,
1528
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1529
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1530
+ extra_headers: Headers | None = None,
1531
+ extra_query: Query | None = None,
1532
+ extra_body: Body | None = None,
1533
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1534
+ ) -> None:
1535
+ """
1536
+ Revert volume to it's last snapshot
1537
+
1538
+ Args:
1539
+ project_id: Project ID
1540
+
1541
+ region_id: Region ID
1542
+
1543
+ volume_id: Volume ID
1544
+
1545
+ extra_headers: Send extra headers
1546
+
1547
+ extra_query: Add additional query parameters to the request
1548
+
1549
+ extra_body: Add additional JSON properties to the request
1550
+
1551
+ timeout: Override the client-level default timeout for this request, in seconds
1552
+ """
1553
+ if project_id is None:
1554
+ project_id = self._client._get_cloud_project_id_path_param()
1555
+ if region_id is None:
1556
+ region_id = self._client._get_cloud_region_id_path_param()
1557
+ if not volume_id:
1558
+ raise ValueError(f"Expected a non-empty value for `volume_id` but received {volume_id!r}")
1559
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
1560
+ return await self._post(
1561
+ f"/cloud/v1/volumes/{project_id}/{region_id}/{volume_id}/revert",
1562
+ options=make_request_options(
1563
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1564
+ ),
1565
+ cast_to=NoneType,
1566
+ )
1567
+
1568
+
1569
+ class VolumesResourceWithRawResponse:
1570
+ def __init__(self, volumes: VolumesResource) -> None:
1571
+ self._volumes = volumes
1572
+
1573
+ self.create = to_raw_response_wrapper(
1574
+ volumes.create,
1575
+ )
1576
+ self.update = to_raw_response_wrapper(
1577
+ volumes.update,
1578
+ )
1579
+ self.list = to_raw_response_wrapper(
1580
+ volumes.list,
1581
+ )
1582
+ self.delete = to_raw_response_wrapper(
1583
+ volumes.delete,
1584
+ )
1585
+ self.attach_to_instance = to_raw_response_wrapper(
1586
+ volumes.attach_to_instance,
1587
+ )
1588
+ self.change_type = to_raw_response_wrapper(
1589
+ volumes.change_type,
1590
+ )
1591
+ self.detach_from_instance = to_raw_response_wrapper(
1592
+ volumes.detach_from_instance,
1593
+ )
1594
+ self.get = to_raw_response_wrapper(
1595
+ volumes.get,
1596
+ )
1597
+ self.resize = to_raw_response_wrapper(
1598
+ volumes.resize,
1599
+ )
1600
+ self.revert_to_last_snapshot = to_raw_response_wrapper(
1601
+ volumes.revert_to_last_snapshot,
1602
+ )
1603
+
1604
+
1605
+ class AsyncVolumesResourceWithRawResponse:
1606
+ def __init__(self, volumes: AsyncVolumesResource) -> None:
1607
+ self._volumes = volumes
1608
+
1609
+ self.create = async_to_raw_response_wrapper(
1610
+ volumes.create,
1611
+ )
1612
+ self.update = async_to_raw_response_wrapper(
1613
+ volumes.update,
1614
+ )
1615
+ self.list = async_to_raw_response_wrapper(
1616
+ volumes.list,
1617
+ )
1618
+ self.delete = async_to_raw_response_wrapper(
1619
+ volumes.delete,
1620
+ )
1621
+ self.attach_to_instance = async_to_raw_response_wrapper(
1622
+ volumes.attach_to_instance,
1623
+ )
1624
+ self.change_type = async_to_raw_response_wrapper(
1625
+ volumes.change_type,
1626
+ )
1627
+ self.detach_from_instance = async_to_raw_response_wrapper(
1628
+ volumes.detach_from_instance,
1629
+ )
1630
+ self.get = async_to_raw_response_wrapper(
1631
+ volumes.get,
1632
+ )
1633
+ self.resize = async_to_raw_response_wrapper(
1634
+ volumes.resize,
1635
+ )
1636
+ self.revert_to_last_snapshot = async_to_raw_response_wrapper(
1637
+ volumes.revert_to_last_snapshot,
1638
+ )
1639
+
1640
+
1641
+ class VolumesResourceWithStreamingResponse:
1642
+ def __init__(self, volumes: VolumesResource) -> None:
1643
+ self._volumes = volumes
1644
+
1645
+ self.create = to_streamed_response_wrapper(
1646
+ volumes.create,
1647
+ )
1648
+ self.update = to_streamed_response_wrapper(
1649
+ volumes.update,
1650
+ )
1651
+ self.list = to_streamed_response_wrapper(
1652
+ volumes.list,
1653
+ )
1654
+ self.delete = to_streamed_response_wrapper(
1655
+ volumes.delete,
1656
+ )
1657
+ self.attach_to_instance = to_streamed_response_wrapper(
1658
+ volumes.attach_to_instance,
1659
+ )
1660
+ self.change_type = to_streamed_response_wrapper(
1661
+ volumes.change_type,
1662
+ )
1663
+ self.detach_from_instance = to_streamed_response_wrapper(
1664
+ volumes.detach_from_instance,
1665
+ )
1666
+ self.get = to_streamed_response_wrapper(
1667
+ volumes.get,
1668
+ )
1669
+ self.resize = to_streamed_response_wrapper(
1670
+ volumes.resize,
1671
+ )
1672
+ self.revert_to_last_snapshot = to_streamed_response_wrapper(
1673
+ volumes.revert_to_last_snapshot,
1674
+ )
1675
+
1676
+
1677
+ class AsyncVolumesResourceWithStreamingResponse:
1678
+ def __init__(self, volumes: AsyncVolumesResource) -> None:
1679
+ self._volumes = volumes
1680
+
1681
+ self.create = async_to_streamed_response_wrapper(
1682
+ volumes.create,
1683
+ )
1684
+ self.update = async_to_streamed_response_wrapper(
1685
+ volumes.update,
1686
+ )
1687
+ self.list = async_to_streamed_response_wrapper(
1688
+ volumes.list,
1689
+ )
1690
+ self.delete = async_to_streamed_response_wrapper(
1691
+ volumes.delete,
1692
+ )
1693
+ self.attach_to_instance = async_to_streamed_response_wrapper(
1694
+ volumes.attach_to_instance,
1695
+ )
1696
+ self.change_type = async_to_streamed_response_wrapper(
1697
+ volumes.change_type,
1698
+ )
1699
+ self.detach_from_instance = async_to_streamed_response_wrapper(
1700
+ volumes.detach_from_instance,
1701
+ )
1702
+ self.get = async_to_streamed_response_wrapper(
1703
+ volumes.get,
1704
+ )
1705
+ self.resize = async_to_streamed_response_wrapper(
1706
+ volumes.resize,
1707
+ )
1708
+ self.revert_to_last_snapshot = async_to_streamed_response_wrapper(
1709
+ volumes.revert_to_last_snapshot,
1710
+ )