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,950 @@
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 StrictInt
20
+ from ..models.attach_volumes import AttachVolumes
21
+ from ..models.attach_volumes_payload import AttachVolumesPayload
22
+ from ..models.detach_volumes import DetachVolumes
23
+ from ..models.detach_volumes_payload import DetachVolumesPayload
24
+ from ..models.update_volume_attachment_payload import UpdateVolumeAttachmentPayload
25
+
26
+ from ..api_client import ApiClient, RequestSerialized
27
+ from ..api_response import ApiResponse
28
+ from ..rest import RESTResponseType
29
+
30
+
31
+ class VolumeAttachmentApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def attach_volumes_to_vm(
46
+ self,
47
+ vm_id: StrictInt,
48
+ payload: AttachVolumesPayload,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> AttachVolumes:
62
+ """Attach volumes to virtual machine
63
+
64
+ Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the VM ID in the path and the volume IDs in the request body to attach the specified volumes. For more detailson volume attachment, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-attachment/attach-volumes/).
65
+
66
+ :param vm_id: (required)
67
+ :type vm_id: int
68
+ :param payload: (required)
69
+ :type payload: AttachVolumesPayload
70
+ :param _request_timeout: timeout setting for this request. If one
71
+ number provided, it will be total request
72
+ timeout. It can also be a pair (tuple) of
73
+ (connection, read) timeouts.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._attach_volumes_to_vm_serialize(
93
+ vm_id=vm_id,
94
+ payload=payload,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '200': "AttachVolumes",
103
+ '400': "ErrorResponseModel",
104
+ '401': "ErrorResponseModel",
105
+ '404': "ErrorResponseModel",
106
+ '405': "ErrorResponseModel",
107
+ '500': None,
108
+ }
109
+ response_data = await self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ await response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ async def attach_volumes_to_vm_with_http_info(
122
+ self,
123
+ vm_id: StrictInt,
124
+ payload: AttachVolumesPayload,
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[AttachVolumes]:
138
+ """Attach volumes to virtual machine
139
+
140
+ Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the VM ID in the path and the volume IDs in the request body to attach the specified volumes. For more detailson volume attachment, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-attachment/attach-volumes/).
141
+
142
+ :param vm_id: (required)
143
+ :type vm_id: int
144
+ :param payload: (required)
145
+ :type payload: AttachVolumesPayload
146
+ :param _request_timeout: timeout setting for this request. If one
147
+ number provided, it will be total request
148
+ timeout. It can also be a pair (tuple) of
149
+ (connection, read) timeouts.
150
+ :type _request_timeout: int, tuple(int, int), optional
151
+ :param _request_auth: set to override the auth_settings for an a single
152
+ request; this effectively ignores the
153
+ authentication in the spec for a single request.
154
+ :type _request_auth: dict, optional
155
+ :param _content_type: force content-type for the request.
156
+ :type _content_type: str, Optional
157
+ :param _headers: set to override the headers for a single
158
+ request; this effectively ignores the headers
159
+ in the spec for a single request.
160
+ :type _headers: dict, optional
161
+ :param _host_index: set to override the host_index for a single
162
+ request; this effectively ignores the host_index
163
+ in the spec for a single request.
164
+ :type _host_index: int, optional
165
+ :return: Returns the result object.
166
+ """ # noqa: E501
167
+
168
+ _param = self._attach_volumes_to_vm_serialize(
169
+ vm_id=vm_id,
170
+ payload=payload,
171
+ _request_auth=_request_auth,
172
+ _content_type=_content_type,
173
+ _headers=_headers,
174
+ _host_index=_host_index
175
+ )
176
+
177
+ _response_types_map: Dict[str, Optional[str]] = {
178
+ '200': "AttachVolumes",
179
+ '400': "ErrorResponseModel",
180
+ '401': "ErrorResponseModel",
181
+ '404': "ErrorResponseModel",
182
+ '405': "ErrorResponseModel",
183
+ '500': None,
184
+ }
185
+ response_data = await self.api_client.call_api(
186
+ *_param,
187
+ _request_timeout=_request_timeout
188
+ )
189
+ await response_data.read()
190
+ return self.api_client.response_deserialize(
191
+ response_data=response_data,
192
+ response_types_map=_response_types_map,
193
+ )
194
+
195
+
196
+ @validate_call
197
+ async def attach_volumes_to_vm_without_preload_content(
198
+ self,
199
+ vm_id: StrictInt,
200
+ payload: AttachVolumesPayload,
201
+ _request_timeout: Union[
202
+ None,
203
+ Annotated[StrictFloat, Field(gt=0)],
204
+ Tuple[
205
+ Annotated[StrictFloat, Field(gt=0)],
206
+ Annotated[StrictFloat, Field(gt=0)]
207
+ ]
208
+ ] = None,
209
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
210
+ _content_type: Optional[StrictStr] = None,
211
+ _headers: Optional[Dict[StrictStr, Any]] = None,
212
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
213
+ ) -> RESTResponseType:
214
+ """Attach volumes to virtual machine
215
+
216
+ Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the VM ID in the path and the volume IDs in the request body to attach the specified volumes. For more detailson volume attachment, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/volumes/volume-attachment/attach-volumes/).
217
+
218
+ :param vm_id: (required)
219
+ :type vm_id: int
220
+ :param payload: (required)
221
+ :type payload: AttachVolumesPayload
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._attach_volumes_to_vm_serialize(
245
+ vm_id=vm_id,
246
+ payload=payload,
247
+ _request_auth=_request_auth,
248
+ _content_type=_content_type,
249
+ _headers=_headers,
250
+ _host_index=_host_index
251
+ )
252
+
253
+ _response_types_map: Dict[str, Optional[str]] = {
254
+ '200': "AttachVolumes",
255
+ '400': "ErrorResponseModel",
256
+ '401': "ErrorResponseModel",
257
+ '404': "ErrorResponseModel",
258
+ '405': "ErrorResponseModel",
259
+ '500': None,
260
+ }
261
+ response_data = await self.api_client.call_api(
262
+ *_param,
263
+ _request_timeout=_request_timeout
264
+ )
265
+ return response_data.response
266
+
267
+
268
+ def _attach_volumes_to_vm_serialize(
269
+ self,
270
+ vm_id,
271
+ payload,
272
+ _request_auth,
273
+ _content_type,
274
+ _headers,
275
+ _host_index,
276
+ ) -> RequestSerialized:
277
+
278
+ _host = None
279
+
280
+ _collection_formats: Dict[str, str] = {
281
+ }
282
+
283
+ _path_params: Dict[str, str] = {}
284
+ _query_params: List[Tuple[str, str]] = []
285
+ _header_params: Dict[str, Optional[str]] = _headers or {}
286
+ _form_params: List[Tuple[str, str]] = []
287
+ _files: Dict[
288
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
289
+ ] = {}
290
+ _body_params: Optional[bytes] = None
291
+
292
+ # process the path parameters
293
+ if vm_id is not None:
294
+ _path_params['vm_id'] = vm_id
295
+ # process the query parameters
296
+ # process the header parameters
297
+ # process the form parameters
298
+ # process the body parameter
299
+ if payload is not None:
300
+ _body_params = payload
301
+
302
+
303
+ # set the HTTP header `Accept`
304
+ if 'Accept' not in _header_params:
305
+ _header_params['Accept'] = self.api_client.select_header_accept(
306
+ [
307
+ 'application/json'
308
+ ]
309
+ )
310
+
311
+ # set the HTTP header `Content-Type`
312
+ if _content_type:
313
+ _header_params['Content-Type'] = _content_type
314
+ else:
315
+ _default_content_type = (
316
+ self.api_client.select_header_content_type(
317
+ [
318
+ 'application/json'
319
+ ]
320
+ )
321
+ )
322
+ if _default_content_type is not None:
323
+ _header_params['Content-Type'] = _default_content_type
324
+
325
+ # authentication setting
326
+ _auth_settings: List[str] = [
327
+ 'apiKey'
328
+ ]
329
+
330
+ return self.api_client.param_serialize(
331
+ method='POST',
332
+ resource_path='/core/virtual-machines/{vm_id}/attach-volumes',
333
+ path_params=_path_params,
334
+ query_params=_query_params,
335
+ header_params=_header_params,
336
+ body=_body_params,
337
+ post_params=_form_params,
338
+ files=_files,
339
+ auth_settings=_auth_settings,
340
+ collection_formats=_collection_formats,
341
+ _host=_host,
342
+ _request_auth=_request_auth
343
+ )
344
+
345
+
346
+
347
+
348
+ @validate_call
349
+ async def detach_volumes_from_vm(
350
+ self,
351
+ vm_id: StrictInt,
352
+ payload: DetachVolumesPayload,
353
+ _request_timeout: Union[
354
+ None,
355
+ Annotated[StrictFloat, Field(gt=0)],
356
+ Tuple[
357
+ Annotated[StrictFloat, Field(gt=0)],
358
+ Annotated[StrictFloat, Field(gt=0)]
359
+ ]
360
+ ] = None,
361
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
362
+ _content_type: Optional[StrictStr] = None,
363
+ _headers: Optional[Dict[StrictStr, Any]] = None,
364
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
365
+ ) -> DetachVolumes:
366
+ """Detach volumes from virtual machine
367
+
368
+ Detaches one or more volumes attached to an existing virtual machine. Include the VM ID in the path and volume IDs in the request body to detach the specified volumes from the virtual machine.
369
+
370
+ :param vm_id: (required)
371
+ :type vm_id: int
372
+ :param payload: (required)
373
+ :type payload: DetachVolumesPayload
374
+ :param _request_timeout: timeout setting for this request. If one
375
+ number provided, it will be total request
376
+ timeout. It can also be a pair (tuple) of
377
+ (connection, read) timeouts.
378
+ :type _request_timeout: int, tuple(int, int), optional
379
+ :param _request_auth: set to override the auth_settings for an a single
380
+ request; this effectively ignores the
381
+ authentication in the spec for a single request.
382
+ :type _request_auth: dict, optional
383
+ :param _content_type: force content-type for the request.
384
+ :type _content_type: str, Optional
385
+ :param _headers: set to override the headers for a single
386
+ request; this effectively ignores the headers
387
+ in the spec for a single request.
388
+ :type _headers: dict, optional
389
+ :param _host_index: set to override the host_index for a single
390
+ request; this effectively ignores the host_index
391
+ in the spec for a single request.
392
+ :type _host_index: int, optional
393
+ :return: Returns the result object.
394
+ """ # noqa: E501
395
+
396
+ _param = self._detach_volumes_from_vm_serialize(
397
+ vm_id=vm_id,
398
+ payload=payload,
399
+ _request_auth=_request_auth,
400
+ _content_type=_content_type,
401
+ _headers=_headers,
402
+ _host_index=_host_index
403
+ )
404
+
405
+ _response_types_map: Dict[str, Optional[str]] = {
406
+ '200': "DetachVolumes",
407
+ '400': "ErrorResponseModel",
408
+ '401': "ErrorResponseModel",
409
+ '404': "ErrorResponseModel",
410
+ '405': "ErrorResponseModel",
411
+ '500': None,
412
+ }
413
+ response_data = await self.api_client.call_api(
414
+ *_param,
415
+ _request_timeout=_request_timeout
416
+ )
417
+ await response_data.read()
418
+ return self.api_client.response_deserialize(
419
+ response_data=response_data,
420
+ response_types_map=_response_types_map,
421
+ ).data
422
+
423
+
424
+ @validate_call
425
+ async def detach_volumes_from_vm_with_http_info(
426
+ self,
427
+ vm_id: StrictInt,
428
+ payload: DetachVolumesPayload,
429
+ _request_timeout: Union[
430
+ None,
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Tuple[
433
+ Annotated[StrictFloat, Field(gt=0)],
434
+ Annotated[StrictFloat, Field(gt=0)]
435
+ ]
436
+ ] = None,
437
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
438
+ _content_type: Optional[StrictStr] = None,
439
+ _headers: Optional[Dict[StrictStr, Any]] = None,
440
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
441
+ ) -> ApiResponse[DetachVolumes]:
442
+ """Detach volumes from virtual machine
443
+
444
+ Detaches one or more volumes attached to an existing virtual machine. Include the VM ID in the path and volume IDs in the request body to detach the specified volumes from the virtual machine.
445
+
446
+ :param vm_id: (required)
447
+ :type vm_id: int
448
+ :param payload: (required)
449
+ :type payload: DetachVolumesPayload
450
+ :param _request_timeout: timeout setting for this request. If one
451
+ number provided, it will be total request
452
+ timeout. It can also be a pair (tuple) of
453
+ (connection, read) timeouts.
454
+ :type _request_timeout: int, tuple(int, int), optional
455
+ :param _request_auth: set to override the auth_settings for an a single
456
+ request; this effectively ignores the
457
+ authentication in the spec for a single request.
458
+ :type _request_auth: dict, optional
459
+ :param _content_type: force content-type for the request.
460
+ :type _content_type: str, Optional
461
+ :param _headers: set to override the headers for a single
462
+ request; this effectively ignores the headers
463
+ in the spec for a single request.
464
+ :type _headers: dict, optional
465
+ :param _host_index: set to override the host_index for a single
466
+ request; this effectively ignores the host_index
467
+ in the spec for a single request.
468
+ :type _host_index: int, optional
469
+ :return: Returns the result object.
470
+ """ # noqa: E501
471
+
472
+ _param = self._detach_volumes_from_vm_serialize(
473
+ vm_id=vm_id,
474
+ payload=payload,
475
+ _request_auth=_request_auth,
476
+ _content_type=_content_type,
477
+ _headers=_headers,
478
+ _host_index=_host_index
479
+ )
480
+
481
+ _response_types_map: Dict[str, Optional[str]] = {
482
+ '200': "DetachVolumes",
483
+ '400': "ErrorResponseModel",
484
+ '401': "ErrorResponseModel",
485
+ '404': "ErrorResponseModel",
486
+ '405': "ErrorResponseModel",
487
+ '500': None,
488
+ }
489
+ response_data = await self.api_client.call_api(
490
+ *_param,
491
+ _request_timeout=_request_timeout
492
+ )
493
+ await response_data.read()
494
+ return self.api_client.response_deserialize(
495
+ response_data=response_data,
496
+ response_types_map=_response_types_map,
497
+ )
498
+
499
+
500
+ @validate_call
501
+ async def detach_volumes_from_vm_without_preload_content(
502
+ self,
503
+ vm_id: StrictInt,
504
+ payload: DetachVolumesPayload,
505
+ _request_timeout: Union[
506
+ None,
507
+ Annotated[StrictFloat, Field(gt=0)],
508
+ Tuple[
509
+ Annotated[StrictFloat, Field(gt=0)],
510
+ Annotated[StrictFloat, Field(gt=0)]
511
+ ]
512
+ ] = None,
513
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
514
+ _content_type: Optional[StrictStr] = None,
515
+ _headers: Optional[Dict[StrictStr, Any]] = None,
516
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
517
+ ) -> RESTResponseType:
518
+ """Detach volumes from virtual machine
519
+
520
+ Detaches one or more volumes attached to an existing virtual machine. Include the VM ID in the path and volume IDs in the request body to detach the specified volumes from the virtual machine.
521
+
522
+ :param vm_id: (required)
523
+ :type vm_id: int
524
+ :param payload: (required)
525
+ :type payload: DetachVolumesPayload
526
+ :param _request_timeout: timeout setting for this request. If one
527
+ number provided, it will be total request
528
+ timeout. It can also be a pair (tuple) of
529
+ (connection, read) timeouts.
530
+ :type _request_timeout: int, tuple(int, int), optional
531
+ :param _request_auth: set to override the auth_settings for an a single
532
+ request; this effectively ignores the
533
+ authentication in the spec for a single request.
534
+ :type _request_auth: dict, optional
535
+ :param _content_type: force content-type for the request.
536
+ :type _content_type: str, Optional
537
+ :param _headers: set to override the headers for a single
538
+ request; this effectively ignores the headers
539
+ in the spec for a single request.
540
+ :type _headers: dict, optional
541
+ :param _host_index: set to override the host_index for a single
542
+ request; this effectively ignores the host_index
543
+ in the spec for a single request.
544
+ :type _host_index: int, optional
545
+ :return: Returns the result object.
546
+ """ # noqa: E501
547
+
548
+ _param = self._detach_volumes_from_vm_serialize(
549
+ vm_id=vm_id,
550
+ payload=payload,
551
+ _request_auth=_request_auth,
552
+ _content_type=_content_type,
553
+ _headers=_headers,
554
+ _host_index=_host_index
555
+ )
556
+
557
+ _response_types_map: Dict[str, Optional[str]] = {
558
+ '200': "DetachVolumes",
559
+ '400': "ErrorResponseModel",
560
+ '401': "ErrorResponseModel",
561
+ '404': "ErrorResponseModel",
562
+ '405': "ErrorResponseModel",
563
+ '500': None,
564
+ }
565
+ response_data = await self.api_client.call_api(
566
+ *_param,
567
+ _request_timeout=_request_timeout
568
+ )
569
+ return response_data.response
570
+
571
+
572
+ def _detach_volumes_from_vm_serialize(
573
+ self,
574
+ vm_id,
575
+ payload,
576
+ _request_auth,
577
+ _content_type,
578
+ _headers,
579
+ _host_index,
580
+ ) -> RequestSerialized:
581
+
582
+ _host = None
583
+
584
+ _collection_formats: Dict[str, str] = {
585
+ }
586
+
587
+ _path_params: Dict[str, str] = {}
588
+ _query_params: List[Tuple[str, str]] = []
589
+ _header_params: Dict[str, Optional[str]] = _headers or {}
590
+ _form_params: List[Tuple[str, str]] = []
591
+ _files: Dict[
592
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
593
+ ] = {}
594
+ _body_params: Optional[bytes] = None
595
+
596
+ # process the path parameters
597
+ if vm_id is not None:
598
+ _path_params['vm_id'] = vm_id
599
+ # process the query parameters
600
+ # process the header parameters
601
+ # process the form parameters
602
+ # process the body parameter
603
+ if payload is not None:
604
+ _body_params = payload
605
+
606
+
607
+ # set the HTTP header `Accept`
608
+ if 'Accept' not in _header_params:
609
+ _header_params['Accept'] = self.api_client.select_header_accept(
610
+ [
611
+ 'application/json'
612
+ ]
613
+ )
614
+
615
+ # set the HTTP header `Content-Type`
616
+ if _content_type:
617
+ _header_params['Content-Type'] = _content_type
618
+ else:
619
+ _default_content_type = (
620
+ self.api_client.select_header_content_type(
621
+ [
622
+ 'application/json'
623
+ ]
624
+ )
625
+ )
626
+ if _default_content_type is not None:
627
+ _header_params['Content-Type'] = _default_content_type
628
+
629
+ # authentication setting
630
+ _auth_settings: List[str] = [
631
+ 'apiKey'
632
+ ]
633
+
634
+ return self.api_client.param_serialize(
635
+ method='POST',
636
+ resource_path='/core/virtual-machines/{vm_id}/detach-volumes',
637
+ path_params=_path_params,
638
+ query_params=_query_params,
639
+ header_params=_header_params,
640
+ body=_body_params,
641
+ post_params=_form_params,
642
+ files=_files,
643
+ auth_settings=_auth_settings,
644
+ collection_formats=_collection_formats,
645
+ _host=_host,
646
+ _request_auth=_request_auth
647
+ )
648
+
649
+
650
+
651
+
652
+ @validate_call
653
+ async def update_volume_attachment(
654
+ self,
655
+ volume_attachment_id: StrictInt,
656
+ payload: UpdateVolumeAttachmentPayload,
657
+ _request_timeout: Union[
658
+ None,
659
+ Annotated[StrictFloat, Field(gt=0)],
660
+ Tuple[
661
+ Annotated[StrictFloat, Field(gt=0)],
662
+ Annotated[StrictFloat, Field(gt=0)]
663
+ ]
664
+ ] = None,
665
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
666
+ _content_type: Optional[StrictStr] = None,
667
+ _headers: Optional[Dict[StrictStr, Any]] = None,
668
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
669
+ ) -> AttachVolumes:
670
+ """Update a volume attachment
671
+
672
+
673
+ :param volume_attachment_id: (required)
674
+ :type volume_attachment_id: int
675
+ :param payload: (required)
676
+ :type payload: UpdateVolumeAttachmentPayload
677
+ :param _request_timeout: timeout setting for this request. If one
678
+ number provided, it will be total request
679
+ timeout. It can also be a pair (tuple) of
680
+ (connection, read) timeouts.
681
+ :type _request_timeout: int, tuple(int, int), optional
682
+ :param _request_auth: set to override the auth_settings for an a single
683
+ request; this effectively ignores the
684
+ authentication in the spec for a single request.
685
+ :type _request_auth: dict, optional
686
+ :param _content_type: force content-type for the request.
687
+ :type _content_type: str, Optional
688
+ :param _headers: set to override the headers for a single
689
+ request; this effectively ignores the headers
690
+ in the spec for a single request.
691
+ :type _headers: dict, optional
692
+ :param _host_index: set to override the host_index for a single
693
+ request; this effectively ignores the host_index
694
+ in the spec for a single request.
695
+ :type _host_index: int, optional
696
+ :return: Returns the result object.
697
+ """ # noqa: E501
698
+
699
+ _param = self._update_volume_attachment_serialize(
700
+ volume_attachment_id=volume_attachment_id,
701
+ payload=payload,
702
+ _request_auth=_request_auth,
703
+ _content_type=_content_type,
704
+ _headers=_headers,
705
+ _host_index=_host_index
706
+ )
707
+
708
+ _response_types_map: Dict[str, Optional[str]] = {
709
+ '200': "AttachVolumes",
710
+ '400': "ErrorResponseModel",
711
+ '401': "ErrorResponseModel",
712
+ '404': "ErrorResponseModel",
713
+ '405': "ErrorResponseModel",
714
+ '500': None,
715
+ }
716
+ response_data = await self.api_client.call_api(
717
+ *_param,
718
+ _request_timeout=_request_timeout
719
+ )
720
+ await response_data.read()
721
+ return self.api_client.response_deserialize(
722
+ response_data=response_data,
723
+ response_types_map=_response_types_map,
724
+ ).data
725
+
726
+
727
+ @validate_call
728
+ async def update_volume_attachment_with_http_info(
729
+ self,
730
+ volume_attachment_id: StrictInt,
731
+ payload: UpdateVolumeAttachmentPayload,
732
+ _request_timeout: Union[
733
+ None,
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Tuple[
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Annotated[StrictFloat, Field(gt=0)]
738
+ ]
739
+ ] = None,
740
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
741
+ _content_type: Optional[StrictStr] = None,
742
+ _headers: Optional[Dict[StrictStr, Any]] = None,
743
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
744
+ ) -> ApiResponse[AttachVolumes]:
745
+ """Update a volume attachment
746
+
747
+
748
+ :param volume_attachment_id: (required)
749
+ :type volume_attachment_id: int
750
+ :param payload: (required)
751
+ :type payload: UpdateVolumeAttachmentPayload
752
+ :param _request_timeout: timeout setting for this request. If one
753
+ number provided, it will be total request
754
+ timeout. It can also be a pair (tuple) of
755
+ (connection, read) timeouts.
756
+ :type _request_timeout: int, tuple(int, int), optional
757
+ :param _request_auth: set to override the auth_settings for an a single
758
+ request; this effectively ignores the
759
+ authentication in the spec for a single request.
760
+ :type _request_auth: dict, optional
761
+ :param _content_type: force content-type for the request.
762
+ :type _content_type: str, Optional
763
+ :param _headers: set to override the headers for a single
764
+ request; this effectively ignores the headers
765
+ in the spec for a single request.
766
+ :type _headers: dict, optional
767
+ :param _host_index: set to override the host_index for a single
768
+ request; this effectively ignores the host_index
769
+ in the spec for a single request.
770
+ :type _host_index: int, optional
771
+ :return: Returns the result object.
772
+ """ # noqa: E501
773
+
774
+ _param = self._update_volume_attachment_serialize(
775
+ volume_attachment_id=volume_attachment_id,
776
+ payload=payload,
777
+ _request_auth=_request_auth,
778
+ _content_type=_content_type,
779
+ _headers=_headers,
780
+ _host_index=_host_index
781
+ )
782
+
783
+ _response_types_map: Dict[str, Optional[str]] = {
784
+ '200': "AttachVolumes",
785
+ '400': "ErrorResponseModel",
786
+ '401': "ErrorResponseModel",
787
+ '404': "ErrorResponseModel",
788
+ '405': "ErrorResponseModel",
789
+ '500': None,
790
+ }
791
+ response_data = await self.api_client.call_api(
792
+ *_param,
793
+ _request_timeout=_request_timeout
794
+ )
795
+ await response_data.read()
796
+ return self.api_client.response_deserialize(
797
+ response_data=response_data,
798
+ response_types_map=_response_types_map,
799
+ )
800
+
801
+
802
+ @validate_call
803
+ async def update_volume_attachment_without_preload_content(
804
+ self,
805
+ volume_attachment_id: StrictInt,
806
+ payload: UpdateVolumeAttachmentPayload,
807
+ _request_timeout: Union[
808
+ None,
809
+ Annotated[StrictFloat, Field(gt=0)],
810
+ Tuple[
811
+ Annotated[StrictFloat, Field(gt=0)],
812
+ Annotated[StrictFloat, Field(gt=0)]
813
+ ]
814
+ ] = None,
815
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
816
+ _content_type: Optional[StrictStr] = None,
817
+ _headers: Optional[Dict[StrictStr, Any]] = None,
818
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
819
+ ) -> RESTResponseType:
820
+ """Update a volume attachment
821
+
822
+
823
+ :param volume_attachment_id: (required)
824
+ :type volume_attachment_id: int
825
+ :param payload: (required)
826
+ :type payload: UpdateVolumeAttachmentPayload
827
+ :param _request_timeout: timeout setting for this request. If one
828
+ number provided, it will be total request
829
+ timeout. It can also be a pair (tuple) of
830
+ (connection, read) timeouts.
831
+ :type _request_timeout: int, tuple(int, int), optional
832
+ :param _request_auth: set to override the auth_settings for an a single
833
+ request; this effectively ignores the
834
+ authentication in the spec for a single request.
835
+ :type _request_auth: dict, optional
836
+ :param _content_type: force content-type for the request.
837
+ :type _content_type: str, Optional
838
+ :param _headers: set to override the headers for a single
839
+ request; this effectively ignores the headers
840
+ in the spec for a single request.
841
+ :type _headers: dict, optional
842
+ :param _host_index: set to override the host_index for a single
843
+ request; this effectively ignores the host_index
844
+ in the spec for a single request.
845
+ :type _host_index: int, optional
846
+ :return: Returns the result object.
847
+ """ # noqa: E501
848
+
849
+ _param = self._update_volume_attachment_serialize(
850
+ volume_attachment_id=volume_attachment_id,
851
+ payload=payload,
852
+ _request_auth=_request_auth,
853
+ _content_type=_content_type,
854
+ _headers=_headers,
855
+ _host_index=_host_index
856
+ )
857
+
858
+ _response_types_map: Dict[str, Optional[str]] = {
859
+ '200': "AttachVolumes",
860
+ '400': "ErrorResponseModel",
861
+ '401': "ErrorResponseModel",
862
+ '404': "ErrorResponseModel",
863
+ '405': "ErrorResponseModel",
864
+ '500': None,
865
+ }
866
+ response_data = await self.api_client.call_api(
867
+ *_param,
868
+ _request_timeout=_request_timeout
869
+ )
870
+ return response_data.response
871
+
872
+
873
+ def _update_volume_attachment_serialize(
874
+ self,
875
+ volume_attachment_id,
876
+ payload,
877
+ _request_auth,
878
+ _content_type,
879
+ _headers,
880
+ _host_index,
881
+ ) -> RequestSerialized:
882
+
883
+ _host = None
884
+
885
+ _collection_formats: Dict[str, str] = {
886
+ }
887
+
888
+ _path_params: Dict[str, str] = {}
889
+ _query_params: List[Tuple[str, str]] = []
890
+ _header_params: Dict[str, Optional[str]] = _headers or {}
891
+ _form_params: List[Tuple[str, str]] = []
892
+ _files: Dict[
893
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
894
+ ] = {}
895
+ _body_params: Optional[bytes] = None
896
+
897
+ # process the path parameters
898
+ if volume_attachment_id is not None:
899
+ _path_params['volume_attachment_id'] = volume_attachment_id
900
+ # process the query parameters
901
+ # process the header parameters
902
+ # process the form parameters
903
+ # process the body parameter
904
+ if payload is not None:
905
+ _body_params = payload
906
+
907
+
908
+ # set the HTTP header `Accept`
909
+ if 'Accept' not in _header_params:
910
+ _header_params['Accept'] = self.api_client.select_header_accept(
911
+ [
912
+ 'application/json'
913
+ ]
914
+ )
915
+
916
+ # set the HTTP header `Content-Type`
917
+ if _content_type:
918
+ _header_params['Content-Type'] = _content_type
919
+ else:
920
+ _default_content_type = (
921
+ self.api_client.select_header_content_type(
922
+ [
923
+ 'application/json'
924
+ ]
925
+ )
926
+ )
927
+ if _default_content_type is not None:
928
+ _header_params['Content-Type'] = _default_content_type
929
+
930
+ # authentication setting
931
+ _auth_settings: List[str] = [
932
+ 'apiKey'
933
+ ]
934
+
935
+ return self.api_client.param_serialize(
936
+ method='PATCH',
937
+ resource_path='/core/volume-attachments/{volume_attachment_id}',
938
+ path_params=_path_params,
939
+ query_params=_query_params,
940
+ header_params=_header_params,
941
+ body=_body_params,
942
+ post_params=_form_params,
943
+ files=_files,
944
+ auth_settings=_auth_settings,
945
+ collection_formats=_collection_formats,
946
+ _host=_host,
947
+ _request_auth=_request_auth
948
+ )
949
+
950
+