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,2033 @@
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_environment import CreateEnvironment
23
+ from ..models.environment import Environment
24
+ from ..models.environments import Environments
25
+ from ..models.name_available_model import NameAvailableModel
26
+ from ..models.response_model import ResponseModel
27
+ from ..models.update_environment import UpdateEnvironment
28
+ from ..models.vm_quota import VMQuota
29
+
30
+ from ..api_client import ApiClient, RequestSerialized
31
+ from ..api_response import ApiResponse
32
+ from ..rest import RESTResponseType
33
+
34
+
35
+ class EnvironmentApi:
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 create_environment(
50
+ self,
51
+ payload: CreateEnvironment,
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> Environment:
65
+ """Create environment
66
+
67
+ Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://docs.hyperstack.cloud/docs/resource-management/regions/) in the request body.
68
+
69
+ :param payload: (required)
70
+ :type payload: CreateEnvironment
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._create_environment_serialize(
94
+ payload=payload,
95
+ _request_auth=_request_auth,
96
+ _content_type=_content_type,
97
+ _headers=_headers,
98
+ _host_index=_host_index
99
+ )
100
+
101
+ _response_types_map: Dict[str, Optional[str]] = {
102
+ '200': "Environment",
103
+ '400': "ErrorResponseModel",
104
+ '401': "ErrorResponseModel",
105
+ '404': "ErrorResponseModel",
106
+ '409': "ErrorResponseModel",
107
+ '500': None,
108
+ }
109
+ response_data = await self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ await response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ async def create_environment_with_http_info(
122
+ self,
123
+ payload: CreateEnvironment,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[Environment]:
137
+ """Create environment
138
+
139
+ Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://docs.hyperstack.cloud/docs/resource-management/regions/) in the request body.
140
+
141
+ :param payload: (required)
142
+ :type payload: CreateEnvironment
143
+ :param _request_timeout: timeout setting for this request. If one
144
+ number provided, it will be total request
145
+ timeout. It can also be a pair (tuple) of
146
+ (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
148
+ :param _request_auth: set to override the auth_settings for an a single
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
151
+ :type _request_auth: dict, optional
152
+ :param _content_type: force content-type for the request.
153
+ :type _content_type: str, Optional
154
+ :param _headers: set to override the headers for a single
155
+ request; this effectively ignores the headers
156
+ in the spec for a single request.
157
+ :type _headers: dict, optional
158
+ :param _host_index: set to override the host_index for a single
159
+ request; this effectively ignores the host_index
160
+ in the spec for a single request.
161
+ :type _host_index: int, optional
162
+ :return: Returns the result object.
163
+ """ # noqa: E501
164
+
165
+ _param = self._create_environment_serialize(
166
+ payload=payload,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "Environment",
175
+ '400': "ErrorResponseModel",
176
+ '401': "ErrorResponseModel",
177
+ '404': "ErrorResponseModel",
178
+ '409': "ErrorResponseModel",
179
+ '500': None,
180
+ }
181
+ response_data = await self.api_client.call_api(
182
+ *_param,
183
+ _request_timeout=_request_timeout
184
+ )
185
+ await response_data.read()
186
+ return self.api_client.response_deserialize(
187
+ response_data=response_data,
188
+ response_types_map=_response_types_map,
189
+ )
190
+
191
+
192
+ @validate_call
193
+ async def create_environment_without_preload_content(
194
+ self,
195
+ payload: CreateEnvironment,
196
+ _request_timeout: Union[
197
+ None,
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Tuple[
200
+ Annotated[StrictFloat, Field(gt=0)],
201
+ Annotated[StrictFloat, Field(gt=0)]
202
+ ]
203
+ ] = None,
204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
205
+ _content_type: Optional[StrictStr] = None,
206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
208
+ ) -> RESTResponseType:
209
+ """Create environment
210
+
211
+ Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://docs.hyperstack.cloud/docs/resource-management/regions/) in the request body.
212
+
213
+ :param payload: (required)
214
+ :type payload: CreateEnvironment
215
+ :param _request_timeout: timeout setting for this request. If one
216
+ number provided, it will be total request
217
+ timeout. It can also be a pair (tuple) of
218
+ (connection, read) timeouts.
219
+ :type _request_timeout: int, tuple(int, int), optional
220
+ :param _request_auth: set to override the auth_settings for an a single
221
+ request; this effectively ignores the
222
+ authentication in the spec for a single request.
223
+ :type _request_auth: dict, optional
224
+ :param _content_type: force content-type for the request.
225
+ :type _content_type: str, Optional
226
+ :param _headers: set to override the headers for a single
227
+ request; this effectively ignores the headers
228
+ in the spec for a single request.
229
+ :type _headers: dict, optional
230
+ :param _host_index: set to override the host_index for a single
231
+ request; this effectively ignores the host_index
232
+ in the spec for a single request.
233
+ :type _host_index: int, optional
234
+ :return: Returns the result object.
235
+ """ # noqa: E501
236
+
237
+ _param = self._create_environment_serialize(
238
+ payload=payload,
239
+ _request_auth=_request_auth,
240
+ _content_type=_content_type,
241
+ _headers=_headers,
242
+ _host_index=_host_index
243
+ )
244
+
245
+ _response_types_map: Dict[str, Optional[str]] = {
246
+ '200': "Environment",
247
+ '400': "ErrorResponseModel",
248
+ '401': "ErrorResponseModel",
249
+ '404': "ErrorResponseModel",
250
+ '409': "ErrorResponseModel",
251
+ '500': None,
252
+ }
253
+ response_data = await self.api_client.call_api(
254
+ *_param,
255
+ _request_timeout=_request_timeout
256
+ )
257
+ return response_data.response
258
+
259
+
260
+ def _create_environment_serialize(
261
+ self,
262
+ payload,
263
+ _request_auth,
264
+ _content_type,
265
+ _headers,
266
+ _host_index,
267
+ ) -> RequestSerialized:
268
+
269
+ _host = None
270
+
271
+ _collection_formats: Dict[str, str] = {
272
+ }
273
+
274
+ _path_params: Dict[str, str] = {}
275
+ _query_params: List[Tuple[str, str]] = []
276
+ _header_params: Dict[str, Optional[str]] = _headers or {}
277
+ _form_params: List[Tuple[str, str]] = []
278
+ _files: Dict[
279
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
280
+ ] = {}
281
+ _body_params: Optional[bytes] = None
282
+
283
+ # process the path parameters
284
+ # process the query parameters
285
+ # process the header parameters
286
+ # process the form parameters
287
+ # process the body parameter
288
+ if payload is not None:
289
+ _body_params = payload
290
+
291
+
292
+ # set the HTTP header `Accept`
293
+ if 'Accept' not in _header_params:
294
+ _header_params['Accept'] = self.api_client.select_header_accept(
295
+ [
296
+ 'application/json'
297
+ ]
298
+ )
299
+
300
+ # set the HTTP header `Content-Type`
301
+ if _content_type:
302
+ _header_params['Content-Type'] = _content_type
303
+ else:
304
+ _default_content_type = (
305
+ self.api_client.select_header_content_type(
306
+ [
307
+ 'application/json'
308
+ ]
309
+ )
310
+ )
311
+ if _default_content_type is not None:
312
+ _header_params['Content-Type'] = _default_content_type
313
+
314
+ # authentication setting
315
+ _auth_settings: List[str] = [
316
+ 'apiKey'
317
+ ]
318
+
319
+ return self.api_client.param_serialize(
320
+ method='POST',
321
+ resource_path='/core/environments',
322
+ path_params=_path_params,
323
+ query_params=_query_params,
324
+ header_params=_header_params,
325
+ body=_body_params,
326
+ post_params=_form_params,
327
+ files=_files,
328
+ auth_settings=_auth_settings,
329
+ collection_formats=_collection_formats,
330
+ _host=_host,
331
+ _request_auth=_request_auth
332
+ )
333
+
334
+
335
+
336
+
337
+ @validate_call
338
+ async def delete_environment(
339
+ self,
340
+ id: StrictInt,
341
+ _request_timeout: Union[
342
+ None,
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Tuple[
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Annotated[StrictFloat, Field(gt=0)]
347
+ ]
348
+ ] = None,
349
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
350
+ _content_type: Optional[StrictStr] = None,
351
+ _headers: Optional[Dict[StrictStr, Any]] = None,
352
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
353
+ ) -> ResponseModel:
354
+ """Delete environment
355
+
356
+ Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
357
+
358
+ :param id: (required)
359
+ :type id: int
360
+ :param _request_timeout: timeout setting for this request. If one
361
+ number provided, it will be total request
362
+ timeout. It can also be a pair (tuple) of
363
+ (connection, read) timeouts.
364
+ :type _request_timeout: int, tuple(int, int), optional
365
+ :param _request_auth: set to override the auth_settings for an a single
366
+ request; this effectively ignores the
367
+ authentication in the spec for a single request.
368
+ :type _request_auth: dict, optional
369
+ :param _content_type: force content-type for the request.
370
+ :type _content_type: str, Optional
371
+ :param _headers: set to override the headers for a single
372
+ request; this effectively ignores the headers
373
+ in the spec for a single request.
374
+ :type _headers: dict, optional
375
+ :param _host_index: set to override the host_index for a single
376
+ request; this effectively ignores the host_index
377
+ in the spec for a single request.
378
+ :type _host_index: int, optional
379
+ :return: Returns the result object.
380
+ """ # noqa: E501
381
+
382
+ _param = self._delete_environment_serialize(
383
+ id=id,
384
+ _request_auth=_request_auth,
385
+ _content_type=_content_type,
386
+ _headers=_headers,
387
+ _host_index=_host_index
388
+ )
389
+
390
+ _response_types_map: Dict[str, Optional[str]] = {
391
+ '200': "ResponseModel",
392
+ '400': "ErrorResponseModel",
393
+ '401': "ErrorResponseModel",
394
+ '404': "ErrorResponseModel",
395
+ '500': None,
396
+ }
397
+ response_data = await self.api_client.call_api(
398
+ *_param,
399
+ _request_timeout=_request_timeout
400
+ )
401
+ await response_data.read()
402
+ return self.api_client.response_deserialize(
403
+ response_data=response_data,
404
+ response_types_map=_response_types_map,
405
+ ).data
406
+
407
+
408
+ @validate_call
409
+ async def delete_environment_with_http_info(
410
+ self,
411
+ id: StrictInt,
412
+ _request_timeout: Union[
413
+ None,
414
+ Annotated[StrictFloat, Field(gt=0)],
415
+ Tuple[
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Annotated[StrictFloat, Field(gt=0)]
418
+ ]
419
+ ] = None,
420
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
421
+ _content_type: Optional[StrictStr] = None,
422
+ _headers: Optional[Dict[StrictStr, Any]] = None,
423
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424
+ ) -> ApiResponse[ResponseModel]:
425
+ """Delete environment
426
+
427
+ Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
428
+
429
+ :param id: (required)
430
+ :type id: int
431
+ :param _request_timeout: timeout setting for this request. If one
432
+ number provided, it will be total request
433
+ timeout. It can also be a pair (tuple) of
434
+ (connection, read) timeouts.
435
+ :type _request_timeout: int, tuple(int, int), optional
436
+ :param _request_auth: set to override the auth_settings for an a single
437
+ request; this effectively ignores the
438
+ authentication in the spec for a single request.
439
+ :type _request_auth: dict, optional
440
+ :param _content_type: force content-type for the request.
441
+ :type _content_type: str, Optional
442
+ :param _headers: set to override the headers for a single
443
+ request; this effectively ignores the headers
444
+ in the spec for a single request.
445
+ :type _headers: dict, optional
446
+ :param _host_index: set to override the host_index for a single
447
+ request; this effectively ignores the host_index
448
+ in the spec for a single request.
449
+ :type _host_index: int, optional
450
+ :return: Returns the result object.
451
+ """ # noqa: E501
452
+
453
+ _param = self._delete_environment_serialize(
454
+ id=id,
455
+ _request_auth=_request_auth,
456
+ _content_type=_content_type,
457
+ _headers=_headers,
458
+ _host_index=_host_index
459
+ )
460
+
461
+ _response_types_map: Dict[str, Optional[str]] = {
462
+ '200': "ResponseModel",
463
+ '400': "ErrorResponseModel",
464
+ '401': "ErrorResponseModel",
465
+ '404': "ErrorResponseModel",
466
+ '500': None,
467
+ }
468
+ response_data = await self.api_client.call_api(
469
+ *_param,
470
+ _request_timeout=_request_timeout
471
+ )
472
+ await response_data.read()
473
+ return self.api_client.response_deserialize(
474
+ response_data=response_data,
475
+ response_types_map=_response_types_map,
476
+ )
477
+
478
+
479
+ @validate_call
480
+ async def delete_environment_without_preload_content(
481
+ self,
482
+ id: StrictInt,
483
+ _request_timeout: Union[
484
+ None,
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Tuple[
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Annotated[StrictFloat, Field(gt=0)]
489
+ ]
490
+ ] = None,
491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
492
+ _content_type: Optional[StrictStr] = None,
493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
495
+ ) -> RESTResponseType:
496
+ """Delete environment
497
+
498
+ Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.
499
+
500
+ :param id: (required)
501
+ :type id: int
502
+ :param _request_timeout: timeout setting for this request. If one
503
+ number provided, it will be total request
504
+ timeout. It can also be a pair (tuple) of
505
+ (connection, read) timeouts.
506
+ :type _request_timeout: int, tuple(int, int), optional
507
+ :param _request_auth: set to override the auth_settings for an a single
508
+ request; this effectively ignores the
509
+ authentication in the spec for a single request.
510
+ :type _request_auth: dict, optional
511
+ :param _content_type: force content-type for the request.
512
+ :type _content_type: str, Optional
513
+ :param _headers: set to override the headers for a single
514
+ request; this effectively ignores the headers
515
+ in the spec for a single request.
516
+ :type _headers: dict, optional
517
+ :param _host_index: set to override the host_index for a single
518
+ request; this effectively ignores the host_index
519
+ in the spec for a single request.
520
+ :type _host_index: int, optional
521
+ :return: Returns the result object.
522
+ """ # noqa: E501
523
+
524
+ _param = self._delete_environment_serialize(
525
+ id=id,
526
+ _request_auth=_request_auth,
527
+ _content_type=_content_type,
528
+ _headers=_headers,
529
+ _host_index=_host_index
530
+ )
531
+
532
+ _response_types_map: Dict[str, Optional[str]] = {
533
+ '200': "ResponseModel",
534
+ '400': "ErrorResponseModel",
535
+ '401': "ErrorResponseModel",
536
+ '404': "ErrorResponseModel",
537
+ '500': None,
538
+ }
539
+ response_data = await self.api_client.call_api(
540
+ *_param,
541
+ _request_timeout=_request_timeout
542
+ )
543
+ return response_data.response
544
+
545
+
546
+ def _delete_environment_serialize(
547
+ self,
548
+ id,
549
+ _request_auth,
550
+ _content_type,
551
+ _headers,
552
+ _host_index,
553
+ ) -> RequestSerialized:
554
+
555
+ _host = None
556
+
557
+ _collection_formats: Dict[str, str] = {
558
+ }
559
+
560
+ _path_params: Dict[str, str] = {}
561
+ _query_params: List[Tuple[str, str]] = []
562
+ _header_params: Dict[str, Optional[str]] = _headers or {}
563
+ _form_params: List[Tuple[str, str]] = []
564
+ _files: Dict[
565
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
566
+ ] = {}
567
+ _body_params: Optional[bytes] = None
568
+
569
+ # process the path parameters
570
+ if id is not None:
571
+ _path_params['id'] = id
572
+ # process the query parameters
573
+ # process the header parameters
574
+ # process the form parameters
575
+ # process the body parameter
576
+
577
+
578
+ # set the HTTP header `Accept`
579
+ if 'Accept' not in _header_params:
580
+ _header_params['Accept'] = self.api_client.select_header_accept(
581
+ [
582
+ 'application/json'
583
+ ]
584
+ )
585
+
586
+
587
+ # authentication setting
588
+ _auth_settings: List[str] = [
589
+ 'apiKey'
590
+ ]
591
+
592
+ return self.api_client.param_serialize(
593
+ method='DELETE',
594
+ resource_path='/core/environments/{id}',
595
+ path_params=_path_params,
596
+ query_params=_query_params,
597
+ header_params=_header_params,
598
+ body=_body_params,
599
+ post_params=_form_params,
600
+ files=_files,
601
+ auth_settings=_auth_settings,
602
+ collection_formats=_collection_formats,
603
+ _host=_host,
604
+ _request_auth=_request_auth
605
+ )
606
+
607
+
608
+
609
+
610
+ @validate_call
611
+ async def fetch_environment_name_availability(
612
+ self,
613
+ name: StrictStr,
614
+ _request_timeout: Union[
615
+ None,
616
+ Annotated[StrictFloat, Field(gt=0)],
617
+ Tuple[
618
+ Annotated[StrictFloat, Field(gt=0)],
619
+ Annotated[StrictFloat, Field(gt=0)]
620
+ ]
621
+ ] = None,
622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
623
+ _content_type: Optional[StrictStr] = None,
624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
626
+ ) -> NameAvailableModel:
627
+ """Fetch environment name availability
628
+
629
+ Check if a Environment name is available
630
+
631
+ :param name: (required)
632
+ :type name: str
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._fetch_environment_name_availability_serialize(
656
+ name=name,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index
661
+ )
662
+
663
+ _response_types_map: Dict[str, Optional[str]] = {
664
+ '200': "NameAvailableModel",
665
+ '400': "ErrorResponseModel",
666
+ '401': "ErrorResponseModel",
667
+ '404': "ErrorResponseModel",
668
+ '500': None,
669
+ }
670
+ response_data = await self.api_client.call_api(
671
+ *_param,
672
+ _request_timeout=_request_timeout
673
+ )
674
+ await response_data.read()
675
+ return self.api_client.response_deserialize(
676
+ response_data=response_data,
677
+ response_types_map=_response_types_map,
678
+ ).data
679
+
680
+
681
+ @validate_call
682
+ async def fetch_environment_name_availability_with_http_info(
683
+ self,
684
+ name: StrictStr,
685
+ _request_timeout: Union[
686
+ None,
687
+ Annotated[StrictFloat, Field(gt=0)],
688
+ Tuple[
689
+ Annotated[StrictFloat, Field(gt=0)],
690
+ Annotated[StrictFloat, Field(gt=0)]
691
+ ]
692
+ ] = None,
693
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
694
+ _content_type: Optional[StrictStr] = None,
695
+ _headers: Optional[Dict[StrictStr, Any]] = None,
696
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
697
+ ) -> ApiResponse[NameAvailableModel]:
698
+ """Fetch environment name availability
699
+
700
+ Check if a Environment name is available
701
+
702
+ :param name: (required)
703
+ :type name: str
704
+ :param _request_timeout: timeout setting for this request. If one
705
+ number provided, it will be total request
706
+ timeout. It can also be a pair (tuple) of
707
+ (connection, read) timeouts.
708
+ :type _request_timeout: int, tuple(int, int), optional
709
+ :param _request_auth: set to override the auth_settings for an a single
710
+ request; this effectively ignores the
711
+ authentication in the spec for a single request.
712
+ :type _request_auth: dict, optional
713
+ :param _content_type: force content-type for the request.
714
+ :type _content_type: str, Optional
715
+ :param _headers: set to override the headers for a single
716
+ request; this effectively ignores the headers
717
+ in the spec for a single request.
718
+ :type _headers: dict, optional
719
+ :param _host_index: set to override the host_index for a single
720
+ request; this effectively ignores the host_index
721
+ in the spec for a single request.
722
+ :type _host_index: int, optional
723
+ :return: Returns the result object.
724
+ """ # noqa: E501
725
+
726
+ _param = self._fetch_environment_name_availability_serialize(
727
+ name=name,
728
+ _request_auth=_request_auth,
729
+ _content_type=_content_type,
730
+ _headers=_headers,
731
+ _host_index=_host_index
732
+ )
733
+
734
+ _response_types_map: Dict[str, Optional[str]] = {
735
+ '200': "NameAvailableModel",
736
+ '400': "ErrorResponseModel",
737
+ '401': "ErrorResponseModel",
738
+ '404': "ErrorResponseModel",
739
+ '500': None,
740
+ }
741
+ response_data = await self.api_client.call_api(
742
+ *_param,
743
+ _request_timeout=_request_timeout
744
+ )
745
+ await response_data.read()
746
+ return self.api_client.response_deserialize(
747
+ response_data=response_data,
748
+ response_types_map=_response_types_map,
749
+ )
750
+
751
+
752
+ @validate_call
753
+ async def fetch_environment_name_availability_without_preload_content(
754
+ self,
755
+ name: StrictStr,
756
+ _request_timeout: Union[
757
+ None,
758
+ Annotated[StrictFloat, Field(gt=0)],
759
+ Tuple[
760
+ Annotated[StrictFloat, Field(gt=0)],
761
+ Annotated[StrictFloat, Field(gt=0)]
762
+ ]
763
+ ] = None,
764
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
765
+ _content_type: Optional[StrictStr] = None,
766
+ _headers: Optional[Dict[StrictStr, Any]] = None,
767
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
768
+ ) -> RESTResponseType:
769
+ """Fetch environment name availability
770
+
771
+ Check if a Environment name is available
772
+
773
+ :param name: (required)
774
+ :type name: str
775
+ :param _request_timeout: timeout setting for this request. If one
776
+ number provided, it will be total request
777
+ timeout. It can also be a pair (tuple) of
778
+ (connection, read) timeouts.
779
+ :type _request_timeout: int, tuple(int, int), optional
780
+ :param _request_auth: set to override the auth_settings for an a single
781
+ request; this effectively ignores the
782
+ authentication in the spec for a single request.
783
+ :type _request_auth: dict, optional
784
+ :param _content_type: force content-type for the request.
785
+ :type _content_type: str, Optional
786
+ :param _headers: set to override the headers for a single
787
+ request; this effectively ignores the headers
788
+ in the spec for a single request.
789
+ :type _headers: dict, optional
790
+ :param _host_index: set to override the host_index for a single
791
+ request; this effectively ignores the host_index
792
+ in the spec for a single request.
793
+ :type _host_index: int, optional
794
+ :return: Returns the result object.
795
+ """ # noqa: E501
796
+
797
+ _param = self._fetch_environment_name_availability_serialize(
798
+ name=name,
799
+ _request_auth=_request_auth,
800
+ _content_type=_content_type,
801
+ _headers=_headers,
802
+ _host_index=_host_index
803
+ )
804
+
805
+ _response_types_map: Dict[str, Optional[str]] = {
806
+ '200': "NameAvailableModel",
807
+ '400': "ErrorResponseModel",
808
+ '401': "ErrorResponseModel",
809
+ '404': "ErrorResponseModel",
810
+ '500': None,
811
+ }
812
+ response_data = await self.api_client.call_api(
813
+ *_param,
814
+ _request_timeout=_request_timeout
815
+ )
816
+ return response_data.response
817
+
818
+
819
+ def _fetch_environment_name_availability_serialize(
820
+ self,
821
+ name,
822
+ _request_auth,
823
+ _content_type,
824
+ _headers,
825
+ _host_index,
826
+ ) -> RequestSerialized:
827
+
828
+ _host = None
829
+
830
+ _collection_formats: Dict[str, str] = {
831
+ }
832
+
833
+ _path_params: Dict[str, str] = {}
834
+ _query_params: List[Tuple[str, str]] = []
835
+ _header_params: Dict[str, Optional[str]] = _headers or {}
836
+ _form_params: List[Tuple[str, str]] = []
837
+ _files: Dict[
838
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
839
+ ] = {}
840
+ _body_params: Optional[bytes] = None
841
+
842
+ # process the path parameters
843
+ if name is not None:
844
+ _path_params['name'] = name
845
+ # process the query parameters
846
+ # process the header parameters
847
+ # process the form parameters
848
+ # process the body parameter
849
+
850
+
851
+ # set the HTTP header `Accept`
852
+ if 'Accept' not in _header_params:
853
+ _header_params['Accept'] = self.api_client.select_header_accept(
854
+ [
855
+ 'application/json'
856
+ ]
857
+ )
858
+
859
+
860
+ # authentication setting
861
+ _auth_settings: List[str] = [
862
+ 'apiKey'
863
+ ]
864
+
865
+ return self.api_client.param_serialize(
866
+ method='GET',
867
+ resource_path='/core/environments/name-availability/{name}',
868
+ path_params=_path_params,
869
+ query_params=_query_params,
870
+ header_params=_header_params,
871
+ body=_body_params,
872
+ post_params=_form_params,
873
+ files=_files,
874
+ auth_settings=_auth_settings,
875
+ collection_formats=_collection_formats,
876
+ _host=_host,
877
+ _request_auth=_request_auth
878
+ )
879
+
880
+
881
+
882
+
883
+ @validate_call
884
+ async def get_environment(
885
+ self,
886
+ id: StrictInt,
887
+ _request_timeout: Union[
888
+ None,
889
+ Annotated[StrictFloat, Field(gt=0)],
890
+ Tuple[
891
+ Annotated[StrictFloat, Field(gt=0)],
892
+ Annotated[StrictFloat, Field(gt=0)]
893
+ ]
894
+ ] = None,
895
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
896
+ _content_type: Optional[StrictStr] = None,
897
+ _headers: Optional[Dict[StrictStr, Any]] = None,
898
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
899
+ ) -> Environment:
900
+ """Retrieve environment
901
+
902
+ Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
903
+
904
+ :param id: (required)
905
+ :type id: int
906
+ :param _request_timeout: timeout setting for this request. If one
907
+ number provided, it will be total request
908
+ timeout. It can also be a pair (tuple) of
909
+ (connection, read) timeouts.
910
+ :type _request_timeout: int, tuple(int, int), optional
911
+ :param _request_auth: set to override the auth_settings for an a single
912
+ request; this effectively ignores the
913
+ authentication in the spec for a single request.
914
+ :type _request_auth: dict, optional
915
+ :param _content_type: force content-type for the request.
916
+ :type _content_type: str, Optional
917
+ :param _headers: set to override the headers for a single
918
+ request; this effectively ignores the headers
919
+ in the spec for a single request.
920
+ :type _headers: dict, optional
921
+ :param _host_index: set to override the host_index for a single
922
+ request; this effectively ignores the host_index
923
+ in the spec for a single request.
924
+ :type _host_index: int, optional
925
+ :return: Returns the result object.
926
+ """ # noqa: E501
927
+
928
+ _param = self._get_environment_serialize(
929
+ id=id,
930
+ _request_auth=_request_auth,
931
+ _content_type=_content_type,
932
+ _headers=_headers,
933
+ _host_index=_host_index
934
+ )
935
+
936
+ _response_types_map: Dict[str, Optional[str]] = {
937
+ '200': "Environment",
938
+ '400': "ErrorResponseModel",
939
+ '401': "ErrorResponseModel",
940
+ '404': "ErrorResponseModel",
941
+ '500': None,
942
+ }
943
+ response_data = await self.api_client.call_api(
944
+ *_param,
945
+ _request_timeout=_request_timeout
946
+ )
947
+ await response_data.read()
948
+ return self.api_client.response_deserialize(
949
+ response_data=response_data,
950
+ response_types_map=_response_types_map,
951
+ ).data
952
+
953
+
954
+ @validate_call
955
+ async def get_environment_with_http_info(
956
+ self,
957
+ id: StrictInt,
958
+ _request_timeout: Union[
959
+ None,
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Tuple[
962
+ Annotated[StrictFloat, Field(gt=0)],
963
+ Annotated[StrictFloat, Field(gt=0)]
964
+ ]
965
+ ] = None,
966
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
967
+ _content_type: Optional[StrictStr] = None,
968
+ _headers: Optional[Dict[StrictStr, Any]] = None,
969
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
970
+ ) -> ApiResponse[Environment]:
971
+ """Retrieve environment
972
+
973
+ Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
974
+
975
+ :param id: (required)
976
+ :type id: int
977
+ :param _request_timeout: timeout setting for this request. If one
978
+ number provided, it will be total request
979
+ timeout. It can also be a pair (tuple) of
980
+ (connection, read) timeouts.
981
+ :type _request_timeout: int, tuple(int, int), optional
982
+ :param _request_auth: set to override the auth_settings for an a single
983
+ request; this effectively ignores the
984
+ authentication in the spec for a single request.
985
+ :type _request_auth: dict, optional
986
+ :param _content_type: force content-type for the request.
987
+ :type _content_type: str, Optional
988
+ :param _headers: set to override the headers for a single
989
+ request; this effectively ignores the headers
990
+ in the spec for a single request.
991
+ :type _headers: dict, optional
992
+ :param _host_index: set to override the host_index for a single
993
+ request; this effectively ignores the host_index
994
+ in the spec for a single request.
995
+ :type _host_index: int, optional
996
+ :return: Returns the result object.
997
+ """ # noqa: E501
998
+
999
+ _param = self._get_environment_serialize(
1000
+ id=id,
1001
+ _request_auth=_request_auth,
1002
+ _content_type=_content_type,
1003
+ _headers=_headers,
1004
+ _host_index=_host_index
1005
+ )
1006
+
1007
+ _response_types_map: Dict[str, Optional[str]] = {
1008
+ '200': "Environment",
1009
+ '400': "ErrorResponseModel",
1010
+ '401': "ErrorResponseModel",
1011
+ '404': "ErrorResponseModel",
1012
+ '500': None,
1013
+ }
1014
+ response_data = await self.api_client.call_api(
1015
+ *_param,
1016
+ _request_timeout=_request_timeout
1017
+ )
1018
+ await response_data.read()
1019
+ return self.api_client.response_deserialize(
1020
+ response_data=response_data,
1021
+ response_types_map=_response_types_map,
1022
+ )
1023
+
1024
+
1025
+ @validate_call
1026
+ async def get_environment_without_preload_content(
1027
+ self,
1028
+ id: StrictInt,
1029
+ _request_timeout: Union[
1030
+ None,
1031
+ Annotated[StrictFloat, Field(gt=0)],
1032
+ Tuple[
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Annotated[StrictFloat, Field(gt=0)]
1035
+ ]
1036
+ ] = None,
1037
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1038
+ _content_type: Optional[StrictStr] = None,
1039
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1040
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1041
+ ) -> RESTResponseType:
1042
+ """Retrieve environment
1043
+
1044
+ Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1045
+
1046
+ :param id: (required)
1047
+ :type id: int
1048
+ :param _request_timeout: timeout setting for this request. If one
1049
+ number provided, it will be total request
1050
+ timeout. It can also be a pair (tuple) of
1051
+ (connection, read) timeouts.
1052
+ :type _request_timeout: int, tuple(int, int), optional
1053
+ :param _request_auth: set to override the auth_settings for an a single
1054
+ request; this effectively ignores the
1055
+ authentication in the spec for a single request.
1056
+ :type _request_auth: dict, optional
1057
+ :param _content_type: force content-type for the request.
1058
+ :type _content_type: str, Optional
1059
+ :param _headers: set to override the headers for a single
1060
+ request; this effectively ignores the headers
1061
+ in the spec for a single request.
1062
+ :type _headers: dict, optional
1063
+ :param _host_index: set to override the host_index for a single
1064
+ request; this effectively ignores the host_index
1065
+ in the spec for a single request.
1066
+ :type _host_index: int, optional
1067
+ :return: Returns the result object.
1068
+ """ # noqa: E501
1069
+
1070
+ _param = self._get_environment_serialize(
1071
+ id=id,
1072
+ _request_auth=_request_auth,
1073
+ _content_type=_content_type,
1074
+ _headers=_headers,
1075
+ _host_index=_host_index
1076
+ )
1077
+
1078
+ _response_types_map: Dict[str, Optional[str]] = {
1079
+ '200': "Environment",
1080
+ '400': "ErrorResponseModel",
1081
+ '401': "ErrorResponseModel",
1082
+ '404': "ErrorResponseModel",
1083
+ '500': None,
1084
+ }
1085
+ response_data = await self.api_client.call_api(
1086
+ *_param,
1087
+ _request_timeout=_request_timeout
1088
+ )
1089
+ return response_data.response
1090
+
1091
+
1092
+ def _get_environment_serialize(
1093
+ self,
1094
+ id,
1095
+ _request_auth,
1096
+ _content_type,
1097
+ _headers,
1098
+ _host_index,
1099
+ ) -> RequestSerialized:
1100
+
1101
+ _host = None
1102
+
1103
+ _collection_formats: Dict[str, str] = {
1104
+ }
1105
+
1106
+ _path_params: Dict[str, str] = {}
1107
+ _query_params: List[Tuple[str, str]] = []
1108
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1109
+ _form_params: List[Tuple[str, str]] = []
1110
+ _files: Dict[
1111
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1112
+ ] = {}
1113
+ _body_params: Optional[bytes] = None
1114
+
1115
+ # process the path parameters
1116
+ if id is not None:
1117
+ _path_params['id'] = id
1118
+ # process the query parameters
1119
+ # process the header parameters
1120
+ # process the form parameters
1121
+ # process the body parameter
1122
+
1123
+
1124
+ # set the HTTP header `Accept`
1125
+ if 'Accept' not in _header_params:
1126
+ _header_params['Accept'] = self.api_client.select_header_accept(
1127
+ [
1128
+ 'application/json'
1129
+ ]
1130
+ )
1131
+
1132
+
1133
+ # authentication setting
1134
+ _auth_settings: List[str] = [
1135
+ 'apiKey'
1136
+ ]
1137
+
1138
+ return self.api_client.param_serialize(
1139
+ method='GET',
1140
+ resource_path='/core/environments/{id}',
1141
+ path_params=_path_params,
1142
+ query_params=_query_params,
1143
+ header_params=_header_params,
1144
+ body=_body_params,
1145
+ post_params=_form_params,
1146
+ files=_files,
1147
+ auth_settings=_auth_settings,
1148
+ collection_formats=_collection_formats,
1149
+ _host=_host,
1150
+ _request_auth=_request_auth
1151
+ )
1152
+
1153
+
1154
+
1155
+
1156
+ @validate_call
1157
+ async def get_environment_vm_quota(
1158
+ self,
1159
+ id: StrictInt,
1160
+ _request_timeout: Union[
1161
+ None,
1162
+ Annotated[StrictFloat, Field(gt=0)],
1163
+ Tuple[
1164
+ Annotated[StrictFloat, Field(gt=0)],
1165
+ Annotated[StrictFloat, Field(gt=0)]
1166
+ ]
1167
+ ] = None,
1168
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1169
+ _content_type: Optional[StrictStr] = None,
1170
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1171
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1172
+ ) -> VMQuota:
1173
+ """Get environment VM quota
1174
+
1175
+ Retrieves VM quota information for a specific environment, including current VM count, maximum VMs allowed, available VMs, and percentage used in an environment before reaching the subnet IP limit.
1176
+
1177
+ :param id: (required)
1178
+ :type id: int
1179
+ :param _request_timeout: timeout setting for this request. If one
1180
+ number provided, it will be total request
1181
+ timeout. It can also be a pair (tuple) of
1182
+ (connection, read) timeouts.
1183
+ :type _request_timeout: int, tuple(int, int), optional
1184
+ :param _request_auth: set to override the auth_settings for an a single
1185
+ request; this effectively ignores the
1186
+ authentication in the spec for a single request.
1187
+ :type _request_auth: dict, optional
1188
+ :param _content_type: force content-type for the request.
1189
+ :type _content_type: str, Optional
1190
+ :param _headers: set to override the headers for a single
1191
+ request; this effectively ignores the headers
1192
+ in the spec for a single request.
1193
+ :type _headers: dict, optional
1194
+ :param _host_index: set to override the host_index for a single
1195
+ request; this effectively ignores the host_index
1196
+ in the spec for a single request.
1197
+ :type _host_index: int, optional
1198
+ :return: Returns the result object.
1199
+ """ # noqa: E501
1200
+
1201
+ _param = self._get_environment_vm_quota_serialize(
1202
+ id=id,
1203
+ _request_auth=_request_auth,
1204
+ _content_type=_content_type,
1205
+ _headers=_headers,
1206
+ _host_index=_host_index
1207
+ )
1208
+
1209
+ _response_types_map: Dict[str, Optional[str]] = {
1210
+ '200': "VMQuota",
1211
+ '400': "ErrorResponseModel",
1212
+ '401': "ErrorResponseModel",
1213
+ '404': "ErrorResponseModel",
1214
+ '500': None,
1215
+ }
1216
+ response_data = await self.api_client.call_api(
1217
+ *_param,
1218
+ _request_timeout=_request_timeout
1219
+ )
1220
+ await response_data.read()
1221
+ return self.api_client.response_deserialize(
1222
+ response_data=response_data,
1223
+ response_types_map=_response_types_map,
1224
+ ).data
1225
+
1226
+
1227
+ @validate_call
1228
+ async def get_environment_vm_quota_with_http_info(
1229
+ self,
1230
+ id: StrictInt,
1231
+ _request_timeout: Union[
1232
+ None,
1233
+ Annotated[StrictFloat, Field(gt=0)],
1234
+ Tuple[
1235
+ Annotated[StrictFloat, Field(gt=0)],
1236
+ Annotated[StrictFloat, Field(gt=0)]
1237
+ ]
1238
+ ] = None,
1239
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1240
+ _content_type: Optional[StrictStr] = None,
1241
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1242
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1243
+ ) -> ApiResponse[VMQuota]:
1244
+ """Get environment VM quota
1245
+
1246
+ Retrieves VM quota information for a specific environment, including current VM count, maximum VMs allowed, available VMs, and percentage used in an environment before reaching the subnet IP limit.
1247
+
1248
+ :param id: (required)
1249
+ :type id: int
1250
+ :param _request_timeout: timeout setting for this request. If one
1251
+ number provided, it will be total request
1252
+ timeout. It can also be a pair (tuple) of
1253
+ (connection, read) timeouts.
1254
+ :type _request_timeout: int, tuple(int, int), optional
1255
+ :param _request_auth: set to override the auth_settings for an a single
1256
+ request; this effectively ignores the
1257
+ authentication in the spec for a single request.
1258
+ :type _request_auth: dict, optional
1259
+ :param _content_type: force content-type for the request.
1260
+ :type _content_type: str, Optional
1261
+ :param _headers: set to override the headers for a single
1262
+ request; this effectively ignores the headers
1263
+ in the spec for a single request.
1264
+ :type _headers: dict, optional
1265
+ :param _host_index: set to override the host_index for a single
1266
+ request; this effectively ignores the host_index
1267
+ in the spec for a single request.
1268
+ :type _host_index: int, optional
1269
+ :return: Returns the result object.
1270
+ """ # noqa: E501
1271
+
1272
+ _param = self._get_environment_vm_quota_serialize(
1273
+ id=id,
1274
+ _request_auth=_request_auth,
1275
+ _content_type=_content_type,
1276
+ _headers=_headers,
1277
+ _host_index=_host_index
1278
+ )
1279
+
1280
+ _response_types_map: Dict[str, Optional[str]] = {
1281
+ '200': "VMQuota",
1282
+ '400': "ErrorResponseModel",
1283
+ '401': "ErrorResponseModel",
1284
+ '404': "ErrorResponseModel",
1285
+ '500': None,
1286
+ }
1287
+ response_data = await self.api_client.call_api(
1288
+ *_param,
1289
+ _request_timeout=_request_timeout
1290
+ )
1291
+ await response_data.read()
1292
+ return self.api_client.response_deserialize(
1293
+ response_data=response_data,
1294
+ response_types_map=_response_types_map,
1295
+ )
1296
+
1297
+
1298
+ @validate_call
1299
+ async def get_environment_vm_quota_without_preload_content(
1300
+ self,
1301
+ id: StrictInt,
1302
+ _request_timeout: Union[
1303
+ None,
1304
+ Annotated[StrictFloat, Field(gt=0)],
1305
+ Tuple[
1306
+ Annotated[StrictFloat, Field(gt=0)],
1307
+ Annotated[StrictFloat, Field(gt=0)]
1308
+ ]
1309
+ ] = None,
1310
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1311
+ _content_type: Optional[StrictStr] = None,
1312
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1313
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1314
+ ) -> RESTResponseType:
1315
+ """Get environment VM quota
1316
+
1317
+ Retrieves VM quota information for a specific environment, including current VM count, maximum VMs allowed, available VMs, and percentage used in an environment before reaching the subnet IP limit.
1318
+
1319
+ :param id: (required)
1320
+ :type id: int
1321
+ :param _request_timeout: timeout setting for this request. If one
1322
+ number provided, it will be total request
1323
+ timeout. It can also be a pair (tuple) of
1324
+ (connection, read) timeouts.
1325
+ :type _request_timeout: int, tuple(int, int), optional
1326
+ :param _request_auth: set to override the auth_settings for an a single
1327
+ request; this effectively ignores the
1328
+ authentication in the spec for a single request.
1329
+ :type _request_auth: dict, optional
1330
+ :param _content_type: force content-type for the request.
1331
+ :type _content_type: str, Optional
1332
+ :param _headers: set to override the headers for a single
1333
+ request; this effectively ignores the headers
1334
+ in the spec for a single request.
1335
+ :type _headers: dict, optional
1336
+ :param _host_index: set to override the host_index for a single
1337
+ request; this effectively ignores the host_index
1338
+ in the spec for a single request.
1339
+ :type _host_index: int, optional
1340
+ :return: Returns the result object.
1341
+ """ # noqa: E501
1342
+
1343
+ _param = self._get_environment_vm_quota_serialize(
1344
+ id=id,
1345
+ _request_auth=_request_auth,
1346
+ _content_type=_content_type,
1347
+ _headers=_headers,
1348
+ _host_index=_host_index
1349
+ )
1350
+
1351
+ _response_types_map: Dict[str, Optional[str]] = {
1352
+ '200': "VMQuota",
1353
+ '400': "ErrorResponseModel",
1354
+ '401': "ErrorResponseModel",
1355
+ '404': "ErrorResponseModel",
1356
+ '500': None,
1357
+ }
1358
+ response_data = await self.api_client.call_api(
1359
+ *_param,
1360
+ _request_timeout=_request_timeout
1361
+ )
1362
+ return response_data.response
1363
+
1364
+
1365
+ def _get_environment_vm_quota_serialize(
1366
+ self,
1367
+ id,
1368
+ _request_auth,
1369
+ _content_type,
1370
+ _headers,
1371
+ _host_index,
1372
+ ) -> RequestSerialized:
1373
+
1374
+ _host = None
1375
+
1376
+ _collection_formats: Dict[str, str] = {
1377
+ }
1378
+
1379
+ _path_params: Dict[str, str] = {}
1380
+ _query_params: List[Tuple[str, str]] = []
1381
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1382
+ _form_params: List[Tuple[str, str]] = []
1383
+ _files: Dict[
1384
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1385
+ ] = {}
1386
+ _body_params: Optional[bytes] = None
1387
+
1388
+ # process the path parameters
1389
+ if id is not None:
1390
+ _path_params['id'] = id
1391
+ # process the query parameters
1392
+ # process the header parameters
1393
+ # process the form parameters
1394
+ # process the body parameter
1395
+
1396
+
1397
+ # set the HTTP header `Accept`
1398
+ if 'Accept' not in _header_params:
1399
+ _header_params['Accept'] = self.api_client.select_header_accept(
1400
+ [
1401
+ 'application/json'
1402
+ ]
1403
+ )
1404
+
1405
+
1406
+ # authentication setting
1407
+ _auth_settings: List[str] = [
1408
+ 'apiKey'
1409
+ ]
1410
+
1411
+ return self.api_client.param_serialize(
1412
+ method='GET',
1413
+ resource_path='/core/environments/{id}/vm-quota',
1414
+ path_params=_path_params,
1415
+ query_params=_query_params,
1416
+ header_params=_header_params,
1417
+ body=_body_params,
1418
+ post_params=_form_params,
1419
+ files=_files,
1420
+ auth_settings=_auth_settings,
1421
+ collection_formats=_collection_formats,
1422
+ _host=_host,
1423
+ _request_auth=_request_auth
1424
+ )
1425
+
1426
+
1427
+
1428
+
1429
+ @validate_call
1430
+ async def list_environments(
1431
+ self,
1432
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1433
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1434
+ search: Annotated[Optional[StrictStr], Field(description="Search By ID or Name or Region")] = None,
1435
+ _request_timeout: Union[
1436
+ None,
1437
+ Annotated[StrictFloat, Field(gt=0)],
1438
+ Tuple[
1439
+ Annotated[StrictFloat, Field(gt=0)],
1440
+ Annotated[StrictFloat, Field(gt=0)]
1441
+ ]
1442
+ ] = None,
1443
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1444
+ _content_type: Optional[StrictStr] = None,
1445
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1446
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1447
+ ) -> Environments:
1448
+ """List environments
1449
+
1450
+ Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/), and the date and time of creation. For more information on environments, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/).
1451
+
1452
+ :param page: Page Number
1453
+ :type page: str
1454
+ :param page_size: Data Per Page
1455
+ :type page_size: str
1456
+ :param search: Search By ID or Name or Region
1457
+ :type search: str
1458
+ :param _request_timeout: timeout setting for this request. If one
1459
+ number provided, it will be total request
1460
+ timeout. It can also be a pair (tuple) of
1461
+ (connection, read) timeouts.
1462
+ :type _request_timeout: int, tuple(int, int), optional
1463
+ :param _request_auth: set to override the auth_settings for an a single
1464
+ request; this effectively ignores the
1465
+ authentication in the spec for a single request.
1466
+ :type _request_auth: dict, optional
1467
+ :param _content_type: force content-type for the request.
1468
+ :type _content_type: str, Optional
1469
+ :param _headers: set to override the headers for a single
1470
+ request; this effectively ignores the headers
1471
+ in the spec for a single request.
1472
+ :type _headers: dict, optional
1473
+ :param _host_index: set to override the host_index for a single
1474
+ request; this effectively ignores the host_index
1475
+ in the spec for a single request.
1476
+ :type _host_index: int, optional
1477
+ :return: Returns the result object.
1478
+ """ # noqa: E501
1479
+
1480
+ _param = self._list_environments_serialize(
1481
+ page=page,
1482
+ page_size=page_size,
1483
+ search=search,
1484
+ _request_auth=_request_auth,
1485
+ _content_type=_content_type,
1486
+ _headers=_headers,
1487
+ _host_index=_host_index
1488
+ )
1489
+
1490
+ _response_types_map: Dict[str, Optional[str]] = {
1491
+ '200': "Environments",
1492
+ '400': "ErrorResponseModel",
1493
+ '401': "ErrorResponseModel",
1494
+ '500': None,
1495
+ }
1496
+ response_data = await self.api_client.call_api(
1497
+ *_param,
1498
+ _request_timeout=_request_timeout
1499
+ )
1500
+ await response_data.read()
1501
+ return self.api_client.response_deserialize(
1502
+ response_data=response_data,
1503
+ response_types_map=_response_types_map,
1504
+ ).data
1505
+
1506
+
1507
+ @validate_call
1508
+ async def list_environments_with_http_info(
1509
+ self,
1510
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1511
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1512
+ search: Annotated[Optional[StrictStr], Field(description="Search By ID or Name or Region")] = None,
1513
+ _request_timeout: Union[
1514
+ None,
1515
+ Annotated[StrictFloat, Field(gt=0)],
1516
+ Tuple[
1517
+ Annotated[StrictFloat, Field(gt=0)],
1518
+ Annotated[StrictFloat, Field(gt=0)]
1519
+ ]
1520
+ ] = None,
1521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1522
+ _content_type: Optional[StrictStr] = None,
1523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1525
+ ) -> ApiResponse[Environments]:
1526
+ """List environments
1527
+
1528
+ Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/), and the date and time of creation. For more information on environments, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/).
1529
+
1530
+ :param page: Page Number
1531
+ :type page: str
1532
+ :param page_size: Data Per Page
1533
+ :type page_size: str
1534
+ :param search: Search By ID or Name or Region
1535
+ :type search: str
1536
+ :param _request_timeout: timeout setting for this request. If one
1537
+ number provided, it will be total request
1538
+ timeout. It can also be a pair (tuple) of
1539
+ (connection, read) timeouts.
1540
+ :type _request_timeout: int, tuple(int, int), optional
1541
+ :param _request_auth: set to override the auth_settings for an a single
1542
+ request; this effectively ignores the
1543
+ authentication in the spec for a single request.
1544
+ :type _request_auth: dict, optional
1545
+ :param _content_type: force content-type for the request.
1546
+ :type _content_type: str, Optional
1547
+ :param _headers: set to override the headers for a single
1548
+ request; this effectively ignores the headers
1549
+ in the spec for a single request.
1550
+ :type _headers: dict, optional
1551
+ :param _host_index: set to override the host_index for a single
1552
+ request; this effectively ignores the host_index
1553
+ in the spec for a single request.
1554
+ :type _host_index: int, optional
1555
+ :return: Returns the result object.
1556
+ """ # noqa: E501
1557
+
1558
+ _param = self._list_environments_serialize(
1559
+ page=page,
1560
+ page_size=page_size,
1561
+ search=search,
1562
+ _request_auth=_request_auth,
1563
+ _content_type=_content_type,
1564
+ _headers=_headers,
1565
+ _host_index=_host_index
1566
+ )
1567
+
1568
+ _response_types_map: Dict[str, Optional[str]] = {
1569
+ '200': "Environments",
1570
+ '400': "ErrorResponseModel",
1571
+ '401': "ErrorResponseModel",
1572
+ '500': None,
1573
+ }
1574
+ response_data = await self.api_client.call_api(
1575
+ *_param,
1576
+ _request_timeout=_request_timeout
1577
+ )
1578
+ await response_data.read()
1579
+ return self.api_client.response_deserialize(
1580
+ response_data=response_data,
1581
+ response_types_map=_response_types_map,
1582
+ )
1583
+
1584
+
1585
+ @validate_call
1586
+ async def list_environments_without_preload_content(
1587
+ self,
1588
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
1589
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
1590
+ search: Annotated[Optional[StrictStr], Field(description="Search By ID or Name or Region")] = None,
1591
+ _request_timeout: Union[
1592
+ None,
1593
+ Annotated[StrictFloat, Field(gt=0)],
1594
+ Tuple[
1595
+ Annotated[StrictFloat, Field(gt=0)],
1596
+ Annotated[StrictFloat, Field(gt=0)]
1597
+ ]
1598
+ ] = None,
1599
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1600
+ _content_type: Optional[StrictStr] = None,
1601
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1602
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1603
+ ) -> RESTResponseType:
1604
+ """List environments
1605
+
1606
+ Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/), and the date and time of creation. For more information on environments, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/).
1607
+
1608
+ :param page: Page Number
1609
+ :type page: str
1610
+ :param page_size: Data Per Page
1611
+ :type page_size: str
1612
+ :param search: Search By ID or Name or Region
1613
+ :type search: str
1614
+ :param _request_timeout: timeout setting for this request. If one
1615
+ number provided, it will be total request
1616
+ timeout. It can also be a pair (tuple) of
1617
+ (connection, read) timeouts.
1618
+ :type _request_timeout: int, tuple(int, int), optional
1619
+ :param _request_auth: set to override the auth_settings for an a single
1620
+ request; this effectively ignores the
1621
+ authentication in the spec for a single request.
1622
+ :type _request_auth: dict, optional
1623
+ :param _content_type: force content-type for the request.
1624
+ :type _content_type: str, Optional
1625
+ :param _headers: set to override the headers for a single
1626
+ request; this effectively ignores the headers
1627
+ in the spec for a single request.
1628
+ :type _headers: dict, optional
1629
+ :param _host_index: set to override the host_index for a single
1630
+ request; this effectively ignores the host_index
1631
+ in the spec for a single request.
1632
+ :type _host_index: int, optional
1633
+ :return: Returns the result object.
1634
+ """ # noqa: E501
1635
+
1636
+ _param = self._list_environments_serialize(
1637
+ page=page,
1638
+ page_size=page_size,
1639
+ search=search,
1640
+ _request_auth=_request_auth,
1641
+ _content_type=_content_type,
1642
+ _headers=_headers,
1643
+ _host_index=_host_index
1644
+ )
1645
+
1646
+ _response_types_map: Dict[str, Optional[str]] = {
1647
+ '200': "Environments",
1648
+ '400': "ErrorResponseModel",
1649
+ '401': "ErrorResponseModel",
1650
+ '500': None,
1651
+ }
1652
+ response_data = await self.api_client.call_api(
1653
+ *_param,
1654
+ _request_timeout=_request_timeout
1655
+ )
1656
+ return response_data.response
1657
+
1658
+
1659
+ def _list_environments_serialize(
1660
+ self,
1661
+ page,
1662
+ page_size,
1663
+ search,
1664
+ _request_auth,
1665
+ _content_type,
1666
+ _headers,
1667
+ _host_index,
1668
+ ) -> RequestSerialized:
1669
+
1670
+ _host = None
1671
+
1672
+ _collection_formats: Dict[str, str] = {
1673
+ }
1674
+
1675
+ _path_params: Dict[str, str] = {}
1676
+ _query_params: List[Tuple[str, str]] = []
1677
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1678
+ _form_params: List[Tuple[str, str]] = []
1679
+ _files: Dict[
1680
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1681
+ ] = {}
1682
+ _body_params: Optional[bytes] = None
1683
+
1684
+ # process the path parameters
1685
+ # process the query parameters
1686
+ if page is not None:
1687
+
1688
+ _query_params.append(('page', page))
1689
+
1690
+ if page_size is not None:
1691
+
1692
+ _query_params.append(('pageSize', page_size))
1693
+
1694
+ if search is not None:
1695
+
1696
+ _query_params.append(('search', search))
1697
+
1698
+ # process the header parameters
1699
+ # process the form parameters
1700
+ # process the body parameter
1701
+
1702
+
1703
+ # set the HTTP header `Accept`
1704
+ if 'Accept' not in _header_params:
1705
+ _header_params['Accept'] = self.api_client.select_header_accept(
1706
+ [
1707
+ 'application/json'
1708
+ ]
1709
+ )
1710
+
1711
+
1712
+ # authentication setting
1713
+ _auth_settings: List[str] = [
1714
+ 'apiKey'
1715
+ ]
1716
+
1717
+ return self.api_client.param_serialize(
1718
+ method='GET',
1719
+ resource_path='/core/environments',
1720
+ path_params=_path_params,
1721
+ query_params=_query_params,
1722
+ header_params=_header_params,
1723
+ body=_body_params,
1724
+ post_params=_form_params,
1725
+ files=_files,
1726
+ auth_settings=_auth_settings,
1727
+ collection_formats=_collection_formats,
1728
+ _host=_host,
1729
+ _request_auth=_request_auth
1730
+ )
1731
+
1732
+
1733
+
1734
+
1735
+ @validate_call
1736
+ async def update_environment(
1737
+ self,
1738
+ id: StrictInt,
1739
+ payload: UpdateEnvironment,
1740
+ _request_timeout: Union[
1741
+ None,
1742
+ Annotated[StrictFloat, Field(gt=0)],
1743
+ Tuple[
1744
+ Annotated[StrictFloat, Field(gt=0)],
1745
+ Annotated[StrictFloat, Field(gt=0)]
1746
+ ]
1747
+ ] = None,
1748
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1749
+ _content_type: Optional[StrictStr] = None,
1750
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1751
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1752
+ ) -> Environment:
1753
+ """Update environment
1754
+
1755
+ Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1756
+
1757
+ :param id: (required)
1758
+ :type id: int
1759
+ :param payload: (required)
1760
+ :type payload: UpdateEnvironment
1761
+ :param _request_timeout: timeout setting for this request. If one
1762
+ number provided, it will be total request
1763
+ timeout. It can also be a pair (tuple) of
1764
+ (connection, read) timeouts.
1765
+ :type _request_timeout: int, tuple(int, int), optional
1766
+ :param _request_auth: set to override the auth_settings for an a single
1767
+ request; this effectively ignores the
1768
+ authentication in the spec for a single request.
1769
+ :type _request_auth: dict, optional
1770
+ :param _content_type: force content-type for the request.
1771
+ :type _content_type: str, Optional
1772
+ :param _headers: set to override the headers for a single
1773
+ request; this effectively ignores the headers
1774
+ in the spec for a single request.
1775
+ :type _headers: dict, optional
1776
+ :param _host_index: set to override the host_index for a single
1777
+ request; this effectively ignores the host_index
1778
+ in the spec for a single request.
1779
+ :type _host_index: int, optional
1780
+ :return: Returns the result object.
1781
+ """ # noqa: E501
1782
+
1783
+ _param = self._update_environment_serialize(
1784
+ id=id,
1785
+ payload=payload,
1786
+ _request_auth=_request_auth,
1787
+ _content_type=_content_type,
1788
+ _headers=_headers,
1789
+ _host_index=_host_index
1790
+ )
1791
+
1792
+ _response_types_map: Dict[str, Optional[str]] = {
1793
+ '200': "Environment",
1794
+ '400': "ErrorResponseModel",
1795
+ '401': "ErrorResponseModel",
1796
+ '404': "ErrorResponseModel",
1797
+ '500': None,
1798
+ }
1799
+ response_data = await self.api_client.call_api(
1800
+ *_param,
1801
+ _request_timeout=_request_timeout
1802
+ )
1803
+ await response_data.read()
1804
+ return self.api_client.response_deserialize(
1805
+ response_data=response_data,
1806
+ response_types_map=_response_types_map,
1807
+ ).data
1808
+
1809
+
1810
+ @validate_call
1811
+ async def update_environment_with_http_info(
1812
+ self,
1813
+ id: StrictInt,
1814
+ payload: UpdateEnvironment,
1815
+ _request_timeout: Union[
1816
+ None,
1817
+ Annotated[StrictFloat, Field(gt=0)],
1818
+ Tuple[
1819
+ Annotated[StrictFloat, Field(gt=0)],
1820
+ Annotated[StrictFloat, Field(gt=0)]
1821
+ ]
1822
+ ] = None,
1823
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1824
+ _content_type: Optional[StrictStr] = None,
1825
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1826
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1827
+ ) -> ApiResponse[Environment]:
1828
+ """Update environment
1829
+
1830
+ Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1831
+
1832
+ :param id: (required)
1833
+ :type id: int
1834
+ :param payload: (required)
1835
+ :type payload: UpdateEnvironment
1836
+ :param _request_timeout: timeout setting for this request. If one
1837
+ number provided, it will be total request
1838
+ timeout. It can also be a pair (tuple) of
1839
+ (connection, read) timeouts.
1840
+ :type _request_timeout: int, tuple(int, int), optional
1841
+ :param _request_auth: set to override the auth_settings for an a single
1842
+ request; this effectively ignores the
1843
+ authentication in the spec for a single request.
1844
+ :type _request_auth: dict, optional
1845
+ :param _content_type: force content-type for the request.
1846
+ :type _content_type: str, Optional
1847
+ :param _headers: set to override the headers for a single
1848
+ request; this effectively ignores the headers
1849
+ in the spec for a single request.
1850
+ :type _headers: dict, optional
1851
+ :param _host_index: set to override the host_index for a single
1852
+ request; this effectively ignores the host_index
1853
+ in the spec for a single request.
1854
+ :type _host_index: int, optional
1855
+ :return: Returns the result object.
1856
+ """ # noqa: E501
1857
+
1858
+ _param = self._update_environment_serialize(
1859
+ id=id,
1860
+ payload=payload,
1861
+ _request_auth=_request_auth,
1862
+ _content_type=_content_type,
1863
+ _headers=_headers,
1864
+ _host_index=_host_index
1865
+ )
1866
+
1867
+ _response_types_map: Dict[str, Optional[str]] = {
1868
+ '200': "Environment",
1869
+ '400': "ErrorResponseModel",
1870
+ '401': "ErrorResponseModel",
1871
+ '404': "ErrorResponseModel",
1872
+ '500': None,
1873
+ }
1874
+ response_data = await self.api_client.call_api(
1875
+ *_param,
1876
+ _request_timeout=_request_timeout
1877
+ )
1878
+ await response_data.read()
1879
+ return self.api_client.response_deserialize(
1880
+ response_data=response_data,
1881
+ response_types_map=_response_types_map,
1882
+ )
1883
+
1884
+
1885
+ @validate_call
1886
+ async def update_environment_without_preload_content(
1887
+ self,
1888
+ id: StrictInt,
1889
+ payload: UpdateEnvironment,
1890
+ _request_timeout: Union[
1891
+ None,
1892
+ Annotated[StrictFloat, Field(gt=0)],
1893
+ Tuple[
1894
+ Annotated[StrictFloat, Field(gt=0)],
1895
+ Annotated[StrictFloat, Field(gt=0)]
1896
+ ]
1897
+ ] = None,
1898
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1899
+ _content_type: Optional[StrictStr] = None,
1900
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1901
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1902
+ ) -> RESTResponseType:
1903
+ """Update environment
1904
+
1905
+ Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.
1906
+
1907
+ :param id: (required)
1908
+ :type id: int
1909
+ :param payload: (required)
1910
+ :type payload: UpdateEnvironment
1911
+ :param _request_timeout: timeout setting for this request. If one
1912
+ number provided, it will be total request
1913
+ timeout. It can also be a pair (tuple) of
1914
+ (connection, read) timeouts.
1915
+ :type _request_timeout: int, tuple(int, int), optional
1916
+ :param _request_auth: set to override the auth_settings for an a single
1917
+ request; this effectively ignores the
1918
+ authentication in the spec for a single request.
1919
+ :type _request_auth: dict, optional
1920
+ :param _content_type: force content-type for the request.
1921
+ :type _content_type: str, Optional
1922
+ :param _headers: set to override the headers for a single
1923
+ request; this effectively ignores the headers
1924
+ in the spec for a single request.
1925
+ :type _headers: dict, optional
1926
+ :param _host_index: set to override the host_index for a single
1927
+ request; this effectively ignores the host_index
1928
+ in the spec for a single request.
1929
+ :type _host_index: int, optional
1930
+ :return: Returns the result object.
1931
+ """ # noqa: E501
1932
+
1933
+ _param = self._update_environment_serialize(
1934
+ id=id,
1935
+ payload=payload,
1936
+ _request_auth=_request_auth,
1937
+ _content_type=_content_type,
1938
+ _headers=_headers,
1939
+ _host_index=_host_index
1940
+ )
1941
+
1942
+ _response_types_map: Dict[str, Optional[str]] = {
1943
+ '200': "Environment",
1944
+ '400': "ErrorResponseModel",
1945
+ '401': "ErrorResponseModel",
1946
+ '404': "ErrorResponseModel",
1947
+ '500': None,
1948
+ }
1949
+ response_data = await self.api_client.call_api(
1950
+ *_param,
1951
+ _request_timeout=_request_timeout
1952
+ )
1953
+ return response_data.response
1954
+
1955
+
1956
+ def _update_environment_serialize(
1957
+ self,
1958
+ id,
1959
+ payload,
1960
+ _request_auth,
1961
+ _content_type,
1962
+ _headers,
1963
+ _host_index,
1964
+ ) -> RequestSerialized:
1965
+
1966
+ _host = None
1967
+
1968
+ _collection_formats: Dict[str, str] = {
1969
+ }
1970
+
1971
+ _path_params: Dict[str, str] = {}
1972
+ _query_params: List[Tuple[str, str]] = []
1973
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1974
+ _form_params: List[Tuple[str, str]] = []
1975
+ _files: Dict[
1976
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1977
+ ] = {}
1978
+ _body_params: Optional[bytes] = None
1979
+
1980
+ # process the path parameters
1981
+ if id is not None:
1982
+ _path_params['id'] = id
1983
+ # process the query parameters
1984
+ # process the header parameters
1985
+ # process the form parameters
1986
+ # process the body parameter
1987
+ if payload is not None:
1988
+ _body_params = payload
1989
+
1990
+
1991
+ # set the HTTP header `Accept`
1992
+ if 'Accept' not in _header_params:
1993
+ _header_params['Accept'] = self.api_client.select_header_accept(
1994
+ [
1995
+ 'application/json'
1996
+ ]
1997
+ )
1998
+
1999
+ # set the HTTP header `Content-Type`
2000
+ if _content_type:
2001
+ _header_params['Content-Type'] = _content_type
2002
+ else:
2003
+ _default_content_type = (
2004
+ self.api_client.select_header_content_type(
2005
+ [
2006
+ 'application/json'
2007
+ ]
2008
+ )
2009
+ )
2010
+ if _default_content_type is not None:
2011
+ _header_params['Content-Type'] = _default_content_type
2012
+
2013
+ # authentication setting
2014
+ _auth_settings: List[str] = [
2015
+ 'apiKey'
2016
+ ]
2017
+
2018
+ return self.api_client.param_serialize(
2019
+ method='PUT',
2020
+ resource_path='/core/environments/{id}',
2021
+ path_params=_path_params,
2022
+ query_params=_query_params,
2023
+ header_params=_header_params,
2024
+ body=_body_params,
2025
+ post_params=_form_params,
2026
+ files=_files,
2027
+ auth_settings=_auth_settings,
2028
+ collection_formats=_collection_formats,
2029
+ _host=_host,
2030
+ _request_auth=_request_auth
2031
+ )
2032
+
2033
+