hyperstack 1.25.0a0__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 +605 -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 +134 -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 +162 -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-1.25.0a0.dist-info/METADATA +23 -0
  399. hyperstack-1.25.0a0.dist-info/RECORD +401 -0
  400. hyperstack-1.25.0a0.dist-info/WHEEL +5 -0
  401. hyperstack-1.25.0a0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1819 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Infrahub-API
5
+
6
+ Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from ..models.create_firewall_payload import CreateFirewallPayload
23
+ from ..models.create_firewall_rule_payload import CreateFirewallRulePayload
24
+ from ..models.firewall_detail_response import FirewallDetailResponse
25
+ from ..models.firewall_response import FirewallResponse
26
+ from ..models.firewall_rule import FirewallRule
27
+ from ..models.firewalls_list_response import FirewallsListResponse
28
+ from ..models.response_model import ResponseModel
29
+
30
+ from ..api_client import ApiClient, RequestSerialized
31
+ from ..api_response import ApiResponse
32
+ from ..rest import RESTResponseType
33
+
34
+
35
+ class FirewallsApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def add_firewall_rule_to_firewall(
50
+ self,
51
+ firewall_id: StrictInt,
52
+ payload: CreateFirewallRulePayload,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> FirewallRule:
66
+ """Add firewall rule to firewall
67
+
68
+ Creates a [**firewall rule**](https://infrahub-doc.nexgencloud.com/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
69
+
70
+ :param firewall_id: (required)
71
+ :type firewall_id: int
72
+ :param payload: (required)
73
+ :type payload: CreateFirewallRulePayload
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._add_firewall_rule_to_firewall_serialize(
97
+ firewall_id=firewall_id,
98
+ payload=payload,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ '200': "FirewallRule",
107
+ '400': "ErrorResponseModel",
108
+ '401': "ErrorResponseModel",
109
+ '403': "ErrorResponseModel",
110
+ '500': None,
111
+ }
112
+ response_data = self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ def add_firewall_rule_to_firewall_with_http_info(
125
+ self,
126
+ firewall_id: StrictInt,
127
+ payload: CreateFirewallRulePayload,
128
+ _request_timeout: Union[
129
+ None,
130
+ Annotated[StrictFloat, Field(gt=0)],
131
+ Tuple[
132
+ Annotated[StrictFloat, Field(gt=0)],
133
+ Annotated[StrictFloat, Field(gt=0)]
134
+ ]
135
+ ] = None,
136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
137
+ _content_type: Optional[StrictStr] = None,
138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
140
+ ) -> ApiResponse[FirewallRule]:
141
+ """Add firewall rule to firewall
142
+
143
+ Creates a [**firewall rule**](https://infrahub-doc.nexgencloud.com/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
144
+
145
+ :param firewall_id: (required)
146
+ :type firewall_id: int
147
+ :param payload: (required)
148
+ :type payload: CreateFirewallRulePayload
149
+ :param _request_timeout: timeout setting for this request. If one
150
+ number provided, it will be total request
151
+ timeout. It can also be a pair (tuple) of
152
+ (connection, read) timeouts.
153
+ :type _request_timeout: int, tuple(int, int), optional
154
+ :param _request_auth: set to override the auth_settings for an a single
155
+ request; this effectively ignores the
156
+ authentication in the spec for a single request.
157
+ :type _request_auth: dict, optional
158
+ :param _content_type: force content-type for the request.
159
+ :type _content_type: str, Optional
160
+ :param _headers: set to override the headers for a single
161
+ request; this effectively ignores the headers
162
+ in the spec for a single request.
163
+ :type _headers: dict, optional
164
+ :param _host_index: set to override the host_index for a single
165
+ request; this effectively ignores the host_index
166
+ in the spec for a single request.
167
+ :type _host_index: int, optional
168
+ :return: Returns the result object.
169
+ """ # noqa: E501
170
+
171
+ _param = self._add_firewall_rule_to_firewall_serialize(
172
+ firewall_id=firewall_id,
173
+ payload=payload,
174
+ _request_auth=_request_auth,
175
+ _content_type=_content_type,
176
+ _headers=_headers,
177
+ _host_index=_host_index
178
+ )
179
+
180
+ _response_types_map: Dict[str, Optional[str]] = {
181
+ '200': "FirewallRule",
182
+ '400': "ErrorResponseModel",
183
+ '401': "ErrorResponseModel",
184
+ '403': "ErrorResponseModel",
185
+ '500': None,
186
+ }
187
+ response_data = self.api_client.call_api(
188
+ *_param,
189
+ _request_timeout=_request_timeout
190
+ )
191
+ response_data.read()
192
+ return self.api_client.response_deserialize(
193
+ response_data=response_data,
194
+ response_types_map=_response_types_map,
195
+ )
196
+
197
+
198
+ @validate_call
199
+ def add_firewall_rule_to_firewall_without_preload_content(
200
+ self,
201
+ firewall_id: StrictInt,
202
+ payload: CreateFirewallRulePayload,
203
+ _request_timeout: Union[
204
+ None,
205
+ Annotated[StrictFloat, Field(gt=0)],
206
+ Tuple[
207
+ Annotated[StrictFloat, Field(gt=0)],
208
+ Annotated[StrictFloat, Field(gt=0)]
209
+ ]
210
+ ] = None,
211
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
212
+ _content_type: Optional[StrictStr] = None,
213
+ _headers: Optional[Dict[StrictStr, Any]] = None,
214
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
215
+ ) -> RESTResponseType:
216
+ """Add firewall rule to firewall
217
+
218
+ Creates a [**firewall rule**](https://infrahub-doc.nexgencloud.com/docs/network-security/security-rules) and adds it to an existing firewall. Include the firewall ID in the path, and provide the firewall rule configuration in the request body.
219
+
220
+ :param firewall_id: (required)
221
+ :type firewall_id: int
222
+ :param payload: (required)
223
+ :type payload: CreateFirewallRulePayload
224
+ :param _request_timeout: timeout setting for this request. If one
225
+ number provided, it will be total request
226
+ timeout. It can also be a pair (tuple) of
227
+ (connection, read) timeouts.
228
+ :type _request_timeout: int, tuple(int, int), optional
229
+ :param _request_auth: set to override the auth_settings for an a single
230
+ request; this effectively ignores the
231
+ authentication in the spec for a single request.
232
+ :type _request_auth: dict, optional
233
+ :param _content_type: force content-type for the request.
234
+ :type _content_type: str, Optional
235
+ :param _headers: set to override the headers for a single
236
+ request; this effectively ignores the headers
237
+ in the spec for a single request.
238
+ :type _headers: dict, optional
239
+ :param _host_index: set to override the host_index for a single
240
+ request; this effectively ignores the host_index
241
+ in the spec for a single request.
242
+ :type _host_index: int, optional
243
+ :return: Returns the result object.
244
+ """ # noqa: E501
245
+
246
+ _param = self._add_firewall_rule_to_firewall_serialize(
247
+ firewall_id=firewall_id,
248
+ payload=payload,
249
+ _request_auth=_request_auth,
250
+ _content_type=_content_type,
251
+ _headers=_headers,
252
+ _host_index=_host_index
253
+ )
254
+
255
+ _response_types_map: Dict[str, Optional[str]] = {
256
+ '200': "FirewallRule",
257
+ '400': "ErrorResponseModel",
258
+ '401': "ErrorResponseModel",
259
+ '403': "ErrorResponseModel",
260
+ '500': None,
261
+ }
262
+ response_data = self.api_client.call_api(
263
+ *_param,
264
+ _request_timeout=_request_timeout
265
+ )
266
+ return response_data.response
267
+
268
+
269
+ def _add_firewall_rule_to_firewall_serialize(
270
+ self,
271
+ firewall_id,
272
+ payload,
273
+ _request_auth,
274
+ _content_type,
275
+ _headers,
276
+ _host_index,
277
+ ) -> RequestSerialized:
278
+
279
+ _host = None
280
+
281
+ _collection_formats: Dict[str, str] = {
282
+ }
283
+
284
+ _path_params: Dict[str, str] = {}
285
+ _query_params: List[Tuple[str, str]] = []
286
+ _header_params: Dict[str, Optional[str]] = _headers or {}
287
+ _form_params: List[Tuple[str, str]] = []
288
+ _files: Dict[
289
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
290
+ ] = {}
291
+ _body_params: Optional[bytes] = None
292
+
293
+ # process the path parameters
294
+ if firewall_id is not None:
295
+ _path_params['firewall_id'] = firewall_id
296
+ # process the query parameters
297
+ # process the header parameters
298
+ # process the form parameters
299
+ # process the body parameter
300
+ if payload is not None:
301
+ _body_params = payload
302
+
303
+
304
+ # set the HTTP header `Accept`
305
+ if 'Accept' not in _header_params:
306
+ _header_params['Accept'] = self.api_client.select_header_accept(
307
+ [
308
+ 'application/json'
309
+ ]
310
+ )
311
+
312
+ # set the HTTP header `Content-Type`
313
+ if _content_type:
314
+ _header_params['Content-Type'] = _content_type
315
+ else:
316
+ _default_content_type = (
317
+ self.api_client.select_header_content_type(
318
+ [
319
+ 'application/json'
320
+ ]
321
+ )
322
+ )
323
+ if _default_content_type is not None:
324
+ _header_params['Content-Type'] = _default_content_type
325
+
326
+ # authentication setting
327
+ _auth_settings: List[str] = [
328
+ 'apiKey',
329
+ 'accessToken'
330
+ ]
331
+
332
+ return self.api_client.param_serialize(
333
+ method='POST',
334
+ resource_path='/core/firewalls/{firewall_id}/firewall-rules',
335
+ path_params=_path_params,
336
+ query_params=_query_params,
337
+ header_params=_header_params,
338
+ body=_body_params,
339
+ post_params=_form_params,
340
+ files=_files,
341
+ auth_settings=_auth_settings,
342
+ collection_formats=_collection_formats,
343
+ _host=_host,
344
+ _request_auth=_request_auth
345
+ )
346
+
347
+
348
+
349
+
350
+ @validate_call
351
+ def create_firewall(
352
+ self,
353
+ payload: CreateFirewallPayload,
354
+ _request_timeout: Union[
355
+ None,
356
+ Annotated[StrictFloat, Field(gt=0)],
357
+ Tuple[
358
+ Annotated[StrictFloat, Field(gt=0)],
359
+ Annotated[StrictFloat, Field(gt=0)]
360
+ ]
361
+ ] = None,
362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
363
+ _content_type: Optional[StrictStr] = None,
364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
366
+ ) -> FirewallResponse:
367
+ """Create firewall
368
+
369
+ Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/environments/list-environments) endpoint.
370
+
371
+ :param payload: (required)
372
+ :type payload: CreateFirewallPayload
373
+ :param _request_timeout: timeout setting for this request. If one
374
+ number provided, it will be total request
375
+ timeout. It can also be a pair (tuple) of
376
+ (connection, read) timeouts.
377
+ :type _request_timeout: int, tuple(int, int), optional
378
+ :param _request_auth: set to override the auth_settings for an a single
379
+ request; this effectively ignores the
380
+ authentication in the spec for a single request.
381
+ :type _request_auth: dict, optional
382
+ :param _content_type: force content-type for the request.
383
+ :type _content_type: str, Optional
384
+ :param _headers: set to override the headers for a single
385
+ request; this effectively ignores the headers
386
+ in the spec for a single request.
387
+ :type _headers: dict, optional
388
+ :param _host_index: set to override the host_index for a single
389
+ request; this effectively ignores the host_index
390
+ in the spec for a single request.
391
+ :type _host_index: int, optional
392
+ :return: Returns the result object.
393
+ """ # noqa: E501
394
+
395
+ _param = self._create_firewall_serialize(
396
+ payload=payload,
397
+ _request_auth=_request_auth,
398
+ _content_type=_content_type,
399
+ _headers=_headers,
400
+ _host_index=_host_index
401
+ )
402
+
403
+ _response_types_map: Dict[str, Optional[str]] = {
404
+ '200': "FirewallResponse",
405
+ '400': "ErrorResponseModel",
406
+ '401': "ErrorResponseModel",
407
+ '403': "ErrorResponseModel",
408
+ '404': "ErrorResponseModel",
409
+ '409': "ErrorResponseModel",
410
+ '500': None,
411
+ }
412
+ response_data = self.api_client.call_api(
413
+ *_param,
414
+ _request_timeout=_request_timeout
415
+ )
416
+ response_data.read()
417
+ return self.api_client.response_deserialize(
418
+ response_data=response_data,
419
+ response_types_map=_response_types_map,
420
+ ).data
421
+
422
+
423
+ @validate_call
424
+ def create_firewall_with_http_info(
425
+ self,
426
+ payload: CreateFirewallPayload,
427
+ _request_timeout: Union[
428
+ None,
429
+ Annotated[StrictFloat, Field(gt=0)],
430
+ Tuple[
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Annotated[StrictFloat, Field(gt=0)]
433
+ ]
434
+ ] = None,
435
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
436
+ _content_type: Optional[StrictStr] = None,
437
+ _headers: Optional[Dict[StrictStr, Any]] = None,
438
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
439
+ ) -> ApiResponse[FirewallResponse]:
440
+ """Create firewall
441
+
442
+ Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/environments/list-environments) endpoint.
443
+
444
+ :param payload: (required)
445
+ :type payload: CreateFirewallPayload
446
+ :param _request_timeout: timeout setting for this request. If one
447
+ number provided, it will be total request
448
+ timeout. It can also be a pair (tuple) of
449
+ (connection, read) timeouts.
450
+ :type _request_timeout: int, tuple(int, int), optional
451
+ :param _request_auth: set to override the auth_settings for an a single
452
+ request; this effectively ignores the
453
+ authentication in the spec for a single request.
454
+ :type _request_auth: dict, optional
455
+ :param _content_type: force content-type for the request.
456
+ :type _content_type: str, Optional
457
+ :param _headers: set to override the headers for a single
458
+ request; this effectively ignores the headers
459
+ in the spec for a single request.
460
+ :type _headers: dict, optional
461
+ :param _host_index: set to override the host_index for a single
462
+ request; this effectively ignores the host_index
463
+ in the spec for a single request.
464
+ :type _host_index: int, optional
465
+ :return: Returns the result object.
466
+ """ # noqa: E501
467
+
468
+ _param = self._create_firewall_serialize(
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': "FirewallResponse",
478
+ '400': "ErrorResponseModel",
479
+ '401': "ErrorResponseModel",
480
+ '403': "ErrorResponseModel",
481
+ '404': "ErrorResponseModel",
482
+ '409': "ErrorResponseModel",
483
+ '500': None,
484
+ }
485
+ response_data = self.api_client.call_api(
486
+ *_param,
487
+ _request_timeout=_request_timeout
488
+ )
489
+ response_data.read()
490
+ return self.api_client.response_deserialize(
491
+ response_data=response_data,
492
+ response_types_map=_response_types_map,
493
+ )
494
+
495
+
496
+ @validate_call
497
+ def create_firewall_without_preload_content(
498
+ self,
499
+ payload: CreateFirewallPayload,
500
+ _request_timeout: Union[
501
+ None,
502
+ Annotated[StrictFloat, Field(gt=0)],
503
+ Tuple[
504
+ Annotated[StrictFloat, Field(gt=0)],
505
+ Annotated[StrictFloat, Field(gt=0)]
506
+ ]
507
+ ] = None,
508
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
509
+ _content_type: Optional[StrictStr] = None,
510
+ _headers: Optional[Dict[StrictStr, Any]] = None,
511
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
512
+ ) -> RESTResponseType:
513
+ """Create firewall
514
+
515
+ Creates a firewall to which firewall rules can be added. A firewall can be attached to one or more virtual machines to control inbound and outbound traffic. In the body of the request, include the name of the firewall, the ID of the environment within which the firewall will be created, and an optional description. To obtain the ID of the environment, make a request to the [**list environments**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/environments/list-environments) endpoint.
516
+
517
+ :param payload: (required)
518
+ :type payload: CreateFirewallPayload
519
+ :param _request_timeout: timeout setting for this request. If one
520
+ number provided, it will be total request
521
+ timeout. It can also be a pair (tuple) of
522
+ (connection, read) timeouts.
523
+ :type _request_timeout: int, tuple(int, int), optional
524
+ :param _request_auth: set to override the auth_settings for an a single
525
+ request; this effectively ignores the
526
+ authentication in the spec for a single request.
527
+ :type _request_auth: dict, optional
528
+ :param _content_type: force content-type for the request.
529
+ :type _content_type: str, Optional
530
+ :param _headers: set to override the headers for a single
531
+ request; this effectively ignores the headers
532
+ in the spec for a single request.
533
+ :type _headers: dict, optional
534
+ :param _host_index: set to override the host_index for a single
535
+ request; this effectively ignores the host_index
536
+ in the spec for a single request.
537
+ :type _host_index: int, optional
538
+ :return: Returns the result object.
539
+ """ # noqa: E501
540
+
541
+ _param = self._create_firewall_serialize(
542
+ payload=payload,
543
+ _request_auth=_request_auth,
544
+ _content_type=_content_type,
545
+ _headers=_headers,
546
+ _host_index=_host_index
547
+ )
548
+
549
+ _response_types_map: Dict[str, Optional[str]] = {
550
+ '200': "FirewallResponse",
551
+ '400': "ErrorResponseModel",
552
+ '401': "ErrorResponseModel",
553
+ '403': "ErrorResponseModel",
554
+ '404': "ErrorResponseModel",
555
+ '409': "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 _create_firewall_serialize(
566
+ self,
567
+ payload,
568
+ _request_auth,
569
+ _content_type,
570
+ _headers,
571
+ _host_index,
572
+ ) -> RequestSerialized:
573
+
574
+ _host = None
575
+
576
+ _collection_formats: Dict[str, str] = {
577
+ }
578
+
579
+ _path_params: Dict[str, str] = {}
580
+ _query_params: List[Tuple[str, str]] = []
581
+ _header_params: Dict[str, Optional[str]] = _headers or {}
582
+ _form_params: List[Tuple[str, str]] = []
583
+ _files: Dict[
584
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
585
+ ] = {}
586
+ _body_params: Optional[bytes] = None
587
+
588
+ # process the path parameters
589
+ # process the query parameters
590
+ # process the header parameters
591
+ # process the form parameters
592
+ # process the body parameter
593
+ if payload is not None:
594
+ _body_params = payload
595
+
596
+
597
+ # set the HTTP header `Accept`
598
+ if 'Accept' not in _header_params:
599
+ _header_params['Accept'] = self.api_client.select_header_accept(
600
+ [
601
+ 'application/json'
602
+ ]
603
+ )
604
+
605
+ # set the HTTP header `Content-Type`
606
+ if _content_type:
607
+ _header_params['Content-Type'] = _content_type
608
+ else:
609
+ _default_content_type = (
610
+ self.api_client.select_header_content_type(
611
+ [
612
+ 'application/json'
613
+ ]
614
+ )
615
+ )
616
+ if _default_content_type is not None:
617
+ _header_params['Content-Type'] = _default_content_type
618
+
619
+ # authentication setting
620
+ _auth_settings: List[str] = [
621
+ 'apiKey',
622
+ 'accessToken'
623
+ ]
624
+
625
+ return self.api_client.param_serialize(
626
+ method='POST',
627
+ resource_path='/core/firewalls',
628
+ path_params=_path_params,
629
+ query_params=_query_params,
630
+ header_params=_header_params,
631
+ body=_body_params,
632
+ post_params=_form_params,
633
+ files=_files,
634
+ auth_settings=_auth_settings,
635
+ collection_formats=_collection_formats,
636
+ _host=_host,
637
+ _request_auth=_request_auth
638
+ )
639
+
640
+
641
+
642
+
643
+ @validate_call
644
+ def delete_firewall(
645
+ self,
646
+ id: StrictInt,
647
+ _request_timeout: Union[
648
+ None,
649
+ Annotated[StrictFloat, Field(gt=0)],
650
+ Tuple[
651
+ Annotated[StrictFloat, Field(gt=0)],
652
+ Annotated[StrictFloat, Field(gt=0)]
653
+ ]
654
+ ] = None,
655
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
656
+ _content_type: Optional[StrictStr] = None,
657
+ _headers: Optional[Dict[StrictStr, Any]] = None,
658
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
659
+ ) -> ResponseModel:
660
+ """Delete firewall
661
+
662
+ Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/firewalls/delete-firewall).
663
+
664
+ :param id: (required)
665
+ :type id: int
666
+ :param _request_timeout: timeout setting for this request. If one
667
+ number provided, it will be total request
668
+ timeout. It can also be a pair (tuple) of
669
+ (connection, read) timeouts.
670
+ :type _request_timeout: int, tuple(int, int), optional
671
+ :param _request_auth: set to override the auth_settings for an a single
672
+ request; this effectively ignores the
673
+ authentication in the spec for a single request.
674
+ :type _request_auth: dict, optional
675
+ :param _content_type: force content-type for the request.
676
+ :type _content_type: str, Optional
677
+ :param _headers: set to override the headers for a single
678
+ request; this effectively ignores the headers
679
+ in the spec for a single request.
680
+ :type _headers: dict, optional
681
+ :param _host_index: set to override the host_index for a single
682
+ request; this effectively ignores the host_index
683
+ in the spec for a single request.
684
+ :type _host_index: int, optional
685
+ :return: Returns the result object.
686
+ """ # noqa: E501
687
+
688
+ _param = self._delete_firewall_serialize(
689
+ id=id,
690
+ _request_auth=_request_auth,
691
+ _content_type=_content_type,
692
+ _headers=_headers,
693
+ _host_index=_host_index
694
+ )
695
+
696
+ _response_types_map: Dict[str, Optional[str]] = {
697
+ '200': "ResponseModel",
698
+ '400': "ErrorResponseModel",
699
+ '401': "ErrorResponseModel",
700
+ '403': "ErrorResponseModel",
701
+ '404': "ErrorResponseModel",
702
+ '409': "ErrorResponseModel",
703
+ '500': None,
704
+ }
705
+ response_data = self.api_client.call_api(
706
+ *_param,
707
+ _request_timeout=_request_timeout
708
+ )
709
+ response_data.read()
710
+ return self.api_client.response_deserialize(
711
+ response_data=response_data,
712
+ response_types_map=_response_types_map,
713
+ ).data
714
+
715
+
716
+ @validate_call
717
+ def delete_firewall_with_http_info(
718
+ self,
719
+ id: StrictInt,
720
+ _request_timeout: Union[
721
+ None,
722
+ Annotated[StrictFloat, Field(gt=0)],
723
+ Tuple[
724
+ Annotated[StrictFloat, Field(gt=0)],
725
+ Annotated[StrictFloat, Field(gt=0)]
726
+ ]
727
+ ] = None,
728
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
729
+ _content_type: Optional[StrictStr] = None,
730
+ _headers: Optional[Dict[StrictStr, Any]] = None,
731
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
732
+ ) -> ApiResponse[ResponseModel]:
733
+ """Delete firewall
734
+
735
+ Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/firewalls/delete-firewall).
736
+
737
+ :param id: (required)
738
+ :type id: int
739
+ :param _request_timeout: timeout setting for this request. If one
740
+ number provided, it will be total request
741
+ timeout. It can also be a pair (tuple) of
742
+ (connection, read) timeouts.
743
+ :type _request_timeout: int, tuple(int, int), optional
744
+ :param _request_auth: set to override the auth_settings for an a single
745
+ request; this effectively ignores the
746
+ authentication in the spec for a single request.
747
+ :type _request_auth: dict, optional
748
+ :param _content_type: force content-type for the request.
749
+ :type _content_type: str, Optional
750
+ :param _headers: set to override the headers for a single
751
+ request; this effectively ignores the headers
752
+ in the spec for a single request.
753
+ :type _headers: dict, optional
754
+ :param _host_index: set to override the host_index for a single
755
+ request; this effectively ignores the host_index
756
+ in the spec for a single request.
757
+ :type _host_index: int, optional
758
+ :return: Returns the result object.
759
+ """ # noqa: E501
760
+
761
+ _param = self._delete_firewall_serialize(
762
+ id=id,
763
+ _request_auth=_request_auth,
764
+ _content_type=_content_type,
765
+ _headers=_headers,
766
+ _host_index=_host_index
767
+ )
768
+
769
+ _response_types_map: Dict[str, Optional[str]] = {
770
+ '200': "ResponseModel",
771
+ '400': "ErrorResponseModel",
772
+ '401': "ErrorResponseModel",
773
+ '403': "ErrorResponseModel",
774
+ '404': "ErrorResponseModel",
775
+ '409': "ErrorResponseModel",
776
+ '500': None,
777
+ }
778
+ response_data = self.api_client.call_api(
779
+ *_param,
780
+ _request_timeout=_request_timeout
781
+ )
782
+ response_data.read()
783
+ return self.api_client.response_deserialize(
784
+ response_data=response_data,
785
+ response_types_map=_response_types_map,
786
+ )
787
+
788
+
789
+ @validate_call
790
+ def delete_firewall_without_preload_content(
791
+ self,
792
+ id: StrictInt,
793
+ _request_timeout: Union[
794
+ None,
795
+ Annotated[StrictFloat, Field(gt=0)],
796
+ Tuple[
797
+ Annotated[StrictFloat, Field(gt=0)],
798
+ Annotated[StrictFloat, Field(gt=0)]
799
+ ]
800
+ ] = None,
801
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
802
+ _content_type: Optional[StrictStr] = None,
803
+ _headers: Optional[Dict[StrictStr, Any]] = None,
804
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
805
+ ) -> RESTResponseType:
806
+ """Delete firewall
807
+
808
+ Deletes a firewall by specifying the firewall ID in the path. If the firewall is currently attached to a virtual machine, it must be detached before deletion. For more information, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/firewalls/delete-firewall).
809
+
810
+ :param id: (required)
811
+ :type id: int
812
+ :param _request_timeout: timeout setting for this request. If one
813
+ number provided, it will be total request
814
+ timeout. It can also be a pair (tuple) of
815
+ (connection, read) timeouts.
816
+ :type _request_timeout: int, tuple(int, int), optional
817
+ :param _request_auth: set to override the auth_settings for an a single
818
+ request; this effectively ignores the
819
+ authentication in the spec for a single request.
820
+ :type _request_auth: dict, optional
821
+ :param _content_type: force content-type for the request.
822
+ :type _content_type: str, Optional
823
+ :param _headers: set to override the headers for a single
824
+ request; this effectively ignores the headers
825
+ in the spec for a single request.
826
+ :type _headers: dict, optional
827
+ :param _host_index: set to override the host_index for a single
828
+ request; this effectively ignores the host_index
829
+ in the spec for a single request.
830
+ :type _host_index: int, optional
831
+ :return: Returns the result object.
832
+ """ # noqa: E501
833
+
834
+ _param = self._delete_firewall_serialize(
835
+ id=id,
836
+ _request_auth=_request_auth,
837
+ _content_type=_content_type,
838
+ _headers=_headers,
839
+ _host_index=_host_index
840
+ )
841
+
842
+ _response_types_map: Dict[str, Optional[str]] = {
843
+ '200': "ResponseModel",
844
+ '400': "ErrorResponseModel",
845
+ '401': "ErrorResponseModel",
846
+ '403': "ErrorResponseModel",
847
+ '404': "ErrorResponseModel",
848
+ '409': "ErrorResponseModel",
849
+ '500': None,
850
+ }
851
+ response_data = self.api_client.call_api(
852
+ *_param,
853
+ _request_timeout=_request_timeout
854
+ )
855
+ return response_data.response
856
+
857
+
858
+ def _delete_firewall_serialize(
859
+ self,
860
+ id,
861
+ _request_auth,
862
+ _content_type,
863
+ _headers,
864
+ _host_index,
865
+ ) -> RequestSerialized:
866
+
867
+ _host = None
868
+
869
+ _collection_formats: Dict[str, str] = {
870
+ }
871
+
872
+ _path_params: Dict[str, str] = {}
873
+ _query_params: List[Tuple[str, str]] = []
874
+ _header_params: Dict[str, Optional[str]] = _headers or {}
875
+ _form_params: List[Tuple[str, str]] = []
876
+ _files: Dict[
877
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
878
+ ] = {}
879
+ _body_params: Optional[bytes] = None
880
+
881
+ # process the path parameters
882
+ if id is not None:
883
+ _path_params['id'] = id
884
+ # process the query parameters
885
+ # process the header parameters
886
+ # process the form parameters
887
+ # process the body parameter
888
+
889
+
890
+ # set the HTTP header `Accept`
891
+ if 'Accept' not in _header_params:
892
+ _header_params['Accept'] = self.api_client.select_header_accept(
893
+ [
894
+ 'application/json'
895
+ ]
896
+ )
897
+
898
+
899
+ # authentication setting
900
+ _auth_settings: List[str] = [
901
+ 'apiKey',
902
+ 'accessToken'
903
+ ]
904
+
905
+ return self.api_client.param_serialize(
906
+ method='DELETE',
907
+ resource_path='/core/firewalls/{id}',
908
+ path_params=_path_params,
909
+ query_params=_query_params,
910
+ header_params=_header_params,
911
+ body=_body_params,
912
+ post_params=_form_params,
913
+ files=_files,
914
+ auth_settings=_auth_settings,
915
+ collection_formats=_collection_formats,
916
+ _host=_host,
917
+ _request_auth=_request_auth
918
+ )
919
+
920
+
921
+
922
+
923
+ @validate_call
924
+ def delete_firewall_rules_from_firewall(
925
+ self,
926
+ firewall_id: StrictInt,
927
+ firewall_rule_id: StrictInt,
928
+ _request_timeout: Union[
929
+ None,
930
+ Annotated[StrictFloat, Field(gt=0)],
931
+ Tuple[
932
+ Annotated[StrictFloat, Field(gt=0)],
933
+ Annotated[StrictFloat, Field(gt=0)]
934
+ ]
935
+ ] = None,
936
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
937
+ _content_type: Optional[StrictStr] = None,
938
+ _headers: Optional[Dict[StrictStr, Any]] = None,
939
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
940
+ ) -> ResponseModel:
941
+ """Delete firewall rules from firewall
942
+
943
+ Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
944
+
945
+ :param firewall_id: (required)
946
+ :type firewall_id: int
947
+ :param firewall_rule_id: (required)
948
+ :type firewall_rule_id: int
949
+ :param _request_timeout: timeout setting for this request. If one
950
+ number provided, it will be total request
951
+ timeout. It can also be a pair (tuple) of
952
+ (connection, read) timeouts.
953
+ :type _request_timeout: int, tuple(int, int), optional
954
+ :param _request_auth: set to override the auth_settings for an a single
955
+ request; this effectively ignores the
956
+ authentication in the spec for a single request.
957
+ :type _request_auth: dict, optional
958
+ :param _content_type: force content-type for the request.
959
+ :type _content_type: str, Optional
960
+ :param _headers: set to override the headers for a single
961
+ request; this effectively ignores the headers
962
+ in the spec for a single request.
963
+ :type _headers: dict, optional
964
+ :param _host_index: set to override the host_index for a single
965
+ request; this effectively ignores the host_index
966
+ in the spec for a single request.
967
+ :type _host_index: int, optional
968
+ :return: Returns the result object.
969
+ """ # noqa: E501
970
+
971
+ _param = self._delete_firewall_rules_from_firewall_serialize(
972
+ firewall_id=firewall_id,
973
+ firewall_rule_id=firewall_rule_id,
974
+ _request_auth=_request_auth,
975
+ _content_type=_content_type,
976
+ _headers=_headers,
977
+ _host_index=_host_index
978
+ )
979
+
980
+ _response_types_map: Dict[str, Optional[str]] = {
981
+ '200': "ResponseModel",
982
+ '400': "ErrorResponseModel",
983
+ '401': "ErrorResponseModel",
984
+ '403': "ErrorResponseModel",
985
+ '404': "ErrorResponseModel",
986
+ '409': "ErrorResponseModel",
987
+ '500': None,
988
+ }
989
+ response_data = self.api_client.call_api(
990
+ *_param,
991
+ _request_timeout=_request_timeout
992
+ )
993
+ response_data.read()
994
+ return self.api_client.response_deserialize(
995
+ response_data=response_data,
996
+ response_types_map=_response_types_map,
997
+ ).data
998
+
999
+
1000
+ @validate_call
1001
+ def delete_firewall_rules_from_firewall_with_http_info(
1002
+ self,
1003
+ firewall_id: StrictInt,
1004
+ firewall_rule_id: StrictInt,
1005
+ _request_timeout: Union[
1006
+ None,
1007
+ Annotated[StrictFloat, Field(gt=0)],
1008
+ Tuple[
1009
+ Annotated[StrictFloat, Field(gt=0)],
1010
+ Annotated[StrictFloat, Field(gt=0)]
1011
+ ]
1012
+ ] = None,
1013
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1014
+ _content_type: Optional[StrictStr] = None,
1015
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1016
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1017
+ ) -> ApiResponse[ResponseModel]:
1018
+ """Delete firewall rules from firewall
1019
+
1020
+ Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
1021
+
1022
+ :param firewall_id: (required)
1023
+ :type firewall_id: int
1024
+ :param firewall_rule_id: (required)
1025
+ :type firewall_rule_id: int
1026
+ :param _request_timeout: timeout setting for this request. If one
1027
+ number provided, it will be total request
1028
+ timeout. It can also be a pair (tuple) of
1029
+ (connection, read) timeouts.
1030
+ :type _request_timeout: int, tuple(int, int), optional
1031
+ :param _request_auth: set to override the auth_settings for an a single
1032
+ request; this effectively ignores the
1033
+ authentication in the spec for a single request.
1034
+ :type _request_auth: dict, optional
1035
+ :param _content_type: force content-type for the request.
1036
+ :type _content_type: str, Optional
1037
+ :param _headers: set to override the headers for a single
1038
+ request; this effectively ignores the headers
1039
+ in the spec for a single request.
1040
+ :type _headers: dict, optional
1041
+ :param _host_index: set to override the host_index for a single
1042
+ request; this effectively ignores the host_index
1043
+ in the spec for a single request.
1044
+ :type _host_index: int, optional
1045
+ :return: Returns the result object.
1046
+ """ # noqa: E501
1047
+
1048
+ _param = self._delete_firewall_rules_from_firewall_serialize(
1049
+ firewall_id=firewall_id,
1050
+ firewall_rule_id=firewall_rule_id,
1051
+ _request_auth=_request_auth,
1052
+ _content_type=_content_type,
1053
+ _headers=_headers,
1054
+ _host_index=_host_index
1055
+ )
1056
+
1057
+ _response_types_map: Dict[str, Optional[str]] = {
1058
+ '200': "ResponseModel",
1059
+ '400': "ErrorResponseModel",
1060
+ '401': "ErrorResponseModel",
1061
+ '403': "ErrorResponseModel",
1062
+ '404': "ErrorResponseModel",
1063
+ '409': "ErrorResponseModel",
1064
+ '500': None,
1065
+ }
1066
+ response_data = self.api_client.call_api(
1067
+ *_param,
1068
+ _request_timeout=_request_timeout
1069
+ )
1070
+ response_data.read()
1071
+ return self.api_client.response_deserialize(
1072
+ response_data=response_data,
1073
+ response_types_map=_response_types_map,
1074
+ )
1075
+
1076
+
1077
+ @validate_call
1078
+ def delete_firewall_rules_from_firewall_without_preload_content(
1079
+ self,
1080
+ firewall_id: StrictInt,
1081
+ firewall_rule_id: StrictInt,
1082
+ _request_timeout: Union[
1083
+ None,
1084
+ Annotated[StrictFloat, Field(gt=0)],
1085
+ Tuple[
1086
+ Annotated[StrictFloat, Field(gt=0)],
1087
+ Annotated[StrictFloat, Field(gt=0)]
1088
+ ]
1089
+ ] = None,
1090
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1091
+ _content_type: Optional[StrictStr] = None,
1092
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1093
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1094
+ ) -> RESTResponseType:
1095
+ """Delete firewall rules from firewall
1096
+
1097
+ Removes a firewall rule from firewall by providing the firewall ID and firewall rule ID in the path. For more information, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/firewalls/remove-firewall-rule-from-firewall).
1098
+
1099
+ :param firewall_id: (required)
1100
+ :type firewall_id: int
1101
+ :param firewall_rule_id: (required)
1102
+ :type firewall_rule_id: int
1103
+ :param _request_timeout: timeout setting for this request. If one
1104
+ number provided, it will be total request
1105
+ timeout. It can also be a pair (tuple) of
1106
+ (connection, read) timeouts.
1107
+ :type _request_timeout: int, tuple(int, int), optional
1108
+ :param _request_auth: set to override the auth_settings for an a single
1109
+ request; this effectively ignores the
1110
+ authentication in the spec for a single request.
1111
+ :type _request_auth: dict, optional
1112
+ :param _content_type: force content-type for the request.
1113
+ :type _content_type: str, Optional
1114
+ :param _headers: set to override the headers for a single
1115
+ request; this effectively ignores the headers
1116
+ in the spec for a single request.
1117
+ :type _headers: dict, optional
1118
+ :param _host_index: set to override the host_index for a single
1119
+ request; this effectively ignores the host_index
1120
+ in the spec for a single request.
1121
+ :type _host_index: int, optional
1122
+ :return: Returns the result object.
1123
+ """ # noqa: E501
1124
+
1125
+ _param = self._delete_firewall_rules_from_firewall_serialize(
1126
+ firewall_id=firewall_id,
1127
+ firewall_rule_id=firewall_rule_id,
1128
+ _request_auth=_request_auth,
1129
+ _content_type=_content_type,
1130
+ _headers=_headers,
1131
+ _host_index=_host_index
1132
+ )
1133
+
1134
+ _response_types_map: Dict[str, Optional[str]] = {
1135
+ '200': "ResponseModel",
1136
+ '400': "ErrorResponseModel",
1137
+ '401': "ErrorResponseModel",
1138
+ '403': "ErrorResponseModel",
1139
+ '404': "ErrorResponseModel",
1140
+ '409': "ErrorResponseModel",
1141
+ '500': None,
1142
+ }
1143
+ response_data = self.api_client.call_api(
1144
+ *_param,
1145
+ _request_timeout=_request_timeout
1146
+ )
1147
+ return response_data.response
1148
+
1149
+
1150
+ def _delete_firewall_rules_from_firewall_serialize(
1151
+ self,
1152
+ firewall_id,
1153
+ firewall_rule_id,
1154
+ _request_auth,
1155
+ _content_type,
1156
+ _headers,
1157
+ _host_index,
1158
+ ) -> RequestSerialized:
1159
+
1160
+ _host = None
1161
+
1162
+ _collection_formats: Dict[str, str] = {
1163
+ }
1164
+
1165
+ _path_params: Dict[str, str] = {}
1166
+ _query_params: List[Tuple[str, str]] = []
1167
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1168
+ _form_params: List[Tuple[str, str]] = []
1169
+ _files: Dict[
1170
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1171
+ ] = {}
1172
+ _body_params: Optional[bytes] = None
1173
+
1174
+ # process the path parameters
1175
+ if firewall_id is not None:
1176
+ _path_params['firewall_id'] = firewall_id
1177
+ if firewall_rule_id is not None:
1178
+ _path_params['firewall_rule_id'] = firewall_rule_id
1179
+ # process the query parameters
1180
+ # process the header parameters
1181
+ # process the form parameters
1182
+ # process the body parameter
1183
+
1184
+
1185
+ # set the HTTP header `Accept`
1186
+ if 'Accept' not in _header_params:
1187
+ _header_params['Accept'] = self.api_client.select_header_accept(
1188
+ [
1189
+ 'application/json'
1190
+ ]
1191
+ )
1192
+
1193
+
1194
+ # authentication setting
1195
+ _auth_settings: List[str] = [
1196
+ 'apiKey',
1197
+ 'accessToken'
1198
+ ]
1199
+
1200
+ return self.api_client.param_serialize(
1201
+ method='DELETE',
1202
+ resource_path='/core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}',
1203
+ path_params=_path_params,
1204
+ query_params=_query_params,
1205
+ header_params=_header_params,
1206
+ body=_body_params,
1207
+ post_params=_form_params,
1208
+ files=_files,
1209
+ auth_settings=_auth_settings,
1210
+ collection_formats=_collection_formats,
1211
+ _host=_host,
1212
+ _request_auth=_request_auth
1213
+ )
1214
+
1215
+
1216
+
1217
+
1218
+ @validate_call
1219
+ def list_firewalls(
1220
+ self,
1221
+ page: Optional[StrictInt] = None,
1222
+ page_size: Optional[StrictInt] = None,
1223
+ search: Optional[StrictStr] = None,
1224
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1225
+ _request_timeout: Union[
1226
+ None,
1227
+ Annotated[StrictFloat, Field(gt=0)],
1228
+ Tuple[
1229
+ Annotated[StrictFloat, Field(gt=0)],
1230
+ Annotated[StrictFloat, Field(gt=0)]
1231
+ ]
1232
+ ] = None,
1233
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1234
+ _content_type: Optional[StrictStr] = None,
1235
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1236
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1237
+ ) -> FirewallsListResponse:
1238
+ """List firewalls
1239
+
1240
+ Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/network-security/security-groups).
1241
+
1242
+ :param page:
1243
+ :type page: int
1244
+ :param page_size:
1245
+ :type page_size: int
1246
+ :param search:
1247
+ :type search: str
1248
+ :param environment: Filter Environment ID or Name
1249
+ :type environment: str
1250
+ :param _request_timeout: timeout setting for this request. If one
1251
+ number provided, it will be total request
1252
+ timeout. It can also be a pair (tuple) of
1253
+ (connection, read) timeouts.
1254
+ :type _request_timeout: int, tuple(int, int), optional
1255
+ :param _request_auth: set to override the auth_settings for an a single
1256
+ request; this effectively ignores the
1257
+ authentication in the spec for a single request.
1258
+ :type _request_auth: dict, optional
1259
+ :param _content_type: force content-type for the request.
1260
+ :type _content_type: str, Optional
1261
+ :param _headers: set to override the headers for a single
1262
+ request; this effectively ignores the headers
1263
+ in the spec for a single request.
1264
+ :type _headers: dict, optional
1265
+ :param _host_index: set to override the host_index for a single
1266
+ request; this effectively ignores the host_index
1267
+ in the spec for a single request.
1268
+ :type _host_index: int, optional
1269
+ :return: Returns the result object.
1270
+ """ # noqa: E501
1271
+
1272
+ _param = self._list_firewalls_serialize(
1273
+ page=page,
1274
+ page_size=page_size,
1275
+ search=search,
1276
+ environment=environment,
1277
+ _request_auth=_request_auth,
1278
+ _content_type=_content_type,
1279
+ _headers=_headers,
1280
+ _host_index=_host_index
1281
+ )
1282
+
1283
+ _response_types_map: Dict[str, Optional[str]] = {
1284
+ '200': "FirewallsListResponse",
1285
+ '400': "ErrorResponseModel",
1286
+ '401': "ErrorResponseModel",
1287
+ '403': "ErrorResponseModel",
1288
+ '500': None,
1289
+ }
1290
+ response_data = self.api_client.call_api(
1291
+ *_param,
1292
+ _request_timeout=_request_timeout
1293
+ )
1294
+ response_data.read()
1295
+ return self.api_client.response_deserialize(
1296
+ response_data=response_data,
1297
+ response_types_map=_response_types_map,
1298
+ ).data
1299
+
1300
+
1301
+ @validate_call
1302
+ def list_firewalls_with_http_info(
1303
+ self,
1304
+ page: Optional[StrictInt] = None,
1305
+ page_size: Optional[StrictInt] = None,
1306
+ search: Optional[StrictStr] = None,
1307
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1308
+ _request_timeout: Union[
1309
+ None,
1310
+ Annotated[StrictFloat, Field(gt=0)],
1311
+ Tuple[
1312
+ Annotated[StrictFloat, Field(gt=0)],
1313
+ Annotated[StrictFloat, Field(gt=0)]
1314
+ ]
1315
+ ] = None,
1316
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1317
+ _content_type: Optional[StrictStr] = None,
1318
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1319
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1320
+ ) -> ApiResponse[FirewallsListResponse]:
1321
+ """List firewalls
1322
+
1323
+ Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/network-security/security-groups).
1324
+
1325
+ :param page:
1326
+ :type page: int
1327
+ :param page_size:
1328
+ :type page_size: int
1329
+ :param search:
1330
+ :type search: str
1331
+ :param environment: Filter Environment ID or Name
1332
+ :type environment: str
1333
+ :param _request_timeout: timeout setting for this request. If one
1334
+ number provided, it will be total request
1335
+ timeout. It can also be a pair (tuple) of
1336
+ (connection, read) timeouts.
1337
+ :type _request_timeout: int, tuple(int, int), optional
1338
+ :param _request_auth: set to override the auth_settings for an a single
1339
+ request; this effectively ignores the
1340
+ authentication in the spec for a single request.
1341
+ :type _request_auth: dict, optional
1342
+ :param _content_type: force content-type for the request.
1343
+ :type _content_type: str, Optional
1344
+ :param _headers: set to override the headers for a single
1345
+ request; this effectively ignores the headers
1346
+ in the spec for a single request.
1347
+ :type _headers: dict, optional
1348
+ :param _host_index: set to override the host_index for a single
1349
+ request; this effectively ignores the host_index
1350
+ in the spec for a single request.
1351
+ :type _host_index: int, optional
1352
+ :return: Returns the result object.
1353
+ """ # noqa: E501
1354
+
1355
+ _param = self._list_firewalls_serialize(
1356
+ page=page,
1357
+ page_size=page_size,
1358
+ search=search,
1359
+ environment=environment,
1360
+ _request_auth=_request_auth,
1361
+ _content_type=_content_type,
1362
+ _headers=_headers,
1363
+ _host_index=_host_index
1364
+ )
1365
+
1366
+ _response_types_map: Dict[str, Optional[str]] = {
1367
+ '200': "FirewallsListResponse",
1368
+ '400': "ErrorResponseModel",
1369
+ '401': "ErrorResponseModel",
1370
+ '403': "ErrorResponseModel",
1371
+ '500': None,
1372
+ }
1373
+ response_data = self.api_client.call_api(
1374
+ *_param,
1375
+ _request_timeout=_request_timeout
1376
+ )
1377
+ response_data.read()
1378
+ return self.api_client.response_deserialize(
1379
+ response_data=response_data,
1380
+ response_types_map=_response_types_map,
1381
+ )
1382
+
1383
+
1384
+ @validate_call
1385
+ def list_firewalls_without_preload_content(
1386
+ self,
1387
+ page: Optional[StrictInt] = None,
1388
+ page_size: Optional[StrictInt] = None,
1389
+ search: Optional[StrictStr] = None,
1390
+ environment: Annotated[Optional[StrictStr], Field(description="Filter Environment ID or Name")] = None,
1391
+ _request_timeout: Union[
1392
+ None,
1393
+ Annotated[StrictFloat, Field(gt=0)],
1394
+ Tuple[
1395
+ Annotated[StrictFloat, Field(gt=0)],
1396
+ Annotated[StrictFloat, Field(gt=0)]
1397
+ ]
1398
+ ] = None,
1399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1400
+ _content_type: Optional[StrictStr] = None,
1401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1403
+ ) -> RESTResponseType:
1404
+ """List firewalls
1405
+
1406
+ Retrieves a list of existing firewalls and their details, including the security rules they contain and information about the virtual machines to which they are attached. For more information about the firewalls features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/network-security/security-groups).
1407
+
1408
+ :param page:
1409
+ :type page: int
1410
+ :param page_size:
1411
+ :type page_size: int
1412
+ :param search:
1413
+ :type search: str
1414
+ :param environment: Filter Environment ID or Name
1415
+ :type environment: str
1416
+ :param _request_timeout: timeout setting for this request. If one
1417
+ number provided, it will be total request
1418
+ timeout. It can also be a pair (tuple) of
1419
+ (connection, read) timeouts.
1420
+ :type _request_timeout: int, tuple(int, int), optional
1421
+ :param _request_auth: set to override the auth_settings for an a single
1422
+ request; this effectively ignores the
1423
+ authentication in the spec for a single request.
1424
+ :type _request_auth: dict, optional
1425
+ :param _content_type: force content-type for the request.
1426
+ :type _content_type: str, Optional
1427
+ :param _headers: set to override the headers for a single
1428
+ request; this effectively ignores the headers
1429
+ in the spec for a single request.
1430
+ :type _headers: dict, optional
1431
+ :param _host_index: set to override the host_index for a single
1432
+ request; this effectively ignores the host_index
1433
+ in the spec for a single request.
1434
+ :type _host_index: int, optional
1435
+ :return: Returns the result object.
1436
+ """ # noqa: E501
1437
+
1438
+ _param = self._list_firewalls_serialize(
1439
+ page=page,
1440
+ page_size=page_size,
1441
+ search=search,
1442
+ environment=environment,
1443
+ _request_auth=_request_auth,
1444
+ _content_type=_content_type,
1445
+ _headers=_headers,
1446
+ _host_index=_host_index
1447
+ )
1448
+
1449
+ _response_types_map: Dict[str, Optional[str]] = {
1450
+ '200': "FirewallsListResponse",
1451
+ '400': "ErrorResponseModel",
1452
+ '401': "ErrorResponseModel",
1453
+ '403': "ErrorResponseModel",
1454
+ '500': None,
1455
+ }
1456
+ response_data = self.api_client.call_api(
1457
+ *_param,
1458
+ _request_timeout=_request_timeout
1459
+ )
1460
+ return response_data.response
1461
+
1462
+
1463
+ def _list_firewalls_serialize(
1464
+ self,
1465
+ page,
1466
+ page_size,
1467
+ search,
1468
+ environment,
1469
+ _request_auth,
1470
+ _content_type,
1471
+ _headers,
1472
+ _host_index,
1473
+ ) -> RequestSerialized:
1474
+
1475
+ _host = None
1476
+
1477
+ _collection_formats: Dict[str, str] = {
1478
+ }
1479
+
1480
+ _path_params: Dict[str, str] = {}
1481
+ _query_params: List[Tuple[str, str]] = []
1482
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1483
+ _form_params: List[Tuple[str, str]] = []
1484
+ _files: Dict[
1485
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1486
+ ] = {}
1487
+ _body_params: Optional[bytes] = None
1488
+
1489
+ # process the path parameters
1490
+ # process the query parameters
1491
+ if page is not None:
1492
+
1493
+ _query_params.append(('page', page))
1494
+
1495
+ if page_size is not None:
1496
+
1497
+ _query_params.append(('pageSize', page_size))
1498
+
1499
+ if search is not None:
1500
+
1501
+ _query_params.append(('search', search))
1502
+
1503
+ if environment is not None:
1504
+
1505
+ _query_params.append(('environment', environment))
1506
+
1507
+ # process the header parameters
1508
+ # process the form parameters
1509
+ # process the body parameter
1510
+
1511
+
1512
+ # set the HTTP header `Accept`
1513
+ if 'Accept' not in _header_params:
1514
+ _header_params['Accept'] = self.api_client.select_header_accept(
1515
+ [
1516
+ 'application/json'
1517
+ ]
1518
+ )
1519
+
1520
+
1521
+ # authentication setting
1522
+ _auth_settings: List[str] = [
1523
+ 'apiKey',
1524
+ 'accessToken'
1525
+ ]
1526
+
1527
+ return self.api_client.param_serialize(
1528
+ method='GET',
1529
+ resource_path='/core/firewalls',
1530
+ path_params=_path_params,
1531
+ query_params=_query_params,
1532
+ header_params=_header_params,
1533
+ body=_body_params,
1534
+ post_params=_form_params,
1535
+ files=_files,
1536
+ auth_settings=_auth_settings,
1537
+ collection_formats=_collection_formats,
1538
+ _host=_host,
1539
+ _request_auth=_request_auth
1540
+ )
1541
+
1542
+
1543
+
1544
+
1545
+ @validate_call
1546
+ def retrieve_firewall_details(
1547
+ self,
1548
+ id: StrictInt,
1549
+ _request_timeout: Union[
1550
+ None,
1551
+ Annotated[StrictFloat, Field(gt=0)],
1552
+ Tuple[
1553
+ Annotated[StrictFloat, Field(gt=0)],
1554
+ Annotated[StrictFloat, Field(gt=0)]
1555
+ ]
1556
+ ] = None,
1557
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1558
+ _content_type: Optional[StrictStr] = None,
1559
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1560
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1561
+ ) -> FirewallDetailResponse:
1562
+ """Retrieve firewall details
1563
+
1564
+ Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1565
+
1566
+ :param id: (required)
1567
+ :type id: int
1568
+ :param _request_timeout: timeout setting for this request. If one
1569
+ number provided, it will be total request
1570
+ timeout. It can also be a pair (tuple) of
1571
+ (connection, read) timeouts.
1572
+ :type _request_timeout: int, tuple(int, int), optional
1573
+ :param _request_auth: set to override the auth_settings for an a single
1574
+ request; this effectively ignores the
1575
+ authentication in the spec for a single request.
1576
+ :type _request_auth: dict, optional
1577
+ :param _content_type: force content-type for the request.
1578
+ :type _content_type: str, Optional
1579
+ :param _headers: set to override the headers for a single
1580
+ request; this effectively ignores the headers
1581
+ in the spec for a single request.
1582
+ :type _headers: dict, optional
1583
+ :param _host_index: set to override the host_index for a single
1584
+ request; this effectively ignores the host_index
1585
+ in the spec for a single request.
1586
+ :type _host_index: int, optional
1587
+ :return: Returns the result object.
1588
+ """ # noqa: E501
1589
+
1590
+ _param = self._retrieve_firewall_details_serialize(
1591
+ id=id,
1592
+ _request_auth=_request_auth,
1593
+ _content_type=_content_type,
1594
+ _headers=_headers,
1595
+ _host_index=_host_index
1596
+ )
1597
+
1598
+ _response_types_map: Dict[str, Optional[str]] = {
1599
+ '200': "FirewallDetailResponse",
1600
+ '400': "ErrorResponseModel",
1601
+ '401': "ErrorResponseModel",
1602
+ '403': "ErrorResponseModel",
1603
+ '404': "ErrorResponseModel",
1604
+ '500': None,
1605
+ }
1606
+ response_data = self.api_client.call_api(
1607
+ *_param,
1608
+ _request_timeout=_request_timeout
1609
+ )
1610
+ response_data.read()
1611
+ return self.api_client.response_deserialize(
1612
+ response_data=response_data,
1613
+ response_types_map=_response_types_map,
1614
+ ).data
1615
+
1616
+
1617
+ @validate_call
1618
+ def retrieve_firewall_details_with_http_info(
1619
+ self,
1620
+ id: StrictInt,
1621
+ _request_timeout: Union[
1622
+ None,
1623
+ Annotated[StrictFloat, Field(gt=0)],
1624
+ Tuple[
1625
+ Annotated[StrictFloat, Field(gt=0)],
1626
+ Annotated[StrictFloat, Field(gt=0)]
1627
+ ]
1628
+ ] = None,
1629
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1630
+ _content_type: Optional[StrictStr] = None,
1631
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1632
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1633
+ ) -> ApiResponse[FirewallDetailResponse]:
1634
+ """Retrieve firewall details
1635
+
1636
+ Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1637
+
1638
+ :param id: (required)
1639
+ :type id: int
1640
+ :param _request_timeout: timeout setting for this request. If one
1641
+ number provided, it will be total request
1642
+ timeout. It can also be a pair (tuple) of
1643
+ (connection, read) timeouts.
1644
+ :type _request_timeout: int, tuple(int, int), optional
1645
+ :param _request_auth: set to override the auth_settings for an a single
1646
+ request; this effectively ignores the
1647
+ authentication in the spec for a single request.
1648
+ :type _request_auth: dict, optional
1649
+ :param _content_type: force content-type for the request.
1650
+ :type _content_type: str, Optional
1651
+ :param _headers: set to override the headers for a single
1652
+ request; this effectively ignores the headers
1653
+ in the spec for a single request.
1654
+ :type _headers: dict, optional
1655
+ :param _host_index: set to override the host_index for a single
1656
+ request; this effectively ignores the host_index
1657
+ in the spec for a single request.
1658
+ :type _host_index: int, optional
1659
+ :return: Returns the result object.
1660
+ """ # noqa: E501
1661
+
1662
+ _param = self._retrieve_firewall_details_serialize(
1663
+ id=id,
1664
+ _request_auth=_request_auth,
1665
+ _content_type=_content_type,
1666
+ _headers=_headers,
1667
+ _host_index=_host_index
1668
+ )
1669
+
1670
+ _response_types_map: Dict[str, Optional[str]] = {
1671
+ '200': "FirewallDetailResponse",
1672
+ '400': "ErrorResponseModel",
1673
+ '401': "ErrorResponseModel",
1674
+ '403': "ErrorResponseModel",
1675
+ '404': "ErrorResponseModel",
1676
+ '500': None,
1677
+ }
1678
+ response_data = self.api_client.call_api(
1679
+ *_param,
1680
+ _request_timeout=_request_timeout
1681
+ )
1682
+ response_data.read()
1683
+ return self.api_client.response_deserialize(
1684
+ response_data=response_data,
1685
+ response_types_map=_response_types_map,
1686
+ )
1687
+
1688
+
1689
+ @validate_call
1690
+ def retrieve_firewall_details_without_preload_content(
1691
+ self,
1692
+ id: StrictInt,
1693
+ _request_timeout: Union[
1694
+ None,
1695
+ Annotated[StrictFloat, Field(gt=0)],
1696
+ Tuple[
1697
+ Annotated[StrictFloat, Field(gt=0)],
1698
+ Annotated[StrictFloat, Field(gt=0)]
1699
+ ]
1700
+ ] = None,
1701
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1702
+ _content_type: Optional[StrictStr] = None,
1703
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1704
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1705
+ ) -> RESTResponseType:
1706
+ """Retrieve firewall details
1707
+
1708
+ Retrieves the details of an existing firewall, including the security rules it contains and information about the virtual machines to which it is attached.
1709
+
1710
+ :param id: (required)
1711
+ :type id: int
1712
+ :param _request_timeout: timeout setting for this request. If one
1713
+ number provided, it will be total request
1714
+ timeout. It can also be a pair (tuple) of
1715
+ (connection, read) timeouts.
1716
+ :type _request_timeout: int, tuple(int, int), optional
1717
+ :param _request_auth: set to override the auth_settings for an a single
1718
+ request; this effectively ignores the
1719
+ authentication in the spec for a single request.
1720
+ :type _request_auth: dict, optional
1721
+ :param _content_type: force content-type for the request.
1722
+ :type _content_type: str, Optional
1723
+ :param _headers: set to override the headers for a single
1724
+ request; this effectively ignores the headers
1725
+ in the spec for a single request.
1726
+ :type _headers: dict, optional
1727
+ :param _host_index: set to override the host_index for a single
1728
+ request; this effectively ignores the host_index
1729
+ in the spec for a single request.
1730
+ :type _host_index: int, optional
1731
+ :return: Returns the result object.
1732
+ """ # noqa: E501
1733
+
1734
+ _param = self._retrieve_firewall_details_serialize(
1735
+ id=id,
1736
+ _request_auth=_request_auth,
1737
+ _content_type=_content_type,
1738
+ _headers=_headers,
1739
+ _host_index=_host_index
1740
+ )
1741
+
1742
+ _response_types_map: Dict[str, Optional[str]] = {
1743
+ '200': "FirewallDetailResponse",
1744
+ '400': "ErrorResponseModel",
1745
+ '401': "ErrorResponseModel",
1746
+ '403': "ErrorResponseModel",
1747
+ '404': "ErrorResponseModel",
1748
+ '500': None,
1749
+ }
1750
+ response_data = self.api_client.call_api(
1751
+ *_param,
1752
+ _request_timeout=_request_timeout
1753
+ )
1754
+ return response_data.response
1755
+
1756
+
1757
+ def _retrieve_firewall_details_serialize(
1758
+ self,
1759
+ id,
1760
+ _request_auth,
1761
+ _content_type,
1762
+ _headers,
1763
+ _host_index,
1764
+ ) -> RequestSerialized:
1765
+
1766
+ _host = None
1767
+
1768
+ _collection_formats: Dict[str, str] = {
1769
+ }
1770
+
1771
+ _path_params: Dict[str, str] = {}
1772
+ _query_params: List[Tuple[str, str]] = []
1773
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1774
+ _form_params: List[Tuple[str, str]] = []
1775
+ _files: Dict[
1776
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1777
+ ] = {}
1778
+ _body_params: Optional[bytes] = None
1779
+
1780
+ # process the path parameters
1781
+ if id is not None:
1782
+ _path_params['id'] = id
1783
+ # process the query parameters
1784
+ # process the header parameters
1785
+ # process the form parameters
1786
+ # process the body parameter
1787
+
1788
+
1789
+ # set the HTTP header `Accept`
1790
+ if 'Accept' not in _header_params:
1791
+ _header_params['Accept'] = self.api_client.select_header_accept(
1792
+ [
1793
+ 'application/json'
1794
+ ]
1795
+ )
1796
+
1797
+
1798
+ # authentication setting
1799
+ _auth_settings: List[str] = [
1800
+ 'apiKey',
1801
+ 'accessToken'
1802
+ ]
1803
+
1804
+ return self.api_client.param_serialize(
1805
+ method='GET',
1806
+ resource_path='/core/firewalls/{id}',
1807
+ path_params=_path_params,
1808
+ query_params=_query_params,
1809
+ header_params=_header_params,
1810
+ body=_body_params,
1811
+ post_params=_form_params,
1812
+ files=_files,
1813
+ auth_settings=_auth_settings,
1814
+ collection_formats=_collection_formats,
1815
+ _host=_host,
1816
+ _request_auth=_request_auth
1817
+ )
1818
+
1819
+