hyperstack-async 1.55.1a0__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.
Files changed (415) hide show
  1. hyperstack_async/__init__.py +434 -0
  2. hyperstack_async/api/__init__.py +60 -0
  3. hyperstack_async/api/access_keys_api.py +885 -0
  4. hyperstack_async/api/alive_api.py +510 -0
  5. hyperstack_async/api/api_key_api.py +1158 -0
  6. hyperstack_async/api/assigning_member_role_api.py +613 -0
  7. hyperstack_async/api/auth_api.py +1340 -0
  8. hyperstack_async/api/auto_topup_api.py +1376 -0
  9. hyperstack_async/api/beta_access_api.py +856 -0
  10. hyperstack_async/api/billing_api.py +12701 -0
  11. hyperstack_async/api/buckets_api.py +865 -0
  12. hyperstack_async/api/calculate_api.py +325 -0
  13. hyperstack_async/api/callbacks_api.py +1789 -0
  14. hyperstack_async/api/cluster_events_api.py +307 -0
  15. hyperstack_async/api/clusters_api.py +4884 -0
  16. hyperstack_async/api/compliance_api.py +1165 -0
  17. hyperstack_async/api/credit_api.py +297 -0
  18. hyperstack_async/api/customer_contract_api.py +919 -0
  19. hyperstack_async/api/dashboard_api.py +291 -0
  20. hyperstack_async/api/deployment_api.py +1118 -0
  21. hyperstack_async/api/email_opt_in_out_api.py +875 -0
  22. hyperstack_async/api/environment_api.py +2033 -0
  23. hyperstack_async/api/fip_exclusions_api.py +313 -0
  24. hyperstack_async/api/firewall_attachment_api.py +345 -0
  25. hyperstack_async/api/firewalls_api.py +1813 -0
  26. hyperstack_async/api/flavor_api.py +314 -0
  27. hyperstack_async/api/floating_ip_api.py +586 -0
  28. hyperstack_async/api/gpu_api.py +291 -0
  29. hyperstack_async/api/health_api.py +282 -0
  30. hyperstack_async/api/image_api.py +1224 -0
  31. hyperstack_async/api/invite_api.py +1127 -0
  32. hyperstack_async/api/keypair_api.py +1463 -0
  33. hyperstack_async/api/organization_api.py +861 -0
  34. hyperstack_async/api/partner_config_api.py +566 -0
  35. hyperstack_async/api/payment_api.py +865 -0
  36. hyperstack_async/api/permission_api.py +291 -0
  37. hyperstack_async/api/policy_api.py +291 -0
  38. hyperstack_async/api/pricebook_api.py +295 -0
  39. hyperstack_async/api/profile_api.py +1127 -0
  40. hyperstack_async/api/rbac_role_api.py +1429 -0
  41. hyperstack_async/api/region_api.py +291 -0
  42. hyperstack_async/api/regions_api.py +282 -0
  43. hyperstack_async/api/security_rules_api.py +291 -0
  44. hyperstack_async/api/snapshot_events_api.py +290 -0
  45. hyperstack_async/api/snapshots_api.py +1773 -0
  46. hyperstack_async/api/stock_api.py +291 -0
  47. hyperstack_async/api/template_api.py +1492 -0
  48. hyperstack_async/api/user_api.py +1130 -0
  49. hyperstack_async/api/user_consent_api.py +1416 -0
  50. hyperstack_async/api/user_consent_events_api.py +307 -0
  51. hyperstack_async/api/user_detail_choice_api.py +294 -0
  52. hyperstack_async/api/user_permission_api.py +565 -0
  53. hyperstack_async/api/virtual_machine_api.py +6246 -0
  54. hyperstack_async/api/virtual_machine_events_api.py +310 -0
  55. hyperstack_async/api/vnc_url_api.py +599 -0
  56. hyperstack_async/api/volume_api.py +2042 -0
  57. hyperstack_async/api/volume_attachment_api.py +950 -0
  58. hyperstack_async/api/vouchers_api.py +326 -0
  59. hyperstack_async/api_client.py +800 -0
  60. hyperstack_async/api_response.py +21 -0
  61. hyperstack_async/configuration.py +591 -0
  62. hyperstack_async/exceptions.py +199 -0
  63. hyperstack_async/models/__init__.py +362 -0
  64. hyperstack_async/models/access_token_field.py +100 -0
  65. hyperstack_async/models/add_user_info_success_response_model.py +108 -0
  66. hyperstack_async/models/allocated_gpu_count_graph.py +102 -0
  67. hyperstack_async/models/allowed_countries_response.py +102 -0
  68. hyperstack_async/models/api_key_fields.py +109 -0
  69. hyperstack_async/models/assign_rbac_role_payload.py +100 -0
  70. hyperstack_async/models/attach_callback_payload.py +100 -0
  71. hyperstack_async/models/attach_callback_response.py +104 -0
  72. hyperstack_async/models/attach_firewall_with_vm.py +100 -0
  73. hyperstack_async/models/attach_firewalls_to_vm_payload.py +100 -0
  74. hyperstack_async/models/attach_volume_fields.py +113 -0
  75. hyperstack_async/models/attach_volumes.py +112 -0
  76. hyperstack_async/models/attach_volumes_payload.py +102 -0
  77. hyperstack_async/models/attachments_fields_for_volume.py +108 -0
  78. hyperstack_async/models/attributes.py +110 -0
  79. hyperstack_async/models/auth_get_token_response_model.py +108 -0
  80. hyperstack_async/models/auth_user_fields.py +107 -0
  81. hyperstack_async/models/auth_user_info_response_model.py +108 -0
  82. hyperstack_async/models/auto_topup.py +108 -0
  83. hyperstack_async/models/auto_topup_error_response.py +104 -0
  84. hyperstack_async/models/auto_topup_status_schema.py +104 -0
  85. hyperstack_async/models/beta_access_request_fields.py +121 -0
  86. hyperstack_async/models/beta_access_request_payload.py +102 -0
  87. hyperstack_async/models/beta_access_request_response_model.py +108 -0
  88. hyperstack_async/models/beta_access_status_item.py +115 -0
  89. hyperstack_async/models/beta_access_status_response_model.py +112 -0
  90. hyperstack_async/models/billing_history.py +110 -0
  91. hyperstack_async/models/billing_history_data_synthesis_details.py +118 -0
  92. hyperstack_async/models/billing_history_fine_tuning.py +118 -0
  93. hyperstack_async/models/billing_history_image_generation_details.py +118 -0
  94. hyperstack_async/models/billing_history_model_evalutation_details.py +118 -0
  95. hyperstack_async/models/billing_history_serverless_inference.py +118 -0
  96. hyperstack_async/models/billing_history_serverless_inference_details.py +118 -0
  97. hyperstack_async/models/billing_metrices_fields.py +121 -0
  98. hyperstack_async/models/billing_metrices_response.py +112 -0
  99. hyperstack_async/models/cluster_events.py +112 -0
  100. hyperstack_async/models/cluster_events_fields.py +117 -0
  101. hyperstack_async/models/cluster_fields.py +147 -0
  102. hyperstack_async/models/cluster_flavor_fields.py +126 -0
  103. hyperstack_async/models/cluster_list_response.py +112 -0
  104. hyperstack_async/models/cluster_node_fields.py +125 -0
  105. hyperstack_async/models/cluster_node_group_fields.py +133 -0
  106. hyperstack_async/models/cluster_node_group_firewall_fields.py +104 -0
  107. hyperstack_async/models/cluster_node_groups_create_response.py +118 -0
  108. hyperstack_async/models/cluster_node_groups_get_response.py +108 -0
  109. hyperstack_async/models/cluster_node_groups_list_response.py +112 -0
  110. hyperstack_async/models/cluster_node_instance_fields.py +114 -0
  111. hyperstack_async/models/cluster_nodes_list_response.py +112 -0
  112. hyperstack_async/models/cluster_response.py +108 -0
  113. hyperstack_async/models/cluster_version.py +111 -0
  114. hyperstack_async/models/cluster_versions.py +112 -0
  115. hyperstack_async/models/colors.py +110 -0
  116. hyperstack_async/models/common_response_model.py +102 -0
  117. hyperstack_async/models/compatible_flavor.py +108 -0
  118. hyperstack_async/models/compliance_fields.py +106 -0
  119. hyperstack_async/models/compliance_model_fields.py +112 -0
  120. hyperstack_async/models/compliance_payload.py +110 -0
  121. hyperstack_async/models/compliance_response.py +108 -0
  122. hyperstack_async/models/consent_action_response.py +106 -0
  123. hyperstack_async/models/consent_block.py +112 -0
  124. hyperstack_async/models/consent_events_response.py +114 -0
  125. hyperstack_async/models/consent_template.py +110 -0
  126. hyperstack_async/models/consent_templates_response.py +100 -0
  127. hyperstack_async/models/container_overview_fields.py +108 -0
  128. hyperstack_async/models/contract.py +118 -0
  129. hyperstack_async/models/contract_discount_plan_fields.py +118 -0
  130. hyperstack_async/models/contract_gpu_allocation_graph_response.py +108 -0
  131. hyperstack_async/models/contract_instance_fields.py +121 -0
  132. hyperstack_async/models/contract_instances_response.py +112 -0
  133. hyperstack_async/models/create_auto_topup_payload.py +102 -0
  134. hyperstack_async/models/create_auto_topup_response.py +108 -0
  135. hyperstack_async/models/create_cluster_node_fields.py +115 -0
  136. hyperstack_async/models/create_cluster_node_group_payload.py +120 -0
  137. hyperstack_async/models/create_cluster_payload.py +137 -0
  138. hyperstack_async/models/create_environment.py +103 -0
  139. hyperstack_async/models/create_firewall_payload.py +104 -0
  140. hyperstack_async/models/create_firewall_rule_payload.py +117 -0
  141. hyperstack_async/models/create_image.py +104 -0
  142. hyperstack_async/models/create_image_payload.py +102 -0
  143. hyperstack_async/models/create_instances_payload.py +149 -0
  144. hyperstack_async/models/create_instances_response.py +112 -0
  145. hyperstack_async/models/create_profile_payload.py +105 -0
  146. hyperstack_async/models/create_profile_response.py +108 -0
  147. hyperstack_async/models/create_security_rule_payload.py +117 -0
  148. hyperstack_async/models/create_snapshot_payload.py +104 -0
  149. hyperstack_async/models/create_snapshot_response.py +108 -0
  150. hyperstack_async/models/create_update_compliance_response.py +108 -0
  151. hyperstack_async/models/create_update_rbac_role_payload.py +107 -0
  152. hyperstack_async/models/create_volume_payload.py +113 -0
  153. hyperstack_async/models/customer_contract_detail_response_model.py +108 -0
  154. hyperstack_async/models/customer_contract_fields.py +125 -0
  155. hyperstack_async/models/dashboard_info_response.py +108 -0
  156. hyperstack_async/models/data_synthesis_billing_history_details_response_schema.py +108 -0
  157. hyperstack_async/models/delete_cluster_nodes_fields.py +100 -0
  158. hyperstack_async/models/deployment_fields.py +111 -0
  159. hyperstack_async/models/deployment_fields_for_start_deployments.py +113 -0
  160. hyperstack_async/models/deployments.py +112 -0
  161. hyperstack_async/models/detach_volumes.py +112 -0
  162. hyperstack_async/models/detach_volumes_payload.py +100 -0
  163. hyperstack_async/models/disable_auto_topup_response.py +108 -0
  164. hyperstack_async/models/edit_label_of_an_existing_vm_payload.py +100 -0
  165. hyperstack_async/models/email_category.py +122 -0
  166. hyperstack_async/models/email_category_child.py +114 -0
  167. hyperstack_async/models/email_preferences_response.py +108 -0
  168. hyperstack_async/models/environment.py +108 -0
  169. hyperstack_async/models/environment_features.py +112 -0
  170. hyperstack_async/models/environment_fields.py +113 -0
  171. hyperstack_async/models/environment_fields_for_volume.py +104 -0
  172. hyperstack_async/models/environments.py +118 -0
  173. hyperstack_async/models/error_response_model.py +104 -0
  174. hyperstack_async/models/firewall_attachment_model.py +111 -0
  175. hyperstack_async/models/firewall_attachment_vm_model.py +111 -0
  176. hyperstack_async/models/firewall_detail_fields.py +135 -0
  177. hyperstack_async/models/firewall_detail_response.py +108 -0
  178. hyperstack_async/models/firewall_environment_fields.py +104 -0
  179. hyperstack_async/models/firewall_fields.py +115 -0
  180. hyperstack_async/models/firewall_response.py +108 -0
  181. hyperstack_async/models/firewall_rule.py +108 -0
  182. hyperstack_async/models/firewalls_list_response.py +118 -0
  183. hyperstack_async/models/flavor_fields.py +135 -0
  184. hyperstack_async/models/flavor_item_get_response.py +112 -0
  185. hyperstack_async/models/flavor_label_fields.py +102 -0
  186. hyperstack_async/models/flavor_list_response.py +112 -0
  187. hyperstack_async/models/flavor_object_fields.py +108 -0
  188. hyperstack_async/models/flavor_restrictions.py +112 -0
  189. hyperstack_async/models/generate_update_api_key_payload.py +103 -0
  190. hyperstack_async/models/generate_update_api_key_response_model.py +108 -0
  191. hyperstack_async/models/get_api_keys_response_model.py +112 -0
  192. hyperstack_async/models/get_auto_topup_response.py +108 -0
  193. hyperstack_async/models/get_credit_and_threshold_info.py +104 -0
  194. hyperstack_async/models/get_credit_and_threshold_info_in_response.py +108 -0
  195. hyperstack_async/models/get_customer_contracts_list_response_model.py +114 -0
  196. hyperstack_async/models/get_instance_logs_response.py +100 -0
  197. hyperstack_async/models/get_invites_response_model.py +112 -0
  198. hyperstack_async/models/get_organization_response_model.py +108 -0
  199. hyperstack_async/models/get_permissions_response_model.py +112 -0
  200. hyperstack_async/models/get_policies_response_model.py +112 -0
  201. hyperstack_async/models/get_rbac_roles_response_model.py +112 -0
  202. hyperstack_async/models/get_user_permissions_response_model.py +112 -0
  203. hyperstack_async/models/gpu_fields.py +119 -0
  204. hyperstack_async/models/gpu_list.py +112 -0
  205. hyperstack_async/models/gpu_region_fields.py +102 -0
  206. hyperstack_async/models/graph_datetime_value_model.py +102 -0
  207. hyperstack_async/models/image.py +104 -0
  208. hyperstack_async/models/image_fields.py +132 -0
  209. hyperstack_async/models/image_generation_billing_history_details_response_schema.py +108 -0
  210. hyperstack_async/models/image_get_response.py +114 -0
  211. hyperstack_async/models/images.py +112 -0
  212. hyperstack_async/models/import_keypair_payload.py +105 -0
  213. hyperstack_async/models/import_keypair_response.py +108 -0
  214. hyperstack_async/models/infrahub_resource_object_response_for_customer.py +122 -0
  215. hyperstack_async/models/instance.py +108 -0
  216. hyperstack_async/models/instance_enhanced_metrics_fields.py +100 -0
  217. hyperstack_async/models/instance_environment_fields.py +112 -0
  218. hyperstack_async/models/instance_events.py +112 -0
  219. hyperstack_async/models/instance_events_fields.py +115 -0
  220. hyperstack_async/models/instance_fields.py +185 -0
  221. hyperstack_async/models/instance_flavor_fields.py +126 -0
  222. hyperstack_async/models/instance_image_fields.py +100 -0
  223. hyperstack_async/models/instance_keypair_fields.py +100 -0
  224. hyperstack_async/models/instance_overview_fields.py +108 -0
  225. hyperstack_async/models/instance_resize_payload.py +106 -0
  226. hyperstack_async/models/instances.py +118 -0
  227. hyperstack_async/models/invite_fields.py +107 -0
  228. hyperstack_async/models/invite_user_payload.py +108 -0
  229. hyperstack_async/models/invite_user_response_model.py +108 -0
  230. hyperstack_async/models/keypair_environment_features.py +112 -0
  231. hyperstack_async/models/keypair_environment_fields.py +113 -0
  232. hyperstack_async/models/keypair_fields.py +115 -0
  233. hyperstack_async/models/keypairs.py +118 -0
  234. hyperstack_async/models/lable_resonse.py +102 -0
  235. hyperstack_async/models/last_day_cost_fields.py +106 -0
  236. hyperstack_async/models/last_day_cost_response.py +108 -0
  237. hyperstack_async/models/logos.py +106 -0
  238. hyperstack_async/models/manual_reconciliation_model.py +108 -0
  239. hyperstack_async/models/master_flavors_response.py +112 -0
  240. hyperstack_async/models/metric_item_fields.py +104 -0
  241. hyperstack_async/models/metrics.py +114 -0
  242. hyperstack_async/models/metrics_fields.py +129 -0
  243. hyperstack_async/models/mfa_status_fields.py +100 -0
  244. hyperstack_async/models/mfa_status_response.py +108 -0
  245. hyperstack_async/models/model_evaluation_billing_history_details_response_schema.py +108 -0
  246. hyperstack_async/models/name_available_model.py +104 -0
  247. hyperstack_async/models/new_configurations_response.py +108 -0
  248. hyperstack_async/models/new_model_response.py +114 -0
  249. hyperstack_async/models/new_stock_response.py +112 -0
  250. hyperstack_async/models/new_stock_retrive_response.py +108 -0
  251. hyperstack_async/models/object_storage_access_key_create_request.py +103 -0
  252. hyperstack_async/models/object_storage_access_key_create_response.py +114 -0
  253. hyperstack_async/models/object_storage_access_key_list_response.py +114 -0
  254. hyperstack_async/models/object_storage_access_key_response.py +112 -0
  255. hyperstack_async/models/object_storage_bucket_list_response.py +110 -0
  256. hyperstack_async/models/object_storage_bucket_response.py +114 -0
  257. hyperstack_async/models/object_storage_delete_response.py +100 -0
  258. hyperstack_async/models/object_storage_error_response.py +104 -0
  259. hyperstack_async/models/object_storage_health_response.py +100 -0
  260. hyperstack_async/models/object_storage_pagination_meta.py +104 -0
  261. hyperstack_async/models/object_storage_region_list_response.py +108 -0
  262. hyperstack_async/models/object_storage_region_response.py +100 -0
  263. hyperstack_async/models/object_storage_regions_enum.py +36 -0
  264. hyperstack_async/models/organization_fields.py +127 -0
  265. hyperstack_async/models/organization_level_billing_history.py +112 -0
  266. hyperstack_async/models/organization_level_billing_history_resources.py +110 -0
  267. hyperstack_async/models/organization_level_billing_history_response_attributes.py +100 -0
  268. hyperstack_async/models/organization_level_billing_history_response_metrics.py +110 -0
  269. hyperstack_async/models/organization_level_billing_history_response_model.py +108 -0
  270. hyperstack_async/models/organization_threshold_fields.py +108 -0
  271. hyperstack_async/models/organization_threshold_update_response.py +108 -0
  272. hyperstack_async/models/organization_thresholds_response.py +112 -0
  273. hyperstack_async/models/organization_user_response_model.py +125 -0
  274. hyperstack_async/models/overview_info.py +116 -0
  275. hyperstack_async/models/pagination.py +104 -0
  276. hyperstack_async/models/pagination_data.py +104 -0
  277. hyperstack_async/models/partner_config.py +124 -0
  278. hyperstack_async/models/payment_details_fields.py +131 -0
  279. hyperstack_async/models/payment_details_response.py +112 -0
  280. hyperstack_async/models/payment_initiate_fields.py +100 -0
  281. hyperstack_async/models/payment_initiate_payload.py +100 -0
  282. hyperstack_async/models/payment_initiate_response.py +108 -0
  283. hyperstack_async/models/permission_fields.py +111 -0
  284. hyperstack_async/models/policy_fields.py +117 -0
  285. hyperstack_async/models/policy_permission_fields.py +104 -0
  286. hyperstack_async/models/pricebook_model.py +113 -0
  287. hyperstack_async/models/pricebook_resource_object_response_for_customer.py +112 -0
  288. hyperstack_async/models/primary_color.py +102 -0
  289. hyperstack_async/models/profile_fields.py +109 -0
  290. hyperstack_async/models/profile_list_response.py +112 -0
  291. hyperstack_async/models/profile_object_fields.py +102 -0
  292. hyperstack_async/models/rbac_role_detail_response_model.py +108 -0
  293. hyperstack_async/models/rbac_role_detail_response_model_fixed.py +108 -0
  294. hyperstack_async/models/rbac_role_field.py +100 -0
  295. hyperstack_async/models/rbac_role_fields.py +127 -0
  296. hyperstack_async/models/record_consent_request.py +132 -0
  297. hyperstack_async/models/redeem_voucher_payload.py +100 -0
  298. hyperstack_async/models/region_fields.py +120 -0
  299. hyperstack_async/models/regions.py +112 -0
  300. hyperstack_async/models/remove_member_from_organization_response_model.py +102 -0
  301. hyperstack_async/models/remove_member_payload.py +101 -0
  302. hyperstack_async/models/request_console.py +104 -0
  303. hyperstack_async/models/request_instance_logs_payload.py +100 -0
  304. hyperstack_async/models/request_instance_logs_response.py +100 -0
  305. hyperstack_async/models/resource_billing_events_history_metrics.py +108 -0
  306. hyperstack_async/models/resource_billing_events_history_response.py +112 -0
  307. hyperstack_async/models/resource_billing_response_for_customer.py +108 -0
  308. hyperstack_async/models/resource_level_billing_bucket_details_resources.py +110 -0
  309. hyperstack_async/models/resource_level_billing_details_attributes.py +104 -0
  310. hyperstack_async/models/resource_level_billing_details_metrics.py +114 -0
  311. hyperstack_async/models/resource_level_billing_details_vm.py +112 -0
  312. hyperstack_async/models/resource_level_billing_details_volume.py +112 -0
  313. hyperstack_async/models/resource_level_billing_details_volume_attributes.py +108 -0
  314. hyperstack_async/models/resource_level_billing_details_volume_metrics.py +108 -0
  315. hyperstack_async/models/resource_level_billing_history.py +118 -0
  316. hyperstack_async/models/resource_level_billing_history_resources.py +110 -0
  317. hyperstack_async/models/resource_level_billing_history_resources_cluster.py +120 -0
  318. hyperstack_async/models/resource_level_billing_history_response_attributes.py +108 -0
  319. hyperstack_async/models/resource_level_billing_history_response_metrics.py +104 -0
  320. hyperstack_async/models/resource_level_billing_vm_details_resources.py +110 -0
  321. hyperstack_async/models/resource_level_billing_volume_details_resources.py +110 -0
  322. hyperstack_async/models/resource_level_bucket_billing_details_response_model.py +108 -0
  323. hyperstack_async/models/resource_level_bucket_billing_history_response_model.py +108 -0
  324. hyperstack_async/models/resource_level_cluster_billing_details_response_model.py +108 -0
  325. hyperstack_async/models/resource_level_cluster_billing_history_response_model.py +108 -0
  326. hyperstack_async/models/resource_level_cluster_graph_billing_details_response_model.py +108 -0
  327. hyperstack_async/models/resource_level_graph_billing_detail_volume.py +114 -0
  328. hyperstack_async/models/resource_level_graph_billing_details_attributes.py +104 -0
  329. hyperstack_async/models/resource_level_graph_billing_details_bucket.py +114 -0
  330. hyperstack_async/models/resource_level_graph_billing_details_metrics.py +110 -0
  331. hyperstack_async/models/resource_level_graph_billing_details_vm.py +114 -0
  332. hyperstack_async/models/resource_level_graph_billing_vm_details_resources.py +110 -0
  333. hyperstack_async/models/resource_level_graph_billing_volume_details_resources.py +110 -0
  334. hyperstack_async/models/resource_level_vm_billing_details_response_model.py +108 -0
  335. hyperstack_async/models/resource_level_vm_billing_history_response_model.py +108 -0
  336. hyperstack_async/models/resource_level_vm_graph_billing_details_response_model.py +108 -0
  337. hyperstack_async/models/resource_level_volume_billing_details_response_model.py +108 -0
  338. hyperstack_async/models/resource_level_volume_billing_history_response_model.py +108 -0
  339. hyperstack_async/models/resource_level_volume_graph_billing_details_response_model.py +108 -0
  340. hyperstack_async/models/resource_object_response_for_customer.py +106 -0
  341. hyperstack_async/models/response_model.py +102 -0
  342. hyperstack_async/models/role_permission_fields.py +104 -0
  343. hyperstack_async/models/role_policy_fields.py +104 -0
  344. hyperstack_async/models/secondary_color.py +102 -0
  345. hyperstack_async/models/security_group_rule.py +108 -0
  346. hyperstack_async/models/security_group_rule_fields.py +117 -0
  347. hyperstack_async/models/security_rules_fields_for_instance.py +117 -0
  348. hyperstack_async/models/security_rules_protocol_fields.py +104 -0
  349. hyperstack_async/models/serverless_inferenced_billing_history_details_response_schema.py +108 -0
  350. hyperstack_async/models/snapshot_fields.py +123 -0
  351. hyperstack_async/models/snapshot_restore_request.py +102 -0
  352. hyperstack_async/models/snapshot_retrieve.py +108 -0
  353. hyperstack_async/models/snapshot_retrieve_fields.py +143 -0
  354. hyperstack_async/models/snapshots.py +118 -0
  355. hyperstack_async/models/start_deployment.py +108 -0
  356. hyperstack_async/models/start_deployment_payload.py +106 -0
  357. hyperstack_async/models/sub_resource_graph_billing_details_metrics.py +165 -0
  358. hyperstack_async/models/sub_resources_costs_response_model.py +114 -0
  359. hyperstack_async/models/sub_resources_graph_billing_history_fields.py +110 -0
  360. hyperstack_async/models/sub_resources_graph_response_model.py +108 -0
  361. hyperstack_async/models/subscribe_or_unsubscribe_update_payload.py +100 -0
  362. hyperstack_async/models/supported_keypair_public_key_types_response.py +104 -0
  363. hyperstack_async/models/template.py +108 -0
  364. hyperstack_async/models/template_fields.py +111 -0
  365. hyperstack_async/models/templates.py +112 -0
  366. hyperstack_async/models/token_based_billing_history_response.py +108 -0
  367. hyperstack_async/models/update_auto_topup_payload.py +102 -0
  368. hyperstack_async/models/update_auto_topup_response.py +108 -0
  369. hyperstack_async/models/update_cluster_node_group_payload.py +105 -0
  370. hyperstack_async/models/update_consent_request.py +123 -0
  371. hyperstack_async/models/update_email_preference_input.py +100 -0
  372. hyperstack_async/models/update_email_preference_response.py +100 -0
  373. hyperstack_async/models/update_environment.py +101 -0
  374. hyperstack_async/models/update_keypair_name.py +101 -0
  375. hyperstack_async/models/update_keypair_name_response.py +108 -0
  376. hyperstack_async/models/update_organization_payload.py +101 -0
  377. hyperstack_async/models/update_organization_response_model.py +102 -0
  378. hyperstack_async/models/update_template.py +104 -0
  379. hyperstack_async/models/update_volume_attachment_payload.py +100 -0
  380. hyperstack_async/models/update_volume_payload.py +100 -0
  381. hyperstack_async/models/update_volume_response.py +110 -0
  382. hyperstack_async/models/uris.py +112 -0
  383. hyperstack_async/models/user_consent.py +116 -0
  384. hyperstack_async/models/user_consent_event.py +112 -0
  385. hyperstack_async/models/user_consents_response.py +108 -0
  386. hyperstack_async/models/user_default_choice_for_user_fields.py +104 -0
  387. hyperstack_async/models/user_default_choices_for_user_response.py +112 -0
  388. hyperstack_async/models/user_enhanced_metrics_payload.py +100 -0
  389. hyperstack_async/models/user_enhanced_metrics_response.py +110 -0
  390. hyperstack_async/models/user_enhanced_metrics_response_fields.py +100 -0
  391. hyperstack_async/models/user_info_post_payload.py +120 -0
  392. hyperstack_async/models/user_organizations_response.py +108 -0
  393. hyperstack_async/models/user_permission_fields.py +104 -0
  394. hyperstack_async/models/users_info_fields.py +129 -0
  395. hyperstack_async/models/users_info_list_response.py +108 -0
  396. hyperstack_async/models/vm_quota.py +112 -0
  397. hyperstack_async/models/vncurl.py +108 -0
  398. hyperstack_async/models/vncurl_fields.py +102 -0
  399. hyperstack_async/models/volume.py +108 -0
  400. hyperstack_async/models/volume_attachment_fields.py +115 -0
  401. hyperstack_async/models/volume_fields.py +139 -0
  402. hyperstack_async/models/volume_fields_for_instance.py +110 -0
  403. hyperstack_async/models/volume_overview_fields.py +104 -0
  404. hyperstack_async/models/volume_types.py +104 -0
  405. hyperstack_async/models/volumes.py +118 -0
  406. hyperstack_async/models/volumes_fields.py +137 -0
  407. hyperstack_async/models/voucher.py +110 -0
  408. hyperstack_async/models/voucher_redeem_response_schema.py +108 -0
  409. hyperstack_async/models/workload_billing_history_response.py +108 -0
  410. hyperstack_async/py.typed +0 -0
  411. hyperstack_async/rest.py +215 -0
  412. hyperstack_async-1.55.1a0.dist-info/METADATA +25 -0
  413. hyperstack_async-1.55.1a0.dist-info/RECORD +415 -0
  414. hyperstack_async-1.55.1a0.dist-info/WHEEL +5 -0
  415. hyperstack_async-1.55.1a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2042 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from ..models.create_volume_payload import CreateVolumePayload
23
+ from ..models.name_available_model import NameAvailableModel
24
+ from ..models.response_model import ResponseModel
25
+ from ..models.update_volume_payload import UpdateVolumePayload
26
+ from ..models.update_volume_response import UpdateVolumeResponse
27
+ from ..models.volume import Volume
28
+ from ..models.volume_types import VolumeTypes
29
+ from ..models.volumes import Volumes
30
+
31
+ from ..api_client import ApiClient, RequestSerialized
32
+ from ..api_response import ApiResponse
33
+ from ..rest import RESTResponseType
34
+
35
+
36
+ class VolumeApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ async def create_volume(
51
+ self,
52
+ payload: CreateVolumePayload,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> Volume:
66
+ """Create volume
67
+
68
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/create-volume).
69
+
70
+ :param payload: (required)
71
+ :type payload: CreateVolumePayload
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._create_volume_serialize(
95
+ payload=payload,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': "Volume",
104
+ '400': "ErrorResponseModel",
105
+ '401': "ErrorResponseModel",
106
+ '404': "ErrorResponseModel",
107
+ '405': "ErrorResponseModel",
108
+ '409': "ErrorResponseModel",
109
+ '500': None,
110
+ }
111
+ response_data = await self.api_client.call_api(
112
+ *_param,
113
+ _request_timeout=_request_timeout
114
+ )
115
+ await response_data.read()
116
+ return self.api_client.response_deserialize(
117
+ response_data=response_data,
118
+ response_types_map=_response_types_map,
119
+ ).data
120
+
121
+
122
+ @validate_call
123
+ async def create_volume_with_http_info(
124
+ self,
125
+ payload: CreateVolumePayload,
126
+ _request_timeout: Union[
127
+ None,
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Tuple[
130
+ Annotated[StrictFloat, Field(gt=0)],
131
+ Annotated[StrictFloat, Field(gt=0)]
132
+ ]
133
+ ] = None,
134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
135
+ _content_type: Optional[StrictStr] = None,
136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
138
+ ) -> ApiResponse[Volume]:
139
+ """Create volume
140
+
141
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/create-volume).
142
+
143
+ :param payload: (required)
144
+ :type payload: CreateVolumePayload
145
+ :param _request_timeout: timeout setting for this request. If one
146
+ number provided, it will be total request
147
+ timeout. It can also be a pair (tuple) of
148
+ (connection, read) timeouts.
149
+ :type _request_timeout: int, tuple(int, int), optional
150
+ :param _request_auth: set to override the auth_settings for an a single
151
+ request; this effectively ignores the
152
+ authentication in the spec for a single request.
153
+ :type _request_auth: dict, optional
154
+ :param _content_type: force content-type for the request.
155
+ :type _content_type: str, Optional
156
+ :param _headers: set to override the headers for a single
157
+ request; this effectively ignores the headers
158
+ in the spec for a single request.
159
+ :type _headers: dict, optional
160
+ :param _host_index: set to override the host_index for a single
161
+ request; this effectively ignores the host_index
162
+ in the spec for a single request.
163
+ :type _host_index: int, optional
164
+ :return: Returns the result object.
165
+ """ # noqa: E501
166
+
167
+ _param = self._create_volume_serialize(
168
+ payload=payload,
169
+ _request_auth=_request_auth,
170
+ _content_type=_content_type,
171
+ _headers=_headers,
172
+ _host_index=_host_index
173
+ )
174
+
175
+ _response_types_map: Dict[str, Optional[str]] = {
176
+ '200': "Volume",
177
+ '400': "ErrorResponseModel",
178
+ '401': "ErrorResponseModel",
179
+ '404': "ErrorResponseModel",
180
+ '405': "ErrorResponseModel",
181
+ '409': "ErrorResponseModel",
182
+ '500': None,
183
+ }
184
+ response_data = await self.api_client.call_api(
185
+ *_param,
186
+ _request_timeout=_request_timeout
187
+ )
188
+ await response_data.read()
189
+ return self.api_client.response_deserialize(
190
+ response_data=response_data,
191
+ response_types_map=_response_types_map,
192
+ )
193
+
194
+
195
+ @validate_call
196
+ async def create_volume_without_preload_content(
197
+ self,
198
+ payload: CreateVolumePayload,
199
+ _request_timeout: Union[
200
+ None,
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Tuple[
203
+ Annotated[StrictFloat, Field(gt=0)],
204
+ Annotated[StrictFloat, Field(gt=0)]
205
+ ]
206
+ ] = None,
207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
208
+ _content_type: Optional[StrictStr] = None,
209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211
+ ) -> RESTResponseType:
212
+ """Create volume
213
+
214
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/create-volume).
215
+
216
+ :param payload: (required)
217
+ :type payload: CreateVolumePayload
218
+ :param _request_timeout: timeout setting for this request. If one
219
+ number provided, it will be total request
220
+ timeout. It can also be a pair (tuple) of
221
+ (connection, read) timeouts.
222
+ :type _request_timeout: int, tuple(int, int), optional
223
+ :param _request_auth: set to override the auth_settings for an a single
224
+ request; this effectively ignores the
225
+ authentication in the spec for a single request.
226
+ :type _request_auth: dict, optional
227
+ :param _content_type: force content-type for the request.
228
+ :type _content_type: str, Optional
229
+ :param _headers: set to override the headers for a single
230
+ request; this effectively ignores the headers
231
+ in the spec for a single request.
232
+ :type _headers: dict, optional
233
+ :param _host_index: set to override the host_index for a single
234
+ request; this effectively ignores the host_index
235
+ in the spec for a single request.
236
+ :type _host_index: int, optional
237
+ :return: Returns the result object.
238
+ """ # noqa: E501
239
+
240
+ _param = self._create_volume_serialize(
241
+ payload=payload,
242
+ _request_auth=_request_auth,
243
+ _content_type=_content_type,
244
+ _headers=_headers,
245
+ _host_index=_host_index
246
+ )
247
+
248
+ _response_types_map: Dict[str, Optional[str]] = {
249
+ '200': "Volume",
250
+ '400': "ErrorResponseModel",
251
+ '401': "ErrorResponseModel",
252
+ '404': "ErrorResponseModel",
253
+ '405': "ErrorResponseModel",
254
+ '409': "ErrorResponseModel",
255
+ '500': None,
256
+ }
257
+ response_data = await self.api_client.call_api(
258
+ *_param,
259
+ _request_timeout=_request_timeout
260
+ )
261
+ return response_data.response
262
+
263
+
264
+ def _create_volume_serialize(
265
+ self,
266
+ payload,
267
+ _request_auth,
268
+ _content_type,
269
+ _headers,
270
+ _host_index,
271
+ ) -> RequestSerialized:
272
+
273
+ _host = None
274
+
275
+ _collection_formats: Dict[str, str] = {
276
+ }
277
+
278
+ _path_params: Dict[str, str] = {}
279
+ _query_params: List[Tuple[str, str]] = []
280
+ _header_params: Dict[str, Optional[str]] = _headers or {}
281
+ _form_params: List[Tuple[str, str]] = []
282
+ _files: Dict[
283
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
284
+ ] = {}
285
+ _body_params: Optional[bytes] = None
286
+
287
+ # process the path parameters
288
+ # process the query parameters
289
+ # process the header parameters
290
+ # process the form parameters
291
+ # process the body parameter
292
+ if payload is not None:
293
+ _body_params = payload
294
+
295
+
296
+ # set the HTTP header `Accept`
297
+ if 'Accept' not in _header_params:
298
+ _header_params['Accept'] = self.api_client.select_header_accept(
299
+ [
300
+ 'application/json'
301
+ ]
302
+ )
303
+
304
+ # set the HTTP header `Content-Type`
305
+ if _content_type:
306
+ _header_params['Content-Type'] = _content_type
307
+ else:
308
+ _default_content_type = (
309
+ self.api_client.select_header_content_type(
310
+ [
311
+ 'application/json'
312
+ ]
313
+ )
314
+ )
315
+ if _default_content_type is not None:
316
+ _header_params['Content-Type'] = _default_content_type
317
+
318
+ # authentication setting
319
+ _auth_settings: List[str] = [
320
+ 'apiKey'
321
+ ]
322
+
323
+ return self.api_client.param_serialize(
324
+ method='POST',
325
+ resource_path='/core/volumes',
326
+ path_params=_path_params,
327
+ query_params=_query_params,
328
+ header_params=_header_params,
329
+ body=_body_params,
330
+ post_params=_form_params,
331
+ files=_files,
332
+ auth_settings=_auth_settings,
333
+ collection_formats=_collection_formats,
334
+ _host=_host,
335
+ _request_auth=_request_auth
336
+ )
337
+
338
+
339
+
340
+
341
+ @validate_call
342
+ async def delete_volume(
343
+ self,
344
+ volume_id: StrictInt,
345
+ _request_timeout: Union[
346
+ None,
347
+ Annotated[StrictFloat, Field(gt=0)],
348
+ Tuple[
349
+ Annotated[StrictFloat, Field(gt=0)],
350
+ Annotated[StrictFloat, Field(gt=0)]
351
+ ]
352
+ ] = None,
353
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
354
+ _content_type: Optional[StrictStr] = None,
355
+ _headers: Optional[Dict[StrictStr, Any]] = None,
356
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
357
+ ) -> ResponseModel:
358
+ """Delete volume
359
+
360
+ Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
361
+
362
+ :param volume_id: (required)
363
+ :type volume_id: int
364
+ :param _request_timeout: timeout setting for this request. If one
365
+ number provided, it will be total request
366
+ timeout. It can also be a pair (tuple) of
367
+ (connection, read) timeouts.
368
+ :type _request_timeout: int, tuple(int, int), optional
369
+ :param _request_auth: set to override the auth_settings for an a single
370
+ request; this effectively ignores the
371
+ authentication in the spec for a single request.
372
+ :type _request_auth: dict, optional
373
+ :param _content_type: force content-type for the request.
374
+ :type _content_type: str, Optional
375
+ :param _headers: set to override the headers for a single
376
+ request; this effectively ignores the headers
377
+ in the spec for a single request.
378
+ :type _headers: dict, optional
379
+ :param _host_index: set to override the host_index for a single
380
+ request; this effectively ignores the host_index
381
+ in the spec for a single request.
382
+ :type _host_index: int, optional
383
+ :return: Returns the result object.
384
+ """ # noqa: E501
385
+
386
+ _param = self._delete_volume_serialize(
387
+ volume_id=volume_id,
388
+ _request_auth=_request_auth,
389
+ _content_type=_content_type,
390
+ _headers=_headers,
391
+ _host_index=_host_index
392
+ )
393
+
394
+ _response_types_map: Dict[str, Optional[str]] = {
395
+ '200': "ResponseModel",
396
+ '400': "ErrorResponseModel",
397
+ '401': "ErrorResponseModel",
398
+ '404': "ErrorResponseModel",
399
+ '500': None,
400
+ }
401
+ response_data = await self.api_client.call_api(
402
+ *_param,
403
+ _request_timeout=_request_timeout
404
+ )
405
+ await response_data.read()
406
+ return self.api_client.response_deserialize(
407
+ response_data=response_data,
408
+ response_types_map=_response_types_map,
409
+ ).data
410
+
411
+
412
+ @validate_call
413
+ async def delete_volume_with_http_info(
414
+ self,
415
+ volume_id: StrictInt,
416
+ _request_timeout: Union[
417
+ None,
418
+ Annotated[StrictFloat, Field(gt=0)],
419
+ Tuple[
420
+ Annotated[StrictFloat, Field(gt=0)],
421
+ Annotated[StrictFloat, Field(gt=0)]
422
+ ]
423
+ ] = None,
424
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
425
+ _content_type: Optional[StrictStr] = None,
426
+ _headers: Optional[Dict[StrictStr, Any]] = None,
427
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
428
+ ) -> ApiResponse[ResponseModel]:
429
+ """Delete volume
430
+
431
+ Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
432
+
433
+ :param volume_id: (required)
434
+ :type volume_id: int
435
+ :param _request_timeout: timeout setting for this request. If one
436
+ number provided, it will be total request
437
+ timeout. It can also be a pair (tuple) of
438
+ (connection, read) timeouts.
439
+ :type _request_timeout: int, tuple(int, int), optional
440
+ :param _request_auth: set to override the auth_settings for an a single
441
+ request; this effectively ignores the
442
+ authentication in the spec for a single request.
443
+ :type _request_auth: dict, optional
444
+ :param _content_type: force content-type for the request.
445
+ :type _content_type: str, Optional
446
+ :param _headers: set to override the headers for a single
447
+ request; this effectively ignores the headers
448
+ in the spec for a single request.
449
+ :type _headers: dict, optional
450
+ :param _host_index: set to override the host_index for a single
451
+ request; this effectively ignores the host_index
452
+ in the spec for a single request.
453
+ :type _host_index: int, optional
454
+ :return: Returns the result object.
455
+ """ # noqa: E501
456
+
457
+ _param = self._delete_volume_serialize(
458
+ volume_id=volume_id,
459
+ _request_auth=_request_auth,
460
+ _content_type=_content_type,
461
+ _headers=_headers,
462
+ _host_index=_host_index
463
+ )
464
+
465
+ _response_types_map: Dict[str, Optional[str]] = {
466
+ '200': "ResponseModel",
467
+ '400': "ErrorResponseModel",
468
+ '401': "ErrorResponseModel",
469
+ '404': "ErrorResponseModel",
470
+ '500': None,
471
+ }
472
+ response_data = await self.api_client.call_api(
473
+ *_param,
474
+ _request_timeout=_request_timeout
475
+ )
476
+ await response_data.read()
477
+ return self.api_client.response_deserialize(
478
+ response_data=response_data,
479
+ response_types_map=_response_types_map,
480
+ )
481
+
482
+
483
+ @validate_call
484
+ async def delete_volume_without_preload_content(
485
+ self,
486
+ volume_id: StrictInt,
487
+ _request_timeout: Union[
488
+ None,
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Tuple[
491
+ Annotated[StrictFloat, Field(gt=0)],
492
+ Annotated[StrictFloat, Field(gt=0)]
493
+ ]
494
+ ] = None,
495
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
496
+ _content_type: Optional[StrictStr] = None,
497
+ _headers: Optional[Dict[StrictStr, Any]] = None,
498
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
499
+ ) -> RESTResponseType:
500
+ """Delete volume
501
+
502
+ Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
503
+
504
+ :param volume_id: (required)
505
+ :type volume_id: int
506
+ :param _request_timeout: timeout setting for this request. If one
507
+ number provided, it will be total request
508
+ timeout. It can also be a pair (tuple) of
509
+ (connection, read) timeouts.
510
+ :type _request_timeout: int, tuple(int, int), optional
511
+ :param _request_auth: set to override the auth_settings for an a single
512
+ request; this effectively ignores the
513
+ authentication in the spec for a single request.
514
+ :type _request_auth: dict, optional
515
+ :param _content_type: force content-type for the request.
516
+ :type _content_type: str, Optional
517
+ :param _headers: set to override the headers for a single
518
+ request; this effectively ignores the headers
519
+ in the spec for a single request.
520
+ :type _headers: dict, optional
521
+ :param _host_index: set to override the host_index for a single
522
+ request; this effectively ignores the host_index
523
+ in the spec for a single request.
524
+ :type _host_index: int, optional
525
+ :return: Returns the result object.
526
+ """ # noqa: E501
527
+
528
+ _param = self._delete_volume_serialize(
529
+ volume_id=volume_id,
530
+ _request_auth=_request_auth,
531
+ _content_type=_content_type,
532
+ _headers=_headers,
533
+ _host_index=_host_index
534
+ )
535
+
536
+ _response_types_map: Dict[str, Optional[str]] = {
537
+ '200': "ResponseModel",
538
+ '400': "ErrorResponseModel",
539
+ '401': "ErrorResponseModel",
540
+ '404': "ErrorResponseModel",
541
+ '500': None,
542
+ }
543
+ response_data = await self.api_client.call_api(
544
+ *_param,
545
+ _request_timeout=_request_timeout
546
+ )
547
+ return response_data.response
548
+
549
+
550
+ def _delete_volume_serialize(
551
+ self,
552
+ volume_id,
553
+ _request_auth,
554
+ _content_type,
555
+ _headers,
556
+ _host_index,
557
+ ) -> RequestSerialized:
558
+
559
+ _host = None
560
+
561
+ _collection_formats: Dict[str, str] = {
562
+ }
563
+
564
+ _path_params: Dict[str, str] = {}
565
+ _query_params: List[Tuple[str, str]] = []
566
+ _header_params: Dict[str, Optional[str]] = _headers or {}
567
+ _form_params: List[Tuple[str, str]] = []
568
+ _files: Dict[
569
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
570
+ ] = {}
571
+ _body_params: Optional[bytes] = None
572
+
573
+ # process the path parameters
574
+ if volume_id is not None:
575
+ _path_params['volume_id'] = volume_id
576
+ # process the query parameters
577
+ # process the header parameters
578
+ # process the form parameters
579
+ # process the body parameter
580
+
581
+
582
+ # set the HTTP header `Accept`
583
+ if 'Accept' not in _header_params:
584
+ _header_params['Accept'] = self.api_client.select_header_accept(
585
+ [
586
+ 'application/json'
587
+ ]
588
+ )
589
+
590
+
591
+ # authentication setting
592
+ _auth_settings: List[str] = [
593
+ 'apiKey'
594
+ ]
595
+
596
+ return self.api_client.param_serialize(
597
+ method='DELETE',
598
+ resource_path='/core/volumes/{volume_id}',
599
+ path_params=_path_params,
600
+ query_params=_query_params,
601
+ header_params=_header_params,
602
+ body=_body_params,
603
+ post_params=_form_params,
604
+ files=_files,
605
+ auth_settings=_auth_settings,
606
+ collection_formats=_collection_formats,
607
+ _host=_host,
608
+ _request_auth=_request_auth
609
+ )
610
+
611
+
612
+
613
+
614
+ @validate_call
615
+ async def fetch_volume_name_availability(
616
+ self,
617
+ name: StrictStr,
618
+ _request_timeout: Union[
619
+ None,
620
+ Annotated[StrictFloat, Field(gt=0)],
621
+ Tuple[
622
+ Annotated[StrictFloat, Field(gt=0)],
623
+ Annotated[StrictFloat, Field(gt=0)]
624
+ ]
625
+ ] = None,
626
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
627
+ _content_type: Optional[StrictStr] = None,
628
+ _headers: Optional[Dict[StrictStr, Any]] = None,
629
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
630
+ ) -> NameAvailableModel:
631
+ """Fetch volume name availability
632
+
633
+ Check if a Volume name is available
634
+
635
+ :param name: (required)
636
+ :type name: str
637
+ :param _request_timeout: timeout setting for this request. If one
638
+ number provided, it will be total request
639
+ timeout. It can also be a pair (tuple) of
640
+ (connection, read) timeouts.
641
+ :type _request_timeout: int, tuple(int, int), optional
642
+ :param _request_auth: set to override the auth_settings for an a single
643
+ request; this effectively ignores the
644
+ authentication in the spec for a single request.
645
+ :type _request_auth: dict, optional
646
+ :param _content_type: force content-type for the request.
647
+ :type _content_type: str, Optional
648
+ :param _headers: set to override the headers for a single
649
+ request; this effectively ignores the headers
650
+ in the spec for a single request.
651
+ :type _headers: dict, optional
652
+ :param _host_index: set to override the host_index for a single
653
+ request; this effectively ignores the host_index
654
+ in the spec for a single request.
655
+ :type _host_index: int, optional
656
+ :return: Returns the result object.
657
+ """ # noqa: E501
658
+
659
+ _param = self._fetch_volume_name_availability_serialize(
660
+ name=name,
661
+ _request_auth=_request_auth,
662
+ _content_type=_content_type,
663
+ _headers=_headers,
664
+ _host_index=_host_index
665
+ )
666
+
667
+ _response_types_map: Dict[str, Optional[str]] = {
668
+ '200': "NameAvailableModel",
669
+ '400': "ErrorResponseModel",
670
+ '401': "ErrorResponseModel",
671
+ '404': "ErrorResponseModel",
672
+ '500': None,
673
+ }
674
+ response_data = await self.api_client.call_api(
675
+ *_param,
676
+ _request_timeout=_request_timeout
677
+ )
678
+ await response_data.read()
679
+ return self.api_client.response_deserialize(
680
+ response_data=response_data,
681
+ response_types_map=_response_types_map,
682
+ ).data
683
+
684
+
685
+ @validate_call
686
+ async def fetch_volume_name_availability_with_http_info(
687
+ self,
688
+ name: StrictStr,
689
+ _request_timeout: Union[
690
+ None,
691
+ Annotated[StrictFloat, Field(gt=0)],
692
+ Tuple[
693
+ Annotated[StrictFloat, Field(gt=0)],
694
+ Annotated[StrictFloat, Field(gt=0)]
695
+ ]
696
+ ] = None,
697
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
698
+ _content_type: Optional[StrictStr] = None,
699
+ _headers: Optional[Dict[StrictStr, Any]] = None,
700
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
701
+ ) -> ApiResponse[NameAvailableModel]:
702
+ """Fetch volume name availability
703
+
704
+ Check if a Volume name is available
705
+
706
+ :param name: (required)
707
+ :type name: str
708
+ :param _request_timeout: timeout setting for this request. If one
709
+ number provided, it will be total request
710
+ timeout. It can also be a pair (tuple) of
711
+ (connection, read) timeouts.
712
+ :type _request_timeout: int, tuple(int, int), optional
713
+ :param _request_auth: set to override the auth_settings for an a single
714
+ request; this effectively ignores the
715
+ authentication in the spec for a single request.
716
+ :type _request_auth: dict, optional
717
+ :param _content_type: force content-type for the request.
718
+ :type _content_type: str, Optional
719
+ :param _headers: set to override the headers for a single
720
+ request; this effectively ignores the headers
721
+ in the spec for a single request.
722
+ :type _headers: dict, optional
723
+ :param _host_index: set to override the host_index for a single
724
+ request; this effectively ignores the host_index
725
+ in the spec for a single request.
726
+ :type _host_index: int, optional
727
+ :return: Returns the result object.
728
+ """ # noqa: E501
729
+
730
+ _param = self._fetch_volume_name_availability_serialize(
731
+ name=name,
732
+ _request_auth=_request_auth,
733
+ _content_type=_content_type,
734
+ _headers=_headers,
735
+ _host_index=_host_index
736
+ )
737
+
738
+ _response_types_map: Dict[str, Optional[str]] = {
739
+ '200': "NameAvailableModel",
740
+ '400': "ErrorResponseModel",
741
+ '401': "ErrorResponseModel",
742
+ '404': "ErrorResponseModel",
743
+ '500': None,
744
+ }
745
+ response_data = await self.api_client.call_api(
746
+ *_param,
747
+ _request_timeout=_request_timeout
748
+ )
749
+ await response_data.read()
750
+ return self.api_client.response_deserialize(
751
+ response_data=response_data,
752
+ response_types_map=_response_types_map,
753
+ )
754
+
755
+
756
+ @validate_call
757
+ async def fetch_volume_name_availability_without_preload_content(
758
+ self,
759
+ name: StrictStr,
760
+ _request_timeout: Union[
761
+ None,
762
+ Annotated[StrictFloat, Field(gt=0)],
763
+ Tuple[
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Annotated[StrictFloat, Field(gt=0)]
766
+ ]
767
+ ] = None,
768
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
769
+ _content_type: Optional[StrictStr] = None,
770
+ _headers: Optional[Dict[StrictStr, Any]] = None,
771
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
772
+ ) -> RESTResponseType:
773
+ """Fetch volume name availability
774
+
775
+ Check if a Volume name is available
776
+
777
+ :param name: (required)
778
+ :type name: str
779
+ :param _request_timeout: timeout setting for this request. If one
780
+ number provided, it will be total request
781
+ timeout. It can also be a pair (tuple) of
782
+ (connection, read) timeouts.
783
+ :type _request_timeout: int, tuple(int, int), optional
784
+ :param _request_auth: set to override the auth_settings for an a single
785
+ request; this effectively ignores the
786
+ authentication in the spec for a single request.
787
+ :type _request_auth: dict, optional
788
+ :param _content_type: force content-type for the request.
789
+ :type _content_type: str, Optional
790
+ :param _headers: set to override the headers for a single
791
+ request; this effectively ignores the headers
792
+ in the spec for a single request.
793
+ :type _headers: dict, optional
794
+ :param _host_index: set to override the host_index for a single
795
+ request; this effectively ignores the host_index
796
+ in the spec for a single request.
797
+ :type _host_index: int, optional
798
+ :return: Returns the result object.
799
+ """ # noqa: E501
800
+
801
+ _param = self._fetch_volume_name_availability_serialize(
802
+ name=name,
803
+ _request_auth=_request_auth,
804
+ _content_type=_content_type,
805
+ _headers=_headers,
806
+ _host_index=_host_index
807
+ )
808
+
809
+ _response_types_map: Dict[str, Optional[str]] = {
810
+ '200': "NameAvailableModel",
811
+ '400': "ErrorResponseModel",
812
+ '401': "ErrorResponseModel",
813
+ '404': "ErrorResponseModel",
814
+ '500': None,
815
+ }
816
+ response_data = await self.api_client.call_api(
817
+ *_param,
818
+ _request_timeout=_request_timeout
819
+ )
820
+ return response_data.response
821
+
822
+
823
+ def _fetch_volume_name_availability_serialize(
824
+ self,
825
+ name,
826
+ _request_auth,
827
+ _content_type,
828
+ _headers,
829
+ _host_index,
830
+ ) -> RequestSerialized:
831
+
832
+ _host = None
833
+
834
+ _collection_formats: Dict[str, str] = {
835
+ }
836
+
837
+ _path_params: Dict[str, str] = {}
838
+ _query_params: List[Tuple[str, str]] = []
839
+ _header_params: Dict[str, Optional[str]] = _headers or {}
840
+ _form_params: List[Tuple[str, str]] = []
841
+ _files: Dict[
842
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
843
+ ] = {}
844
+ _body_params: Optional[bytes] = None
845
+
846
+ # process the path parameters
847
+ if name is not None:
848
+ _path_params['name'] = name
849
+ # process the query parameters
850
+ # process the header parameters
851
+ # process the form parameters
852
+ # process the body parameter
853
+
854
+
855
+ # set the HTTP header `Accept`
856
+ if 'Accept' not in _header_params:
857
+ _header_params['Accept'] = self.api_client.select_header_accept(
858
+ [
859
+ 'application/json'
860
+ ]
861
+ )
862
+
863
+
864
+ # authentication setting
865
+ _auth_settings: List[str] = [
866
+ 'apiKey'
867
+ ]
868
+
869
+ return self.api_client.param_serialize(
870
+ method='GET',
871
+ resource_path='/core/volume/name-availability/{name}',
872
+ path_params=_path_params,
873
+ query_params=_query_params,
874
+ header_params=_header_params,
875
+ body=_body_params,
876
+ post_params=_form_params,
877
+ files=_files,
878
+ auth_settings=_auth_settings,
879
+ collection_formats=_collection_formats,
880
+ _host=_host,
881
+ _request_auth=_request_auth
882
+ )
883
+
884
+
885
+
886
+
887
+ @validate_call
888
+ async def get_volume(
889
+ self,
890
+ volume_id: StrictInt,
891
+ _request_timeout: Union[
892
+ None,
893
+ Annotated[StrictFloat, Field(gt=0)],
894
+ Tuple[
895
+ Annotated[StrictFloat, Field(gt=0)],
896
+ Annotated[StrictFloat, Field(gt=0)]
897
+ ]
898
+ ] = None,
899
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
900
+ _content_type: Optional[StrictStr] = None,
901
+ _headers: Optional[Dict[StrictStr, Any]] = None,
902
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
903
+ ) -> Volume:
904
+ """Fetch Volume Details
905
+
906
+ Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
907
+
908
+ :param volume_id: (required)
909
+ :type volume_id: int
910
+ :param _request_timeout: timeout setting for this request. If one
911
+ number provided, it will be total request
912
+ timeout. It can also be a pair (tuple) of
913
+ (connection, read) timeouts.
914
+ :type _request_timeout: int, tuple(int, int), optional
915
+ :param _request_auth: set to override the auth_settings for an a single
916
+ request; this effectively ignores the
917
+ authentication in the spec for a single request.
918
+ :type _request_auth: dict, optional
919
+ :param _content_type: force content-type for the request.
920
+ :type _content_type: str, Optional
921
+ :param _headers: set to override the headers for a single
922
+ request; this effectively ignores the headers
923
+ in the spec for a single request.
924
+ :type _headers: dict, optional
925
+ :param _host_index: set to override the host_index for a single
926
+ request; this effectively ignores the host_index
927
+ in the spec for a single request.
928
+ :type _host_index: int, optional
929
+ :return: Returns the result object.
930
+ """ # noqa: E501
931
+
932
+ _param = self._get_volume_serialize(
933
+ volume_id=volume_id,
934
+ _request_auth=_request_auth,
935
+ _content_type=_content_type,
936
+ _headers=_headers,
937
+ _host_index=_host_index
938
+ )
939
+
940
+ _response_types_map: Dict[str, Optional[str]] = {
941
+ '200': "Volume",
942
+ '400': "ErrorResponseModel",
943
+ '401': "ErrorResponseModel",
944
+ '403': "ErrorResponseModel",
945
+ '405': "ErrorResponseModel",
946
+ '500': None,
947
+ }
948
+ response_data = await self.api_client.call_api(
949
+ *_param,
950
+ _request_timeout=_request_timeout
951
+ )
952
+ await response_data.read()
953
+ return self.api_client.response_deserialize(
954
+ response_data=response_data,
955
+ response_types_map=_response_types_map,
956
+ ).data
957
+
958
+
959
+ @validate_call
960
+ async def get_volume_with_http_info(
961
+ self,
962
+ volume_id: StrictInt,
963
+ _request_timeout: Union[
964
+ None,
965
+ Annotated[StrictFloat, Field(gt=0)],
966
+ Tuple[
967
+ Annotated[StrictFloat, Field(gt=0)],
968
+ Annotated[StrictFloat, Field(gt=0)]
969
+ ]
970
+ ] = None,
971
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
972
+ _content_type: Optional[StrictStr] = None,
973
+ _headers: Optional[Dict[StrictStr, Any]] = None,
974
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
975
+ ) -> ApiResponse[Volume]:
976
+ """Fetch Volume Details
977
+
978
+ Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
979
+
980
+ :param volume_id: (required)
981
+ :type volume_id: int
982
+ :param _request_timeout: timeout setting for this request. If one
983
+ number provided, it will be total request
984
+ timeout. It can also be a pair (tuple) of
985
+ (connection, read) timeouts.
986
+ :type _request_timeout: int, tuple(int, int), optional
987
+ :param _request_auth: set to override the auth_settings for an a single
988
+ request; this effectively ignores the
989
+ authentication in the spec for a single request.
990
+ :type _request_auth: dict, optional
991
+ :param _content_type: force content-type for the request.
992
+ :type _content_type: str, Optional
993
+ :param _headers: set to override the headers for a single
994
+ request; this effectively ignores the headers
995
+ in the spec for a single request.
996
+ :type _headers: dict, optional
997
+ :param _host_index: set to override the host_index for a single
998
+ request; this effectively ignores the host_index
999
+ in the spec for a single request.
1000
+ :type _host_index: int, optional
1001
+ :return: Returns the result object.
1002
+ """ # noqa: E501
1003
+
1004
+ _param = self._get_volume_serialize(
1005
+ volume_id=volume_id,
1006
+ _request_auth=_request_auth,
1007
+ _content_type=_content_type,
1008
+ _headers=_headers,
1009
+ _host_index=_host_index
1010
+ )
1011
+
1012
+ _response_types_map: Dict[str, Optional[str]] = {
1013
+ '200': "Volume",
1014
+ '400': "ErrorResponseModel",
1015
+ '401': "ErrorResponseModel",
1016
+ '403': "ErrorResponseModel",
1017
+ '405': "ErrorResponseModel",
1018
+ '500': None,
1019
+ }
1020
+ response_data = await self.api_client.call_api(
1021
+ *_param,
1022
+ _request_timeout=_request_timeout
1023
+ )
1024
+ await response_data.read()
1025
+ return self.api_client.response_deserialize(
1026
+ response_data=response_data,
1027
+ response_types_map=_response_types_map,
1028
+ )
1029
+
1030
+
1031
+ @validate_call
1032
+ async def get_volume_without_preload_content(
1033
+ self,
1034
+ volume_id: StrictInt,
1035
+ _request_timeout: Union[
1036
+ None,
1037
+ Annotated[StrictFloat, Field(gt=0)],
1038
+ Tuple[
1039
+ Annotated[StrictFloat, Field(gt=0)],
1040
+ Annotated[StrictFloat, Field(gt=0)]
1041
+ ]
1042
+ ] = None,
1043
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1044
+ _content_type: Optional[StrictStr] = None,
1045
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1046
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1047
+ ) -> RESTResponseType:
1048
+ """Fetch Volume Details
1049
+
1050
+ Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
1051
+
1052
+ :param volume_id: (required)
1053
+ :type volume_id: int
1054
+ :param _request_timeout: timeout setting for this request. If one
1055
+ number provided, it will be total request
1056
+ timeout. It can also be a pair (tuple) of
1057
+ (connection, read) timeouts.
1058
+ :type _request_timeout: int, tuple(int, int), optional
1059
+ :param _request_auth: set to override the auth_settings for an a single
1060
+ request; this effectively ignores the
1061
+ authentication in the spec for a single request.
1062
+ :type _request_auth: dict, optional
1063
+ :param _content_type: force content-type for the request.
1064
+ :type _content_type: str, Optional
1065
+ :param _headers: set to override the headers for a single
1066
+ request; this effectively ignores the headers
1067
+ in the spec for a single request.
1068
+ :type _headers: dict, optional
1069
+ :param _host_index: set to override the host_index for a single
1070
+ request; this effectively ignores the host_index
1071
+ in the spec for a single request.
1072
+ :type _host_index: int, optional
1073
+ :return: Returns the result object.
1074
+ """ # noqa: E501
1075
+
1076
+ _param = self._get_volume_serialize(
1077
+ volume_id=volume_id,
1078
+ _request_auth=_request_auth,
1079
+ _content_type=_content_type,
1080
+ _headers=_headers,
1081
+ _host_index=_host_index
1082
+ )
1083
+
1084
+ _response_types_map: Dict[str, Optional[str]] = {
1085
+ '200': "Volume",
1086
+ '400': "ErrorResponseModel",
1087
+ '401': "ErrorResponseModel",
1088
+ '403': "ErrorResponseModel",
1089
+ '405': "ErrorResponseModel",
1090
+ '500': None,
1091
+ }
1092
+ response_data = await self.api_client.call_api(
1093
+ *_param,
1094
+ _request_timeout=_request_timeout
1095
+ )
1096
+ return response_data.response
1097
+
1098
+
1099
+ def _get_volume_serialize(
1100
+ self,
1101
+ volume_id,
1102
+ _request_auth,
1103
+ _content_type,
1104
+ _headers,
1105
+ _host_index,
1106
+ ) -> RequestSerialized:
1107
+
1108
+ _host = None
1109
+
1110
+ _collection_formats: Dict[str, str] = {
1111
+ }
1112
+
1113
+ _path_params: Dict[str, str] = {}
1114
+ _query_params: List[Tuple[str, str]] = []
1115
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1116
+ _form_params: List[Tuple[str, str]] = []
1117
+ _files: Dict[
1118
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1119
+ ] = {}
1120
+ _body_params: Optional[bytes] = None
1121
+
1122
+ # process the path parameters
1123
+ if volume_id is not None:
1124
+ _path_params['volume_id'] = volume_id
1125
+ # process the query parameters
1126
+ # process the header parameters
1127
+ # process the form parameters
1128
+ # process the body parameter
1129
+
1130
+
1131
+ # set the HTTP header `Accept`
1132
+ if 'Accept' not in _header_params:
1133
+ _header_params['Accept'] = self.api_client.select_header_accept(
1134
+ [
1135
+ 'application/json'
1136
+ ]
1137
+ )
1138
+
1139
+
1140
+ # authentication setting
1141
+ _auth_settings: List[str] = [
1142
+ 'apiKey'
1143
+ ]
1144
+
1145
+ return self.api_client.param_serialize(
1146
+ method='GET',
1147
+ resource_path='/core/volumes/{volume_id}',
1148
+ path_params=_path_params,
1149
+ query_params=_query_params,
1150
+ header_params=_header_params,
1151
+ body=_body_params,
1152
+ post_params=_form_params,
1153
+ files=_files,
1154
+ auth_settings=_auth_settings,
1155
+ collection_formats=_collection_formats,
1156
+ _host=_host,
1157
+ _request_auth=_request_auth
1158
+ )
1159
+
1160
+
1161
+
1162
+
1163
+ @validate_call
1164
+ async def list_volume_types(
1165
+ self,
1166
+ _request_timeout: Union[
1167
+ None,
1168
+ Annotated[StrictFloat, Field(gt=0)],
1169
+ Tuple[
1170
+ Annotated[StrictFloat, Field(gt=0)],
1171
+ Annotated[StrictFloat, Field(gt=0)]
1172
+ ]
1173
+ ] = None,
1174
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1175
+ _content_type: Optional[StrictStr] = None,
1176
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1177
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1178
+ ) -> VolumeTypes:
1179
+ """List volume types
1180
+
1181
+ Retrieves a list of available volume types that can be used in the creation of a new volume.
1182
+
1183
+ :param _request_timeout: timeout setting for this request. If one
1184
+ number provided, it will be total request
1185
+ timeout. It can also be a pair (tuple) of
1186
+ (connection, read) timeouts.
1187
+ :type _request_timeout: int, tuple(int, int), optional
1188
+ :param _request_auth: set to override the auth_settings for an a single
1189
+ request; this effectively ignores the
1190
+ authentication in the spec for a single request.
1191
+ :type _request_auth: dict, optional
1192
+ :param _content_type: force content-type for the request.
1193
+ :type _content_type: str, Optional
1194
+ :param _headers: set to override the headers for a single
1195
+ request; this effectively ignores the headers
1196
+ in the spec for a single request.
1197
+ :type _headers: dict, optional
1198
+ :param _host_index: set to override the host_index for a single
1199
+ request; this effectively ignores the host_index
1200
+ in the spec for a single request.
1201
+ :type _host_index: int, optional
1202
+ :return: Returns the result object.
1203
+ """ # noqa: E501
1204
+
1205
+ _param = self._list_volume_types_serialize(
1206
+ _request_auth=_request_auth,
1207
+ _content_type=_content_type,
1208
+ _headers=_headers,
1209
+ _host_index=_host_index
1210
+ )
1211
+
1212
+ _response_types_map: Dict[str, Optional[str]] = {
1213
+ '200': "VolumeTypes",
1214
+ '400': "ErrorResponseModel",
1215
+ '401': "ErrorResponseModel",
1216
+ '500': None,
1217
+ }
1218
+ response_data = await self.api_client.call_api(
1219
+ *_param,
1220
+ _request_timeout=_request_timeout
1221
+ )
1222
+ await response_data.read()
1223
+ return self.api_client.response_deserialize(
1224
+ response_data=response_data,
1225
+ response_types_map=_response_types_map,
1226
+ ).data
1227
+
1228
+
1229
+ @validate_call
1230
+ async def list_volume_types_with_http_info(
1231
+ self,
1232
+ _request_timeout: Union[
1233
+ None,
1234
+ Annotated[StrictFloat, Field(gt=0)],
1235
+ Tuple[
1236
+ Annotated[StrictFloat, Field(gt=0)],
1237
+ Annotated[StrictFloat, Field(gt=0)]
1238
+ ]
1239
+ ] = None,
1240
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1241
+ _content_type: Optional[StrictStr] = None,
1242
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1243
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1244
+ ) -> ApiResponse[VolumeTypes]:
1245
+ """List volume types
1246
+
1247
+ Retrieves a list of available volume types that can be used in the creation of a new volume.
1248
+
1249
+ :param _request_timeout: timeout setting for this request. If one
1250
+ number provided, it will be total request
1251
+ timeout. It can also be a pair (tuple) of
1252
+ (connection, read) timeouts.
1253
+ :type _request_timeout: int, tuple(int, int), optional
1254
+ :param _request_auth: set to override the auth_settings for an a single
1255
+ request; this effectively ignores the
1256
+ authentication in the spec for a single request.
1257
+ :type _request_auth: dict, optional
1258
+ :param _content_type: force content-type for the request.
1259
+ :type _content_type: str, Optional
1260
+ :param _headers: set to override the headers for a single
1261
+ request; this effectively ignores the headers
1262
+ in the spec for a single request.
1263
+ :type _headers: dict, optional
1264
+ :param _host_index: set to override the host_index for a single
1265
+ request; this effectively ignores the host_index
1266
+ in the spec for a single request.
1267
+ :type _host_index: int, optional
1268
+ :return: Returns the result object.
1269
+ """ # noqa: E501
1270
+
1271
+ _param = self._list_volume_types_serialize(
1272
+ _request_auth=_request_auth,
1273
+ _content_type=_content_type,
1274
+ _headers=_headers,
1275
+ _host_index=_host_index
1276
+ )
1277
+
1278
+ _response_types_map: Dict[str, Optional[str]] = {
1279
+ '200': "VolumeTypes",
1280
+ '400': "ErrorResponseModel",
1281
+ '401': "ErrorResponseModel",
1282
+ '500': None,
1283
+ }
1284
+ response_data = await self.api_client.call_api(
1285
+ *_param,
1286
+ _request_timeout=_request_timeout
1287
+ )
1288
+ await response_data.read()
1289
+ return self.api_client.response_deserialize(
1290
+ response_data=response_data,
1291
+ response_types_map=_response_types_map,
1292
+ )
1293
+
1294
+
1295
+ @validate_call
1296
+ async def list_volume_types_without_preload_content(
1297
+ self,
1298
+ _request_timeout: Union[
1299
+ None,
1300
+ Annotated[StrictFloat, Field(gt=0)],
1301
+ Tuple[
1302
+ Annotated[StrictFloat, Field(gt=0)],
1303
+ Annotated[StrictFloat, Field(gt=0)]
1304
+ ]
1305
+ ] = None,
1306
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1307
+ _content_type: Optional[StrictStr] = None,
1308
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1309
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1310
+ ) -> RESTResponseType:
1311
+ """List volume types
1312
+
1313
+ Retrieves a list of available volume types that can be used in the creation of a new volume.
1314
+
1315
+ :param _request_timeout: timeout setting for this request. If one
1316
+ number provided, it will be total request
1317
+ timeout. It can also be a pair (tuple) of
1318
+ (connection, read) timeouts.
1319
+ :type _request_timeout: int, tuple(int, int), optional
1320
+ :param _request_auth: set to override the auth_settings for an a single
1321
+ request; this effectively ignores the
1322
+ authentication in the spec for a single request.
1323
+ :type _request_auth: dict, optional
1324
+ :param _content_type: force content-type for the request.
1325
+ :type _content_type: str, Optional
1326
+ :param _headers: set to override the headers for a single
1327
+ request; this effectively ignores the headers
1328
+ in the spec for a single request.
1329
+ :type _headers: dict, optional
1330
+ :param _host_index: set to override the host_index for a single
1331
+ request; this effectively ignores the host_index
1332
+ in the spec for a single request.
1333
+ :type _host_index: int, optional
1334
+ :return: Returns the result object.
1335
+ """ # noqa: E501
1336
+
1337
+ _param = self._list_volume_types_serialize(
1338
+ _request_auth=_request_auth,
1339
+ _content_type=_content_type,
1340
+ _headers=_headers,
1341
+ _host_index=_host_index
1342
+ )
1343
+
1344
+ _response_types_map: Dict[str, Optional[str]] = {
1345
+ '200': "VolumeTypes",
1346
+ '400': "ErrorResponseModel",
1347
+ '401': "ErrorResponseModel",
1348
+ '500': None,
1349
+ }
1350
+ response_data = await self.api_client.call_api(
1351
+ *_param,
1352
+ _request_timeout=_request_timeout
1353
+ )
1354
+ return response_data.response
1355
+
1356
+
1357
+ def _list_volume_types_serialize(
1358
+ self,
1359
+ _request_auth,
1360
+ _content_type,
1361
+ _headers,
1362
+ _host_index,
1363
+ ) -> RequestSerialized:
1364
+
1365
+ _host = None
1366
+
1367
+ _collection_formats: Dict[str, str] = {
1368
+ }
1369
+
1370
+ _path_params: Dict[str, str] = {}
1371
+ _query_params: List[Tuple[str, str]] = []
1372
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1373
+ _form_params: List[Tuple[str, str]] = []
1374
+ _files: Dict[
1375
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1376
+ ] = {}
1377
+ _body_params: Optional[bytes] = None
1378
+
1379
+ # process the path parameters
1380
+ # process the query parameters
1381
+ # process the header parameters
1382
+ # process the form parameters
1383
+ # process the body parameter
1384
+
1385
+
1386
+ # set the HTTP header `Accept`
1387
+ if 'Accept' not in _header_params:
1388
+ _header_params['Accept'] = self.api_client.select_header_accept(
1389
+ [
1390
+ 'application/json'
1391
+ ]
1392
+ )
1393
+
1394
+
1395
+ # authentication setting
1396
+ _auth_settings: List[str] = [
1397
+ 'apiKey'
1398
+ ]
1399
+
1400
+ return self.api_client.param_serialize(
1401
+ method='GET',
1402
+ resource_path='/core/volume-types',
1403
+ path_params=_path_params,
1404
+ query_params=_query_params,
1405
+ header_params=_header_params,
1406
+ body=_body_params,
1407
+ post_params=_form_params,
1408
+ files=_files,
1409
+ auth_settings=_auth_settings,
1410
+ collection_formats=_collection_formats,
1411
+ _host=_host,
1412
+ _request_auth=_request_auth
1413
+ )
1414
+
1415
+
1416
+
1417
+
1418
+ @validate_call
1419
+ async def list_volumes(
1420
+ self,
1421
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1422
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1423
+ search: Optional[StrictStr] = None,
1424
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1425
+ _request_timeout: Union[
1426
+ None,
1427
+ Annotated[StrictFloat, Field(gt=0)],
1428
+ Tuple[
1429
+ Annotated[StrictFloat, Field(gt=0)],
1430
+ Annotated[StrictFloat, Field(gt=0)]
1431
+ ]
1432
+ ] = None,
1433
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1434
+ _content_type: Optional[StrictStr] = None,
1435
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1436
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1437
+ ) -> Volumes:
1438
+ """List volumes
1439
+
1440
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/).
1441
+
1442
+ :param page: Page Number
1443
+ :type page: str
1444
+ :param page_size: Data Per Page
1445
+ :type page_size: str
1446
+ :param search:
1447
+ :type search: str
1448
+ :param environment: Filter Environment ID or Name
1449
+ :type environment: str
1450
+ :param _request_timeout: timeout setting for this request. If one
1451
+ number provided, it will be total request
1452
+ timeout. It can also be a pair (tuple) of
1453
+ (connection, read) timeouts.
1454
+ :type _request_timeout: int, tuple(int, int), optional
1455
+ :param _request_auth: set to override the auth_settings for an a single
1456
+ request; this effectively ignores the
1457
+ authentication in the spec for a single request.
1458
+ :type _request_auth: dict, optional
1459
+ :param _content_type: force content-type for the request.
1460
+ :type _content_type: str, Optional
1461
+ :param _headers: set to override the headers for a single
1462
+ request; this effectively ignores the headers
1463
+ in the spec for a single request.
1464
+ :type _headers: dict, optional
1465
+ :param _host_index: set to override the host_index for a single
1466
+ request; this effectively ignores the host_index
1467
+ in the spec for a single request.
1468
+ :type _host_index: int, optional
1469
+ :return: Returns the result object.
1470
+ """ # noqa: E501
1471
+
1472
+ _param = self._list_volumes_serialize(
1473
+ page=page,
1474
+ page_size=page_size,
1475
+ search=search,
1476
+ environment=environment,
1477
+ _request_auth=_request_auth,
1478
+ _content_type=_content_type,
1479
+ _headers=_headers,
1480
+ _host_index=_host_index
1481
+ )
1482
+
1483
+ _response_types_map: Dict[str, Optional[str]] = {
1484
+ '200': "Volumes",
1485
+ '400': "ErrorResponseModel",
1486
+ '401': "ErrorResponseModel",
1487
+ '500': None,
1488
+ }
1489
+ response_data = await self.api_client.call_api(
1490
+ *_param,
1491
+ _request_timeout=_request_timeout
1492
+ )
1493
+ await response_data.read()
1494
+ return self.api_client.response_deserialize(
1495
+ response_data=response_data,
1496
+ response_types_map=_response_types_map,
1497
+ ).data
1498
+
1499
+
1500
+ @validate_call
1501
+ async def list_volumes_with_http_info(
1502
+ self,
1503
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1504
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1505
+ search: Optional[StrictStr] = None,
1506
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1507
+ _request_timeout: Union[
1508
+ None,
1509
+ Annotated[StrictFloat, Field(gt=0)],
1510
+ Tuple[
1511
+ Annotated[StrictFloat, Field(gt=0)],
1512
+ Annotated[StrictFloat, Field(gt=0)]
1513
+ ]
1514
+ ] = None,
1515
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1516
+ _content_type: Optional[StrictStr] = None,
1517
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1518
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1519
+ ) -> ApiResponse[Volumes]:
1520
+ """List volumes
1521
+
1522
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/).
1523
+
1524
+ :param page: Page Number
1525
+ :type page: str
1526
+ :param page_size: Data Per Page
1527
+ :type page_size: str
1528
+ :param search:
1529
+ :type search: str
1530
+ :param environment: Filter Environment ID or Name
1531
+ :type environment: str
1532
+ :param _request_timeout: timeout setting for this request. If one
1533
+ number provided, it will be total request
1534
+ timeout. It can also be a pair (tuple) of
1535
+ (connection, read) timeouts.
1536
+ :type _request_timeout: int, tuple(int, int), optional
1537
+ :param _request_auth: set to override the auth_settings for an a single
1538
+ request; this effectively ignores the
1539
+ authentication in the spec for a single request.
1540
+ :type _request_auth: dict, optional
1541
+ :param _content_type: force content-type for the request.
1542
+ :type _content_type: str, Optional
1543
+ :param _headers: set to override the headers for a single
1544
+ request; this effectively ignores the headers
1545
+ in the spec for a single request.
1546
+ :type _headers: dict, optional
1547
+ :param _host_index: set to override the host_index for a single
1548
+ request; this effectively ignores the host_index
1549
+ in the spec for a single request.
1550
+ :type _host_index: int, optional
1551
+ :return: Returns the result object.
1552
+ """ # noqa: E501
1553
+
1554
+ _param = self._list_volumes_serialize(
1555
+ page=page,
1556
+ page_size=page_size,
1557
+ search=search,
1558
+ environment=environment,
1559
+ _request_auth=_request_auth,
1560
+ _content_type=_content_type,
1561
+ _headers=_headers,
1562
+ _host_index=_host_index
1563
+ )
1564
+
1565
+ _response_types_map: Dict[str, Optional[str]] = {
1566
+ '200': "Volumes",
1567
+ '400': "ErrorResponseModel",
1568
+ '401': "ErrorResponseModel",
1569
+ '500': None,
1570
+ }
1571
+ response_data = await self.api_client.call_api(
1572
+ *_param,
1573
+ _request_timeout=_request_timeout
1574
+ )
1575
+ await response_data.read()
1576
+ return self.api_client.response_deserialize(
1577
+ response_data=response_data,
1578
+ response_types_map=_response_types_map,
1579
+ )
1580
+
1581
+
1582
+ @validate_call
1583
+ async def list_volumes_without_preload_content(
1584
+ self,
1585
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1586
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1587
+ search: Optional[StrictStr] = None,
1588
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1589
+ _request_timeout: Union[
1590
+ None,
1591
+ Annotated[StrictFloat, Field(gt=0)],
1592
+ Tuple[
1593
+ Annotated[StrictFloat, Field(gt=0)],
1594
+ Annotated[StrictFloat, Field(gt=0)]
1595
+ ]
1596
+ ] = None,
1597
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1598
+ _content_type: Optional[StrictStr] = None,
1599
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1600
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1601
+ ) -> RESTResponseType:
1602
+ """List volumes
1603
+
1604
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/).
1605
+
1606
+ :param page: Page Number
1607
+ :type page: str
1608
+ :param page_size: Data Per Page
1609
+ :type page_size: str
1610
+ :param search:
1611
+ :type search: str
1612
+ :param environment: Filter Environment ID or Name
1613
+ :type environment: str
1614
+ :param _request_timeout: timeout setting for this request. If one
1615
+ number provided, it will be total request
1616
+ timeout. It can also be a pair (tuple) of
1617
+ (connection, read) timeouts.
1618
+ :type _request_timeout: int, tuple(int, int), optional
1619
+ :param _request_auth: set to override the auth_settings for an a single
1620
+ request; this effectively ignores the
1621
+ authentication in the spec for a single request.
1622
+ :type _request_auth: dict, optional
1623
+ :param _content_type: force content-type for the request.
1624
+ :type _content_type: str, Optional
1625
+ :param _headers: set to override the headers for a single
1626
+ request; this effectively ignores the headers
1627
+ in the spec for a single request.
1628
+ :type _headers: dict, optional
1629
+ :param _host_index: set to override the host_index for a single
1630
+ request; this effectively ignores the host_index
1631
+ in the spec for a single request.
1632
+ :type _host_index: int, optional
1633
+ :return: Returns the result object.
1634
+ """ # noqa: E501
1635
+
1636
+ _param = self._list_volumes_serialize(
1637
+ page=page,
1638
+ page_size=page_size,
1639
+ search=search,
1640
+ environment=environment,
1641
+ _request_auth=_request_auth,
1642
+ _content_type=_content_type,
1643
+ _headers=_headers,
1644
+ _host_index=_host_index
1645
+ )
1646
+
1647
+ _response_types_map: Dict[str, Optional[str]] = {
1648
+ '200': "Volumes",
1649
+ '400': "ErrorResponseModel",
1650
+ '401': "ErrorResponseModel",
1651
+ '500': None,
1652
+ }
1653
+ response_data = await self.api_client.call_api(
1654
+ *_param,
1655
+ _request_timeout=_request_timeout
1656
+ )
1657
+ return response_data.response
1658
+
1659
+
1660
+ def _list_volumes_serialize(
1661
+ self,
1662
+ page,
1663
+ page_size,
1664
+ search,
1665
+ environment,
1666
+ _request_auth,
1667
+ _content_type,
1668
+ _headers,
1669
+ _host_index,
1670
+ ) -> RequestSerialized:
1671
+
1672
+ _host = None
1673
+
1674
+ _collection_formats: Dict[str, str] = {
1675
+ }
1676
+
1677
+ _path_params: Dict[str, str] = {}
1678
+ _query_params: List[Tuple[str, str]] = []
1679
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1680
+ _form_params: List[Tuple[str, str]] = []
1681
+ _files: Dict[
1682
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1683
+ ] = {}
1684
+ _body_params: Optional[bytes] = None
1685
+
1686
+ # process the path parameters
1687
+ # process the query parameters
1688
+ if page is not None:
1689
+
1690
+ _query_params.append(('page', page))
1691
+
1692
+ if page_size is not None:
1693
+
1694
+ _query_params.append(('pageSize', page_size))
1695
+
1696
+ if search is not None:
1697
+
1698
+ _query_params.append(('search', search))
1699
+
1700
+ if environment is not None:
1701
+
1702
+ _query_params.append(('environment', environment))
1703
+
1704
+ # process the header parameters
1705
+ # process the form parameters
1706
+ # process the body parameter
1707
+
1708
+
1709
+ # set the HTTP header `Accept`
1710
+ if 'Accept' not in _header_params:
1711
+ _header_params['Accept'] = self.api_client.select_header_accept(
1712
+ [
1713
+ 'application/json'
1714
+ ]
1715
+ )
1716
+
1717
+
1718
+ # authentication setting
1719
+ _auth_settings: List[str] = [
1720
+ 'apiKey'
1721
+ ]
1722
+
1723
+ return self.api_client.param_serialize(
1724
+ method='GET',
1725
+ resource_path='/core/volumes',
1726
+ path_params=_path_params,
1727
+ query_params=_query_params,
1728
+ header_params=_header_params,
1729
+ body=_body_params,
1730
+ post_params=_form_params,
1731
+ files=_files,
1732
+ auth_settings=_auth_settings,
1733
+ collection_formats=_collection_formats,
1734
+ _host=_host,
1735
+ _request_auth=_request_auth
1736
+ )
1737
+
1738
+
1739
+
1740
+
1741
+ @validate_call
1742
+ async def update_volume(
1743
+ self,
1744
+ volume_id: StrictInt,
1745
+ payload: UpdateVolumePayload,
1746
+ _request_timeout: Union[
1747
+ None,
1748
+ Annotated[StrictFloat, Field(gt=0)],
1749
+ Tuple[
1750
+ Annotated[StrictFloat, Field(gt=0)],
1751
+ Annotated[StrictFloat, Field(gt=0)]
1752
+ ]
1753
+ ] = None,
1754
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1755
+ _content_type: Optional[StrictStr] = None,
1756
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1757
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1758
+ ) -> UpdateVolumeResponse:
1759
+ """Update volume fields
1760
+
1761
+ Update volume properties. Currently supports updating the environment by providing 'environment_name'. The volume must not be attached to any instance when changing environments, and the target environment must be in the same region.
1762
+
1763
+ :param volume_id: (required)
1764
+ :type volume_id: int
1765
+ :param payload: (required)
1766
+ :type payload: UpdateVolumePayload
1767
+ :param _request_timeout: timeout setting for this request. If one
1768
+ number provided, it will be total request
1769
+ timeout. It can also be a pair (tuple) of
1770
+ (connection, read) timeouts.
1771
+ :type _request_timeout: int, tuple(int, int), optional
1772
+ :param _request_auth: set to override the auth_settings for an a single
1773
+ request; this effectively ignores the
1774
+ authentication in the spec for a single request.
1775
+ :type _request_auth: dict, optional
1776
+ :param _content_type: force content-type for the request.
1777
+ :type _content_type: str, Optional
1778
+ :param _headers: set to override the headers for a single
1779
+ request; this effectively ignores the headers
1780
+ in the spec for a single request.
1781
+ :type _headers: dict, optional
1782
+ :param _host_index: set to override the host_index for a single
1783
+ request; this effectively ignores the host_index
1784
+ in the spec for a single request.
1785
+ :type _host_index: int, optional
1786
+ :return: Returns the result object.
1787
+ """ # noqa: E501
1788
+
1789
+ _param = self._update_volume_serialize(
1790
+ volume_id=volume_id,
1791
+ payload=payload,
1792
+ _request_auth=_request_auth,
1793
+ _content_type=_content_type,
1794
+ _headers=_headers,
1795
+ _host_index=_host_index
1796
+ )
1797
+
1798
+ _response_types_map: Dict[str, Optional[str]] = {
1799
+ '200': "UpdateVolumeResponse",
1800
+ '400': "ErrorResponseModel",
1801
+ '401': "ErrorResponseModel",
1802
+ '404': "ErrorResponseModel",
1803
+ '409': "ErrorResponseModel",
1804
+ '500': None,
1805
+ }
1806
+ response_data = await self.api_client.call_api(
1807
+ *_param,
1808
+ _request_timeout=_request_timeout
1809
+ )
1810
+ await response_data.read()
1811
+ return self.api_client.response_deserialize(
1812
+ response_data=response_data,
1813
+ response_types_map=_response_types_map,
1814
+ ).data
1815
+
1816
+
1817
+ @validate_call
1818
+ async def update_volume_with_http_info(
1819
+ self,
1820
+ volume_id: StrictInt,
1821
+ payload: UpdateVolumePayload,
1822
+ _request_timeout: Union[
1823
+ None,
1824
+ Annotated[StrictFloat, Field(gt=0)],
1825
+ Tuple[
1826
+ Annotated[StrictFloat, Field(gt=0)],
1827
+ Annotated[StrictFloat, Field(gt=0)]
1828
+ ]
1829
+ ] = None,
1830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1831
+ _content_type: Optional[StrictStr] = None,
1832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1834
+ ) -> ApiResponse[UpdateVolumeResponse]:
1835
+ """Update volume fields
1836
+
1837
+ Update volume properties. Currently supports updating the environment by providing 'environment_name'. The volume must not be attached to any instance when changing environments, and the target environment must be in the same region.
1838
+
1839
+ :param volume_id: (required)
1840
+ :type volume_id: int
1841
+ :param payload: (required)
1842
+ :type payload: UpdateVolumePayload
1843
+ :param _request_timeout: timeout setting for this request. If one
1844
+ number provided, it will be total request
1845
+ timeout. It can also be a pair (tuple) of
1846
+ (connection, read) timeouts.
1847
+ :type _request_timeout: int, tuple(int, int), optional
1848
+ :param _request_auth: set to override the auth_settings for an a single
1849
+ request; this effectively ignores the
1850
+ authentication in the spec for a single request.
1851
+ :type _request_auth: dict, optional
1852
+ :param _content_type: force content-type for the request.
1853
+ :type _content_type: str, Optional
1854
+ :param _headers: set to override the headers for a single
1855
+ request; this effectively ignores the headers
1856
+ in the spec for a single request.
1857
+ :type _headers: dict, optional
1858
+ :param _host_index: set to override the host_index for a single
1859
+ request; this effectively ignores the host_index
1860
+ in the spec for a single request.
1861
+ :type _host_index: int, optional
1862
+ :return: Returns the result object.
1863
+ """ # noqa: E501
1864
+
1865
+ _param = self._update_volume_serialize(
1866
+ volume_id=volume_id,
1867
+ payload=payload,
1868
+ _request_auth=_request_auth,
1869
+ _content_type=_content_type,
1870
+ _headers=_headers,
1871
+ _host_index=_host_index
1872
+ )
1873
+
1874
+ _response_types_map: Dict[str, Optional[str]] = {
1875
+ '200': "UpdateVolumeResponse",
1876
+ '400': "ErrorResponseModel",
1877
+ '401': "ErrorResponseModel",
1878
+ '404': "ErrorResponseModel",
1879
+ '409': "ErrorResponseModel",
1880
+ '500': None,
1881
+ }
1882
+ response_data = await self.api_client.call_api(
1883
+ *_param,
1884
+ _request_timeout=_request_timeout
1885
+ )
1886
+ await response_data.read()
1887
+ return self.api_client.response_deserialize(
1888
+ response_data=response_data,
1889
+ response_types_map=_response_types_map,
1890
+ )
1891
+
1892
+
1893
+ @validate_call
1894
+ async def update_volume_without_preload_content(
1895
+ self,
1896
+ volume_id: StrictInt,
1897
+ payload: UpdateVolumePayload,
1898
+ _request_timeout: Union[
1899
+ None,
1900
+ Annotated[StrictFloat, Field(gt=0)],
1901
+ Tuple[
1902
+ Annotated[StrictFloat, Field(gt=0)],
1903
+ Annotated[StrictFloat, Field(gt=0)]
1904
+ ]
1905
+ ] = None,
1906
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1907
+ _content_type: Optional[StrictStr] = None,
1908
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1909
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1910
+ ) -> RESTResponseType:
1911
+ """Update volume fields
1912
+
1913
+ Update volume properties. Currently supports updating the environment by providing 'environment_name'. The volume must not be attached to any instance when changing environments, and the target environment must be in the same region.
1914
+
1915
+ :param volume_id: (required)
1916
+ :type volume_id: int
1917
+ :param payload: (required)
1918
+ :type payload: UpdateVolumePayload
1919
+ :param _request_timeout: timeout setting for this request. If one
1920
+ number provided, it will be total request
1921
+ timeout. It can also be a pair (tuple) of
1922
+ (connection, read) timeouts.
1923
+ :type _request_timeout: int, tuple(int, int), optional
1924
+ :param _request_auth: set to override the auth_settings for an a single
1925
+ request; this effectively ignores the
1926
+ authentication in the spec for a single request.
1927
+ :type _request_auth: dict, optional
1928
+ :param _content_type: force content-type for the request.
1929
+ :type _content_type: str, Optional
1930
+ :param _headers: set to override the headers for a single
1931
+ request; this effectively ignores the headers
1932
+ in the spec for a single request.
1933
+ :type _headers: dict, optional
1934
+ :param _host_index: set to override the host_index for a single
1935
+ request; this effectively ignores the host_index
1936
+ in the spec for a single request.
1937
+ :type _host_index: int, optional
1938
+ :return: Returns the result object.
1939
+ """ # noqa: E501
1940
+
1941
+ _param = self._update_volume_serialize(
1942
+ volume_id=volume_id,
1943
+ payload=payload,
1944
+ _request_auth=_request_auth,
1945
+ _content_type=_content_type,
1946
+ _headers=_headers,
1947
+ _host_index=_host_index
1948
+ )
1949
+
1950
+ _response_types_map: Dict[str, Optional[str]] = {
1951
+ '200': "UpdateVolumeResponse",
1952
+ '400': "ErrorResponseModel",
1953
+ '401': "ErrorResponseModel",
1954
+ '404': "ErrorResponseModel",
1955
+ '409': "ErrorResponseModel",
1956
+ '500': None,
1957
+ }
1958
+ response_data = await self.api_client.call_api(
1959
+ *_param,
1960
+ _request_timeout=_request_timeout
1961
+ )
1962
+ return response_data.response
1963
+
1964
+
1965
+ def _update_volume_serialize(
1966
+ self,
1967
+ volume_id,
1968
+ payload,
1969
+ _request_auth,
1970
+ _content_type,
1971
+ _headers,
1972
+ _host_index,
1973
+ ) -> RequestSerialized:
1974
+
1975
+ _host = None
1976
+
1977
+ _collection_formats: Dict[str, str] = {
1978
+ }
1979
+
1980
+ _path_params: Dict[str, str] = {}
1981
+ _query_params: List[Tuple[str, str]] = []
1982
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1983
+ _form_params: List[Tuple[str, str]] = []
1984
+ _files: Dict[
1985
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1986
+ ] = {}
1987
+ _body_params: Optional[bytes] = None
1988
+
1989
+ # process the path parameters
1990
+ if volume_id is not None:
1991
+ _path_params['volume_id'] = volume_id
1992
+ # process the query parameters
1993
+ # process the header parameters
1994
+ # process the form parameters
1995
+ # process the body parameter
1996
+ if payload is not None:
1997
+ _body_params = payload
1998
+
1999
+
2000
+ # set the HTTP header `Accept`
2001
+ if 'Accept' not in _header_params:
2002
+ _header_params['Accept'] = self.api_client.select_header_accept(
2003
+ [
2004
+ 'application/json'
2005
+ ]
2006
+ )
2007
+
2008
+ # set the HTTP header `Content-Type`
2009
+ if _content_type:
2010
+ _header_params['Content-Type'] = _content_type
2011
+ else:
2012
+ _default_content_type = (
2013
+ self.api_client.select_header_content_type(
2014
+ [
2015
+ 'application/json'
2016
+ ]
2017
+ )
2018
+ )
2019
+ if _default_content_type is not None:
2020
+ _header_params['Content-Type'] = _default_content_type
2021
+
2022
+ # authentication setting
2023
+ _auth_settings: List[str] = [
2024
+ 'apiKey'
2025
+ ]
2026
+
2027
+ return self.api_client.param_serialize(
2028
+ method='PATCH',
2029
+ resource_path='/core/volumes/{volume_id}',
2030
+ path_params=_path_params,
2031
+ query_params=_query_params,
2032
+ header_params=_header_params,
2033
+ body=_body_params,
2034
+ post_params=_form_params,
2035
+ files=_files,
2036
+ auth_settings=_auth_settings,
2037
+ collection_formats=_collection_formats,
2038
+ _host=_host,
2039
+ _request_auth=_request_auth
2040
+ )
2041
+
2042
+