hyperstack 0.1.23__py3-none-any.whl → 1.41.0a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. hyperstack/__init__.py +79 -131
  2. hyperstack/api/__init__.py +2 -0
  3. hyperstack/api/alive_api.py +240 -0
  4. hyperstack/api/api_key_api.py +16 -20
  5. hyperstack/api/assigning_member_role_api.py +15 -17
  6. hyperstack/api/auth_api.py +1050 -5
  7. hyperstack/api/beta_access_api.py +856 -0
  8. hyperstack/api/billing_api.py +6461 -673
  9. hyperstack/api/calculate_api.py +8 -9
  10. hyperstack/api/callbacks_api.py +120 -126
  11. hyperstack/api/cluster_events_api.py +1 -2
  12. hyperstack/api/clusters_api.py +2492 -146
  13. hyperstack/api/compliance_api.py +14 -18
  14. hyperstack/api/credit_api.py +17 -15
  15. hyperstack/api/customer_contract_api.py +30 -33
  16. hyperstack/api/dashboard_api.py +4 -5
  17. hyperstack/api/deployment_api.py +4 -8
  18. hyperstack/api/environment_api.py +285 -16
  19. hyperstack/api/firewall_attachment_api.py +11 -9
  20. hyperstack/api/firewalls_api.py +341 -347
  21. hyperstack/api/flavor_api.py +4 -5
  22. hyperstack/api/floating_ip_api.py +50 -49
  23. hyperstack/api/gpu_api.py +1 -2
  24. hyperstack/api/image_api.py +35 -39
  25. hyperstack/api/invite_api.py +288 -18
  26. hyperstack/api/keypair_api.py +22 -26
  27. hyperstack/api/organization_api.py +12 -15
  28. hyperstack/api/partner_config_api.py +564 -0
  29. hyperstack/api/payment_api.py +299 -18
  30. hyperstack/api/permission_api.py +4 -5
  31. hyperstack/api/policy_api.py +4 -5
  32. hyperstack/api/pricebook_api.py +14 -12
  33. hyperstack/api/profile_api.py +13 -17
  34. hyperstack/api/rbac_role_api.py +20 -25
  35. hyperstack/api/region_api.py +7 -8
  36. hyperstack/api/security_rules_api.py +1 -2
  37. hyperstack/api/snapshot_events_api.py +1 -2
  38. hyperstack/api/snapshots_api.py +166 -172
  39. hyperstack/api/stock_api.py +4 -5
  40. hyperstack/api/template_api.py +14 -19
  41. hyperstack/api/user_api.py +55 -49
  42. hyperstack/api/user_detail_choice_api.py +1 -2
  43. hyperstack/api/user_permission_api.py +8 -10
  44. hyperstack/api/virtual_machine_api.py +1529 -929
  45. hyperstack/api/virtual_machine_events_api.py +21 -22
  46. hyperstack/api/vnc_url_api.py +54 -50
  47. hyperstack/api/volume_api.py +340 -40
  48. hyperstack/api/volume_attachment_api.py +342 -42
  49. hyperstack/api_client.py +1 -1
  50. hyperstack/configuration.py +154 -47
  51. hyperstack/models/__init__.py +76 -130
  52. hyperstack/models/{environment_fieldsfor_volume.py → access_token_field.py} +7 -7
  53. hyperstack/models/attach_volume_fields.py +6 -2
  54. hyperstack/models/attach_volumes_payload.py +4 -2
  55. hyperstack/models/{virtual_machine_usage.py → attachments_fields_for_volume.py} +13 -11
  56. hyperstack/models/{flavor_vm_fields.py → attributes.py} +15 -18
  57. hyperstack/models/auth_get_token_response_model.py +4 -6
  58. hyperstack/models/{future_node_model.py → beta_access_request_fields.py} +27 -25
  59. hyperstack/models/{create_gpu.py → beta_access_request_payload.py} +9 -11
  60. hyperstack/models/{create_discount_response.py → beta_access_request_response_model.py} +11 -11
  61. hyperstack/models/{export_billing_data_request.py → beta_access_status_item.py} +20 -23
  62. hyperstack/models/{get_all_discount_for_all_organization_response.py → beta_access_status_response_model.py} +15 -15
  63. hyperstack/models/{exclude_billing_post_response.py → billing_history.py} +13 -11
  64. hyperstack/models/billing_history_data_synthesis_details.py +105 -0
  65. hyperstack/models/{vm_usage_response.py → billing_history_fine_tuning.py} +23 -19
  66. hyperstack/models/billing_history_model_evalutation_details.py +105 -0
  67. hyperstack/models/{get_all_discounts_fields.py → billing_history_serverless_inference.py} +23 -24
  68. hyperstack/models/billing_history_serverless_inference_details.py +105 -0
  69. hyperstack/models/{billingmetricesfields.py → billing_metrices_fields.py} +4 -4
  70. hyperstack/models/{billingmetricesresponse.py → billing_metrices_response.py} +7 -7
  71. hyperstack/models/cluster_fields.py +27 -9
  72. hyperstack/models/{add_update_flavor_organization_payload.py → cluster_flavor_fields.py} +28 -26
  73. hyperstack/models/{historical_instances_fields.py → cluster_node_fields.py} +24 -22
  74. hyperstack/models/{internal_instance_flavor_fields.py → cluster_node_group_fields.py} +17 -17
  75. hyperstack/models/{create_update_policy_response_model.py → cluster_node_groups_create_response.py} +21 -11
  76. hyperstack/models/{create_update_permission_response_model.py → cluster_node_groups_get_response.py} +11 -11
  77. hyperstack/models/{auth_request_login_response_model.py → cluster_node_groups_list_response.py} +15 -11
  78. hyperstack/models/{contract_eligible_instance_fields.py → cluster_node_instance_fields.py} +13 -11
  79. hyperstack/models/{image_logos.py → cluster_nodes_list_response.py} +14 -14
  80. hyperstack/models/{internal_environment_fields.py → cluster_version.py} +13 -9
  81. hyperstack/models/cluster_versions.py +10 -2
  82. hyperstack/models/{future_nodes_stock_model.py → colors.py} +17 -15
  83. hyperstack/models/contract_discount_plan_fields.py +3 -1
  84. hyperstack/models/contract_instance_fields.py +7 -1
  85. hyperstack/models/{future_node_response_model.py → create_cluster_node_fields.py} +23 -18
  86. hyperstack/models/{update_gpu.py → create_cluster_node_group_payload.py} +12 -11
  87. hyperstack/models/create_cluster_payload.py +31 -8
  88. hyperstack/models/create_environment.py +1 -1
  89. hyperstack/models/create_instances_payload.py +10 -8
  90. hyperstack/models/create_profile_payload.py +1 -1
  91. hyperstack/models/create_snapshot_payload.py +2 -4
  92. hyperstack/models/create_volume_payload.py +1 -1
  93. hyperstack/models/data_synthesis_billing_history_details_response_schema.py +95 -0
  94. hyperstack/models/{deployment_fieldsforstartdeployments.py → deployment_fields_for_start_deployments.py} +4 -4
  95. hyperstack/models/{editlabelofanexisting_vm_payload.py → edit_label_of_an_existing_vm_payload.py} +4 -4
  96. hyperstack/models/environment_features.py +14 -2
  97. hyperstack/models/{node_stocks_payload.py → environment_fields_for_volume.py} +10 -12
  98. hyperstack/models/flavor_fields.py +3 -1
  99. hyperstack/models/{customer_fields.py → flavor_label_fields.py} +7 -7
  100. hyperstack/models/{getcreditandthresholdinfo.py → get_credit_and_threshold_info.py} +4 -4
  101. hyperstack/models/{getcreditandthresholdinfoinresponse.py → get_credit_and_threshold_info_in_response.py} +7 -7
  102. hyperstack/models/{region_payload.py → get_instance_logs_response.py} +7 -9
  103. hyperstack/models/instance_fields.py +14 -4
  104. hyperstack/models/instance_flavor_fields.py +13 -1
  105. hyperstack/models/{flavor_response.py → keypair_environment_features.py} +20 -16
  106. hyperstack/models/{internal_instance_keypair_fields.py → keypair_environment_fields.py} +13 -11
  107. hyperstack/models/keypair_fields.py +6 -2
  108. hyperstack/models/{lastdaycostfields.py → last_day_cost_fields.py} +4 -4
  109. hyperstack/models/{lastdaycostresponse.py → last_day_cost_response.py} +7 -7
  110. hyperstack/models/{export_billing_data_response.py → logos.py} +13 -9
  111. hyperstack/models/{creditrequestresponse.py → master_flavors_response.py} +14 -14
  112. hyperstack/models/{customer_payload.py → mfa_status_fields.py} +8 -10
  113. hyperstack/models/{gpu.py → mfa_status_response.py} +11 -11
  114. hyperstack/models/model_evaluation_billing_history_details_response_schema.py +95 -0
  115. hyperstack/models/{organization_thresholdfields.py → organization_threshold_fields.py} +4 -4
  116. hyperstack/models/{organizationthresholdupdateresponse.py → organization_threshold_update_response.py} +7 -7
  117. hyperstack/models/{organizationthresholdsresponse.py → organization_thresholds_response.py} +7 -7
  118. hyperstack/models/{logo_get_response.py → pagination.py} +12 -12
  119. hyperstack/models/{billing_response.py → partner_config.py} +31 -20
  120. hyperstack/models/payment_details_fields.py +5 -1
  121. hyperstack/models/{logout_payload.py → primary_color.py} +10 -8
  122. hyperstack/models/region_fields.py +16 -2
  123. hyperstack/models/{vm_usage_request_payload.py → request_instance_logs_payload.py} +8 -8
  124. hyperstack/models/{stock_visibility_user_payload.py → request_instance_logs_response.py} +8 -8
  125. hyperstack/models/{contract_billing_history.py → resource_level_billing_bucket_details_resources.py} +10 -10
  126. hyperstack/models/{node_response_model.py → resource_level_billing_history_resources_cluster.py} +21 -11
  127. hyperstack/models/resource_level_billing_history_response_attributes.py +3 -1
  128. hyperstack/models/{get_all_contracts_response_model.py → resource_level_bucket_billing_details_response_model.py} +11 -15
  129. hyperstack/models/{contract_billing_history_response_model.py → resource_level_bucket_billing_history_response_model.py} +11 -11
  130. hyperstack/models/resource_level_cluster_billing_details_response_model.py +95 -0
  131. hyperstack/models/resource_level_cluster_billing_history_response_model.py +95 -0
  132. hyperstack/models/{get_discount_detail_response.py → resource_level_cluster_graph_billing_details_response_model.py} +11 -11
  133. hyperstack/models/{organization_object_response.py → resource_level_graph_billing_details_bucket.py} +18 -14
  134. hyperstack/models/{update_discounts_status_payload.py → secondary_color.py} +10 -8
  135. hyperstack/models/{security_rules_fieldsfor_instance.py → security_rules_fields_for_instance.py} +4 -4
  136. hyperstack/models/serverless_inferenced_billing_history_details_response_schema.py +95 -0
  137. hyperstack/models/snapshot_fields.py +6 -1
  138. hyperstack/models/snapshot_retrieve_fields.py +29 -2
  139. hyperstack/models/start_deployment.py +3 -3
  140. hyperstack/models/{subscribeorunsubscribeupdatepayload.py → subscribe_or_unsubscribe_update_payload.py} +4 -4
  141. hyperstack/models/token_based_billing_history_response.py +95 -0
  142. hyperstack/models/{update_keypairnameresponse.py → update_keypair_name_response.py} +4 -4
  143. hyperstack/models/update_volume_attachment_payload.py +87 -0
  144. hyperstack/models/{verify_api_key_payload.py → update_volume_payload.py} +7 -7
  145. hyperstack/models/{stock_visibility_user_list_response.py → update_volume_response.py} +14 -16
  146. hyperstack/models/{auth_request_login_fields.py → uris.py} +19 -9
  147. hyperstack/models/{userinfopostpayload.py → user_info_post_payload.py} +4 -4
  148. hyperstack/models/{node_stock_response_model.py → user_organizations_response.py} +14 -14
  149. hyperstack/models/users_info_fields.py +3 -1
  150. hyperstack/models/volume_attachment_fields.py +9 -5
  151. hyperstack/models/volume_fields.py +14 -4
  152. hyperstack/models/{volume_fieldsfor_instance.py → volume_fields_for_instance.py} +4 -4
  153. hyperstack/models/volumes.py +17 -11
  154. hyperstack/models/{instances_summary_fields.py → volumes_fields.py} +33 -29
  155. hyperstack/models/workload_billing_history_response.py +95 -0
  156. {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/METADATA +9 -2
  157. hyperstack-1.41.0a0.dist-info/RECORD +349 -0
  158. {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/WHEEL +1 -1
  159. hyperstack/models/api_key_verify_fields.py +0 -93
  160. hyperstack/models/billing_immune_resources_response.py +0 -95
  161. hyperstack/models/contract_billing_history_response_attributes.py +0 -99
  162. hyperstack/models/contract_change_payload.py +0 -101
  163. hyperstack/models/contract_eligible_instances_response.py +0 -101
  164. hyperstack/models/contract_event_create_model.py +0 -91
  165. hyperstack/models/contract_resource_payload.py +0 -95
  166. hyperstack/models/contractl_billing_history_response_metrics.py +0 -87
  167. hyperstack/models/create_contract_fields.py +0 -110
  168. hyperstack/models/create_contract_payload.py +0 -106
  169. hyperstack/models/create_discounts_payload.py +0 -112
  170. hyperstack/models/create_update_permission_payload.py +0 -93
  171. hyperstack/models/create_update_policy_payload.py +0 -93
  172. hyperstack/models/creditrechargelimitfield.py +0 -93
  173. hyperstack/models/creditrechargelimitresponse.py +0 -99
  174. hyperstack/models/creditrequests.py +0 -96
  175. hyperstack/models/data.py +0 -91
  176. hyperstack/models/discount_entity_model.py +0 -97
  177. hyperstack/models/discount_fields.py +0 -100
  178. hyperstack/models/discount_plan_fields.py +0 -108
  179. hyperstack/models/discount_resource_fields.py +0 -93
  180. hyperstack/models/discount_resource_payload.py +0 -93
  181. hyperstack/models/exclude_billing_post_payload.py +0 -91
  182. hyperstack/models/field_change.py +0 -91
  183. hyperstack/models/flavor_payload.py +0 -101
  184. hyperstack/models/flavor_vms_response.py +0 -99
  185. hyperstack/models/future_node_stock_model.py +0 -93
  186. hyperstack/models/future_node_update_model.py +0 -98
  187. hyperstack/models/get_all_contract_fields.py +0 -100
  188. hyperstack/models/get_discount_response.py +0 -99
  189. hyperstack/models/get_entity_discount_detail_response.py +0 -108
  190. hyperstack/models/get_token_payload.py +0 -89
  191. hyperstack/models/get_version_response.py +0 -91
  192. hyperstack/models/historical_instance.py +0 -101
  193. hyperstack/models/infrahub_resource_object_response.py +0 -119
  194. hyperstack/models/insert_discount_plan_fields.py +0 -112
  195. hyperstack/models/internal_instance_fields.py +0 -156
  196. hyperstack/models/internal_instance_image_fields.py +0 -95
  197. hyperstack/models/internal_instances_response.py +0 -99
  198. hyperstack/models/internal_security_rules_fields_for_instance.py +0 -104
  199. hyperstack/models/internal_volume_attachment_fields.py +0 -98
  200. hyperstack/models/internal_volume_fields.py +0 -95
  201. hyperstack/models/internal_volumes_response.py +0 -99
  202. hyperstack/models/new_stock_update_response_model.py +0 -89
  203. hyperstack/models/node_model.py +0 -114
  204. hyperstack/models/node_payload_model.py +0 -97
  205. hyperstack/models/node_power_usage_model.py +0 -120
  206. hyperstack/models/node_stock_payload_model.py +0 -95
  207. hyperstack/models/organizationcreditrechargelimitresponse.py +0 -95
  208. hyperstack/models/power_usage_model.py +0 -89
  209. hyperstack/models/pricebook_resource_object_response.py +0 -107
  210. hyperstack/models/refresh_token_payload.py +0 -89
  211. hyperstack/models/region_response.py +0 -95
  212. hyperstack/models/set_defaults_payload.py +0 -89
  213. hyperstack/models/single_visibility_user_response.py +0 -91
  214. hyperstack/models/success_response_model.py +0 -89
  215. hyperstack/models/token_fields.py +0 -91
  216. hyperstack/models/update_contract_payload.py +0 -104
  217. hyperstack/models/update_discounts_payload.py +0 -102
  218. hyperstack/models/user_transfer_payload.py +0 -89
  219. hyperstack/models/verify_api_key_response_model.py +0 -95
  220. hyperstack/models/volume_status_change_fields.py +0 -96
  221. hyperstack/models/volumes_last_status_change_response.py +0 -99
  222. hyperstack/models/warning_mail_log_fields.py +0 -99
  223. hyperstack/models/warning_mail_log_response.py +0 -101
  224. hyperstack-0.1.23.dist-info/RECORD +0 -401
  225. {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/top_level.txt +0 -0
@@ -22,6 +22,8 @@ from typing_extensions import Annotated
22
22
  from ..models.create_volume_payload import CreateVolumePayload
23
23
  from ..models.name_available_model import NameAvailableModel
24
24
  from ..models.response_model import ResponseModel
25
+ from ..models.update_volume_payload import UpdateVolumePayload
26
+ from ..models.update_volume_response import UpdateVolumeResponse
25
27
  from ..models.volume import Volume
26
28
  from ..models.volume_types import VolumeTypes
27
29
  from ..models.volumes import Volumes
@@ -63,7 +65,7 @@ class VolumeApi:
63
65
  ) -> Volume:
64
66
  """Create volume
65
67
 
66
- Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
68
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/create-volume).
67
69
 
68
70
  :param payload: (required)
69
71
  :type payload: CreateVolumePayload
@@ -136,7 +138,7 @@ class VolumeApi:
136
138
  ) -> ApiResponse[Volume]:
137
139
  """Create volume
138
140
 
139
- Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
141
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/create-volume).
140
142
 
141
143
  :param payload: (required)
142
144
  :type payload: CreateVolumePayload
@@ -209,7 +211,7 @@ class VolumeApi:
209
211
  ) -> RESTResponseType:
210
212
  """Create volume
211
213
 
212
- Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
214
+ Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/create-volume).
213
215
 
214
216
  :param payload: (required)
215
217
  :type payload: CreateVolumePayload
@@ -315,8 +317,7 @@ class VolumeApi:
315
317
 
316
318
  # authentication setting
317
319
  _auth_settings: List[str] = [
318
- 'apiKey',
319
- 'accessToken'
320
+ 'apiKey'
320
321
  ]
321
322
 
322
323
  return self.api_client.param_serialize(
@@ -340,7 +341,7 @@ class VolumeApi:
340
341
  @validate_call
341
342
  def delete_volume(
342
343
  self,
343
- id: StrictInt,
344
+ volume_id: StrictInt,
344
345
  _request_timeout: Union[
345
346
  None,
346
347
  Annotated[StrictFloat, Field(gt=0)],
@@ -358,8 +359,8 @@ class VolumeApi:
358
359
 
359
360
  Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
360
361
 
361
- :param id: (required)
362
- :type id: int
362
+ :param volume_id: (required)
363
+ :type volume_id: int
363
364
  :param _request_timeout: timeout setting for this request. If one
364
365
  number provided, it will be total request
365
366
  timeout. It can also be a pair (tuple) of
@@ -383,7 +384,7 @@ class VolumeApi:
383
384
  """ # noqa: E501
384
385
 
385
386
  _param = self._delete_volume_serialize(
386
- id=id,
387
+ volume_id=volume_id,
387
388
  _request_auth=_request_auth,
388
389
  _content_type=_content_type,
389
390
  _headers=_headers,
@@ -411,7 +412,7 @@ class VolumeApi:
411
412
  @validate_call
412
413
  def delete_volume_with_http_info(
413
414
  self,
414
- id: StrictInt,
415
+ volume_id: StrictInt,
415
416
  _request_timeout: Union[
416
417
  None,
417
418
  Annotated[StrictFloat, Field(gt=0)],
@@ -429,8 +430,8 @@ class VolumeApi:
429
430
 
430
431
  Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
431
432
 
432
- :param id: (required)
433
- :type id: int
433
+ :param volume_id: (required)
434
+ :type volume_id: int
434
435
  :param _request_timeout: timeout setting for this request. If one
435
436
  number provided, it will be total request
436
437
  timeout. It can also be a pair (tuple) of
@@ -454,7 +455,7 @@ class VolumeApi:
454
455
  """ # noqa: E501
455
456
 
456
457
  _param = self._delete_volume_serialize(
457
- id=id,
458
+ volume_id=volume_id,
458
459
  _request_auth=_request_auth,
459
460
  _content_type=_content_type,
460
461
  _headers=_headers,
@@ -482,7 +483,7 @@ class VolumeApi:
482
483
  @validate_call
483
484
  def delete_volume_without_preload_content(
484
485
  self,
485
- id: StrictInt,
486
+ volume_id: StrictInt,
486
487
  _request_timeout: Union[
487
488
  None,
488
489
  Annotated[StrictFloat, Field(gt=0)],
@@ -500,8 +501,8 @@ class VolumeApi:
500
501
 
501
502
  Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.
502
503
 
503
- :param id: (required)
504
- :type id: int
504
+ :param volume_id: (required)
505
+ :type volume_id: int
505
506
  :param _request_timeout: timeout setting for this request. If one
506
507
  number provided, it will be total request
507
508
  timeout. It can also be a pair (tuple) of
@@ -525,7 +526,7 @@ class VolumeApi:
525
526
  """ # noqa: E501
526
527
 
527
528
  _param = self._delete_volume_serialize(
528
- id=id,
529
+ volume_id=volume_id,
529
530
  _request_auth=_request_auth,
530
531
  _content_type=_content_type,
531
532
  _headers=_headers,
@@ -548,7 +549,7 @@ class VolumeApi:
548
549
 
549
550
  def _delete_volume_serialize(
550
551
  self,
551
- id,
552
+ volume_id,
552
553
  _request_auth,
553
554
  _content_type,
554
555
  _headers,
@@ -570,8 +571,8 @@ class VolumeApi:
570
571
  _body_params: Optional[bytes] = None
571
572
 
572
573
  # process the path parameters
573
- if id is not None:
574
- _path_params['id'] = id
574
+ if volume_id is not None:
575
+ _path_params['volume_id'] = volume_id
575
576
  # process the query parameters
576
577
  # process the header parameters
577
578
  # process the form parameters
@@ -589,13 +590,12 @@ class VolumeApi:
589
590
 
590
591
  # authentication setting
591
592
  _auth_settings: List[str] = [
592
- 'apiKey',
593
- 'accessToken'
593
+ 'apiKey'
594
594
  ]
595
595
 
596
596
  return self.api_client.param_serialize(
597
597
  method='DELETE',
598
- resource_path='/core/volumes/{id}',
598
+ resource_path='/core/volumes/{volume_id}',
599
599
  path_params=_path_params,
600
600
  query_params=_query_params,
601
601
  header_params=_header_params,
@@ -627,7 +627,7 @@ class VolumeApi:
627
627
  _content_type: Optional[StrictStr] = None,
628
628
  _headers: Optional[Dict[StrictStr, Any]] = None,
629
629
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
630
- ) -> Volumes:
630
+ ) -> Volume:
631
631
  """Fetch Volume Details
632
632
 
633
633
  Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
@@ -665,7 +665,7 @@ class VolumeApi:
665
665
  )
666
666
 
667
667
  _response_types_map: Dict[str, Optional[str]] = {
668
- '200': "Volumes",
668
+ '200': "Volume",
669
669
  '400': "ErrorResponseModel",
670
670
  '401': "ErrorResponseModel",
671
671
  '403': "ErrorResponseModel",
@@ -699,7 +699,7 @@ class VolumeApi:
699
699
  _content_type: Optional[StrictStr] = None,
700
700
  _headers: Optional[Dict[StrictStr, Any]] = None,
701
701
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
702
- ) -> ApiResponse[Volumes]:
702
+ ) -> ApiResponse[Volume]:
703
703
  """Fetch Volume Details
704
704
 
705
705
  Fetch volume details for specific volume. This endpoint returns id, name, volume size, volume type, status, description, image_id, os_image, created_at, updated_at etc.
@@ -737,7 +737,7 @@ class VolumeApi:
737
737
  )
738
738
 
739
739
  _response_types_map: Dict[str, Optional[str]] = {
740
- '200': "Volumes",
740
+ '200': "Volume",
741
741
  '400': "ErrorResponseModel",
742
742
  '401': "ErrorResponseModel",
743
743
  '403': "ErrorResponseModel",
@@ -809,7 +809,7 @@ class VolumeApi:
809
809
  )
810
810
 
811
811
  _response_types_map: Dict[str, Optional[str]] = {
812
- '200': "Volumes",
812
+ '200': "Volume",
813
813
  '400': "ErrorResponseModel",
814
814
  '401': "ErrorResponseModel",
815
815
  '403': "ErrorResponseModel",
@@ -866,13 +866,12 @@ class VolumeApi:
866
866
 
867
867
  # authentication setting
868
868
  _auth_settings: List[str] = [
869
- 'apiKey',
870
- 'accessToken'
869
+ 'apiKey'
871
870
  ]
872
871
 
873
872
  return self.api_client.param_serialize(
874
873
  method='GET',
875
- resource_path='/core/volume/{volume_id}',
874
+ resource_path='/core/volumes/{volume_id}',
876
875
  path_params=_path_params,
877
876
  query_params=_query_params,
878
877
  header_params=_header_params,
@@ -1140,8 +1139,7 @@ class VolumeApi:
1140
1139
 
1141
1140
  # authentication setting
1142
1141
  _auth_settings: List[str] = [
1143
- 'apiKey',
1144
- 'accessToken'
1142
+ 'apiKey'
1145
1143
  ]
1146
1144
 
1147
1145
  return self.api_client.param_serialize(
@@ -1396,8 +1394,7 @@ class VolumeApi:
1396
1394
 
1397
1395
  # authentication setting
1398
1396
  _auth_settings: List[str] = [
1399
- 'apiKey',
1400
- 'accessToken'
1397
+ 'apiKey'
1401
1398
  ]
1402
1399
 
1403
1400
  return self.api_client.param_serialize(
@@ -1440,7 +1437,7 @@ class VolumeApi:
1440
1437
  ) -> Volumes:
1441
1438
  """List volumes
1442
1439
 
1443
- Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
1440
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/).
1444
1441
 
1445
1442
  :param page: Page Number
1446
1443
  :type page: str
@@ -1522,7 +1519,7 @@ class VolumeApi:
1522
1519
  ) -> ApiResponse[Volumes]:
1523
1520
  """List volumes
1524
1521
 
1525
- Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
1522
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/).
1526
1523
 
1527
1524
  :param page: Page Number
1528
1525
  :type page: str
@@ -1604,7 +1601,7 @@ class VolumeApi:
1604
1601
  ) -> RESTResponseType:
1605
1602
  """List volumes
1606
1603
 
1607
- Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).
1604
+ Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**]({Config.INFRAHUB_DOCS_BASE}/docs/api-reference/core-resources/volumes/).
1608
1605
 
1609
1606
  :param page: Page Number
1610
1607
  :type page: str
@@ -1720,8 +1717,7 @@ class VolumeApi:
1720
1717
 
1721
1718
  # authentication setting
1722
1719
  _auth_settings: List[str] = [
1723
- 'apiKey',
1724
- 'accessToken'
1720
+ 'apiKey'
1725
1721
  ]
1726
1722
 
1727
1723
  return self.api_client.param_serialize(
@@ -1740,3 +1736,307 @@ class VolumeApi:
1740
1736
  )
1741
1737
 
1742
1738
 
1739
+
1740
+
1741
+ @validate_call
1742
+ def update_volume(
1743
+ self,
1744
+ volume_id: StrictInt,
1745
+ payload: UpdateVolumePayload,
1746
+ _request_timeout: Union[
1747
+ None,
1748
+ Annotated[StrictFloat, Field(gt=0)],
1749
+ Tuple[
1750
+ Annotated[StrictFloat, Field(gt=0)],
1751
+ Annotated[StrictFloat, Field(gt=0)]
1752
+ ]
1753
+ ] = None,
1754
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1755
+ _content_type: Optional[StrictStr] = None,
1756
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1757
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1758
+ ) -> UpdateVolumeResponse:
1759
+ """Update volume fields
1760
+
1761
+ Update volume properties. Currently supports updating the environment by providing 'environment_name'. The volume must not be attached to any instance when changing environments, and the target environment must be in the same region.
1762
+
1763
+ :param volume_id: (required)
1764
+ :type volume_id: int
1765
+ :param payload: (required)
1766
+ :type payload: UpdateVolumePayload
1767
+ :param _request_timeout: timeout setting for this request. If one
1768
+ number provided, it will be total request
1769
+ timeout. It can also be a pair (tuple) of
1770
+ (connection, read) timeouts.
1771
+ :type _request_timeout: int, tuple(int, int), optional
1772
+ :param _request_auth: set to override the auth_settings for an a single
1773
+ request; this effectively ignores the
1774
+ authentication in the spec for a single request.
1775
+ :type _request_auth: dict, optional
1776
+ :param _content_type: force content-type for the request.
1777
+ :type _content_type: str, Optional
1778
+ :param _headers: set to override the headers for a single
1779
+ request; this effectively ignores the headers
1780
+ in the spec for a single request.
1781
+ :type _headers: dict, optional
1782
+ :param _host_index: set to override the host_index for a single
1783
+ request; this effectively ignores the host_index
1784
+ in the spec for a single request.
1785
+ :type _host_index: int, optional
1786
+ :return: Returns the result object.
1787
+ """ # noqa: E501
1788
+
1789
+ _param = self._update_volume_serialize(
1790
+ volume_id=volume_id,
1791
+ payload=payload,
1792
+ _request_auth=_request_auth,
1793
+ _content_type=_content_type,
1794
+ _headers=_headers,
1795
+ _host_index=_host_index
1796
+ )
1797
+
1798
+ _response_types_map: Dict[str, Optional[str]] = {
1799
+ '200': "UpdateVolumeResponse",
1800
+ '400': "ErrorResponseModel",
1801
+ '401': "ErrorResponseModel",
1802
+ '404': "ErrorResponseModel",
1803
+ '409': "ErrorResponseModel",
1804
+ '500': None,
1805
+ }
1806
+ response_data = self.api_client.call_api(
1807
+ *_param,
1808
+ _request_timeout=_request_timeout
1809
+ )
1810
+ response_data.read()
1811
+ return self.api_client.response_deserialize(
1812
+ response_data=response_data,
1813
+ response_types_map=_response_types_map,
1814
+ ).data
1815
+
1816
+
1817
+ @validate_call
1818
+ def update_volume_with_http_info(
1819
+ self,
1820
+ volume_id: StrictInt,
1821
+ payload: UpdateVolumePayload,
1822
+ _request_timeout: Union[
1823
+ None,
1824
+ Annotated[StrictFloat, Field(gt=0)],
1825
+ Tuple[
1826
+ Annotated[StrictFloat, Field(gt=0)],
1827
+ Annotated[StrictFloat, Field(gt=0)]
1828
+ ]
1829
+ ] = None,
1830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1831
+ _content_type: Optional[StrictStr] = None,
1832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1834
+ ) -> ApiResponse[UpdateVolumeResponse]:
1835
+ """Update volume fields
1836
+
1837
+ Update volume properties. Currently supports updating the environment by providing 'environment_name'. The volume must not be attached to any instance when changing environments, and the target environment must be in the same region.
1838
+
1839
+ :param volume_id: (required)
1840
+ :type volume_id: int
1841
+ :param payload: (required)
1842
+ :type payload: UpdateVolumePayload
1843
+ :param _request_timeout: timeout setting for this request. If one
1844
+ number provided, it will be total request
1845
+ timeout. It can also be a pair (tuple) of
1846
+ (connection, read) timeouts.
1847
+ :type _request_timeout: int, tuple(int, int), optional
1848
+ :param _request_auth: set to override the auth_settings for an a single
1849
+ request; this effectively ignores the
1850
+ authentication in the spec for a single request.
1851
+ :type _request_auth: dict, optional
1852
+ :param _content_type: force content-type for the request.
1853
+ :type _content_type: str, Optional
1854
+ :param _headers: set to override the headers for a single
1855
+ request; this effectively ignores the headers
1856
+ in the spec for a single request.
1857
+ :type _headers: dict, optional
1858
+ :param _host_index: set to override the host_index for a single
1859
+ request; this effectively ignores the host_index
1860
+ in the spec for a single request.
1861
+ :type _host_index: int, optional
1862
+ :return: Returns the result object.
1863
+ """ # noqa: E501
1864
+
1865
+ _param = self._update_volume_serialize(
1866
+ volume_id=volume_id,
1867
+ payload=payload,
1868
+ _request_auth=_request_auth,
1869
+ _content_type=_content_type,
1870
+ _headers=_headers,
1871
+ _host_index=_host_index
1872
+ )
1873
+
1874
+ _response_types_map: Dict[str, Optional[str]] = {
1875
+ '200': "UpdateVolumeResponse",
1876
+ '400': "ErrorResponseModel",
1877
+ '401': "ErrorResponseModel",
1878
+ '404': "ErrorResponseModel",
1879
+ '409': "ErrorResponseModel",
1880
+ '500': None,
1881
+ }
1882
+ response_data = self.api_client.call_api(
1883
+ *_param,
1884
+ _request_timeout=_request_timeout
1885
+ )
1886
+ response_data.read()
1887
+ return self.api_client.response_deserialize(
1888
+ response_data=response_data,
1889
+ response_types_map=_response_types_map,
1890
+ )
1891
+
1892
+
1893
+ @validate_call
1894
+ def update_volume_without_preload_content(
1895
+ self,
1896
+ volume_id: StrictInt,
1897
+ payload: UpdateVolumePayload,
1898
+ _request_timeout: Union[
1899
+ None,
1900
+ Annotated[StrictFloat, Field(gt=0)],
1901
+ Tuple[
1902
+ Annotated[StrictFloat, Field(gt=0)],
1903
+ Annotated[StrictFloat, Field(gt=0)]
1904
+ ]
1905
+ ] = None,
1906
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1907
+ _content_type: Optional[StrictStr] = None,
1908
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1909
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1910
+ ) -> RESTResponseType:
1911
+ """Update volume fields
1912
+
1913
+ Update volume properties. Currently supports updating the environment by providing 'environment_name'. The volume must not be attached to any instance when changing environments, and the target environment must be in the same region.
1914
+
1915
+ :param volume_id: (required)
1916
+ :type volume_id: int
1917
+ :param payload: (required)
1918
+ :type payload: UpdateVolumePayload
1919
+ :param _request_timeout: timeout setting for this request. If one
1920
+ number provided, it will be total request
1921
+ timeout. It can also be a pair (tuple) of
1922
+ (connection, read) timeouts.
1923
+ :type _request_timeout: int, tuple(int, int), optional
1924
+ :param _request_auth: set to override the auth_settings for an a single
1925
+ request; this effectively ignores the
1926
+ authentication in the spec for a single request.
1927
+ :type _request_auth: dict, optional
1928
+ :param _content_type: force content-type for the request.
1929
+ :type _content_type: str, Optional
1930
+ :param _headers: set to override the headers for a single
1931
+ request; this effectively ignores the headers
1932
+ in the spec for a single request.
1933
+ :type _headers: dict, optional
1934
+ :param _host_index: set to override the host_index for a single
1935
+ request; this effectively ignores the host_index
1936
+ in the spec for a single request.
1937
+ :type _host_index: int, optional
1938
+ :return: Returns the result object.
1939
+ """ # noqa: E501
1940
+
1941
+ _param = self._update_volume_serialize(
1942
+ volume_id=volume_id,
1943
+ payload=payload,
1944
+ _request_auth=_request_auth,
1945
+ _content_type=_content_type,
1946
+ _headers=_headers,
1947
+ _host_index=_host_index
1948
+ )
1949
+
1950
+ _response_types_map: Dict[str, Optional[str]] = {
1951
+ '200': "UpdateVolumeResponse",
1952
+ '400': "ErrorResponseModel",
1953
+ '401': "ErrorResponseModel",
1954
+ '404': "ErrorResponseModel",
1955
+ '409': "ErrorResponseModel",
1956
+ '500': None,
1957
+ }
1958
+ response_data = self.api_client.call_api(
1959
+ *_param,
1960
+ _request_timeout=_request_timeout
1961
+ )
1962
+ return response_data.response
1963
+
1964
+
1965
+ def _update_volume_serialize(
1966
+ self,
1967
+ volume_id,
1968
+ payload,
1969
+ _request_auth,
1970
+ _content_type,
1971
+ _headers,
1972
+ _host_index,
1973
+ ) -> RequestSerialized:
1974
+
1975
+ _host = None
1976
+
1977
+ _collection_formats: Dict[str, str] = {
1978
+ }
1979
+
1980
+ _path_params: Dict[str, str] = {}
1981
+ _query_params: List[Tuple[str, str]] = []
1982
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1983
+ _form_params: List[Tuple[str, str]] = []
1984
+ _files: Dict[
1985
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1986
+ ] = {}
1987
+ _body_params: Optional[bytes] = None
1988
+
1989
+ # process the path parameters
1990
+ if volume_id is not None:
1991
+ _path_params['volume_id'] = volume_id
1992
+ # process the query parameters
1993
+ # process the header parameters
1994
+ # process the form parameters
1995
+ # process the body parameter
1996
+ if payload is not None:
1997
+ _body_params = payload
1998
+
1999
+
2000
+ # set the HTTP header `Accept`
2001
+ if 'Accept' not in _header_params:
2002
+ _header_params['Accept'] = self.api_client.select_header_accept(
2003
+ [
2004
+ 'application/json'
2005
+ ]
2006
+ )
2007
+
2008
+ # set the HTTP header `Content-Type`
2009
+ if _content_type:
2010
+ _header_params['Content-Type'] = _content_type
2011
+ else:
2012
+ _default_content_type = (
2013
+ self.api_client.select_header_content_type(
2014
+ [
2015
+ 'application/json'
2016
+ ]
2017
+ )
2018
+ )
2019
+ if _default_content_type is not None:
2020
+ _header_params['Content-Type'] = _default_content_type
2021
+
2022
+ # authentication setting
2023
+ _auth_settings: List[str] = [
2024
+ 'apiKey'
2025
+ ]
2026
+
2027
+ return self.api_client.param_serialize(
2028
+ method='PATCH',
2029
+ resource_path='/core/volumes/{volume_id}',
2030
+ path_params=_path_params,
2031
+ query_params=_query_params,
2032
+ header_params=_header_params,
2033
+ body=_body_params,
2034
+ post_params=_form_params,
2035
+ files=_files,
2036
+ auth_settings=_auth_settings,
2037
+ collection_formats=_collection_formats,
2038
+ _host=_host,
2039
+ _request_auth=_request_auth
2040
+ )
2041
+
2042
+