hyperstack-async 1.55.1a0__py3-none-any.whl

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