hyperstack 0.1.23__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 (401) hide show
  1. hyperstack/__init__.py +420 -0
  2. hyperstack/api/__init__.py +48 -0
  3. hyperstack/api/alive_api.py +270 -0
  4. hyperstack/api/api_key_api.py +1161 -0
  5. hyperstack/api/assigning_member_role_api.py +615 -0
  6. hyperstack/api/auth_api.py +292 -0
  7. hyperstack/api/billing_api.py +5946 -0
  8. hyperstack/api/calculate_api.py +326 -0
  9. hyperstack/api/callbacks_api.py +1795 -0
  10. hyperstack/api/cluster_events_api.py +308 -0
  11. hyperstack/api/clusters_api.py +1651 -0
  12. hyperstack/api/compliance_api.py +1169 -0
  13. hyperstack/api/credit_api.py +295 -0
  14. hyperstack/api/customer_contract_api.py +922 -0
  15. hyperstack/api/dashboard_api.py +292 -0
  16. hyperstack/api/deployment_api.py +1122 -0
  17. hyperstack/api/environment_api.py +1490 -0
  18. hyperstack/api/firewall_attachment_api.py +343 -0
  19. hyperstack/api/firewalls_api.py +1819 -0
  20. hyperstack/api/flavor_api.py +315 -0
  21. hyperstack/api/floating_ip_api.py +585 -0
  22. hyperstack/api/gpu_api.py +292 -0
  23. hyperstack/api/image_api.py +1228 -0
  24. hyperstack/api/invite_api.py +857 -0
  25. hyperstack/api/keypair_api.py +1217 -0
  26. hyperstack/api/organization_api.py +864 -0
  27. hyperstack/api/payment_api.py +584 -0
  28. hyperstack/api/permission_api.py +292 -0
  29. hyperstack/api/policy_api.py +292 -0
  30. hyperstack/api/pricebook_api.py +293 -0
  31. hyperstack/api/profile_api.py +1131 -0
  32. hyperstack/api/rbac_role_api.py +1434 -0
  33. hyperstack/api/region_api.py +292 -0
  34. hyperstack/api/security_rules_api.py +292 -0
  35. hyperstack/api/snapshot_events_api.py +291 -0
  36. hyperstack/api/snapshots_api.py +1779 -0
  37. hyperstack/api/stock_api.py +292 -0
  38. hyperstack/api/template_api.py +1497 -0
  39. hyperstack/api/user_api.py +871 -0
  40. hyperstack/api/user_detail_choice_api.py +295 -0
  41. hyperstack/api/user_permission_api.py +567 -0
  42. hyperstack/api/virtual_machine_api.py +5289 -0
  43. hyperstack/api/virtual_machine_events_api.py +311 -0
  44. hyperstack/api/vnc_url_api.py +595 -0
  45. hyperstack/api/volume_api.py +1742 -0
  46. hyperstack/api/volume_attachment_api.py +650 -0
  47. hyperstack/api_client.py +797 -0
  48. hyperstack/api_response.py +21 -0
  49. hyperstack/configuration.py +488 -0
  50. hyperstack/exceptions.py +199 -0
  51. hyperstack/models/__init__.py +360 -0
  52. hyperstack/models/add_update_flavor_organization_payload.py +111 -0
  53. hyperstack/models/add_user_info_success_response_model.py +95 -0
  54. hyperstack/models/allocated_gpu_count_graph.py +89 -0
  55. hyperstack/models/api_key_fields.py +96 -0
  56. hyperstack/models/api_key_verify_fields.py +93 -0
  57. hyperstack/models/assign_rbac_role_payload.py +87 -0
  58. hyperstack/models/attach_callback_payload.py +87 -0
  59. hyperstack/models/attach_callback_response.py +91 -0
  60. hyperstack/models/attach_firewall_with_vm.py +87 -0
  61. hyperstack/models/attach_firewalls_to_vm_payload.py +87 -0
  62. hyperstack/models/attach_volume_fields.py +96 -0
  63. hyperstack/models/attach_volumes.py +99 -0
  64. hyperstack/models/attach_volumes_payload.py +87 -0
  65. hyperstack/models/auth_get_token_response_model.py +97 -0
  66. hyperstack/models/auth_request_login_fields.py +89 -0
  67. hyperstack/models/auth_request_login_response_model.py +95 -0
  68. hyperstack/models/auth_user_fields.py +94 -0
  69. hyperstack/models/auth_user_info_response_model.py +95 -0
  70. hyperstack/models/billing_immune_resources_response.py +95 -0
  71. hyperstack/models/billing_response.py +100 -0
  72. hyperstack/models/billingmetricesfields.py +108 -0
  73. hyperstack/models/billingmetricesresponse.py +99 -0
  74. hyperstack/models/cluster_events.py +99 -0
  75. hyperstack/models/cluster_events_fields.py +104 -0
  76. hyperstack/models/cluster_fields.py +114 -0
  77. hyperstack/models/cluster_list_response.py +99 -0
  78. hyperstack/models/cluster_response.py +95 -0
  79. hyperstack/models/cluster_versions.py +91 -0
  80. hyperstack/models/common_response_model.py +89 -0
  81. hyperstack/models/compliance_fields.py +93 -0
  82. hyperstack/models/compliance_model_fields.py +99 -0
  83. hyperstack/models/compliance_payload.py +97 -0
  84. hyperstack/models/compliance_response.py +95 -0
  85. hyperstack/models/container_overview_fields.py +95 -0
  86. hyperstack/models/contract.py +105 -0
  87. hyperstack/models/contract_billing_history.py +97 -0
  88. hyperstack/models/contract_billing_history_response_attributes.py +99 -0
  89. hyperstack/models/contract_billing_history_response_model.py +95 -0
  90. hyperstack/models/contract_change_payload.py +101 -0
  91. hyperstack/models/contract_discount_plan_fields.py +103 -0
  92. hyperstack/models/contract_eligible_instance_fields.py +99 -0
  93. hyperstack/models/contract_eligible_instances_response.py +101 -0
  94. hyperstack/models/contract_event_create_model.py +91 -0
  95. hyperstack/models/contract_gpu_allocation_graph_response.py +95 -0
  96. hyperstack/models/contract_instance_fields.py +102 -0
  97. hyperstack/models/contract_instances_response.py +99 -0
  98. hyperstack/models/contract_resource_payload.py +95 -0
  99. hyperstack/models/contractl_billing_history_response_metrics.py +87 -0
  100. hyperstack/models/create_cluster_payload.py +101 -0
  101. hyperstack/models/create_contract_fields.py +110 -0
  102. hyperstack/models/create_contract_payload.py +106 -0
  103. hyperstack/models/create_discount_response.py +95 -0
  104. hyperstack/models/create_discounts_payload.py +112 -0
  105. hyperstack/models/create_environment.py +90 -0
  106. hyperstack/models/create_firewall_payload.py +91 -0
  107. hyperstack/models/create_firewall_rule_payload.py +104 -0
  108. hyperstack/models/create_gpu.py +91 -0
  109. hyperstack/models/create_image.py +91 -0
  110. hyperstack/models/create_image_payload.py +89 -0
  111. hyperstack/models/create_instances_payload.py +132 -0
  112. hyperstack/models/create_instances_response.py +99 -0
  113. hyperstack/models/create_profile_payload.py +92 -0
  114. hyperstack/models/create_profile_response.py +95 -0
  115. hyperstack/models/create_security_rule_payload.py +104 -0
  116. hyperstack/models/create_snapshot_payload.py +93 -0
  117. hyperstack/models/create_snapshot_response.py +95 -0
  118. hyperstack/models/create_update_compliance_response.py +95 -0
  119. hyperstack/models/create_update_permission_payload.py +93 -0
  120. hyperstack/models/create_update_permission_response_model.py +95 -0
  121. hyperstack/models/create_update_policy_payload.py +93 -0
  122. hyperstack/models/create_update_policy_response_model.py +95 -0
  123. hyperstack/models/create_update_rbac_role_payload.py +94 -0
  124. hyperstack/models/create_volume_payload.py +100 -0
  125. hyperstack/models/creditrechargelimitfield.py +93 -0
  126. hyperstack/models/creditrechargelimitresponse.py +99 -0
  127. hyperstack/models/creditrequestresponse.py +99 -0
  128. hyperstack/models/creditrequests.py +96 -0
  129. hyperstack/models/customer_contract_detail_response_model.py +95 -0
  130. hyperstack/models/customer_contract_fields.py +112 -0
  131. hyperstack/models/customer_fields.py +89 -0
  132. hyperstack/models/customer_payload.py +89 -0
  133. hyperstack/models/dashboard_info_response.py +95 -0
  134. hyperstack/models/data.py +91 -0
  135. hyperstack/models/deployment_fields.py +98 -0
  136. hyperstack/models/deployment_fieldsforstartdeployments.py +100 -0
  137. hyperstack/models/deployments.py +99 -0
  138. hyperstack/models/detach_volumes.py +99 -0
  139. hyperstack/models/detach_volumes_payload.py +87 -0
  140. hyperstack/models/discount_entity_model.py +97 -0
  141. hyperstack/models/discount_fields.py +100 -0
  142. hyperstack/models/discount_plan_fields.py +108 -0
  143. hyperstack/models/discount_resource_fields.py +93 -0
  144. hyperstack/models/discount_resource_payload.py +93 -0
  145. hyperstack/models/editlabelofanexisting_vm_payload.py +87 -0
  146. hyperstack/models/environment.py +95 -0
  147. hyperstack/models/environment_features.py +87 -0
  148. hyperstack/models/environment_fields.py +100 -0
  149. hyperstack/models/environment_fieldsfor_volume.py +87 -0
  150. hyperstack/models/environments.py +105 -0
  151. hyperstack/models/error_response_model.py +91 -0
  152. hyperstack/models/exclude_billing_post_payload.py +91 -0
  153. hyperstack/models/exclude_billing_post_response.py +91 -0
  154. hyperstack/models/export_billing_data_request.py +105 -0
  155. hyperstack/models/export_billing_data_response.py +89 -0
  156. hyperstack/models/field_change.py +91 -0
  157. hyperstack/models/firewall_attachment_model.py +98 -0
  158. hyperstack/models/firewall_attachment_vm_model.py +98 -0
  159. hyperstack/models/firewall_detail_fields.py +122 -0
  160. hyperstack/models/firewall_detail_response.py +95 -0
  161. hyperstack/models/firewall_environment_fields.py +91 -0
  162. hyperstack/models/firewall_fields.py +102 -0
  163. hyperstack/models/firewall_response.py +95 -0
  164. hyperstack/models/firewall_rule.py +95 -0
  165. hyperstack/models/firewalls_list_response.py +105 -0
  166. hyperstack/models/flavor_fields.py +120 -0
  167. hyperstack/models/flavor_item_get_response.py +99 -0
  168. hyperstack/models/flavor_list_response.py +99 -0
  169. hyperstack/models/flavor_object_fields.py +95 -0
  170. hyperstack/models/flavor_payload.py +101 -0
  171. hyperstack/models/flavor_response.py +95 -0
  172. hyperstack/models/flavor_vm_fields.py +100 -0
  173. hyperstack/models/flavor_vms_response.py +99 -0
  174. hyperstack/models/future_node_model.py +106 -0
  175. hyperstack/models/future_node_response_model.py +97 -0
  176. hyperstack/models/future_node_stock_model.py +93 -0
  177. hyperstack/models/future_node_update_model.py +98 -0
  178. hyperstack/models/future_nodes_stock_model.py +95 -0
  179. hyperstack/models/generate_update_api_key_payload.py +89 -0
  180. hyperstack/models/generate_update_api_key_response_model.py +95 -0
  181. hyperstack/models/get_all_contract_fields.py +100 -0
  182. hyperstack/models/get_all_contracts_response_model.py +99 -0
  183. hyperstack/models/get_all_discount_for_all_organization_response.py +99 -0
  184. hyperstack/models/get_all_discounts_fields.py +106 -0
  185. hyperstack/models/get_api_keys_response_model.py +99 -0
  186. hyperstack/models/get_customer_contracts_list_response_model.py +101 -0
  187. hyperstack/models/get_discount_detail_response.py +95 -0
  188. hyperstack/models/get_discount_response.py +99 -0
  189. hyperstack/models/get_entity_discount_detail_response.py +108 -0
  190. hyperstack/models/get_invites_response_model.py +99 -0
  191. hyperstack/models/get_organization_response_model.py +95 -0
  192. hyperstack/models/get_permissions_response_model.py +99 -0
  193. hyperstack/models/get_policies_response_model.py +99 -0
  194. hyperstack/models/get_rbac_roles_response_model.py +99 -0
  195. hyperstack/models/get_token_payload.py +89 -0
  196. hyperstack/models/get_user_permissions_response_model.py +99 -0
  197. hyperstack/models/get_version_response.py +91 -0
  198. hyperstack/models/getcreditandthresholdinfo.py +91 -0
  199. hyperstack/models/getcreditandthresholdinfoinresponse.py +95 -0
  200. hyperstack/models/gpu.py +95 -0
  201. hyperstack/models/gpu_fields.py +106 -0
  202. hyperstack/models/gpu_list.py +99 -0
  203. hyperstack/models/gpu_region_fields.py +89 -0
  204. hyperstack/models/graph_datetime_value_model.py +89 -0
  205. hyperstack/models/historical_instance.py +101 -0
  206. hyperstack/models/historical_instances_fields.py +110 -0
  207. hyperstack/models/image.py +91 -0
  208. hyperstack/models/image_fields.py +113 -0
  209. hyperstack/models/image_get_response.py +101 -0
  210. hyperstack/models/image_logos.py +99 -0
  211. hyperstack/models/images.py +99 -0
  212. hyperstack/models/import_keypair_payload.py +92 -0
  213. hyperstack/models/import_keypair_response.py +95 -0
  214. hyperstack/models/infrahub_resource_object_response.py +119 -0
  215. hyperstack/models/infrahub_resource_object_response_for_customer.py +109 -0
  216. hyperstack/models/insert_discount_plan_fields.py +112 -0
  217. hyperstack/models/instance.py +95 -0
  218. hyperstack/models/instance_environment_fields.py +99 -0
  219. hyperstack/models/instance_events.py +99 -0
  220. hyperstack/models/instance_events_fields.py +102 -0
  221. hyperstack/models/instance_fields.py +156 -0
  222. hyperstack/models/instance_flavor_fields.py +101 -0
  223. hyperstack/models/instance_image_fields.py +87 -0
  224. hyperstack/models/instance_keypair_fields.py +87 -0
  225. hyperstack/models/instance_overview_fields.py +95 -0
  226. hyperstack/models/instance_resize_payload.py +93 -0
  227. hyperstack/models/instances.py +105 -0
  228. hyperstack/models/instances_summary_fields.py +120 -0
  229. hyperstack/models/internal_environment_fields.py +94 -0
  230. hyperstack/models/internal_instance_fields.py +156 -0
  231. hyperstack/models/internal_instance_flavor_fields.py +104 -0
  232. hyperstack/models/internal_instance_image_fields.py +95 -0
  233. hyperstack/models/internal_instance_keypair_fields.py +98 -0
  234. hyperstack/models/internal_instances_response.py +99 -0
  235. hyperstack/models/internal_security_rules_fields_for_instance.py +104 -0
  236. hyperstack/models/internal_volume_attachment_fields.py +98 -0
  237. hyperstack/models/internal_volume_fields.py +95 -0
  238. hyperstack/models/internal_volumes_response.py +99 -0
  239. hyperstack/models/invite_fields.py +94 -0
  240. hyperstack/models/invite_user_payload.py +88 -0
  241. hyperstack/models/invite_user_response_model.py +95 -0
  242. hyperstack/models/keypair_fields.py +98 -0
  243. hyperstack/models/keypairs.py +105 -0
  244. hyperstack/models/lable_resonse.py +89 -0
  245. hyperstack/models/lastdaycostfields.py +93 -0
  246. hyperstack/models/lastdaycostresponse.py +95 -0
  247. hyperstack/models/logo_get_response.py +91 -0
  248. hyperstack/models/logout_payload.py +87 -0
  249. hyperstack/models/metric_item_fields.py +91 -0
  250. hyperstack/models/metrics_fields.py +116 -0
  251. hyperstack/models/name_available_model.py +91 -0
  252. hyperstack/models/new_configurations_response.py +95 -0
  253. hyperstack/models/new_model_response.py +101 -0
  254. hyperstack/models/new_stock_response.py +99 -0
  255. hyperstack/models/new_stock_retrive_response.py +95 -0
  256. hyperstack/models/new_stock_update_response_model.py +89 -0
  257. hyperstack/models/node_model.py +114 -0
  258. hyperstack/models/node_payload_model.py +97 -0
  259. hyperstack/models/node_power_usage_model.py +120 -0
  260. hyperstack/models/node_response_model.py +97 -0
  261. hyperstack/models/node_stock_payload_model.py +95 -0
  262. hyperstack/models/node_stock_response_model.py +95 -0
  263. hyperstack/models/node_stocks_payload.py +93 -0
  264. hyperstack/models/organization_fields.py +114 -0
  265. hyperstack/models/organization_level_billing_history.py +99 -0
  266. hyperstack/models/organization_level_billing_history_resources.py +97 -0
  267. hyperstack/models/organization_level_billing_history_response_attributes.py +87 -0
  268. hyperstack/models/organization_level_billing_history_response_metrics.py +97 -0
  269. hyperstack/models/organization_level_billing_history_response_model.py +95 -0
  270. hyperstack/models/organization_object_response.py +97 -0
  271. hyperstack/models/organization_thresholdfields.py +95 -0
  272. hyperstack/models/organization_user_response_model.py +112 -0
  273. hyperstack/models/organizationcreditrechargelimitresponse.py +95 -0
  274. hyperstack/models/organizationthresholdsresponse.py +99 -0
  275. hyperstack/models/organizationthresholdupdateresponse.py +95 -0
  276. hyperstack/models/overview_info.py +103 -0
  277. hyperstack/models/pagination_data.py +91 -0
  278. hyperstack/models/payment_details_fields.py +106 -0
  279. hyperstack/models/payment_details_response.py +95 -0
  280. hyperstack/models/payment_initiate_fields.py +87 -0
  281. hyperstack/models/payment_initiate_payload.py +87 -0
  282. hyperstack/models/payment_initiate_response.py +95 -0
  283. hyperstack/models/permission_fields.py +98 -0
  284. hyperstack/models/policy_fields.py +104 -0
  285. hyperstack/models/policy_permission_fields.py +91 -0
  286. hyperstack/models/power_usage_model.py +89 -0
  287. hyperstack/models/pricebook_model.py +100 -0
  288. hyperstack/models/pricebook_resource_object_response.py +107 -0
  289. hyperstack/models/pricebook_resource_object_response_for_customer.py +99 -0
  290. hyperstack/models/profile_fields.py +96 -0
  291. hyperstack/models/profile_list_response.py +99 -0
  292. hyperstack/models/profile_object_fields.py +89 -0
  293. hyperstack/models/rbac_role_detail_response_model.py +95 -0
  294. hyperstack/models/rbac_role_detail_response_model_fixed.py +95 -0
  295. hyperstack/models/rbac_role_field.py +87 -0
  296. hyperstack/models/rbac_role_fields.py +114 -0
  297. hyperstack/models/refresh_token_payload.py +89 -0
  298. hyperstack/models/region_fields.py +91 -0
  299. hyperstack/models/region_payload.py +89 -0
  300. hyperstack/models/region_response.py +95 -0
  301. hyperstack/models/regions.py +99 -0
  302. hyperstack/models/remove_member_from_organization_response_model.py +89 -0
  303. hyperstack/models/remove_member_payload.py +88 -0
  304. hyperstack/models/request_console.py +91 -0
  305. hyperstack/models/resource_billing_events_history_metrics.py +95 -0
  306. hyperstack/models/resource_billing_events_history_response.py +99 -0
  307. hyperstack/models/resource_billing_response_for_customer.py +95 -0
  308. hyperstack/models/resource_level_billing_details_attributes.py +91 -0
  309. hyperstack/models/resource_level_billing_details_metrics.py +101 -0
  310. hyperstack/models/resource_level_billing_details_vm.py +99 -0
  311. hyperstack/models/resource_level_billing_details_volume.py +99 -0
  312. hyperstack/models/resource_level_billing_details_volume_attributes.py +95 -0
  313. hyperstack/models/resource_level_billing_details_volume_metrics.py +95 -0
  314. hyperstack/models/resource_level_billing_history.py +105 -0
  315. hyperstack/models/resource_level_billing_history_resources.py +97 -0
  316. hyperstack/models/resource_level_billing_history_response_attributes.py +93 -0
  317. hyperstack/models/resource_level_billing_history_response_metrics.py +91 -0
  318. hyperstack/models/resource_level_billing_vm_details_resources.py +97 -0
  319. hyperstack/models/resource_level_billing_volume_details_resources.py +97 -0
  320. hyperstack/models/resource_level_graph_billing_detail_volume.py +101 -0
  321. hyperstack/models/resource_level_graph_billing_details_attributes.py +91 -0
  322. hyperstack/models/resource_level_graph_billing_details_metrics.py +97 -0
  323. hyperstack/models/resource_level_graph_billing_details_vm.py +101 -0
  324. hyperstack/models/resource_level_graph_billing_vm_details_resources.py +97 -0
  325. hyperstack/models/resource_level_graph_billing_volume_details_resources.py +97 -0
  326. hyperstack/models/resource_level_vm_billing_details_response_model.py +95 -0
  327. hyperstack/models/resource_level_vm_billing_history_response_model.py +95 -0
  328. hyperstack/models/resource_level_vm_graph_billing_details_response_model.py +95 -0
  329. hyperstack/models/resource_level_volume_billing_details_response_model.py +95 -0
  330. hyperstack/models/resource_level_volume_billing_history_response_model.py +95 -0
  331. hyperstack/models/resource_level_volume_graph_billing_details_response_model.py +95 -0
  332. hyperstack/models/resource_object_response_for_customer.py +93 -0
  333. hyperstack/models/response_model.py +89 -0
  334. hyperstack/models/role_permission_fields.py +91 -0
  335. hyperstack/models/role_policy_fields.py +91 -0
  336. hyperstack/models/security_group_rule.py +95 -0
  337. hyperstack/models/security_group_rule_fields.py +104 -0
  338. hyperstack/models/security_rules_fieldsfor_instance.py +104 -0
  339. hyperstack/models/security_rules_protocol_fields.py +91 -0
  340. hyperstack/models/set_defaults_payload.py +89 -0
  341. hyperstack/models/single_visibility_user_response.py +91 -0
  342. hyperstack/models/snapshot_fields.py +105 -0
  343. hyperstack/models/snapshot_restore_request.py +89 -0
  344. hyperstack/models/snapshot_retrieve.py +95 -0
  345. hyperstack/models/snapshot_retrieve_fields.py +103 -0
  346. hyperstack/models/snapshots.py +105 -0
  347. hyperstack/models/start_deployment.py +95 -0
  348. hyperstack/models/start_deployment_payload.py +93 -0
  349. hyperstack/models/stock_visibility_user_list_response.py +99 -0
  350. hyperstack/models/stock_visibility_user_payload.py +87 -0
  351. hyperstack/models/sub_resource_graph_billing_details_metrics.py +152 -0
  352. hyperstack/models/sub_resources_costs_response_model.py +101 -0
  353. hyperstack/models/sub_resources_graph_billing_history_fields.py +97 -0
  354. hyperstack/models/sub_resources_graph_response_model.py +95 -0
  355. hyperstack/models/subscribeorunsubscribeupdatepayload.py +87 -0
  356. hyperstack/models/success_response_model.py +89 -0
  357. hyperstack/models/template.py +95 -0
  358. hyperstack/models/template_fields.py +98 -0
  359. hyperstack/models/templates.py +99 -0
  360. hyperstack/models/token_fields.py +91 -0
  361. hyperstack/models/update_contract_payload.py +104 -0
  362. hyperstack/models/update_discounts_payload.py +102 -0
  363. hyperstack/models/update_discounts_status_payload.py +87 -0
  364. hyperstack/models/update_environment.py +88 -0
  365. hyperstack/models/update_gpu.py +91 -0
  366. hyperstack/models/update_keypair_name.py +88 -0
  367. hyperstack/models/update_keypairnameresponse.py +95 -0
  368. hyperstack/models/update_organization_payload.py +88 -0
  369. hyperstack/models/update_organization_response_model.py +89 -0
  370. hyperstack/models/update_template.py +91 -0
  371. hyperstack/models/user_default_choice_for_user_fields.py +91 -0
  372. hyperstack/models/user_default_choices_for_user_response.py +99 -0
  373. hyperstack/models/user_permission_fields.py +91 -0
  374. hyperstack/models/user_transfer_payload.py +89 -0
  375. hyperstack/models/userinfopostpayload.py +107 -0
  376. hyperstack/models/users_info_fields.py +114 -0
  377. hyperstack/models/users_info_list_response.py +95 -0
  378. hyperstack/models/verify_api_key_payload.py +87 -0
  379. hyperstack/models/verify_api_key_response_model.py +95 -0
  380. hyperstack/models/virtual_machine_usage.py +93 -0
  381. hyperstack/models/vm_usage_request_payload.py +87 -0
  382. hyperstack/models/vm_usage_response.py +101 -0
  383. hyperstack/models/vncurl.py +95 -0
  384. hyperstack/models/vncurl_fields.py +89 -0
  385. hyperstack/models/volume.py +95 -0
  386. hyperstack/models/volume_attachment_fields.py +98 -0
  387. hyperstack/models/volume_fields.py +116 -0
  388. hyperstack/models/volume_fieldsfor_instance.py +97 -0
  389. hyperstack/models/volume_overview_fields.py +91 -0
  390. hyperstack/models/volume_status_change_fields.py +96 -0
  391. hyperstack/models/volume_types.py +91 -0
  392. hyperstack/models/volumes.py +99 -0
  393. hyperstack/models/volumes_last_status_change_response.py +99 -0
  394. hyperstack/models/warning_mail_log_fields.py +99 -0
  395. hyperstack/models/warning_mail_log_response.py +101 -0
  396. hyperstack/py.typed +0 -0
  397. hyperstack/rest.py +257 -0
  398. hyperstack-0.1.23.dist-info/METADATA +16 -0
  399. hyperstack-0.1.23.dist-info/RECORD +401 -0
  400. hyperstack-0.1.23.dist-info/WHEEL +5 -0
  401. hyperstack-0.1.23.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1795 @@
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_callback_payload import AttachCallbackPayload
21
+ from ..models.attach_callback_response import AttachCallbackResponse
22
+ from ..models.response_model import ResponseModel
23
+
24
+ from ..api_client import ApiClient, RequestSerialized
25
+ from ..api_response import ApiResponse
26
+ from ..rest import RESTResponseType
27
+
28
+
29
+ class CallbacksApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def attach_callback_to_virtual_machine(
44
+ self,
45
+ id: StrictInt,
46
+ payload: AttachCallbackPayload,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> AttachCallbackResponse:
60
+ """Attach callback to virtual machine
61
+
62
+ Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine).
63
+
64
+ :param id: (required)
65
+ :type id: int
66
+ :param payload: (required)
67
+ :type payload: AttachCallbackPayload
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
87
+ :return: Returns the result object.
88
+ """ # noqa: E501
89
+
90
+ _param = self._attach_callback_to_virtual_machine_serialize(
91
+ id=id,
92
+ payload=payload,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '200': "AttachCallbackResponse",
101
+ '400': "ErrorResponseModel",
102
+ '401': "ErrorResponseModel",
103
+ '404': "ErrorResponseModel",
104
+ '500': None,
105
+ }
106
+ response_data = self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ def attach_callback_to_virtual_machine_with_http_info(
119
+ self,
120
+ id: StrictInt,
121
+ payload: AttachCallbackPayload,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Annotated[StrictFloat, Field(gt=0)]
128
+ ]
129
+ ] = None,
130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
131
+ _content_type: Optional[StrictStr] = None,
132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
+ ) -> ApiResponse[AttachCallbackResponse]:
135
+ """Attach callback to virtual machine
136
+
137
+ Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine).
138
+
139
+ :param id: (required)
140
+ :type id: int
141
+ :param payload: (required)
142
+ :type payload: AttachCallbackPayload
143
+ :param _request_timeout: timeout setting for this request. If one
144
+ number provided, it will be total request
145
+ timeout. It can also be a pair (tuple) of
146
+ (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
148
+ :param _request_auth: set to override the auth_settings for an a single
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
151
+ :type _request_auth: dict, optional
152
+ :param _content_type: force content-type for the request.
153
+ :type _content_type: str, Optional
154
+ :param _headers: set to override the headers for a single
155
+ request; this effectively ignores the headers
156
+ in the spec for a single request.
157
+ :type _headers: dict, optional
158
+ :param _host_index: set to override the host_index for a single
159
+ request; this effectively ignores the host_index
160
+ in the spec for a single request.
161
+ :type _host_index: int, optional
162
+ :return: Returns the result object.
163
+ """ # noqa: E501
164
+
165
+ _param = self._attach_callback_to_virtual_machine_serialize(
166
+ id=id,
167
+ payload=payload,
168
+ _request_auth=_request_auth,
169
+ _content_type=_content_type,
170
+ _headers=_headers,
171
+ _host_index=_host_index
172
+ )
173
+
174
+ _response_types_map: Dict[str, Optional[str]] = {
175
+ '200': "AttachCallbackResponse",
176
+ '400': "ErrorResponseModel",
177
+ '401': "ErrorResponseModel",
178
+ '404': "ErrorResponseModel",
179
+ '500': None,
180
+ }
181
+ response_data = self.api_client.call_api(
182
+ *_param,
183
+ _request_timeout=_request_timeout
184
+ )
185
+ response_data.read()
186
+ return self.api_client.response_deserialize(
187
+ response_data=response_data,
188
+ response_types_map=_response_types_map,
189
+ )
190
+
191
+
192
+ @validate_call
193
+ def attach_callback_to_virtual_machine_without_preload_content(
194
+ self,
195
+ id: StrictInt,
196
+ payload: AttachCallbackPayload,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """Attach callback to virtual machine
211
+
212
+ Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine).
213
+
214
+ :param id: (required)
215
+ :type id: int
216
+ :param payload: (required)
217
+ :type payload: AttachCallbackPayload
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._attach_callback_to_virtual_machine_serialize(
241
+ id=id,
242
+ payload=payload,
243
+ _request_auth=_request_auth,
244
+ _content_type=_content_type,
245
+ _headers=_headers,
246
+ _host_index=_host_index
247
+ )
248
+
249
+ _response_types_map: Dict[str, Optional[str]] = {
250
+ '200': "AttachCallbackResponse",
251
+ '400': "ErrorResponseModel",
252
+ '401': "ErrorResponseModel",
253
+ '404': "ErrorResponseModel",
254
+ '500': None,
255
+ }
256
+ response_data = self.api_client.call_api(
257
+ *_param,
258
+ _request_timeout=_request_timeout
259
+ )
260
+ return response_data.response
261
+
262
+
263
+ def _attach_callback_to_virtual_machine_serialize(
264
+ self,
265
+ id,
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
+ if id is not None:
289
+ _path_params['id'] = id
290
+ # process the query parameters
291
+ # process the header parameters
292
+ # process the form parameters
293
+ # process the body parameter
294
+ if payload is not None:
295
+ _body_params = payload
296
+
297
+
298
+ # set the HTTP header `Accept`
299
+ if 'Accept' not in _header_params:
300
+ _header_params['Accept'] = self.api_client.select_header_accept(
301
+ [
302
+ 'application/json'
303
+ ]
304
+ )
305
+
306
+ # set the HTTP header `Content-Type`
307
+ if _content_type:
308
+ _header_params['Content-Type'] = _content_type
309
+ else:
310
+ _default_content_type = (
311
+ self.api_client.select_header_content_type(
312
+ [
313
+ 'application/json'
314
+ ]
315
+ )
316
+ )
317
+ if _default_content_type is not None:
318
+ _header_params['Content-Type'] = _default_content_type
319
+
320
+ # authentication setting
321
+ _auth_settings: List[str] = [
322
+ 'apiKey',
323
+ 'accessToken'
324
+ ]
325
+
326
+ return self.api_client.param_serialize(
327
+ method='POST',
328
+ resource_path='/core/virtual-machines/{id}/attach-callback',
329
+ path_params=_path_params,
330
+ query_params=_query_params,
331
+ header_params=_header_params,
332
+ body=_body_params,
333
+ post_params=_form_params,
334
+ files=_files,
335
+ auth_settings=_auth_settings,
336
+ collection_formats=_collection_formats,
337
+ _host=_host,
338
+ _request_auth=_request_auth
339
+ )
340
+
341
+
342
+
343
+
344
+ @validate_call
345
+ def attach_callback_to_volume(
346
+ self,
347
+ id: StrictInt,
348
+ payload: AttachCallbackPayload,
349
+ _request_timeout: Union[
350
+ None,
351
+ Annotated[StrictFloat, Field(gt=0)],
352
+ Tuple[
353
+ Annotated[StrictFloat, Field(gt=0)],
354
+ Annotated[StrictFloat, Field(gt=0)]
355
+ ]
356
+ ] = None,
357
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
358
+ _content_type: Optional[StrictStr] = None,
359
+ _headers: Optional[Dict[StrictStr, Any]] = None,
360
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
361
+ ) -> AttachCallbackResponse:
362
+ """Attach callback to volume
363
+
364
+ Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
365
+
366
+ :param id: (required)
367
+ :type id: int
368
+ :param payload: (required)
369
+ :type payload: AttachCallbackPayload
370
+ :param _request_timeout: timeout setting for this request. If one
371
+ number provided, it will be total request
372
+ timeout. It can also be a pair (tuple) of
373
+ (connection, read) timeouts.
374
+ :type _request_timeout: int, tuple(int, int), optional
375
+ :param _request_auth: set to override the auth_settings for an a single
376
+ request; this effectively ignores the
377
+ authentication in the spec for a single request.
378
+ :type _request_auth: dict, optional
379
+ :param _content_type: force content-type for the request.
380
+ :type _content_type: str, Optional
381
+ :param _headers: set to override the headers for a single
382
+ request; this effectively ignores the headers
383
+ in the spec for a single request.
384
+ :type _headers: dict, optional
385
+ :param _host_index: set to override the host_index for a single
386
+ request; this effectively ignores the host_index
387
+ in the spec for a single request.
388
+ :type _host_index: int, optional
389
+ :return: Returns the result object.
390
+ """ # noqa: E501
391
+
392
+ _param = self._attach_callback_to_volume_serialize(
393
+ id=id,
394
+ payload=payload,
395
+ _request_auth=_request_auth,
396
+ _content_type=_content_type,
397
+ _headers=_headers,
398
+ _host_index=_host_index
399
+ )
400
+
401
+ _response_types_map: Dict[str, Optional[str]] = {
402
+ '200': "AttachCallbackResponse",
403
+ '400': "ErrorResponseModel",
404
+ '401': "ErrorResponseModel",
405
+ '404': "ErrorResponseModel",
406
+ '500': None,
407
+ }
408
+ response_data = self.api_client.call_api(
409
+ *_param,
410
+ _request_timeout=_request_timeout
411
+ )
412
+ response_data.read()
413
+ return self.api_client.response_deserialize(
414
+ response_data=response_data,
415
+ response_types_map=_response_types_map,
416
+ ).data
417
+
418
+
419
+ @validate_call
420
+ def attach_callback_to_volume_with_http_info(
421
+ self,
422
+ id: StrictInt,
423
+ payload: AttachCallbackPayload,
424
+ _request_timeout: Union[
425
+ None,
426
+ Annotated[StrictFloat, Field(gt=0)],
427
+ Tuple[
428
+ Annotated[StrictFloat, Field(gt=0)],
429
+ Annotated[StrictFloat, Field(gt=0)]
430
+ ]
431
+ ] = None,
432
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
433
+ _content_type: Optional[StrictStr] = None,
434
+ _headers: Optional[Dict[StrictStr, Any]] = None,
435
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
436
+ ) -> ApiResponse[AttachCallbackResponse]:
437
+ """Attach callback to volume
438
+
439
+ Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
440
+
441
+ :param id: (required)
442
+ :type id: int
443
+ :param payload: (required)
444
+ :type payload: AttachCallbackPayload
445
+ :param _request_timeout: timeout setting for this request. If one
446
+ number provided, it will be total request
447
+ timeout. It can also be a pair (tuple) of
448
+ (connection, read) timeouts.
449
+ :type _request_timeout: int, tuple(int, int), optional
450
+ :param _request_auth: set to override the auth_settings for an a single
451
+ request; this effectively ignores the
452
+ authentication in the spec for a single request.
453
+ :type _request_auth: dict, optional
454
+ :param _content_type: force content-type for the request.
455
+ :type _content_type: str, Optional
456
+ :param _headers: set to override the headers for a single
457
+ request; this effectively ignores the headers
458
+ in the spec for a single request.
459
+ :type _headers: dict, optional
460
+ :param _host_index: set to override the host_index for a single
461
+ request; this effectively ignores the host_index
462
+ in the spec for a single request.
463
+ :type _host_index: int, optional
464
+ :return: Returns the result object.
465
+ """ # noqa: E501
466
+
467
+ _param = self._attach_callback_to_volume_serialize(
468
+ id=id,
469
+ payload=payload,
470
+ _request_auth=_request_auth,
471
+ _content_type=_content_type,
472
+ _headers=_headers,
473
+ _host_index=_host_index
474
+ )
475
+
476
+ _response_types_map: Dict[str, Optional[str]] = {
477
+ '200': "AttachCallbackResponse",
478
+ '400': "ErrorResponseModel",
479
+ '401': "ErrorResponseModel",
480
+ '404': "ErrorResponseModel",
481
+ '500': None,
482
+ }
483
+ response_data = self.api_client.call_api(
484
+ *_param,
485
+ _request_timeout=_request_timeout
486
+ )
487
+ response_data.read()
488
+ return self.api_client.response_deserialize(
489
+ response_data=response_data,
490
+ response_types_map=_response_types_map,
491
+ )
492
+
493
+
494
+ @validate_call
495
+ def attach_callback_to_volume_without_preload_content(
496
+ self,
497
+ id: StrictInt,
498
+ payload: AttachCallbackPayload,
499
+ _request_timeout: Union[
500
+ None,
501
+ Annotated[StrictFloat, Field(gt=0)],
502
+ Tuple[
503
+ Annotated[StrictFloat, Field(gt=0)],
504
+ Annotated[StrictFloat, Field(gt=0)]
505
+ ]
506
+ ] = None,
507
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
508
+ _content_type: Optional[StrictStr] = None,
509
+ _headers: Optional[Dict[StrictStr, Any]] = None,
510
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
511
+ ) -> RESTResponseType:
512
+ """Attach callback to volume
513
+
514
+ Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
515
+
516
+ :param id: (required)
517
+ :type id: int
518
+ :param payload: (required)
519
+ :type payload: AttachCallbackPayload
520
+ :param _request_timeout: timeout setting for this request. If one
521
+ number provided, it will be total request
522
+ timeout. It can also be a pair (tuple) of
523
+ (connection, read) timeouts.
524
+ :type _request_timeout: int, tuple(int, int), optional
525
+ :param _request_auth: set to override the auth_settings for an a single
526
+ request; this effectively ignores the
527
+ authentication in the spec for a single request.
528
+ :type _request_auth: dict, optional
529
+ :param _content_type: force content-type for the request.
530
+ :type _content_type: str, Optional
531
+ :param _headers: set to override the headers for a single
532
+ request; this effectively ignores the headers
533
+ in the spec for a single request.
534
+ :type _headers: dict, optional
535
+ :param _host_index: set to override the host_index for a single
536
+ request; this effectively ignores the host_index
537
+ in the spec for a single request.
538
+ :type _host_index: int, optional
539
+ :return: Returns the result object.
540
+ """ # noqa: E501
541
+
542
+ _param = self._attach_callback_to_volume_serialize(
543
+ id=id,
544
+ payload=payload,
545
+ _request_auth=_request_auth,
546
+ _content_type=_content_type,
547
+ _headers=_headers,
548
+ _host_index=_host_index
549
+ )
550
+
551
+ _response_types_map: Dict[str, Optional[str]] = {
552
+ '200': "AttachCallbackResponse",
553
+ '400': "ErrorResponseModel",
554
+ '401': "ErrorResponseModel",
555
+ '404': "ErrorResponseModel",
556
+ '500': None,
557
+ }
558
+ response_data = self.api_client.call_api(
559
+ *_param,
560
+ _request_timeout=_request_timeout
561
+ )
562
+ return response_data.response
563
+
564
+
565
+ def _attach_callback_to_volume_serialize(
566
+ self,
567
+ id,
568
+ payload,
569
+ _request_auth,
570
+ _content_type,
571
+ _headers,
572
+ _host_index,
573
+ ) -> RequestSerialized:
574
+
575
+ _host = None
576
+
577
+ _collection_formats: Dict[str, str] = {
578
+ }
579
+
580
+ _path_params: Dict[str, str] = {}
581
+ _query_params: List[Tuple[str, str]] = []
582
+ _header_params: Dict[str, Optional[str]] = _headers or {}
583
+ _form_params: List[Tuple[str, str]] = []
584
+ _files: Dict[
585
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
586
+ ] = {}
587
+ _body_params: Optional[bytes] = None
588
+
589
+ # process the path parameters
590
+ if id is not None:
591
+ _path_params['id'] = id
592
+ # process the query parameters
593
+ # process the header parameters
594
+ # process the form parameters
595
+ # process the body parameter
596
+ if payload is not None:
597
+ _body_params = payload
598
+
599
+
600
+ # set the HTTP header `Accept`
601
+ if 'Accept' not in _header_params:
602
+ _header_params['Accept'] = self.api_client.select_header_accept(
603
+ [
604
+ 'application/json'
605
+ ]
606
+ )
607
+
608
+ # set the HTTP header `Content-Type`
609
+ if _content_type:
610
+ _header_params['Content-Type'] = _content_type
611
+ else:
612
+ _default_content_type = (
613
+ self.api_client.select_header_content_type(
614
+ [
615
+ 'application/json'
616
+ ]
617
+ )
618
+ )
619
+ if _default_content_type is not None:
620
+ _header_params['Content-Type'] = _default_content_type
621
+
622
+ # authentication setting
623
+ _auth_settings: List[str] = [
624
+ 'apiKey',
625
+ 'accessToken'
626
+ ]
627
+
628
+ return self.api_client.param_serialize(
629
+ method='POST',
630
+ resource_path='/core/volumes/{id}/attach-callback',
631
+ path_params=_path_params,
632
+ query_params=_query_params,
633
+ header_params=_header_params,
634
+ body=_body_params,
635
+ post_params=_form_params,
636
+ files=_files,
637
+ auth_settings=_auth_settings,
638
+ collection_formats=_collection_formats,
639
+ _host=_host,
640
+ _request_auth=_request_auth
641
+ )
642
+
643
+
644
+
645
+
646
+ @validate_call
647
+ def delete_virtual_machine_callback(
648
+ self,
649
+ id: StrictInt,
650
+ _request_timeout: Union[
651
+ None,
652
+ Annotated[StrictFloat, Field(gt=0)],
653
+ Tuple[
654
+ Annotated[StrictFloat, Field(gt=0)],
655
+ Annotated[StrictFloat, Field(gt=0)]
656
+ ]
657
+ ] = None,
658
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
659
+ _content_type: Optional[StrictStr] = None,
660
+ _headers: Optional[Dict[StrictStr, Any]] = None,
661
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
662
+ ) -> ResponseModel:
663
+ """Delete virtual machine callback
664
+
665
+ Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
666
+
667
+ :param id: (required)
668
+ :type id: int
669
+ :param _request_timeout: timeout setting for this request. If one
670
+ number provided, it will be total request
671
+ timeout. It can also be a pair (tuple) of
672
+ (connection, read) timeouts.
673
+ :type _request_timeout: int, tuple(int, int), optional
674
+ :param _request_auth: set to override the auth_settings for an a single
675
+ request; this effectively ignores the
676
+ authentication in the spec for a single request.
677
+ :type _request_auth: dict, optional
678
+ :param _content_type: force content-type for the request.
679
+ :type _content_type: str, Optional
680
+ :param _headers: set to override the headers for a single
681
+ request; this effectively ignores the headers
682
+ in the spec for a single request.
683
+ :type _headers: dict, optional
684
+ :param _host_index: set to override the host_index for a single
685
+ request; this effectively ignores the host_index
686
+ in the spec for a single request.
687
+ :type _host_index: int, optional
688
+ :return: Returns the result object.
689
+ """ # noqa: E501
690
+
691
+ _param = self._delete_virtual_machine_callback_serialize(
692
+ id=id,
693
+ _request_auth=_request_auth,
694
+ _content_type=_content_type,
695
+ _headers=_headers,
696
+ _host_index=_host_index
697
+ )
698
+
699
+ _response_types_map: Dict[str, Optional[str]] = {
700
+ '200': "ResponseModel",
701
+ '400': "ErrorResponseModel",
702
+ '401': "ErrorResponseModel",
703
+ '404': "ErrorResponseModel",
704
+ '500': None,
705
+ }
706
+ response_data = self.api_client.call_api(
707
+ *_param,
708
+ _request_timeout=_request_timeout
709
+ )
710
+ response_data.read()
711
+ return self.api_client.response_deserialize(
712
+ response_data=response_data,
713
+ response_types_map=_response_types_map,
714
+ ).data
715
+
716
+
717
+ @validate_call
718
+ def delete_virtual_machine_callback_with_http_info(
719
+ self,
720
+ id: StrictInt,
721
+ _request_timeout: Union[
722
+ None,
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Tuple[
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Annotated[StrictFloat, Field(gt=0)]
727
+ ]
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> ApiResponse[ResponseModel]:
734
+ """Delete virtual machine callback
735
+
736
+ Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
737
+
738
+ :param id: (required)
739
+ :type id: int
740
+ :param _request_timeout: timeout setting for this request. If one
741
+ number provided, it will be total request
742
+ timeout. It can also be a pair (tuple) of
743
+ (connection, read) timeouts.
744
+ :type _request_timeout: int, tuple(int, int), optional
745
+ :param _request_auth: set to override the auth_settings for an a single
746
+ request; this effectively ignores the
747
+ authentication in the spec for a single request.
748
+ :type _request_auth: dict, optional
749
+ :param _content_type: force content-type for the request.
750
+ :type _content_type: str, Optional
751
+ :param _headers: set to override the headers for a single
752
+ request; this effectively ignores the headers
753
+ in the spec for a single request.
754
+ :type _headers: dict, optional
755
+ :param _host_index: set to override the host_index for a single
756
+ request; this effectively ignores the host_index
757
+ in the spec for a single request.
758
+ :type _host_index: int, optional
759
+ :return: Returns the result object.
760
+ """ # noqa: E501
761
+
762
+ _param = self._delete_virtual_machine_callback_serialize(
763
+ id=id,
764
+ _request_auth=_request_auth,
765
+ _content_type=_content_type,
766
+ _headers=_headers,
767
+ _host_index=_host_index
768
+ )
769
+
770
+ _response_types_map: Dict[str, Optional[str]] = {
771
+ '200': "ResponseModel",
772
+ '400': "ErrorResponseModel",
773
+ '401': "ErrorResponseModel",
774
+ '404': "ErrorResponseModel",
775
+ '500': None,
776
+ }
777
+ response_data = self.api_client.call_api(
778
+ *_param,
779
+ _request_timeout=_request_timeout
780
+ )
781
+ response_data.read()
782
+ return self.api_client.response_deserialize(
783
+ response_data=response_data,
784
+ response_types_map=_response_types_map,
785
+ )
786
+
787
+
788
+ @validate_call
789
+ def delete_virtual_machine_callback_without_preload_content(
790
+ self,
791
+ id: StrictInt,
792
+ _request_timeout: Union[
793
+ None,
794
+ Annotated[StrictFloat, Field(gt=0)],
795
+ Tuple[
796
+ Annotated[StrictFloat, Field(gt=0)],
797
+ Annotated[StrictFloat, Field(gt=0)]
798
+ ]
799
+ ] = None,
800
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
801
+ _content_type: Optional[StrictStr] = None,
802
+ _headers: Optional[Dict[StrictStr, Any]] = None,
803
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
804
+ ) -> RESTResponseType:
805
+ """Delete virtual machine callback
806
+
807
+ Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
808
+
809
+ :param id: (required)
810
+ :type id: int
811
+ :param _request_timeout: timeout setting for this request. If one
812
+ number provided, it will be total request
813
+ timeout. It can also be a pair (tuple) of
814
+ (connection, read) timeouts.
815
+ :type _request_timeout: int, tuple(int, int), optional
816
+ :param _request_auth: set to override the auth_settings for an a single
817
+ request; this effectively ignores the
818
+ authentication in the spec for a single request.
819
+ :type _request_auth: dict, optional
820
+ :param _content_type: force content-type for the request.
821
+ :type _content_type: str, Optional
822
+ :param _headers: set to override the headers for a single
823
+ request; this effectively ignores the headers
824
+ in the spec for a single request.
825
+ :type _headers: dict, optional
826
+ :param _host_index: set to override the host_index for a single
827
+ request; this effectively ignores the host_index
828
+ in the spec for a single request.
829
+ :type _host_index: int, optional
830
+ :return: Returns the result object.
831
+ """ # noqa: E501
832
+
833
+ _param = self._delete_virtual_machine_callback_serialize(
834
+ id=id,
835
+ _request_auth=_request_auth,
836
+ _content_type=_content_type,
837
+ _headers=_headers,
838
+ _host_index=_host_index
839
+ )
840
+
841
+ _response_types_map: Dict[str, Optional[str]] = {
842
+ '200': "ResponseModel",
843
+ '400': "ErrorResponseModel",
844
+ '401': "ErrorResponseModel",
845
+ '404': "ErrorResponseModel",
846
+ '500': None,
847
+ }
848
+ response_data = self.api_client.call_api(
849
+ *_param,
850
+ _request_timeout=_request_timeout
851
+ )
852
+ return response_data.response
853
+
854
+
855
+ def _delete_virtual_machine_callback_serialize(
856
+ self,
857
+ id,
858
+ _request_auth,
859
+ _content_type,
860
+ _headers,
861
+ _host_index,
862
+ ) -> RequestSerialized:
863
+
864
+ _host = None
865
+
866
+ _collection_formats: Dict[str, str] = {
867
+ }
868
+
869
+ _path_params: Dict[str, str] = {}
870
+ _query_params: List[Tuple[str, str]] = []
871
+ _header_params: Dict[str, Optional[str]] = _headers or {}
872
+ _form_params: List[Tuple[str, str]] = []
873
+ _files: Dict[
874
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
875
+ ] = {}
876
+ _body_params: Optional[bytes] = None
877
+
878
+ # process the path parameters
879
+ if id is not None:
880
+ _path_params['id'] = id
881
+ # process the query parameters
882
+ # process the header parameters
883
+ # process the form parameters
884
+ # process the body parameter
885
+
886
+
887
+ # set the HTTP header `Accept`
888
+ if 'Accept' not in _header_params:
889
+ _header_params['Accept'] = self.api_client.select_header_accept(
890
+ [
891
+ 'application/json'
892
+ ]
893
+ )
894
+
895
+
896
+ # authentication setting
897
+ _auth_settings: List[str] = [
898
+ 'apiKey',
899
+ 'accessToken'
900
+ ]
901
+
902
+ return self.api_client.param_serialize(
903
+ method='DELETE',
904
+ resource_path='/core/virtual-machines/{id}/delete-callback',
905
+ path_params=_path_params,
906
+ query_params=_query_params,
907
+ header_params=_header_params,
908
+ body=_body_params,
909
+ post_params=_form_params,
910
+ files=_files,
911
+ auth_settings=_auth_settings,
912
+ collection_formats=_collection_formats,
913
+ _host=_host,
914
+ _request_auth=_request_auth
915
+ )
916
+
917
+
918
+
919
+
920
+ @validate_call
921
+ def delete_volume_callback(
922
+ self,
923
+ id: StrictInt,
924
+ _request_timeout: Union[
925
+ None,
926
+ Annotated[StrictFloat, Field(gt=0)],
927
+ Tuple[
928
+ Annotated[StrictFloat, Field(gt=0)],
929
+ Annotated[StrictFloat, Field(gt=0)]
930
+ ]
931
+ ] = None,
932
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
933
+ _content_type: Optional[StrictStr] = None,
934
+ _headers: Optional[Dict[StrictStr, Any]] = None,
935
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
936
+ ) -> ResponseModel:
937
+ """Delete volume callback
938
+
939
+ Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
940
+
941
+ :param id: (required)
942
+ :type id: int
943
+ :param _request_timeout: timeout setting for this request. If one
944
+ number provided, it will be total request
945
+ timeout. It can also be a pair (tuple) of
946
+ (connection, read) timeouts.
947
+ :type _request_timeout: int, tuple(int, int), optional
948
+ :param _request_auth: set to override the auth_settings for an a single
949
+ request; this effectively ignores the
950
+ authentication in the spec for a single request.
951
+ :type _request_auth: dict, optional
952
+ :param _content_type: force content-type for the request.
953
+ :type _content_type: str, Optional
954
+ :param _headers: set to override the headers for a single
955
+ request; this effectively ignores the headers
956
+ in the spec for a single request.
957
+ :type _headers: dict, optional
958
+ :param _host_index: set to override the host_index for a single
959
+ request; this effectively ignores the host_index
960
+ in the spec for a single request.
961
+ :type _host_index: int, optional
962
+ :return: Returns the result object.
963
+ """ # noqa: E501
964
+
965
+ _param = self._delete_volume_callback_serialize(
966
+ id=id,
967
+ _request_auth=_request_auth,
968
+ _content_type=_content_type,
969
+ _headers=_headers,
970
+ _host_index=_host_index
971
+ )
972
+
973
+ _response_types_map: Dict[str, Optional[str]] = {
974
+ '200': "ResponseModel",
975
+ '400': "ErrorResponseModel",
976
+ '401': "ErrorResponseModel",
977
+ '404': "ErrorResponseModel",
978
+ '500': None,
979
+ }
980
+ response_data = self.api_client.call_api(
981
+ *_param,
982
+ _request_timeout=_request_timeout
983
+ )
984
+ response_data.read()
985
+ return self.api_client.response_deserialize(
986
+ response_data=response_data,
987
+ response_types_map=_response_types_map,
988
+ ).data
989
+
990
+
991
+ @validate_call
992
+ def delete_volume_callback_with_http_info(
993
+ self,
994
+ id: StrictInt,
995
+ _request_timeout: Union[
996
+ None,
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Tuple[
999
+ Annotated[StrictFloat, Field(gt=0)],
1000
+ Annotated[StrictFloat, Field(gt=0)]
1001
+ ]
1002
+ ] = None,
1003
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1004
+ _content_type: Optional[StrictStr] = None,
1005
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1006
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1007
+ ) -> ApiResponse[ResponseModel]:
1008
+ """Delete volume callback
1009
+
1010
+ Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1011
+
1012
+ :param id: (required)
1013
+ :type id: int
1014
+ :param _request_timeout: timeout setting for this request. If one
1015
+ number provided, it will be total request
1016
+ timeout. It can also be a pair (tuple) of
1017
+ (connection, read) timeouts.
1018
+ :type _request_timeout: int, tuple(int, int), optional
1019
+ :param _request_auth: set to override the auth_settings for an a single
1020
+ request; this effectively ignores the
1021
+ authentication in the spec for a single request.
1022
+ :type _request_auth: dict, optional
1023
+ :param _content_type: force content-type for the request.
1024
+ :type _content_type: str, Optional
1025
+ :param _headers: set to override the headers for a single
1026
+ request; this effectively ignores the headers
1027
+ in the spec for a single request.
1028
+ :type _headers: dict, optional
1029
+ :param _host_index: set to override the host_index for a single
1030
+ request; this effectively ignores the host_index
1031
+ in the spec for a single request.
1032
+ :type _host_index: int, optional
1033
+ :return: Returns the result object.
1034
+ """ # noqa: E501
1035
+
1036
+ _param = self._delete_volume_callback_serialize(
1037
+ id=id,
1038
+ _request_auth=_request_auth,
1039
+ _content_type=_content_type,
1040
+ _headers=_headers,
1041
+ _host_index=_host_index
1042
+ )
1043
+
1044
+ _response_types_map: Dict[str, Optional[str]] = {
1045
+ '200': "ResponseModel",
1046
+ '400': "ErrorResponseModel",
1047
+ '401': "ErrorResponseModel",
1048
+ '404': "ErrorResponseModel",
1049
+ '500': None,
1050
+ }
1051
+ response_data = self.api_client.call_api(
1052
+ *_param,
1053
+ _request_timeout=_request_timeout
1054
+ )
1055
+ response_data.read()
1056
+ return self.api_client.response_deserialize(
1057
+ response_data=response_data,
1058
+ response_types_map=_response_types_map,
1059
+ )
1060
+
1061
+
1062
+ @validate_call
1063
+ def delete_volume_callback_without_preload_content(
1064
+ self,
1065
+ id: StrictInt,
1066
+ _request_timeout: Union[
1067
+ None,
1068
+ Annotated[StrictFloat, Field(gt=0)],
1069
+ Tuple[
1070
+ Annotated[StrictFloat, Field(gt=0)],
1071
+ Annotated[StrictFloat, Field(gt=0)]
1072
+ ]
1073
+ ] = None,
1074
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1075
+ _content_type: Optional[StrictStr] = None,
1076
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1077
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1078
+ ) -> RESTResponseType:
1079
+ """Delete volume callback
1080
+
1081
+ Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1082
+
1083
+ :param id: (required)
1084
+ :type id: int
1085
+ :param _request_timeout: timeout setting for this request. If one
1086
+ number provided, it will be total request
1087
+ timeout. It can also be a pair (tuple) of
1088
+ (connection, read) timeouts.
1089
+ :type _request_timeout: int, tuple(int, int), optional
1090
+ :param _request_auth: set to override the auth_settings for an a single
1091
+ request; this effectively ignores the
1092
+ authentication in the spec for a single request.
1093
+ :type _request_auth: dict, optional
1094
+ :param _content_type: force content-type for the request.
1095
+ :type _content_type: str, Optional
1096
+ :param _headers: set to override the headers for a single
1097
+ request; this effectively ignores the headers
1098
+ in the spec for a single request.
1099
+ :type _headers: dict, optional
1100
+ :param _host_index: set to override the host_index for a single
1101
+ request; this effectively ignores the host_index
1102
+ in the spec for a single request.
1103
+ :type _host_index: int, optional
1104
+ :return: Returns the result object.
1105
+ """ # noqa: E501
1106
+
1107
+ _param = self._delete_volume_callback_serialize(
1108
+ id=id,
1109
+ _request_auth=_request_auth,
1110
+ _content_type=_content_type,
1111
+ _headers=_headers,
1112
+ _host_index=_host_index
1113
+ )
1114
+
1115
+ _response_types_map: Dict[str, Optional[str]] = {
1116
+ '200': "ResponseModel",
1117
+ '400': "ErrorResponseModel",
1118
+ '401': "ErrorResponseModel",
1119
+ '404': "ErrorResponseModel",
1120
+ '500': None,
1121
+ }
1122
+ response_data = self.api_client.call_api(
1123
+ *_param,
1124
+ _request_timeout=_request_timeout
1125
+ )
1126
+ return response_data.response
1127
+
1128
+
1129
+ def _delete_volume_callback_serialize(
1130
+ self,
1131
+ id,
1132
+ _request_auth,
1133
+ _content_type,
1134
+ _headers,
1135
+ _host_index,
1136
+ ) -> RequestSerialized:
1137
+
1138
+ _host = None
1139
+
1140
+ _collection_formats: Dict[str, str] = {
1141
+ }
1142
+
1143
+ _path_params: Dict[str, str] = {}
1144
+ _query_params: List[Tuple[str, str]] = []
1145
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1146
+ _form_params: List[Tuple[str, str]] = []
1147
+ _files: Dict[
1148
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1149
+ ] = {}
1150
+ _body_params: Optional[bytes] = None
1151
+
1152
+ # process the path parameters
1153
+ if id is not None:
1154
+ _path_params['id'] = id
1155
+ # process the query parameters
1156
+ # process the header parameters
1157
+ # process the form parameters
1158
+ # process the body parameter
1159
+
1160
+
1161
+ # set the HTTP header `Accept`
1162
+ if 'Accept' not in _header_params:
1163
+ _header_params['Accept'] = self.api_client.select_header_accept(
1164
+ [
1165
+ 'application/json'
1166
+ ]
1167
+ )
1168
+
1169
+
1170
+ # authentication setting
1171
+ _auth_settings: List[str] = [
1172
+ 'apiKey',
1173
+ 'accessToken'
1174
+ ]
1175
+
1176
+ return self.api_client.param_serialize(
1177
+ method='DELETE',
1178
+ resource_path='/core/volumes/{id}/delete-callback',
1179
+ path_params=_path_params,
1180
+ query_params=_query_params,
1181
+ header_params=_header_params,
1182
+ body=_body_params,
1183
+ post_params=_form_params,
1184
+ files=_files,
1185
+ auth_settings=_auth_settings,
1186
+ collection_formats=_collection_formats,
1187
+ _host=_host,
1188
+ _request_auth=_request_auth
1189
+ )
1190
+
1191
+
1192
+
1193
+
1194
+ @validate_call
1195
+ def update_virtual_machine_callback(
1196
+ self,
1197
+ id: StrictInt,
1198
+ payload: AttachCallbackPayload,
1199
+ _request_timeout: Union[
1200
+ None,
1201
+ Annotated[StrictFloat, Field(gt=0)],
1202
+ Tuple[
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Annotated[StrictFloat, Field(gt=0)]
1205
+ ]
1206
+ ] = None,
1207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1208
+ _content_type: Optional[StrictStr] = None,
1209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1211
+ ) -> AttachCallbackResponse:
1212
+ """Update virtual machine callback
1213
+
1214
+ Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1215
+
1216
+ :param id: (required)
1217
+ :type id: int
1218
+ :param payload: (required)
1219
+ :type payload: AttachCallbackPayload
1220
+ :param _request_timeout: timeout setting for this request. If one
1221
+ number provided, it will be total request
1222
+ timeout. It can also be a pair (tuple) of
1223
+ (connection, read) timeouts.
1224
+ :type _request_timeout: int, tuple(int, int), optional
1225
+ :param _request_auth: set to override the auth_settings for an a single
1226
+ request; this effectively ignores the
1227
+ authentication in the spec for a single request.
1228
+ :type _request_auth: dict, optional
1229
+ :param _content_type: force content-type for the request.
1230
+ :type _content_type: str, Optional
1231
+ :param _headers: set to override the headers for a single
1232
+ request; this effectively ignores the headers
1233
+ in the spec for a single request.
1234
+ :type _headers: dict, optional
1235
+ :param _host_index: set to override the host_index for a single
1236
+ request; this effectively ignores the host_index
1237
+ in the spec for a single request.
1238
+ :type _host_index: int, optional
1239
+ :return: Returns the result object.
1240
+ """ # noqa: E501
1241
+
1242
+ _param = self._update_virtual_machine_callback_serialize(
1243
+ id=id,
1244
+ payload=payload,
1245
+ _request_auth=_request_auth,
1246
+ _content_type=_content_type,
1247
+ _headers=_headers,
1248
+ _host_index=_host_index
1249
+ )
1250
+
1251
+ _response_types_map: Dict[str, Optional[str]] = {
1252
+ '200': "AttachCallbackResponse",
1253
+ '400': "ErrorResponseModel",
1254
+ '401': "ErrorResponseModel",
1255
+ '404': "ErrorResponseModel",
1256
+ '500': None,
1257
+ }
1258
+ response_data = self.api_client.call_api(
1259
+ *_param,
1260
+ _request_timeout=_request_timeout
1261
+ )
1262
+ response_data.read()
1263
+ return self.api_client.response_deserialize(
1264
+ response_data=response_data,
1265
+ response_types_map=_response_types_map,
1266
+ ).data
1267
+
1268
+
1269
+ @validate_call
1270
+ def update_virtual_machine_callback_with_http_info(
1271
+ self,
1272
+ id: StrictInt,
1273
+ payload: AttachCallbackPayload,
1274
+ _request_timeout: Union[
1275
+ None,
1276
+ Annotated[StrictFloat, Field(gt=0)],
1277
+ Tuple[
1278
+ Annotated[StrictFloat, Field(gt=0)],
1279
+ Annotated[StrictFloat, Field(gt=0)]
1280
+ ]
1281
+ ] = None,
1282
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1283
+ _content_type: Optional[StrictStr] = None,
1284
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1285
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1286
+ ) -> ApiResponse[AttachCallbackResponse]:
1287
+ """Update virtual machine callback
1288
+
1289
+ Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1290
+
1291
+ :param id: (required)
1292
+ :type id: int
1293
+ :param payload: (required)
1294
+ :type payload: AttachCallbackPayload
1295
+ :param _request_timeout: timeout setting for this request. If one
1296
+ number provided, it will be total request
1297
+ timeout. It can also be a pair (tuple) of
1298
+ (connection, read) timeouts.
1299
+ :type _request_timeout: int, tuple(int, int), optional
1300
+ :param _request_auth: set to override the auth_settings for an a single
1301
+ request; this effectively ignores the
1302
+ authentication in the spec for a single request.
1303
+ :type _request_auth: dict, optional
1304
+ :param _content_type: force content-type for the request.
1305
+ :type _content_type: str, Optional
1306
+ :param _headers: set to override the headers for a single
1307
+ request; this effectively ignores the headers
1308
+ in the spec for a single request.
1309
+ :type _headers: dict, optional
1310
+ :param _host_index: set to override the host_index for a single
1311
+ request; this effectively ignores the host_index
1312
+ in the spec for a single request.
1313
+ :type _host_index: int, optional
1314
+ :return: Returns the result object.
1315
+ """ # noqa: E501
1316
+
1317
+ _param = self._update_virtual_machine_callback_serialize(
1318
+ id=id,
1319
+ payload=payload,
1320
+ _request_auth=_request_auth,
1321
+ _content_type=_content_type,
1322
+ _headers=_headers,
1323
+ _host_index=_host_index
1324
+ )
1325
+
1326
+ _response_types_map: Dict[str, Optional[str]] = {
1327
+ '200': "AttachCallbackResponse",
1328
+ '400': "ErrorResponseModel",
1329
+ '401': "ErrorResponseModel",
1330
+ '404': "ErrorResponseModel",
1331
+ '500': None,
1332
+ }
1333
+ response_data = self.api_client.call_api(
1334
+ *_param,
1335
+ _request_timeout=_request_timeout
1336
+ )
1337
+ response_data.read()
1338
+ return self.api_client.response_deserialize(
1339
+ response_data=response_data,
1340
+ response_types_map=_response_types_map,
1341
+ )
1342
+
1343
+
1344
+ @validate_call
1345
+ def update_virtual_machine_callback_without_preload_content(
1346
+ self,
1347
+ id: StrictInt,
1348
+ payload: AttachCallbackPayload,
1349
+ _request_timeout: Union[
1350
+ None,
1351
+ Annotated[StrictFloat, Field(gt=0)],
1352
+ Tuple[
1353
+ Annotated[StrictFloat, Field(gt=0)],
1354
+ Annotated[StrictFloat, Field(gt=0)]
1355
+ ]
1356
+ ] = None,
1357
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1358
+ _content_type: Optional[StrictStr] = None,
1359
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1360
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1361
+ ) -> RESTResponseType:
1362
+ """Update virtual machine callback
1363
+
1364
+ Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1365
+
1366
+ :param id: (required)
1367
+ :type id: int
1368
+ :param payload: (required)
1369
+ :type payload: AttachCallbackPayload
1370
+ :param _request_timeout: timeout setting for this request. If one
1371
+ number provided, it will be total request
1372
+ timeout. It can also be a pair (tuple) of
1373
+ (connection, read) timeouts.
1374
+ :type _request_timeout: int, tuple(int, int), optional
1375
+ :param _request_auth: set to override the auth_settings for an a single
1376
+ request; this effectively ignores the
1377
+ authentication in the spec for a single request.
1378
+ :type _request_auth: dict, optional
1379
+ :param _content_type: force content-type for the request.
1380
+ :type _content_type: str, Optional
1381
+ :param _headers: set to override the headers for a single
1382
+ request; this effectively ignores the headers
1383
+ in the spec for a single request.
1384
+ :type _headers: dict, optional
1385
+ :param _host_index: set to override the host_index for a single
1386
+ request; this effectively ignores the host_index
1387
+ in the spec for a single request.
1388
+ :type _host_index: int, optional
1389
+ :return: Returns the result object.
1390
+ """ # noqa: E501
1391
+
1392
+ _param = self._update_virtual_machine_callback_serialize(
1393
+ id=id,
1394
+ payload=payload,
1395
+ _request_auth=_request_auth,
1396
+ _content_type=_content_type,
1397
+ _headers=_headers,
1398
+ _host_index=_host_index
1399
+ )
1400
+
1401
+ _response_types_map: Dict[str, Optional[str]] = {
1402
+ '200': "AttachCallbackResponse",
1403
+ '400': "ErrorResponseModel",
1404
+ '401': "ErrorResponseModel",
1405
+ '404': "ErrorResponseModel",
1406
+ '500': None,
1407
+ }
1408
+ response_data = self.api_client.call_api(
1409
+ *_param,
1410
+ _request_timeout=_request_timeout
1411
+ )
1412
+ return response_data.response
1413
+
1414
+
1415
+ def _update_virtual_machine_callback_serialize(
1416
+ self,
1417
+ id,
1418
+ payload,
1419
+ _request_auth,
1420
+ _content_type,
1421
+ _headers,
1422
+ _host_index,
1423
+ ) -> RequestSerialized:
1424
+
1425
+ _host = None
1426
+
1427
+ _collection_formats: Dict[str, str] = {
1428
+ }
1429
+
1430
+ _path_params: Dict[str, str] = {}
1431
+ _query_params: List[Tuple[str, str]] = []
1432
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1433
+ _form_params: List[Tuple[str, str]] = []
1434
+ _files: Dict[
1435
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1436
+ ] = {}
1437
+ _body_params: Optional[bytes] = None
1438
+
1439
+ # process the path parameters
1440
+ if id is not None:
1441
+ _path_params['id'] = id
1442
+ # process the query parameters
1443
+ # process the header parameters
1444
+ # process the form parameters
1445
+ # process the body parameter
1446
+ if payload is not None:
1447
+ _body_params = payload
1448
+
1449
+
1450
+ # set the HTTP header `Accept`
1451
+ if 'Accept' not in _header_params:
1452
+ _header_params['Accept'] = self.api_client.select_header_accept(
1453
+ [
1454
+ 'application/json'
1455
+ ]
1456
+ )
1457
+
1458
+ # set the HTTP header `Content-Type`
1459
+ if _content_type:
1460
+ _header_params['Content-Type'] = _content_type
1461
+ else:
1462
+ _default_content_type = (
1463
+ self.api_client.select_header_content_type(
1464
+ [
1465
+ 'application/json'
1466
+ ]
1467
+ )
1468
+ )
1469
+ if _default_content_type is not None:
1470
+ _header_params['Content-Type'] = _default_content_type
1471
+
1472
+ # authentication setting
1473
+ _auth_settings: List[str] = [
1474
+ 'apiKey',
1475
+ 'accessToken'
1476
+ ]
1477
+
1478
+ return self.api_client.param_serialize(
1479
+ method='PUT',
1480
+ resource_path='/core/virtual-machines/{id}/update-callback',
1481
+ path_params=_path_params,
1482
+ query_params=_query_params,
1483
+ header_params=_header_params,
1484
+ body=_body_params,
1485
+ post_params=_form_params,
1486
+ files=_files,
1487
+ auth_settings=_auth_settings,
1488
+ collection_formats=_collection_formats,
1489
+ _host=_host,
1490
+ _request_auth=_request_auth
1491
+ )
1492
+
1493
+
1494
+
1495
+
1496
+ @validate_call
1497
+ def update_volume_callback(
1498
+ self,
1499
+ id: StrictInt,
1500
+ payload: AttachCallbackPayload,
1501
+ _request_timeout: Union[
1502
+ None,
1503
+ Annotated[StrictFloat, Field(gt=0)],
1504
+ Tuple[
1505
+ Annotated[StrictFloat, Field(gt=0)],
1506
+ Annotated[StrictFloat, Field(gt=0)]
1507
+ ]
1508
+ ] = None,
1509
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1510
+ _content_type: Optional[StrictStr] = None,
1511
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1512
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1513
+ ) -> AttachCallbackResponse:
1514
+ """Update volume callback
1515
+
1516
+ Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1517
+
1518
+ :param id: (required)
1519
+ :type id: int
1520
+ :param payload: (required)
1521
+ :type payload: AttachCallbackPayload
1522
+ :param _request_timeout: timeout setting for this request. If one
1523
+ number provided, it will be total request
1524
+ timeout. It can also be a pair (tuple) of
1525
+ (connection, read) timeouts.
1526
+ :type _request_timeout: int, tuple(int, int), optional
1527
+ :param _request_auth: set to override the auth_settings for an a single
1528
+ request; this effectively ignores the
1529
+ authentication in the spec for a single request.
1530
+ :type _request_auth: dict, optional
1531
+ :param _content_type: force content-type for the request.
1532
+ :type _content_type: str, Optional
1533
+ :param _headers: set to override the headers for a single
1534
+ request; this effectively ignores the headers
1535
+ in the spec for a single request.
1536
+ :type _headers: dict, optional
1537
+ :param _host_index: set to override the host_index for a single
1538
+ request; this effectively ignores the host_index
1539
+ in the spec for a single request.
1540
+ :type _host_index: int, optional
1541
+ :return: Returns the result object.
1542
+ """ # noqa: E501
1543
+
1544
+ _param = self._update_volume_callback_serialize(
1545
+ id=id,
1546
+ payload=payload,
1547
+ _request_auth=_request_auth,
1548
+ _content_type=_content_type,
1549
+ _headers=_headers,
1550
+ _host_index=_host_index
1551
+ )
1552
+
1553
+ _response_types_map: Dict[str, Optional[str]] = {
1554
+ '200': "AttachCallbackResponse",
1555
+ '400': "ErrorResponseModel",
1556
+ '401': "ErrorResponseModel",
1557
+ '404': "ErrorResponseModel",
1558
+ '500': None,
1559
+ }
1560
+ response_data = self.api_client.call_api(
1561
+ *_param,
1562
+ _request_timeout=_request_timeout
1563
+ )
1564
+ response_data.read()
1565
+ return self.api_client.response_deserialize(
1566
+ response_data=response_data,
1567
+ response_types_map=_response_types_map,
1568
+ ).data
1569
+
1570
+
1571
+ @validate_call
1572
+ def update_volume_callback_with_http_info(
1573
+ self,
1574
+ id: StrictInt,
1575
+ payload: AttachCallbackPayload,
1576
+ _request_timeout: Union[
1577
+ None,
1578
+ Annotated[StrictFloat, Field(gt=0)],
1579
+ Tuple[
1580
+ Annotated[StrictFloat, Field(gt=0)],
1581
+ Annotated[StrictFloat, Field(gt=0)]
1582
+ ]
1583
+ ] = None,
1584
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1585
+ _content_type: Optional[StrictStr] = None,
1586
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1587
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1588
+ ) -> ApiResponse[AttachCallbackResponse]:
1589
+ """Update volume callback
1590
+
1591
+ Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1592
+
1593
+ :param id: (required)
1594
+ :type id: int
1595
+ :param payload: (required)
1596
+ :type payload: AttachCallbackPayload
1597
+ :param _request_timeout: timeout setting for this request. If one
1598
+ number provided, it will be total request
1599
+ timeout. It can also be a pair (tuple) of
1600
+ (connection, read) timeouts.
1601
+ :type _request_timeout: int, tuple(int, int), optional
1602
+ :param _request_auth: set to override the auth_settings for an a single
1603
+ request; this effectively ignores the
1604
+ authentication in the spec for a single request.
1605
+ :type _request_auth: dict, optional
1606
+ :param _content_type: force content-type for the request.
1607
+ :type _content_type: str, Optional
1608
+ :param _headers: set to override the headers for a single
1609
+ request; this effectively ignores the headers
1610
+ in the spec for a single request.
1611
+ :type _headers: dict, optional
1612
+ :param _host_index: set to override the host_index for a single
1613
+ request; this effectively ignores the host_index
1614
+ in the spec for a single request.
1615
+ :type _host_index: int, optional
1616
+ :return: Returns the result object.
1617
+ """ # noqa: E501
1618
+
1619
+ _param = self._update_volume_callback_serialize(
1620
+ id=id,
1621
+ payload=payload,
1622
+ _request_auth=_request_auth,
1623
+ _content_type=_content_type,
1624
+ _headers=_headers,
1625
+ _host_index=_host_index
1626
+ )
1627
+
1628
+ _response_types_map: Dict[str, Optional[str]] = {
1629
+ '200': "AttachCallbackResponse",
1630
+ '400': "ErrorResponseModel",
1631
+ '401': "ErrorResponseModel",
1632
+ '404': "ErrorResponseModel",
1633
+ '500': None,
1634
+ }
1635
+ response_data = self.api_client.call_api(
1636
+ *_param,
1637
+ _request_timeout=_request_timeout
1638
+ )
1639
+ response_data.read()
1640
+ return self.api_client.response_deserialize(
1641
+ response_data=response_data,
1642
+ response_types_map=_response_types_map,
1643
+ )
1644
+
1645
+
1646
+ @validate_call
1647
+ def update_volume_callback_without_preload_content(
1648
+ self,
1649
+ id: StrictInt,
1650
+ payload: AttachCallbackPayload,
1651
+ _request_timeout: Union[
1652
+ None,
1653
+ Annotated[StrictFloat, Field(gt=0)],
1654
+ Tuple[
1655
+ Annotated[StrictFloat, Field(gt=0)],
1656
+ Annotated[StrictFloat, Field(gt=0)]
1657
+ ]
1658
+ ] = None,
1659
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1660
+ _content_type: Optional[StrictStr] = None,
1661
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1662
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1663
+ ) -> RESTResponseType:
1664
+ """Update volume callback
1665
+
1666
+ Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).
1667
+
1668
+ :param id: (required)
1669
+ :type id: int
1670
+ :param payload: (required)
1671
+ :type payload: AttachCallbackPayload
1672
+ :param _request_timeout: timeout setting for this request. If one
1673
+ number provided, it will be total request
1674
+ timeout. It can also be a pair (tuple) of
1675
+ (connection, read) timeouts.
1676
+ :type _request_timeout: int, tuple(int, int), optional
1677
+ :param _request_auth: set to override the auth_settings for an a single
1678
+ request; this effectively ignores the
1679
+ authentication in the spec for a single request.
1680
+ :type _request_auth: dict, optional
1681
+ :param _content_type: force content-type for the request.
1682
+ :type _content_type: str, Optional
1683
+ :param _headers: set to override the headers for a single
1684
+ request; this effectively ignores the headers
1685
+ in the spec for a single request.
1686
+ :type _headers: dict, optional
1687
+ :param _host_index: set to override the host_index for a single
1688
+ request; this effectively ignores the host_index
1689
+ in the spec for a single request.
1690
+ :type _host_index: int, optional
1691
+ :return: Returns the result object.
1692
+ """ # noqa: E501
1693
+
1694
+ _param = self._update_volume_callback_serialize(
1695
+ id=id,
1696
+ payload=payload,
1697
+ _request_auth=_request_auth,
1698
+ _content_type=_content_type,
1699
+ _headers=_headers,
1700
+ _host_index=_host_index
1701
+ )
1702
+
1703
+ _response_types_map: Dict[str, Optional[str]] = {
1704
+ '200': "AttachCallbackResponse",
1705
+ '400': "ErrorResponseModel",
1706
+ '401': "ErrorResponseModel",
1707
+ '404': "ErrorResponseModel",
1708
+ '500': None,
1709
+ }
1710
+ response_data = self.api_client.call_api(
1711
+ *_param,
1712
+ _request_timeout=_request_timeout
1713
+ )
1714
+ return response_data.response
1715
+
1716
+
1717
+ def _update_volume_callback_serialize(
1718
+ self,
1719
+ id,
1720
+ payload,
1721
+ _request_auth,
1722
+ _content_type,
1723
+ _headers,
1724
+ _host_index,
1725
+ ) -> RequestSerialized:
1726
+
1727
+ _host = None
1728
+
1729
+ _collection_formats: Dict[str, str] = {
1730
+ }
1731
+
1732
+ _path_params: Dict[str, str] = {}
1733
+ _query_params: List[Tuple[str, str]] = []
1734
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1735
+ _form_params: List[Tuple[str, str]] = []
1736
+ _files: Dict[
1737
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1738
+ ] = {}
1739
+ _body_params: Optional[bytes] = None
1740
+
1741
+ # process the path parameters
1742
+ if id is not None:
1743
+ _path_params['id'] = id
1744
+ # process the query parameters
1745
+ # process the header parameters
1746
+ # process the form parameters
1747
+ # process the body parameter
1748
+ if payload is not None:
1749
+ _body_params = payload
1750
+
1751
+
1752
+ # set the HTTP header `Accept`
1753
+ if 'Accept' not in _header_params:
1754
+ _header_params['Accept'] = self.api_client.select_header_accept(
1755
+ [
1756
+ 'application/json'
1757
+ ]
1758
+ )
1759
+
1760
+ # set the HTTP header `Content-Type`
1761
+ if _content_type:
1762
+ _header_params['Content-Type'] = _content_type
1763
+ else:
1764
+ _default_content_type = (
1765
+ self.api_client.select_header_content_type(
1766
+ [
1767
+ 'application/json'
1768
+ ]
1769
+ )
1770
+ )
1771
+ if _default_content_type is not None:
1772
+ _header_params['Content-Type'] = _default_content_type
1773
+
1774
+ # authentication setting
1775
+ _auth_settings: List[str] = [
1776
+ 'apiKey',
1777
+ 'accessToken'
1778
+ ]
1779
+
1780
+ return self.api_client.param_serialize(
1781
+ method='PUT',
1782
+ resource_path='/core/volumes/{id}/update-callback',
1783
+ path_params=_path_params,
1784
+ query_params=_query_params,
1785
+ header_params=_header_params,
1786
+ body=_body_params,
1787
+ post_params=_form_params,
1788
+ files=_files,
1789
+ auth_settings=_auth_settings,
1790
+ collection_formats=_collection_formats,
1791
+ _host=_host,
1792
+ _request_auth=_request_auth
1793
+ )
1794
+
1795
+