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,1463 @@
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.import_keypair_payload import ImportKeypairPayload
23
+ from ..models.import_keypair_response import ImportKeypairResponse
24
+ from ..models.keypairs import Keypairs
25
+ from ..models.response_model import ResponseModel
26
+ from ..models.supported_keypair_public_key_types_response import SupportedKeypairPublicKeyTypesResponse
27
+ from ..models.update_keypair_name import UpdateKeypairName
28
+ from ..models.update_keypair_name_response import UpdateKeypairNameResponse
29
+
30
+ from ..api_client import ApiClient, RequestSerialized
31
+ from ..api_response import ApiResponse
32
+ from ..rest import RESTResponseType
33
+
34
+
35
+ class KeypairApi:
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 delete_key_pair(
50
+ self,
51
+ id: StrictInt,
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
+ ) -> ResponseModel:
65
+ """Delete key pair
66
+
67
+ Permanently deletes a specified key pair. Provide the key pair ID in the path to remove the designated key pair.
68
+
69
+ :param id: (required)
70
+ :type id: int
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._delete_key_pair_serialize(
94
+ id=id,
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': "ResponseModel",
103
+ '400': "ErrorResponseModel",
104
+ '401': "ErrorResponseModel",
105
+ '404': "ErrorResponseModel",
106
+ '500': None,
107
+ }
108
+ response_data = await self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ await response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ async def delete_key_pair_with_http_info(
121
+ self,
122
+ id: StrictInt,
123
+ _request_timeout: Union[
124
+ None,
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Tuple[
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Annotated[StrictFloat, Field(gt=0)]
129
+ ]
130
+ ] = None,
131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
132
+ _content_type: Optional[StrictStr] = None,
133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135
+ ) -> ApiResponse[ResponseModel]:
136
+ """Delete key pair
137
+
138
+ Permanently deletes a specified key pair. Provide the key pair ID in the path to remove the designated key pair.
139
+
140
+ :param id: (required)
141
+ :type id: int
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._delete_key_pair_serialize(
165
+ id=id,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ '200': "ResponseModel",
174
+ '400': "ErrorResponseModel",
175
+ '401': "ErrorResponseModel",
176
+ '404': "ErrorResponseModel",
177
+ '500': None,
178
+ }
179
+ response_data = await self.api_client.call_api(
180
+ *_param,
181
+ _request_timeout=_request_timeout
182
+ )
183
+ await response_data.read()
184
+ return self.api_client.response_deserialize(
185
+ response_data=response_data,
186
+ response_types_map=_response_types_map,
187
+ )
188
+
189
+
190
+ @validate_call
191
+ async def delete_key_pair_without_preload_content(
192
+ self,
193
+ id: StrictInt,
194
+ _request_timeout: Union[
195
+ None,
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Tuple[
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Annotated[StrictFloat, Field(gt=0)]
200
+ ]
201
+ ] = None,
202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
203
+ _content_type: Optional[StrictStr] = None,
204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
+ ) -> RESTResponseType:
207
+ """Delete key pair
208
+
209
+ Permanently deletes a specified key pair. Provide the key pair ID in the path to remove the designated key pair.
210
+
211
+ :param id: (required)
212
+ :type id: int
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._delete_key_pair_serialize(
236
+ id=id,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '200': "ResponseModel",
245
+ '400': "ErrorResponseModel",
246
+ '401': "ErrorResponseModel",
247
+ '404': "ErrorResponseModel",
248
+ '500': None,
249
+ }
250
+ response_data = await self.api_client.call_api(
251
+ *_param,
252
+ _request_timeout=_request_timeout
253
+ )
254
+ return response_data.response
255
+
256
+
257
+ def _delete_key_pair_serialize(
258
+ self,
259
+ id,
260
+ _request_auth,
261
+ _content_type,
262
+ _headers,
263
+ _host_index,
264
+ ) -> RequestSerialized:
265
+
266
+ _host = None
267
+
268
+ _collection_formats: Dict[str, str] = {
269
+ }
270
+
271
+ _path_params: Dict[str, str] = {}
272
+ _query_params: List[Tuple[str, str]] = []
273
+ _header_params: Dict[str, Optional[str]] = _headers or {}
274
+ _form_params: List[Tuple[str, str]] = []
275
+ _files: Dict[
276
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
277
+ ] = {}
278
+ _body_params: Optional[bytes] = None
279
+
280
+ # process the path parameters
281
+ if id is not None:
282
+ _path_params['id'] = id
283
+ # process the query parameters
284
+ # process the header parameters
285
+ # process the form parameters
286
+ # process the body parameter
287
+
288
+
289
+ # set the HTTP header `Accept`
290
+ if 'Accept' not in _header_params:
291
+ _header_params['Accept'] = self.api_client.select_header_accept(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+
297
+
298
+ # authentication setting
299
+ _auth_settings: List[str] = [
300
+ 'apiKey'
301
+ ]
302
+
303
+ return self.api_client.param_serialize(
304
+ method='DELETE',
305
+ resource_path='/core/keypair/{id}',
306
+ path_params=_path_params,
307
+ query_params=_query_params,
308
+ header_params=_header_params,
309
+ body=_body_params,
310
+ post_params=_form_params,
311
+ files=_files,
312
+ auth_settings=_auth_settings,
313
+ collection_formats=_collection_formats,
314
+ _host=_host,
315
+ _request_auth=_request_auth
316
+ )
317
+
318
+
319
+
320
+
321
+ @validate_call
322
+ async def import_key_pair(
323
+ self,
324
+ payload: ImportKeypairPayload,
325
+ _request_timeout: Union[
326
+ None,
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Tuple[
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Annotated[StrictFloat, Field(gt=0)]
331
+ ]
332
+ ] = None,
333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
334
+ _content_type: Optional[StrictStr] = None,
335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
337
+ ) -> ImportKeypairResponse:
338
+ """Import key pair
339
+
340
+ Imports a new key pair for secure shell (SSH) access to your resources. Provide the key name, environment name, and public key in the request body. For more details on importing SSH key pairs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/keypairs/import-keypair).
341
+
342
+ :param payload: (required)
343
+ :type payload: ImportKeypairPayload
344
+ :param _request_timeout: timeout setting for this request. If one
345
+ number provided, it will be total request
346
+ timeout. It can also be a pair (tuple) of
347
+ (connection, read) timeouts.
348
+ :type _request_timeout: int, tuple(int, int), optional
349
+ :param _request_auth: set to override the auth_settings for an a single
350
+ request; this effectively ignores the
351
+ authentication in the spec for a single request.
352
+ :type _request_auth: dict, optional
353
+ :param _content_type: force content-type for the request.
354
+ :type _content_type: str, Optional
355
+ :param _headers: set to override the headers for a single
356
+ request; this effectively ignores the headers
357
+ in the spec for a single request.
358
+ :type _headers: dict, optional
359
+ :param _host_index: set to override the host_index for a single
360
+ request; this effectively ignores the host_index
361
+ in the spec for a single request.
362
+ :type _host_index: int, optional
363
+ :return: Returns the result object.
364
+ """ # noqa: E501
365
+
366
+ _param = self._import_key_pair_serialize(
367
+ payload=payload,
368
+ _request_auth=_request_auth,
369
+ _content_type=_content_type,
370
+ _headers=_headers,
371
+ _host_index=_host_index
372
+ )
373
+
374
+ _response_types_map: Dict[str, Optional[str]] = {
375
+ '200': "ImportKeypairResponse",
376
+ '400': "ErrorResponseModel",
377
+ '401': "ErrorResponseModel",
378
+ '404': "ErrorResponseModel",
379
+ '409': "ErrorResponseModel",
380
+ '500': None,
381
+ }
382
+ response_data = await self.api_client.call_api(
383
+ *_param,
384
+ _request_timeout=_request_timeout
385
+ )
386
+ await response_data.read()
387
+ return self.api_client.response_deserialize(
388
+ response_data=response_data,
389
+ response_types_map=_response_types_map,
390
+ ).data
391
+
392
+
393
+ @validate_call
394
+ async def import_key_pair_with_http_info(
395
+ self,
396
+ payload: ImportKeypairPayload,
397
+ _request_timeout: Union[
398
+ None,
399
+ Annotated[StrictFloat, Field(gt=0)],
400
+ Tuple[
401
+ Annotated[StrictFloat, Field(gt=0)],
402
+ Annotated[StrictFloat, Field(gt=0)]
403
+ ]
404
+ ] = None,
405
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
406
+ _content_type: Optional[StrictStr] = None,
407
+ _headers: Optional[Dict[StrictStr, Any]] = None,
408
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
409
+ ) -> ApiResponse[ImportKeypairResponse]:
410
+ """Import key pair
411
+
412
+ Imports a new key pair for secure shell (SSH) access to your resources. Provide the key name, environment name, and public key in the request body. For more details on importing SSH key pairs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/keypairs/import-keypair).
413
+
414
+ :param payload: (required)
415
+ :type payload: ImportKeypairPayload
416
+ :param _request_timeout: timeout setting for this request. If one
417
+ number provided, it will be total request
418
+ timeout. It can also be a pair (tuple) of
419
+ (connection, read) timeouts.
420
+ :type _request_timeout: int, tuple(int, int), optional
421
+ :param _request_auth: set to override the auth_settings for an a single
422
+ request; this effectively ignores the
423
+ authentication in the spec for a single request.
424
+ :type _request_auth: dict, optional
425
+ :param _content_type: force content-type for the request.
426
+ :type _content_type: str, Optional
427
+ :param _headers: set to override the headers for a single
428
+ request; this effectively ignores the headers
429
+ in the spec for a single request.
430
+ :type _headers: dict, optional
431
+ :param _host_index: set to override the host_index for a single
432
+ request; this effectively ignores the host_index
433
+ in the spec for a single request.
434
+ :type _host_index: int, optional
435
+ :return: Returns the result object.
436
+ """ # noqa: E501
437
+
438
+ _param = self._import_key_pair_serialize(
439
+ payload=payload,
440
+ _request_auth=_request_auth,
441
+ _content_type=_content_type,
442
+ _headers=_headers,
443
+ _host_index=_host_index
444
+ )
445
+
446
+ _response_types_map: Dict[str, Optional[str]] = {
447
+ '200': "ImportKeypairResponse",
448
+ '400': "ErrorResponseModel",
449
+ '401': "ErrorResponseModel",
450
+ '404': "ErrorResponseModel",
451
+ '409': "ErrorResponseModel",
452
+ '500': None,
453
+ }
454
+ response_data = await self.api_client.call_api(
455
+ *_param,
456
+ _request_timeout=_request_timeout
457
+ )
458
+ await response_data.read()
459
+ return self.api_client.response_deserialize(
460
+ response_data=response_data,
461
+ response_types_map=_response_types_map,
462
+ )
463
+
464
+
465
+ @validate_call
466
+ async def import_key_pair_without_preload_content(
467
+ self,
468
+ payload: ImportKeypairPayload,
469
+ _request_timeout: Union[
470
+ None,
471
+ Annotated[StrictFloat, Field(gt=0)],
472
+ Tuple[
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Annotated[StrictFloat, Field(gt=0)]
475
+ ]
476
+ ] = None,
477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
478
+ _content_type: Optional[StrictStr] = None,
479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
481
+ ) -> RESTResponseType:
482
+ """Import key pair
483
+
484
+ Imports a new key pair for secure shell (SSH) access to your resources. Provide the key name, environment name, and public key in the request body. For more details on importing SSH key pairs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/keypairs/import-keypair).
485
+
486
+ :param payload: (required)
487
+ :type payload: ImportKeypairPayload
488
+ :param _request_timeout: timeout setting for this request. If one
489
+ number provided, it will be total request
490
+ timeout. It can also be a pair (tuple) of
491
+ (connection, read) timeouts.
492
+ :type _request_timeout: int, tuple(int, int), optional
493
+ :param _request_auth: set to override the auth_settings for an a single
494
+ request; this effectively ignores the
495
+ authentication in the spec for a single request.
496
+ :type _request_auth: dict, optional
497
+ :param _content_type: force content-type for the request.
498
+ :type _content_type: str, Optional
499
+ :param _headers: set to override the headers for a single
500
+ request; this effectively ignores the headers
501
+ in the spec for a single request.
502
+ :type _headers: dict, optional
503
+ :param _host_index: set to override the host_index for a single
504
+ request; this effectively ignores the host_index
505
+ in the spec for a single request.
506
+ :type _host_index: int, optional
507
+ :return: Returns the result object.
508
+ """ # noqa: E501
509
+
510
+ _param = self._import_key_pair_serialize(
511
+ payload=payload,
512
+ _request_auth=_request_auth,
513
+ _content_type=_content_type,
514
+ _headers=_headers,
515
+ _host_index=_host_index
516
+ )
517
+
518
+ _response_types_map: Dict[str, Optional[str]] = {
519
+ '200': "ImportKeypairResponse",
520
+ '400': "ErrorResponseModel",
521
+ '401': "ErrorResponseModel",
522
+ '404': "ErrorResponseModel",
523
+ '409': "ErrorResponseModel",
524
+ '500': None,
525
+ }
526
+ response_data = await self.api_client.call_api(
527
+ *_param,
528
+ _request_timeout=_request_timeout
529
+ )
530
+ return response_data.response
531
+
532
+
533
+ def _import_key_pair_serialize(
534
+ self,
535
+ payload,
536
+ _request_auth,
537
+ _content_type,
538
+ _headers,
539
+ _host_index,
540
+ ) -> RequestSerialized:
541
+
542
+ _host = None
543
+
544
+ _collection_formats: Dict[str, str] = {
545
+ }
546
+
547
+ _path_params: Dict[str, str] = {}
548
+ _query_params: List[Tuple[str, str]] = []
549
+ _header_params: Dict[str, Optional[str]] = _headers or {}
550
+ _form_params: List[Tuple[str, str]] = []
551
+ _files: Dict[
552
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
553
+ ] = {}
554
+ _body_params: Optional[bytes] = None
555
+
556
+ # process the path parameters
557
+ # process the query parameters
558
+ # process the header parameters
559
+ # process the form parameters
560
+ # process the body parameter
561
+ if payload is not None:
562
+ _body_params = payload
563
+
564
+
565
+ # set the HTTP header `Accept`
566
+ if 'Accept' not in _header_params:
567
+ _header_params['Accept'] = self.api_client.select_header_accept(
568
+ [
569
+ 'application/json'
570
+ ]
571
+ )
572
+
573
+ # set the HTTP header `Content-Type`
574
+ if _content_type:
575
+ _header_params['Content-Type'] = _content_type
576
+ else:
577
+ _default_content_type = (
578
+ self.api_client.select_header_content_type(
579
+ [
580
+ 'application/json'
581
+ ]
582
+ )
583
+ )
584
+ if _default_content_type is not None:
585
+ _header_params['Content-Type'] = _default_content_type
586
+
587
+ # authentication setting
588
+ _auth_settings: List[str] = [
589
+ 'apiKey'
590
+ ]
591
+
592
+ return self.api_client.param_serialize(
593
+ method='POST',
594
+ resource_path='/core/keypairs',
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 list_key_pairs(
612
+ self,
613
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
614
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
615
+ search: Optional[StrictStr] = None,
616
+ _request_timeout: Union[
617
+ None,
618
+ Annotated[StrictFloat, Field(gt=0)],
619
+ Tuple[
620
+ Annotated[StrictFloat, Field(gt=0)],
621
+ Annotated[StrictFloat, Field(gt=0)]
622
+ ]
623
+ ] = None,
624
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
625
+ _content_type: Optional[StrictStr] = None,
626
+ _headers: Optional[Dict[StrictStr, Any]] = None,
627
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
628
+ ) -> Keypairs:
629
+ """List key pairs
630
+
631
+ Retrieves a list of your existing SSH key pairs, providing details for each. For more information on SSH key pairs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/keypairs/).
632
+
633
+ :param page: Page Number
634
+ :type page: str
635
+ :param page_size: Data Per Page
636
+ :type page_size: str
637
+ :param search:
638
+ :type search: str
639
+ :param _request_timeout: timeout setting for this request. If one
640
+ number provided, it will be total request
641
+ timeout. It can also be a pair (tuple) of
642
+ (connection, read) timeouts.
643
+ :type _request_timeout: int, tuple(int, int), optional
644
+ :param _request_auth: set to override the auth_settings for an a single
645
+ request; this effectively ignores the
646
+ authentication in the spec for a single request.
647
+ :type _request_auth: dict, optional
648
+ :param _content_type: force content-type for the request.
649
+ :type _content_type: str, Optional
650
+ :param _headers: set to override the headers for a single
651
+ request; this effectively ignores the headers
652
+ in the spec for a single request.
653
+ :type _headers: dict, optional
654
+ :param _host_index: set to override the host_index for a single
655
+ request; this effectively ignores the host_index
656
+ in the spec for a single request.
657
+ :type _host_index: int, optional
658
+ :return: Returns the result object.
659
+ """ # noqa: E501
660
+
661
+ _param = self._list_key_pairs_serialize(
662
+ page=page,
663
+ page_size=page_size,
664
+ search=search,
665
+ _request_auth=_request_auth,
666
+ _content_type=_content_type,
667
+ _headers=_headers,
668
+ _host_index=_host_index
669
+ )
670
+
671
+ _response_types_map: Dict[str, Optional[str]] = {
672
+ '200': "Keypairs",
673
+ '400': "ErrorResponseModel",
674
+ '401': "ErrorResponseModel",
675
+ '500': None,
676
+ }
677
+ response_data = await self.api_client.call_api(
678
+ *_param,
679
+ _request_timeout=_request_timeout
680
+ )
681
+ await response_data.read()
682
+ return self.api_client.response_deserialize(
683
+ response_data=response_data,
684
+ response_types_map=_response_types_map,
685
+ ).data
686
+
687
+
688
+ @validate_call
689
+ async def list_key_pairs_with_http_info(
690
+ self,
691
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
692
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
693
+ search: Optional[StrictStr] = None,
694
+ _request_timeout: Union[
695
+ None,
696
+ Annotated[StrictFloat, Field(gt=0)],
697
+ Tuple[
698
+ Annotated[StrictFloat, Field(gt=0)],
699
+ Annotated[StrictFloat, Field(gt=0)]
700
+ ]
701
+ ] = None,
702
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
703
+ _content_type: Optional[StrictStr] = None,
704
+ _headers: Optional[Dict[StrictStr, Any]] = None,
705
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
706
+ ) -> ApiResponse[Keypairs]:
707
+ """List key pairs
708
+
709
+ Retrieves a list of your existing SSH key pairs, providing details for each. For more information on SSH key pairs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/keypairs/).
710
+
711
+ :param page: Page Number
712
+ :type page: str
713
+ :param page_size: Data Per Page
714
+ :type page_size: str
715
+ :param search:
716
+ :type search: str
717
+ :param _request_timeout: timeout setting for this request. If one
718
+ number provided, it will be total request
719
+ timeout. It can also be a pair (tuple) of
720
+ (connection, read) timeouts.
721
+ :type _request_timeout: int, tuple(int, int), optional
722
+ :param _request_auth: set to override the auth_settings for an a single
723
+ request; this effectively ignores the
724
+ authentication in the spec for a single request.
725
+ :type _request_auth: dict, optional
726
+ :param _content_type: force content-type for the request.
727
+ :type _content_type: str, Optional
728
+ :param _headers: set to override the headers for a single
729
+ request; this effectively ignores the headers
730
+ in the spec for a single request.
731
+ :type _headers: dict, optional
732
+ :param _host_index: set to override the host_index for a single
733
+ request; this effectively ignores the host_index
734
+ in the spec for a single request.
735
+ :type _host_index: int, optional
736
+ :return: Returns the result object.
737
+ """ # noqa: E501
738
+
739
+ _param = self._list_key_pairs_serialize(
740
+ page=page,
741
+ page_size=page_size,
742
+ search=search,
743
+ _request_auth=_request_auth,
744
+ _content_type=_content_type,
745
+ _headers=_headers,
746
+ _host_index=_host_index
747
+ )
748
+
749
+ _response_types_map: Dict[str, Optional[str]] = {
750
+ '200': "Keypairs",
751
+ '400': "ErrorResponseModel",
752
+ '401': "ErrorResponseModel",
753
+ '500': None,
754
+ }
755
+ response_data = await self.api_client.call_api(
756
+ *_param,
757
+ _request_timeout=_request_timeout
758
+ )
759
+ await response_data.read()
760
+ return self.api_client.response_deserialize(
761
+ response_data=response_data,
762
+ response_types_map=_response_types_map,
763
+ )
764
+
765
+
766
+ @validate_call
767
+ async def list_key_pairs_without_preload_content(
768
+ self,
769
+ page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
770
+ page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
771
+ search: Optional[StrictStr] = None,
772
+ _request_timeout: Union[
773
+ None,
774
+ Annotated[StrictFloat, Field(gt=0)],
775
+ Tuple[
776
+ Annotated[StrictFloat, Field(gt=0)],
777
+ Annotated[StrictFloat, Field(gt=0)]
778
+ ]
779
+ ] = None,
780
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
781
+ _content_type: Optional[StrictStr] = None,
782
+ _headers: Optional[Dict[StrictStr, Any]] = None,
783
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
784
+ ) -> RESTResponseType:
785
+ """List key pairs
786
+
787
+ Retrieves a list of your existing SSH key pairs, providing details for each. For more information on SSH key pairs, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/keypairs/).
788
+
789
+ :param page: Page Number
790
+ :type page: str
791
+ :param page_size: Data Per Page
792
+ :type page_size: str
793
+ :param search:
794
+ :type search: str
795
+ :param _request_timeout: timeout setting for this request. If one
796
+ number provided, it will be total request
797
+ timeout. It can also be a pair (tuple) of
798
+ (connection, read) timeouts.
799
+ :type _request_timeout: int, tuple(int, int), optional
800
+ :param _request_auth: set to override the auth_settings for an a single
801
+ request; this effectively ignores the
802
+ authentication in the spec for a single request.
803
+ :type _request_auth: dict, optional
804
+ :param _content_type: force content-type for the request.
805
+ :type _content_type: str, Optional
806
+ :param _headers: set to override the headers for a single
807
+ request; this effectively ignores the headers
808
+ in the spec for a single request.
809
+ :type _headers: dict, optional
810
+ :param _host_index: set to override the host_index for a single
811
+ request; this effectively ignores the host_index
812
+ in the spec for a single request.
813
+ :type _host_index: int, optional
814
+ :return: Returns the result object.
815
+ """ # noqa: E501
816
+
817
+ _param = self._list_key_pairs_serialize(
818
+ page=page,
819
+ page_size=page_size,
820
+ search=search,
821
+ _request_auth=_request_auth,
822
+ _content_type=_content_type,
823
+ _headers=_headers,
824
+ _host_index=_host_index
825
+ )
826
+
827
+ _response_types_map: Dict[str, Optional[str]] = {
828
+ '200': "Keypairs",
829
+ '400': "ErrorResponseModel",
830
+ '401': "ErrorResponseModel",
831
+ '500': None,
832
+ }
833
+ response_data = await self.api_client.call_api(
834
+ *_param,
835
+ _request_timeout=_request_timeout
836
+ )
837
+ return response_data.response
838
+
839
+
840
+ def _list_key_pairs_serialize(
841
+ self,
842
+ page,
843
+ page_size,
844
+ search,
845
+ _request_auth,
846
+ _content_type,
847
+ _headers,
848
+ _host_index,
849
+ ) -> RequestSerialized:
850
+
851
+ _host = None
852
+
853
+ _collection_formats: Dict[str, str] = {
854
+ }
855
+
856
+ _path_params: Dict[str, str] = {}
857
+ _query_params: List[Tuple[str, str]] = []
858
+ _header_params: Dict[str, Optional[str]] = _headers or {}
859
+ _form_params: List[Tuple[str, str]] = []
860
+ _files: Dict[
861
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
862
+ ] = {}
863
+ _body_params: Optional[bytes] = None
864
+
865
+ # process the path parameters
866
+ # process the query parameters
867
+ if page is not None:
868
+
869
+ _query_params.append(('page', page))
870
+
871
+ if page_size is not None:
872
+
873
+ _query_params.append(('pageSize', page_size))
874
+
875
+ if search is not None:
876
+
877
+ _query_params.append(('search', search))
878
+
879
+ # process the header parameters
880
+ # process the form parameters
881
+ # process the body parameter
882
+
883
+
884
+ # set the HTTP header `Accept`
885
+ if 'Accept' not in _header_params:
886
+ _header_params['Accept'] = self.api_client.select_header_accept(
887
+ [
888
+ 'application/json'
889
+ ]
890
+ )
891
+
892
+
893
+ # authentication setting
894
+ _auth_settings: List[str] = [
895
+ 'apiKey'
896
+ ]
897
+
898
+ return self.api_client.param_serialize(
899
+ method='GET',
900
+ resource_path='/core/keypairs',
901
+ path_params=_path_params,
902
+ query_params=_query_params,
903
+ header_params=_header_params,
904
+ body=_body_params,
905
+ post_params=_form_params,
906
+ files=_files,
907
+ auth_settings=_auth_settings,
908
+ collection_formats=_collection_formats,
909
+ _host=_host,
910
+ _request_auth=_request_auth
911
+ )
912
+
913
+
914
+
915
+
916
+ @validate_call
917
+ async def list_supported_key_pair_types(
918
+ self,
919
+ _request_timeout: Union[
920
+ None,
921
+ Annotated[StrictFloat, Field(gt=0)],
922
+ Tuple[
923
+ Annotated[StrictFloat, Field(gt=0)],
924
+ Annotated[StrictFloat, Field(gt=0)]
925
+ ]
926
+ ] = None,
927
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
928
+ _content_type: Optional[StrictStr] = None,
929
+ _headers: Optional[Dict[StrictStr, Any]] = None,
930
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
931
+ ) -> SupportedKeypairPublicKeyTypesResponse:
932
+ """List supported key pair types
933
+
934
+ Retrieves the SSH public key types supported for import.
935
+
936
+ :param _request_timeout: timeout setting for this request. If one
937
+ number provided, it will be total request
938
+ timeout. It can also be a pair (tuple) of
939
+ (connection, read) timeouts.
940
+ :type _request_timeout: int, tuple(int, int), optional
941
+ :param _request_auth: set to override the auth_settings for an a single
942
+ request; this effectively ignores the
943
+ authentication in the spec for a single request.
944
+ :type _request_auth: dict, optional
945
+ :param _content_type: force content-type for the request.
946
+ :type _content_type: str, Optional
947
+ :param _headers: set to override the headers for a single
948
+ request; this effectively ignores the headers
949
+ in the spec for a single request.
950
+ :type _headers: dict, optional
951
+ :param _host_index: set to override the host_index for a single
952
+ request; this effectively ignores the host_index
953
+ in the spec for a single request.
954
+ :type _host_index: int, optional
955
+ :return: Returns the result object.
956
+ """ # noqa: E501
957
+
958
+ _param = self._list_supported_key_pair_types_serialize(
959
+ _request_auth=_request_auth,
960
+ _content_type=_content_type,
961
+ _headers=_headers,
962
+ _host_index=_host_index
963
+ )
964
+
965
+ _response_types_map: Dict[str, Optional[str]] = {
966
+ '200': "SupportedKeypairPublicKeyTypesResponse",
967
+ '500': None,
968
+ }
969
+ response_data = await self.api_client.call_api(
970
+ *_param,
971
+ _request_timeout=_request_timeout
972
+ )
973
+ await response_data.read()
974
+ return self.api_client.response_deserialize(
975
+ response_data=response_data,
976
+ response_types_map=_response_types_map,
977
+ ).data
978
+
979
+
980
+ @validate_call
981
+ async def list_supported_key_pair_types_with_http_info(
982
+ self,
983
+ _request_timeout: Union[
984
+ None,
985
+ Annotated[StrictFloat, Field(gt=0)],
986
+ Tuple[
987
+ Annotated[StrictFloat, Field(gt=0)],
988
+ Annotated[StrictFloat, Field(gt=0)]
989
+ ]
990
+ ] = None,
991
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
992
+ _content_type: Optional[StrictStr] = None,
993
+ _headers: Optional[Dict[StrictStr, Any]] = None,
994
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
995
+ ) -> ApiResponse[SupportedKeypairPublicKeyTypesResponse]:
996
+ """List supported key pair types
997
+
998
+ Retrieves the SSH public key types supported for import.
999
+
1000
+ :param _request_timeout: timeout setting for this request. If one
1001
+ number provided, it will be total request
1002
+ timeout. It can also be a pair (tuple) of
1003
+ (connection, read) timeouts.
1004
+ :type _request_timeout: int, tuple(int, int), optional
1005
+ :param _request_auth: set to override the auth_settings for an a single
1006
+ request; this effectively ignores the
1007
+ authentication in the spec for a single request.
1008
+ :type _request_auth: dict, optional
1009
+ :param _content_type: force content-type for the request.
1010
+ :type _content_type: str, Optional
1011
+ :param _headers: set to override the headers for a single
1012
+ request; this effectively ignores the headers
1013
+ in the spec for a single request.
1014
+ :type _headers: dict, optional
1015
+ :param _host_index: set to override the host_index for a single
1016
+ request; this effectively ignores the host_index
1017
+ in the spec for a single request.
1018
+ :type _host_index: int, optional
1019
+ :return: Returns the result object.
1020
+ """ # noqa: E501
1021
+
1022
+ _param = self._list_supported_key_pair_types_serialize(
1023
+ _request_auth=_request_auth,
1024
+ _content_type=_content_type,
1025
+ _headers=_headers,
1026
+ _host_index=_host_index
1027
+ )
1028
+
1029
+ _response_types_map: Dict[str, Optional[str]] = {
1030
+ '200': "SupportedKeypairPublicKeyTypesResponse",
1031
+ '500': None,
1032
+ }
1033
+ response_data = await self.api_client.call_api(
1034
+ *_param,
1035
+ _request_timeout=_request_timeout
1036
+ )
1037
+ await response_data.read()
1038
+ return self.api_client.response_deserialize(
1039
+ response_data=response_data,
1040
+ response_types_map=_response_types_map,
1041
+ )
1042
+
1043
+
1044
+ @validate_call
1045
+ async def list_supported_key_pair_types_without_preload_content(
1046
+ self,
1047
+ _request_timeout: Union[
1048
+ None,
1049
+ Annotated[StrictFloat, Field(gt=0)],
1050
+ Tuple[
1051
+ Annotated[StrictFloat, Field(gt=0)],
1052
+ Annotated[StrictFloat, Field(gt=0)]
1053
+ ]
1054
+ ] = None,
1055
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1056
+ _content_type: Optional[StrictStr] = None,
1057
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1058
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1059
+ ) -> RESTResponseType:
1060
+ """List supported key pair types
1061
+
1062
+ Retrieves the SSH public key types supported for import.
1063
+
1064
+ :param _request_timeout: timeout setting for this request. If one
1065
+ number provided, it will be total request
1066
+ timeout. It can also be a pair (tuple) of
1067
+ (connection, read) timeouts.
1068
+ :type _request_timeout: int, tuple(int, int), optional
1069
+ :param _request_auth: set to override the auth_settings for an a single
1070
+ request; this effectively ignores the
1071
+ authentication in the spec for a single request.
1072
+ :type _request_auth: dict, optional
1073
+ :param _content_type: force content-type for the request.
1074
+ :type _content_type: str, Optional
1075
+ :param _headers: set to override the headers for a single
1076
+ request; this effectively ignores the headers
1077
+ in the spec for a single request.
1078
+ :type _headers: dict, optional
1079
+ :param _host_index: set to override the host_index for a single
1080
+ request; this effectively ignores the host_index
1081
+ in the spec for a single request.
1082
+ :type _host_index: int, optional
1083
+ :return: Returns the result object.
1084
+ """ # noqa: E501
1085
+
1086
+ _param = self._list_supported_key_pair_types_serialize(
1087
+ _request_auth=_request_auth,
1088
+ _content_type=_content_type,
1089
+ _headers=_headers,
1090
+ _host_index=_host_index
1091
+ )
1092
+
1093
+ _response_types_map: Dict[str, Optional[str]] = {
1094
+ '200': "SupportedKeypairPublicKeyTypesResponse",
1095
+ '500': None,
1096
+ }
1097
+ response_data = await self.api_client.call_api(
1098
+ *_param,
1099
+ _request_timeout=_request_timeout
1100
+ )
1101
+ return response_data.response
1102
+
1103
+
1104
+ def _list_supported_key_pair_types_serialize(
1105
+ self,
1106
+ _request_auth,
1107
+ _content_type,
1108
+ _headers,
1109
+ _host_index,
1110
+ ) -> RequestSerialized:
1111
+
1112
+ _host = None
1113
+
1114
+ _collection_formats: Dict[str, str] = {
1115
+ }
1116
+
1117
+ _path_params: Dict[str, str] = {}
1118
+ _query_params: List[Tuple[str, str]] = []
1119
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1120
+ _form_params: List[Tuple[str, str]] = []
1121
+ _files: Dict[
1122
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1123
+ ] = {}
1124
+ _body_params: Optional[bytes] = None
1125
+
1126
+ # process the path parameters
1127
+ # process the query parameters
1128
+ # process the header parameters
1129
+ # process the form parameters
1130
+ # process the body parameter
1131
+
1132
+
1133
+ # set the HTTP header `Accept`
1134
+ if 'Accept' not in _header_params:
1135
+ _header_params['Accept'] = self.api_client.select_header_accept(
1136
+ [
1137
+ 'application/json'
1138
+ ]
1139
+ )
1140
+
1141
+
1142
+ # authentication setting
1143
+ _auth_settings: List[str] = [
1144
+ 'apiKey'
1145
+ ]
1146
+
1147
+ return self.api_client.param_serialize(
1148
+ method='GET',
1149
+ resource_path='/core/supported-keypairs',
1150
+ path_params=_path_params,
1151
+ query_params=_query_params,
1152
+ header_params=_header_params,
1153
+ body=_body_params,
1154
+ post_params=_form_params,
1155
+ files=_files,
1156
+ auth_settings=_auth_settings,
1157
+ collection_formats=_collection_formats,
1158
+ _host=_host,
1159
+ _request_auth=_request_auth
1160
+ )
1161
+
1162
+
1163
+
1164
+
1165
+ @validate_call
1166
+ async def update_key_pair_name(
1167
+ self,
1168
+ id: StrictInt,
1169
+ payload: UpdateKeypairName,
1170
+ _request_timeout: Union[
1171
+ None,
1172
+ Annotated[StrictFloat, Field(gt=0)],
1173
+ Tuple[
1174
+ Annotated[StrictFloat, Field(gt=0)],
1175
+ Annotated[StrictFloat, Field(gt=0)]
1176
+ ]
1177
+ ] = None,
1178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1179
+ _content_type: Optional[StrictStr] = None,
1180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1182
+ ) -> UpdateKeypairNameResponse:
1183
+ """Update key pair name
1184
+
1185
+ Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
1186
+
1187
+ :param id: (required)
1188
+ :type id: int
1189
+ :param payload: (required)
1190
+ :type payload: UpdateKeypairName
1191
+ :param _request_timeout: timeout setting for this request. If one
1192
+ number provided, it will be total request
1193
+ timeout. It can also be a pair (tuple) of
1194
+ (connection, read) timeouts.
1195
+ :type _request_timeout: int, tuple(int, int), optional
1196
+ :param _request_auth: set to override the auth_settings for an a single
1197
+ request; this effectively ignores the
1198
+ authentication in the spec for a single request.
1199
+ :type _request_auth: dict, optional
1200
+ :param _content_type: force content-type for the request.
1201
+ :type _content_type: str, Optional
1202
+ :param _headers: set to override the headers for a single
1203
+ request; this effectively ignores the headers
1204
+ in the spec for a single request.
1205
+ :type _headers: dict, optional
1206
+ :param _host_index: set to override the host_index for a single
1207
+ request; this effectively ignores the host_index
1208
+ in the spec for a single request.
1209
+ :type _host_index: int, optional
1210
+ :return: Returns the result object.
1211
+ """ # noqa: E501
1212
+
1213
+ _param = self._update_key_pair_name_serialize(
1214
+ id=id,
1215
+ payload=payload,
1216
+ _request_auth=_request_auth,
1217
+ _content_type=_content_type,
1218
+ _headers=_headers,
1219
+ _host_index=_host_index
1220
+ )
1221
+
1222
+ _response_types_map: Dict[str, Optional[str]] = {
1223
+ '200': "UpdateKeypairNameResponse",
1224
+ '400': "ErrorResponseModel",
1225
+ '401': "ErrorResponseModel",
1226
+ '404': "ErrorResponseModel",
1227
+ '500': None,
1228
+ }
1229
+ response_data = await self.api_client.call_api(
1230
+ *_param,
1231
+ _request_timeout=_request_timeout
1232
+ )
1233
+ await response_data.read()
1234
+ return self.api_client.response_deserialize(
1235
+ response_data=response_data,
1236
+ response_types_map=_response_types_map,
1237
+ ).data
1238
+
1239
+
1240
+ @validate_call
1241
+ async def update_key_pair_name_with_http_info(
1242
+ self,
1243
+ id: StrictInt,
1244
+ payload: UpdateKeypairName,
1245
+ _request_timeout: Union[
1246
+ None,
1247
+ Annotated[StrictFloat, Field(gt=0)],
1248
+ Tuple[
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Annotated[StrictFloat, Field(gt=0)]
1251
+ ]
1252
+ ] = None,
1253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1254
+ _content_type: Optional[StrictStr] = None,
1255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1257
+ ) -> ApiResponse[UpdateKeypairNameResponse]:
1258
+ """Update key pair name
1259
+
1260
+ Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
1261
+
1262
+ :param id: (required)
1263
+ :type id: int
1264
+ :param payload: (required)
1265
+ :type payload: UpdateKeypairName
1266
+ :param _request_timeout: timeout setting for this request. If one
1267
+ number provided, it will be total request
1268
+ timeout. It can also be a pair (tuple) of
1269
+ (connection, read) timeouts.
1270
+ :type _request_timeout: int, tuple(int, int), optional
1271
+ :param _request_auth: set to override the auth_settings for an a single
1272
+ request; this effectively ignores the
1273
+ authentication in the spec for a single request.
1274
+ :type _request_auth: dict, optional
1275
+ :param _content_type: force content-type for the request.
1276
+ :type _content_type: str, Optional
1277
+ :param _headers: set to override the headers for a single
1278
+ request; this effectively ignores the headers
1279
+ in the spec for a single request.
1280
+ :type _headers: dict, optional
1281
+ :param _host_index: set to override the host_index for a single
1282
+ request; this effectively ignores the host_index
1283
+ in the spec for a single request.
1284
+ :type _host_index: int, optional
1285
+ :return: Returns the result object.
1286
+ """ # noqa: E501
1287
+
1288
+ _param = self._update_key_pair_name_serialize(
1289
+ id=id,
1290
+ payload=payload,
1291
+ _request_auth=_request_auth,
1292
+ _content_type=_content_type,
1293
+ _headers=_headers,
1294
+ _host_index=_host_index
1295
+ )
1296
+
1297
+ _response_types_map: Dict[str, Optional[str]] = {
1298
+ '200': "UpdateKeypairNameResponse",
1299
+ '400': "ErrorResponseModel",
1300
+ '401': "ErrorResponseModel",
1301
+ '404': "ErrorResponseModel",
1302
+ '500': None,
1303
+ }
1304
+ response_data = await self.api_client.call_api(
1305
+ *_param,
1306
+ _request_timeout=_request_timeout
1307
+ )
1308
+ await response_data.read()
1309
+ return self.api_client.response_deserialize(
1310
+ response_data=response_data,
1311
+ response_types_map=_response_types_map,
1312
+ )
1313
+
1314
+
1315
+ @validate_call
1316
+ async def update_key_pair_name_without_preload_content(
1317
+ self,
1318
+ id: StrictInt,
1319
+ payload: UpdateKeypairName,
1320
+ _request_timeout: Union[
1321
+ None,
1322
+ Annotated[StrictFloat, Field(gt=0)],
1323
+ Tuple[
1324
+ Annotated[StrictFloat, Field(gt=0)],
1325
+ Annotated[StrictFloat, Field(gt=0)]
1326
+ ]
1327
+ ] = None,
1328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1329
+ _content_type: Optional[StrictStr] = None,
1330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1332
+ ) -> RESTResponseType:
1333
+ """Update key pair name
1334
+
1335
+ Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
1336
+
1337
+ :param id: (required)
1338
+ :type id: int
1339
+ :param payload: (required)
1340
+ :type payload: UpdateKeypairName
1341
+ :param _request_timeout: timeout setting for this request. If one
1342
+ number provided, it will be total request
1343
+ timeout. It can also be a pair (tuple) of
1344
+ (connection, read) timeouts.
1345
+ :type _request_timeout: int, tuple(int, int), optional
1346
+ :param _request_auth: set to override the auth_settings for an a single
1347
+ request; this effectively ignores the
1348
+ authentication in the spec for a single request.
1349
+ :type _request_auth: dict, optional
1350
+ :param _content_type: force content-type for the request.
1351
+ :type _content_type: str, Optional
1352
+ :param _headers: set to override the headers for a single
1353
+ request; this effectively ignores the headers
1354
+ in the spec for a single request.
1355
+ :type _headers: dict, optional
1356
+ :param _host_index: set to override the host_index for a single
1357
+ request; this effectively ignores the host_index
1358
+ in the spec for a single request.
1359
+ :type _host_index: int, optional
1360
+ :return: Returns the result object.
1361
+ """ # noqa: E501
1362
+
1363
+ _param = self._update_key_pair_name_serialize(
1364
+ id=id,
1365
+ payload=payload,
1366
+ _request_auth=_request_auth,
1367
+ _content_type=_content_type,
1368
+ _headers=_headers,
1369
+ _host_index=_host_index
1370
+ )
1371
+
1372
+ _response_types_map: Dict[str, Optional[str]] = {
1373
+ '200': "UpdateKeypairNameResponse",
1374
+ '400': "ErrorResponseModel",
1375
+ '401': "ErrorResponseModel",
1376
+ '404': "ErrorResponseModel",
1377
+ '500': None,
1378
+ }
1379
+ response_data = await self.api_client.call_api(
1380
+ *_param,
1381
+ _request_timeout=_request_timeout
1382
+ )
1383
+ return response_data.response
1384
+
1385
+
1386
+ def _update_key_pair_name_serialize(
1387
+ self,
1388
+ id,
1389
+ payload,
1390
+ _request_auth,
1391
+ _content_type,
1392
+ _headers,
1393
+ _host_index,
1394
+ ) -> RequestSerialized:
1395
+
1396
+ _host = None
1397
+
1398
+ _collection_formats: Dict[str, str] = {
1399
+ }
1400
+
1401
+ _path_params: Dict[str, str] = {}
1402
+ _query_params: List[Tuple[str, str]] = []
1403
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1404
+ _form_params: List[Tuple[str, str]] = []
1405
+ _files: Dict[
1406
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1407
+ ] = {}
1408
+ _body_params: Optional[bytes] = None
1409
+
1410
+ # process the path parameters
1411
+ if id is not None:
1412
+ _path_params['id'] = id
1413
+ # process the query parameters
1414
+ # process the header parameters
1415
+ # process the form parameters
1416
+ # process the body parameter
1417
+ if payload is not None:
1418
+ _body_params = payload
1419
+
1420
+
1421
+ # set the HTTP header `Accept`
1422
+ if 'Accept' not in _header_params:
1423
+ _header_params['Accept'] = self.api_client.select_header_accept(
1424
+ [
1425
+ 'application/json'
1426
+ ]
1427
+ )
1428
+
1429
+ # set the HTTP header `Content-Type`
1430
+ if _content_type:
1431
+ _header_params['Content-Type'] = _content_type
1432
+ else:
1433
+ _default_content_type = (
1434
+ self.api_client.select_header_content_type(
1435
+ [
1436
+ 'application/json'
1437
+ ]
1438
+ )
1439
+ )
1440
+ if _default_content_type is not None:
1441
+ _header_params['Content-Type'] = _default_content_type
1442
+
1443
+ # authentication setting
1444
+ _auth_settings: List[str] = [
1445
+ 'apiKey'
1446
+ ]
1447
+
1448
+ return self.api_client.param_serialize(
1449
+ method='PUT',
1450
+ resource_path='/core/keypair/{id}',
1451
+ path_params=_path_params,
1452
+ query_params=_query_params,
1453
+ header_params=_header_params,
1454
+ body=_body_params,
1455
+ post_params=_form_params,
1456
+ files=_files,
1457
+ auth_settings=_auth_settings,
1458
+ collection_formats=_collection_formats,
1459
+ _host=_host,
1460
+ _request_auth=_request_auth
1461
+ )
1462
+
1463
+