@nexgencloud/hyperstack-sdk-javascript 1.25.0-alpha → 1.48.0-alpha

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 (420) hide show
  1. package/README.md +268 -245
  2. package/dist/ApiClient.js +2 -7
  3. package/dist/api/AccessKeysApi.js +168 -0
  4. package/dist/api/AliveApi.js +33 -2
  5. package/dist/api/ApiKeyApi.js +33 -33
  6. package/dist/api/AssigningMemberRoleApi.js +20 -20
  7. package/dist/api/AuthApi.js +146 -6
  8. package/dist/api/BetaAccessApi.js +161 -0
  9. package/dist/api/BillingApi.js +1394 -465
  10. package/dist/api/BucketsApi.js +180 -0
  11. package/dist/api/CalculateApi.js +9 -9
  12. package/dist/api/CallbacksApi.js +87 -87
  13. package/dist/api/ClusterEventsApi.js +8 -8
  14. package/dist/api/ClustersApi.js +531 -23
  15. package/dist/api/ComplianceApi.js +24 -24
  16. package/dist/api/CreditApi.js +13 -11
  17. package/dist/api/CustomerContractApi.js +71 -71
  18. package/dist/api/DashboardApi.js +9 -9
  19. package/dist/api/DeploymentApi.js +11 -11
  20. package/dist/api/EnvironmentApi.js +83 -41
  21. package/dist/api/FIPExclusionsApi.js +85 -0
  22. package/dist/api/FirewallAttachmentApi.js +11 -9
  23. package/dist/api/FirewallsApi.js +82 -82
  24. package/dist/api/FlavorApi.js +4 -4
  25. package/dist/api/FloatingIpApi.js +31 -31
  26. package/dist/api/GpuApi.js +7 -7
  27. package/dist/api/HealthApi.js +76 -0
  28. package/dist/api/ImageApi.js +25 -25
  29. package/dist/api/InviteApi.js +53 -12
  30. package/dist/api/KeypairApi.js +17 -17
  31. package/dist/api/OrganizationApi.js +10 -10
  32. package/dist/api/PartnerConfigApi.js +117 -0
  33. package/dist/api/PaymentApi.js +66 -21
  34. package/dist/api/PermissionApi.js +4 -4
  35. package/dist/api/PolicyApi.js +4 -4
  36. package/dist/api/PricebookApi.js +9 -7
  37. package/dist/api/ProfileApi.js +43 -43
  38. package/dist/api/RbacRoleApi.js +46 -46
  39. package/dist/api/RegionApi.js +6 -6
  40. package/dist/api/RegionsApi.js +76 -0
  41. package/dist/api/SecurityRulesApi.js +2 -2
  42. package/dist/api/SnapshotEventsApi.js +8 -8
  43. package/dist/api/SnapshotsApi.js +73 -73
  44. package/dist/api/StockApi.js +9 -9
  45. package/dist/api/TemplateApi.js +50 -50
  46. package/dist/api/UserApi.js +53 -47
  47. package/dist/api/UserDetailChoiceApi.js +9 -9
  48. package/dist/api/UserPermissionApi.js +7 -7
  49. package/dist/api/VirtualMachineApi.js +464 -355
  50. package/dist/api/VirtualMachineEventsApi.js +16 -16
  51. package/dist/api/VncUrlApi.js +32 -28
  52. package/dist/api/VolumeApi.js +108 -59
  53. package/dist/api/VolumeAttachmentApi.js +79 -33
  54. package/dist/api/VouchersApi.js +86 -0
  55. package/dist/index.js +525 -714
  56. package/dist/model/{EnvironmentFieldsforVolume.js → AccessTokenField.js} +23 -23
  57. package/dist/model/AddUserInfoSuccessResponseModel.js +1 -1
  58. package/dist/model/AllocatedGPUCountGraph.js +1 -1
  59. package/dist/model/ApiKeyFields.js +1 -1
  60. package/dist/model/AssignRbacRolePayload.js +1 -1
  61. package/dist/model/AttachCallbackPayload.js +1 -1
  62. package/dist/model/AttachCallbackResponse.js +1 -1
  63. package/dist/model/AttachFirewallWithVM.js +1 -1
  64. package/dist/model/AttachFirewallsToVMPayload.js +1 -1
  65. package/dist/model/AttachVolumeFields.js +21 -1
  66. package/dist/model/AttachVolumes.js +1 -1
  67. package/dist/model/AttachVolumesPayload.js +13 -2
  68. package/dist/model/{InternalVolumeAttachmentFields.js → AttachmentsFieldsForVolume.js} +39 -37
  69. package/dist/model/{VirtualMachineUsage.js → Attributes.js} +68 -34
  70. package/dist/model/AuthGetTokenResponseModel.js +5 -13
  71. package/dist/model/AuthUserFields.js +1 -1
  72. package/dist/model/AuthUserInfoResponseModel.js +1 -1
  73. package/dist/model/{FlavorVMFields.js → BetaAccessRequestFields.js} +68 -50
  74. package/dist/model/BetaAccessRequestPayload.js +122 -0
  75. package/dist/model/{CreateDiscountResponse.js → BetaAccessRequestResponseModel.js} +27 -27
  76. package/dist/model/{Creditrequests.js → BetaAccessStatusItem.js} +57 -42
  77. package/dist/model/{VolumesLastStatusChangeResponse.js → BetaAccessStatusResponseModel.js} +38 -37
  78. package/dist/model/BillingHistory.js +99 -0
  79. package/dist/model/{WarningMailLogResponse.js → BillingHistoryDataSynthesisDetails.js} +48 -43
  80. package/dist/model/{VMUsageResponse.js → BillingHistoryFineTuning.js} +46 -41
  81. package/dist/model/BillingHistoryModelEvalutationDetails.js +143 -0
  82. package/dist/model/{ContractEligibleInstancesResponse.js → BillingHistoryServerlessInference.js} +48 -43
  83. package/dist/model/{GetAllDiscountForAllOrganizationResponse.js → BillingHistoryServerlessInferenceDetails.js} +52 -39
  84. package/dist/model/{Billingmetricesfields.js → BillingMetricesFields.js} +28 -28
  85. package/dist/model/{Billingmetricesresponse.js → BillingMetricesResponse.js} +24 -24
  86. package/dist/model/ClusterEvents.js +1 -1
  87. package/dist/model/ClusterEventsFields.js +1 -1
  88. package/dist/model/ClusterFields.js +76 -13
  89. package/dist/model/{FlavorPayload.js → ClusterFlavorFields.js} +74 -74
  90. package/dist/model/ClusterListResponse.js +1 -1
  91. package/dist/model/{InternalSecurityRulesFieldsForInstance.js → ClusterNodeFields.js} +76 -58
  92. package/dist/model/{InternalInstanceKeypairFields.js → ClusterNodeGroupFields.js} +65 -43
  93. package/dist/model/{StockVisibilityUserListResponse.js → ClusterNodeGroupsCreateResponse.js} +46 -32
  94. package/dist/model/{CreateUpdatePolicyResponseModel.js → ClusterNodeGroupsGetResponse.js} +27 -27
  95. package/dist/model/{InternalInstancesResponse.js → ClusterNodeGroupsListResponse.js} +36 -36
  96. package/dist/model/{ContractEligibleInstanceFields.js → ClusterNodeInstanceFields.js} +53 -45
  97. package/dist/model/{ImageLogos.js → ClusterNodesListResponse.js} +36 -36
  98. package/dist/model/ClusterResponse.js +1 -1
  99. package/dist/model/{GetVersionResponse.js → ClusterVersion.js} +54 -30
  100. package/dist/model/ClusterVersions.js +27 -6
  101. package/dist/model/Colors.js +105 -0
  102. package/dist/model/CommonResponseModel.js +1 -1
  103. package/dist/model/ComplianceFields.js +1 -1
  104. package/dist/model/ComplianceModelFields.js +1 -1
  105. package/dist/model/CompliancePayload.js +1 -1
  106. package/dist/model/ComplianceResponse.js +1 -1
  107. package/dist/model/ContainerOverviewFields.js +1 -1
  108. package/dist/model/Contract.js +1 -1
  109. package/dist/model/ContractDiscountPlanFields.js +9 -1
  110. package/dist/model/ContractGPUAllocationGraphResponse.js +1 -1
  111. package/dist/model/ContractInstanceFields.js +15 -1
  112. package/dist/model/ContractInstancesResponse.js +1 -1
  113. package/dist/model/{ApiKeyVerifyFields.js → CreateClusterNodeFields.js} +48 -38
  114. package/dist/model/{CreateUpdatePolicyPayload.js → CreateClusterNodeGroupPayload.js} +72 -44
  115. package/dist/model/CreateClusterPayload.js +74 -22
  116. package/dist/model/CreateEnvironment.js +3 -3
  117. package/dist/model/CreateFirewallPayload.js +1 -1
  118. package/dist/model/CreateFirewallRulePayload.js +1 -1
  119. package/dist/model/CreateImage.js +1 -1
  120. package/dist/model/CreateImagePayload.js +1 -1
  121. package/dist/model/CreateInstancesPayload.js +11 -11
  122. package/dist/model/CreateInstancesResponse.js +1 -1
  123. package/dist/model/CreateProfilePayload.js +3 -3
  124. package/dist/model/CreateProfileResponse.js +1 -1
  125. package/dist/model/CreateSecurityRulePayload.js +1 -1
  126. package/dist/model/CreateSnapshotPayload.js +5 -16
  127. package/dist/model/CreateSnapshotResponse.js +1 -1
  128. package/dist/model/CreateUpdateComplianceResponse.js +1 -1
  129. package/dist/model/CreateUpdateRbacRolePayload.js +1 -1
  130. package/dist/model/CreateVolumePayload.js +3 -3
  131. package/dist/model/CustomerContractDetailResponseModel.js +1 -1
  132. package/dist/model/CustomerContractFields.js +1 -1
  133. package/dist/model/DashboardInfoResponse.js +1 -1
  134. package/dist/model/{ContractBillingHistoryResponseModel.js → DataSynthesisBillingHistoryDetailsResponseSchema.js} +29 -27
  135. package/dist/model/{ContractlBillingHistoryResponseMetrics.js → DeleteClusterNodesFields.js} +25 -21
  136. package/dist/model/DeploymentFields.js +1 -1
  137. package/dist/model/{DeploymentFieldsforstartdeployments.js → DeploymentFieldsForStartDeployments.js} +24 -24
  138. package/dist/model/Deployments.js +1 -1
  139. package/dist/model/DetachVolumes.js +1 -1
  140. package/dist/model/DetachVolumesPayload.js +1 -1
  141. package/dist/model/{EditlabelofanexistingVMPayload.js → EditLabelOfAnExistingVMPayload.js} +18 -18
  142. package/dist/model/Environment.js +1 -1
  143. package/dist/model/EnvironmentFeatures.js +36 -1
  144. package/dist/model/EnvironmentFields.js +1 -1
  145. package/dist/model/{InternalEnvironmentFields.js → EnvironmentFieldsForVolume.js} +23 -31
  146. package/dist/model/Environments.js +1 -1
  147. package/dist/model/ErrorResponseModel.js +1 -1
  148. package/dist/model/FirewallAttachmentModel.js +1 -1
  149. package/dist/model/FirewallAttachmentVMModel.js +1 -1
  150. package/dist/model/FirewallDetailFields.js +1 -1
  151. package/dist/model/FirewallDetailResponse.js +1 -1
  152. package/dist/model/FirewallEnvironmentFields.js +1 -1
  153. package/dist/model/FirewallFields.js +1 -1
  154. package/dist/model/FirewallResponse.js +1 -1
  155. package/dist/model/FirewallRule.js +1 -1
  156. package/dist/model/FirewallsListResponse.js +1 -1
  157. package/dist/model/FlavorFields.js +9 -1
  158. package/dist/model/FlavorItemGetResponse.js +1 -1
  159. package/dist/model/{CustomerFields.js → FlavorLabelFields.js} +26 -24
  160. package/dist/model/FlavorListResponse.js +1 -1
  161. package/dist/model/FlavorObjectFields.js +1 -1
  162. package/dist/model/GPUFields.js +1 -1
  163. package/dist/model/GPUList.js +1 -1
  164. package/dist/model/GPURegionFields.js +1 -1
  165. package/dist/model/GenerateUpdateApiKeyPayload.js +1 -1
  166. package/dist/model/GenerateUpdateApiKeyResponseModel.js +1 -1
  167. package/dist/model/GetApiKeysResponseModel.js +1 -1
  168. package/dist/model/{Getcreditandthresholdinfo.js → GetCreditAndThresholdInfo.js} +20 -20
  169. package/dist/model/{Getcreditandthresholdinfoinresponse.js → GetCreditAndThresholdInfoInResponse.js} +24 -24
  170. package/dist/model/GetCustomerContractsListResponseModel.js +1 -1
  171. package/dist/model/GetInstanceLogsResponse.js +89 -0
  172. package/dist/model/GetInvitesResponseModel.js +1 -1
  173. package/dist/model/GetOrganizationResponseModel.js +1 -1
  174. package/dist/model/GetPermissionsResponseModel.js +1 -1
  175. package/dist/model/GetPoliciesResponseModel.js +1 -1
  176. package/dist/model/GetRbacRolesResponseModel.js +1 -1
  177. package/dist/model/GetUserPermissionsResponseModel.js +1 -1
  178. package/dist/model/GraphDatetimeValueModel.js +1 -1
  179. package/dist/model/Image.js +1 -1
  180. package/dist/model/ImageFields.js +1 -1
  181. package/dist/model/ImageGetResponse.js +1 -1
  182. package/dist/model/Images.js +1 -1
  183. package/dist/model/ImportKeypairPayload.js +1 -1
  184. package/dist/model/ImportKeypairResponse.js +1 -1
  185. package/dist/model/InfrahubResourceObjectResponseForCustomer.js +1 -1
  186. package/dist/model/Instance.js +1 -1
  187. package/dist/model/InstanceEnvironmentFields.js +1 -1
  188. package/dist/model/InstanceEvents.js +1 -1
  189. package/dist/model/InstanceEventsFields.js +1 -1
  190. package/dist/model/InstanceFields.js +21 -5
  191. package/dist/model/InstanceFlavorFields.js +42 -1
  192. package/dist/model/InstanceImageFields.js +1 -1
  193. package/dist/model/InstanceKeypairFields.js +1 -1
  194. package/dist/model/InstanceOverviewFields.js +1 -1
  195. package/dist/model/InstanceResizePayload.js +1 -1
  196. package/dist/model/Instances.js +1 -1
  197. package/dist/model/InviteFields.js +1 -1
  198. package/dist/model/InviteUserPayload.js +1 -1
  199. package/dist/model/InviteUserResponseModel.js +1 -1
  200. package/dist/model/KeypairEnvironmentFeatures.js +120 -0
  201. package/dist/model/{InternalVolumeFields.js → KeypairEnvironmentFields.js} +41 -39
  202. package/dist/model/KeypairFields.js +8 -6
  203. package/dist/model/Keypairs.js +1 -1
  204. package/dist/model/LableResonse.js +1 -1
  205. package/dist/model/{Lastdaycostfields.js → LastDayCostFields.js} +21 -21
  206. package/dist/model/{Lastdaycostresponse.js → LastDayCostResponse.js} +24 -24
  207. package/dist/model/{TokenFields.js → Logos.js} +47 -35
  208. package/dist/model/{LogoutPayload.js → MFAStatusFields.js} +27 -30
  209. package/dist/model/{GPU.js → MFAStatusResponse.js} +31 -31
  210. package/dist/model/{VerifyApiKeyResponseModel.js → ManualReconciliationModel.js} +33 -29
  211. package/dist/model/{Creditrequestresponse.js → MasterFlavorsResponse.js} +30 -30
  212. package/dist/model/MetricItemFields.js +1 -1
  213. package/dist/model/MetricsFields.js +1 -1
  214. package/dist/model/ModelEvaluationBillingHistoryDetailsResponseSchema.js +113 -0
  215. package/dist/model/NameAvailableModel.js +1 -1
  216. package/dist/model/NewConfigurationsResponse.js +1 -1
  217. package/dist/model/NewModelResponse.js +1 -1
  218. package/dist/model/NewStockResponse.js +1 -1
  219. package/dist/model/NewStockRetriveResponse.js +1 -1
  220. package/dist/model/ObjectStorageAccessKeyCreateRequest.js +117 -0
  221. package/dist/model/{FutureNodeModel.js → ObjectStorageAccessKeyCreateResponse.js} +70 -66
  222. package/dist/model/{ContractChangePayload.js → ObjectStorageAccessKeyListResponse.js} +44 -64
  223. package/dist/model/{FutureNodeUpdateModel.js → ObjectStorageAccessKeyResponse.js} +60 -51
  224. package/dist/model/{SetDefaultsPayload.js → ObjectStorageBucketListResponse.js} +53 -37
  225. package/dist/model/{CreateUpdatePermissionPayload.js → ObjectStorageBucketResponse.js} +75 -49
  226. package/dist/model/{PowerUsageModel.js → ObjectStorageDeleteResponse.js} +28 -38
  227. package/dist/model/{ContractEventCreateModel.js → ObjectStorageErrorResponse.js} +40 -47
  228. package/dist/model/{VerifyApiKeyPayload.js → ObjectStorageHealthResponse.js} +28 -29
  229. package/dist/model/{SingleVisibilityUserResponse.js → ObjectStoragePaginationMeta.js} +38 -38
  230. package/dist/model/{CreateGPU.js → ObjectStorageRegionListResponse.js} +46 -53
  231. package/dist/model/{RegionPayload.js → ObjectStorageRegionResponse.js} +20 -32
  232. package/dist/model/ObjectStorageRegionsEnum.js +53 -0
  233. package/dist/model/OrganizationFields.js +1 -1
  234. package/dist/model/OrganizationLevelBillingHistory.js +1 -1
  235. package/dist/model/OrganizationLevelBillingHistoryResources.js +1 -1
  236. package/dist/model/OrganizationLevelBillingHistoryResponseAttributes.js +1 -1
  237. package/dist/model/OrganizationLevelBillingHistoryResponseMetrics.js +1 -1
  238. package/dist/model/OrganizationLevelBillingHistoryResponseModel.js +1 -1
  239. package/dist/model/{OrganizationThresholdfields.js → OrganizationThresholdFields.js} +22 -22
  240. package/dist/model/{Organizationthresholdupdateresponse.js → OrganizationThresholdUpdateResponse.js} +24 -24
  241. package/dist/model/{Organizationthresholdsresponse.js → OrganizationThresholdsResponse.js} +24 -24
  242. package/dist/model/OrganizationUserResponseModel.js +1 -1
  243. package/dist/model/OverviewInfo.js +1 -1
  244. package/dist/model/Pagination.js +104 -0
  245. package/dist/model/PaginationData.js +1 -1
  246. package/dist/model/PartnerConfig.js +192 -0
  247. package/dist/model/PaymentDetailsFields.js +21 -1
  248. package/dist/model/PaymentDetailsResponse.js +1 -1
  249. package/dist/model/PaymentInitiateFields.js +1 -1
  250. package/dist/model/PaymentInitiatePayload.js +1 -1
  251. package/dist/model/PaymentInitiateResponse.js +1 -1
  252. package/dist/model/PermissionFields.js +1 -1
  253. package/dist/model/PolicyFields.js +1 -1
  254. package/dist/model/PolicyPermissionFields.js +1 -1
  255. package/dist/model/PricebookModel.js +1 -1
  256. package/dist/model/PricebookResourceObjectResponseForCustomer.js +1 -1
  257. package/dist/model/{NewStockUpdateResponseModel.js → PrimaryColor.js} +31 -27
  258. package/dist/model/ProfileFields.js +1 -1
  259. package/dist/model/ProfileListResponse.js +1 -1
  260. package/dist/model/ProfileObjectFields.js +1 -1
  261. package/dist/model/RbacRoleDetailResponseModel.js +1 -1
  262. package/dist/model/RbacRoleDetailResponseModelFixed.js +1 -1
  263. package/dist/model/RbacRoleField.js +1 -1
  264. package/dist/model/RbacRoleFields.js +1 -1
  265. package/dist/model/{CustomerPayload.js → RedeemVoucherPayload.js} +29 -38
  266. package/dist/model/RegionFields.js +49 -1
  267. package/dist/model/Regions.js +1 -1
  268. package/dist/model/RemoveMemberFromOrganizationResponseModel.js +1 -1
  269. package/dist/model/RemoveMemberPayload.js +1 -1
  270. package/dist/model/RequestConsole.js +1 -1
  271. package/dist/model/{ExcludeBillingPostResponse.js → RequestInstanceLogsPayload.js} +22 -27
  272. package/dist/model/RequestInstanceLogsResponse.js +85 -0
  273. package/dist/model/ResourceBillingEventsHistoryMetrics.js +1 -1
  274. package/dist/model/ResourceBillingEventsHistoryResponse.js +1 -1
  275. package/dist/model/ResourceBillingResponseForCustomer.js +1 -1
  276. package/dist/model/{ContractBillingHistory.js → ResourceLevelBillingBucketDetailsResources.js} +27 -27
  277. package/dist/model/ResourceLevelBillingDetailsAttributes.js +1 -1
  278. package/dist/model/ResourceLevelBillingDetailsMetrics.js +1 -1
  279. package/dist/model/ResourceLevelBillingDetailsVM.js +1 -1
  280. package/dist/model/ResourceLevelBillingDetailsVolume.js +1 -1
  281. package/dist/model/ResourceLevelBillingDetailsVolumeAttributes.js +1 -1
  282. package/dist/model/ResourceLevelBillingDetailsVolumeMetrics.js +1 -1
  283. package/dist/model/ResourceLevelBillingHistory.js +1 -1
  284. package/dist/model/ResourceLevelBillingHistoryResources.js +1 -1
  285. package/dist/model/{NodeResponseModel.js → ResourceLevelBillingHistoryResourcesCluster.js} +47 -31
  286. package/dist/model/ResourceLevelBillingHistoryResponseAttributes.js +9 -1
  287. package/dist/model/ResourceLevelBillingHistoryResponseMetrics.js +1 -1
  288. package/dist/model/ResourceLevelBillingVMDetailsResources.js +1 -1
  289. package/dist/model/ResourceLevelBillingVolumeDetailsResources.js +1 -1
  290. package/dist/model/{AuthRequestLoginResponseModel.js → ResourceLevelBucketBillingDetailsResponseModel.js} +27 -27
  291. package/dist/model/{CreateUpdatePermissionResponseModel.js → ResourceLevelBucketBillingHistoryResponseModel.js} +31 -31
  292. package/dist/model/ResourceLevelClusterBillingDetailsResponseModel.js +111 -0
  293. package/dist/model/ResourceLevelClusterBillingHistoryResponseModel.js +111 -0
  294. package/dist/model/ResourceLevelClusterGraphBillingDetailsResponseModel.js +111 -0
  295. package/dist/model/ResourceLevelGraphBillingDetailVolume.js +1 -1
  296. package/dist/model/ResourceLevelGraphBillingDetailsAttributes.js +1 -1
  297. package/dist/model/{OrganizationObjectResponse.js → ResourceLevelGraphBillingDetailsBucket.js} +45 -29
  298. package/dist/model/ResourceLevelGraphBillingDetailsMetrics.js +1 -1
  299. package/dist/model/ResourceLevelGraphBillingDetailsVM.js +1 -1
  300. package/dist/model/ResourceLevelGraphBillingVMDetailsResources.js +1 -1
  301. package/dist/model/ResourceLevelGraphBillingVolumeDetailsResources.js +1 -1
  302. package/dist/model/ResourceLevelVMBillingDetailsResponseModel.js +1 -1
  303. package/dist/model/ResourceLevelVmBillingHistoryResponseModel.js +1 -1
  304. package/dist/model/ResourceLevelVmGraphBillingDetailsResponseModel.js +1 -1
  305. package/dist/model/ResourceLevelVolumeBillingDetailsResponseModel.js +1 -1
  306. package/dist/model/ResourceLevelVolumeBillingHistoryResponseModel.js +1 -1
  307. package/dist/model/ResourceLevelVolumeGraphBillingDetailsResponseModel.js +1 -1
  308. package/dist/model/ResourceObjectResponseForCustomer.js +1 -1
  309. package/dist/model/ResponseModel.js +1 -1
  310. package/dist/model/RolePermissionFields.js +1 -1
  311. package/dist/model/RolePolicyFields.js +1 -1
  312. package/dist/model/{Data.js → SecondaryColor.js} +31 -38
  313. package/dist/model/SecurityGroupRule.js +1 -1
  314. package/dist/model/SecurityGroupRuleFields.js +1 -1
  315. package/dist/model/{SecurityRulesFieldsforInstance.js → SecurityRulesFieldsForInstance.js} +26 -26
  316. package/dist/model/SecurityRulesProtocolFields.js +1 -1
  317. package/dist/model/{Organizationcreditrechargelimitresponse.js → ServerlessInferencedBillingHistoryDetailsResponseSchema.js} +29 -27
  318. package/dist/model/SnapshotFields.js +27 -5
  319. package/dist/model/SnapshotRestoreRequest.js +1 -1
  320. package/dist/model/SnapshotRetrieve.js +1 -1
  321. package/dist/model/SnapshotRetrieveFields.js +170 -5
  322. package/dist/model/Snapshots.js +1 -1
  323. package/dist/model/StartDeployment.js +5 -5
  324. package/dist/model/StartDeploymentPayload.js +1 -1
  325. package/dist/model/SubResourceGraphBillingDetailsMetrics.js +1 -1
  326. package/dist/model/SubResourcesCostsResponseModel.js +1 -1
  327. package/dist/model/SubResourcesGraphBillingHistoryFields.js +1 -1
  328. package/dist/model/SubResourcesGraphResponseModel.js +1 -1
  329. package/dist/model/{Subscribeorunsubscribeupdatepayload.js → SubscribeOrUnsubscribeUpdatePayload.js} +20 -20
  330. package/dist/model/Template.js +1 -1
  331. package/dist/model/TemplateFields.js +1 -1
  332. package/dist/model/Templates.js +1 -1
  333. package/dist/model/TokenBasedBillingHistoryResponse.js +113 -0
  334. package/dist/model/URIs.js +161 -0
  335. package/dist/model/UpdateClusterNodeGroupPayload.js +93 -0
  336. package/dist/model/UpdateEnvironment.js +1 -1
  337. package/dist/model/UpdateKeypairName.js +1 -1
  338. package/dist/model/{UpdateKeypairnameresponse.js → UpdateKeypairNameResponse.js} +20 -20
  339. package/dist/model/UpdateOrganizationPayload.js +1 -1
  340. package/dist/model/UpdateOrganizationResponseModel.js +1 -1
  341. package/dist/model/UpdateTemplate.js +1 -1
  342. package/dist/model/UpdateVolumeAttachmentPayload.js +85 -0
  343. package/dist/model/{UserTransferPayload.js → UpdateVolumePayload.js} +29 -38
  344. package/dist/model/{FlavorResponse.js → UpdateVolumeResponse.js} +41 -32
  345. package/dist/model/UserDefaultChoiceForUserFields.js +1 -1
  346. package/dist/model/UserDefaultChoicesForUserResponse.js +1 -1
  347. package/dist/model/{Userinfopostpayload.js → UserInfoPostPayload.js} +30 -30
  348. package/dist/model/{FutureNodesStockModel.js → UserOrganizationsResponse.js} +28 -28
  349. package/dist/model/UserPermissionFields.js +1 -1
  350. package/dist/model/UsersInfoFields.js +13 -1
  351. package/dist/model/UsersInfoListResponse.js +1 -1
  352. package/dist/model/VNCURL.js +1 -1
  353. package/dist/model/VNCURLFields.js +1 -1
  354. package/dist/model/Volume.js +1 -1
  355. package/dist/model/VolumeAttachmentFields.js +21 -5
  356. package/dist/model/VolumeFields.js +38 -5
  357. package/dist/model/{VolumeFieldsforInstance.js → VolumeFieldsForInstance.js} +23 -23
  358. package/dist/model/VolumeOverviewFields.js +1 -1
  359. package/dist/model/VolumeTypes.js +1 -1
  360. package/dist/model/Volumes.js +36 -12
  361. package/dist/model/{InfrahubResourceObjectResponse.js → VolumesFields.js} +95 -85
  362. package/dist/model/{FutureNodeStockModel.js → Voucher.js} +44 -33
  363. package/dist/model/{Creditrechargelimitresponse.js → VoucherRedeemResponseSchema.js} +56 -47
  364. package/dist/model/WorkloadBillingHistoryResponse.js +113 -0
  365. package/package.json +1 -1
  366. package/dist/model/AddUpdateFlavorOrganizationPayload.js +0 -242
  367. package/dist/model/AuthRequestLoginFields.js +0 -101
  368. package/dist/model/BillingImmuneResourcesResponse.js +0 -111
  369. package/dist/model/BillingResponse.js +0 -130
  370. package/dist/model/ContractBillingHistoryResponseAttributes.js +0 -149
  371. package/dist/model/ContractResourcePayload.js +0 -146
  372. package/dist/model/CreateContractFields.js +0 -170
  373. package/dist/model/CreateContractPayload.js +0 -178
  374. package/dist/model/CreateDiscountsPayload.js +0 -192
  375. package/dist/model/Creditrechargelimitfield.js +0 -109
  376. package/dist/model/DiscountEntityModel.js +0 -122
  377. package/dist/model/DiscountFields.js +0 -149
  378. package/dist/model/DiscountPlanFields.js +0 -181
  379. package/dist/model/DiscountResourceFields.js +0 -113
  380. package/dist/model/DiscountResourcePayload.js +0 -142
  381. package/dist/model/ExcludeBillingPostPayload.js +0 -135
  382. package/dist/model/ExportBillingDataRequest.js +0 -186
  383. package/dist/model/ExportBillingDataResponse.js +0 -101
  384. package/dist/model/FieldChange.js +0 -116
  385. package/dist/model/FlavorVMsResponse.js +0 -130
  386. package/dist/model/FutureNodeResponseModel.js +0 -122
  387. package/dist/model/GetAllContractFields.js +0 -137
  388. package/dist/model/GetAllContractsResponseModel.js +0 -130
  389. package/dist/model/GetAllDiscountsFields.js +0 -158
  390. package/dist/model/GetDiscountDetailResponse.js +0 -111
  391. package/dist/model/GetDiscountResponse.js +0 -130
  392. package/dist/model/GetEntityDiscountDetailResponse.js +0 -159
  393. package/dist/model/GetTokenPayload.js +0 -126
  394. package/dist/model/HistoricalInstance.js +0 -138
  395. package/dist/model/HistoricalInstancesFields.js +0 -201
  396. package/dist/model/InsertDiscountPlanFields.js +0 -168
  397. package/dist/model/InstancesSummaryFields.js +0 -249
  398. package/dist/model/InternalInstanceFields.js +0 -344
  399. package/dist/model/InternalInstanceFlavorFields.js +0 -161
  400. package/dist/model/InternalInstanceImageFields.js +0 -133
  401. package/dist/model/InternalVolumesResponse.js +0 -130
  402. package/dist/model/LogoGetResponse.js +0 -109
  403. package/dist/model/NodeModel.js +0 -230
  404. package/dist/model/NodePayloadModel.js +0 -122
  405. package/dist/model/NodePowerUsageModel.js +0 -244
  406. package/dist/model/NodeStockPayloadModel.js +0 -110
  407. package/dist/model/NodeStockResponseModel.js +0 -110
  408. package/dist/model/NodeStocksPayload.js +0 -144
  409. package/dist/model/PricebookResourceObjectResponse.js +0 -173
  410. package/dist/model/RefreshTokenPayload.js +0 -126
  411. package/dist/model/RegionResponse.js +0 -111
  412. package/dist/model/StockVisibilityUserPayload.js +0 -112
  413. package/dist/model/SuccessResponseModel.js +0 -100
  414. package/dist/model/UpdateContractPayload.js +0 -168
  415. package/dist/model/UpdateDiscountsPayload.js +0 -160
  416. package/dist/model/UpdateDiscountsStatusPayload.js +0 -112
  417. package/dist/model/UpdateGPU.js +0 -114
  418. package/dist/model/VMUsageRequestPayload.js +0 -113
  419. package/dist/model/VolumeStatusChangeFields.js +0 -125
  420. package/dist/model/WarningMailLogFields.js +0 -149
@@ -12,13 +12,16 @@ var _CreateInstancesResponse = _interopRequireDefault(require("../model/CreateIn
12
12
  var _CreateSecurityRulePayload = _interopRequireDefault(require("../model/CreateSecurityRulePayload"));
13
13
  var _CreateSnapshotPayload = _interopRequireDefault(require("../model/CreateSnapshotPayload"));
14
14
  var _CreateSnapshotResponse = _interopRequireDefault(require("../model/CreateSnapshotResponse"));
15
- var _EditlabelofanexistingVMPayload = _interopRequireDefault(require("../model/EditlabelofanexistingVMPayload"));
15
+ var _EditLabelOfAnExistingVMPayload = _interopRequireDefault(require("../model/EditLabelOfAnExistingVMPayload"));
16
16
  var _ErrorResponseModel = _interopRequireDefault(require("../model/ErrorResponseModel"));
17
+ var _GetInstanceLogsResponse = _interopRequireDefault(require("../model/GetInstanceLogsResponse"));
17
18
  var _Instance = _interopRequireDefault(require("../model/Instance"));
18
19
  var _InstanceResizePayload = _interopRequireDefault(require("../model/InstanceResizePayload"));
19
20
  var _Instances = _interopRequireDefault(require("../model/Instances"));
20
21
  var _MetricsFields = _interopRequireDefault(require("../model/MetricsFields"));
21
22
  var _NameAvailableModel = _interopRequireDefault(require("../model/NameAvailableModel"));
23
+ var _RequestInstanceLogsPayload = _interopRequireDefault(require("../model/RequestInstanceLogsPayload"));
24
+ var _RequestInstanceLogsResponse = _interopRequireDefault(require("../model/RequestInstanceLogsResponse"));
22
25
  var _ResponseModel = _interopRequireDefault(require("../model/ResponseModel"));
23
26
  var _SecurityGroupRule = _interopRequireDefault(require("../model/SecurityGroupRule"));
24
27
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -42,7 +45,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
42
45
  /**
43
46
  * VirtualMachine service.
44
47
  * @module api/VirtualMachineApi
45
- * @version v1.25.0-alpha
48
+ * @version v1.48.0-alpha
46
49
  */
47
50
  var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
48
51
  /**
@@ -58,48 +61,48 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
58
61
  }
59
62
 
60
63
  /**
61
- * Add firewall rule to virtual machine
62
- * Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
63
- * @param {Number} id
64
- * @param {module:model/CreateSecurityRulePayload} payload
65
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SecurityGroupRule} and HTTP response
64
+ * Edit virtual machine labels
65
+ * Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
66
+ * @param {Number} vmId
67
+ * @param {module:model/EditLabelOfAnExistingVMPayload} payload
68
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
66
69
  */
67
70
  return _createClass(VirtualMachineApi, [{
68
- key: "addFirewallRuleToVirtualMachineWithHttpInfo",
69
- value: function addFirewallRuleToVirtualMachineWithHttpInfo(id, payload) {
71
+ key: "addVMLabelWithHttpInfo",
72
+ value: function addVMLabelWithHttpInfo(vmId, payload) {
70
73
  var postBody = payload;
71
- // verify the required parameter 'id' is set
72
- if (id === undefined || id === null) {
73
- throw new Error("Missing the required parameter 'id' when calling addFirewallRuleToVirtualMachine");
74
+ // verify the required parameter 'vmId' is set
75
+ if (vmId === undefined || vmId === null) {
76
+ throw new Error("Missing the required parameter 'vmId' when calling addVMLabel");
74
77
  }
75
78
  // verify the required parameter 'payload' is set
76
79
  if (payload === undefined || payload === null) {
77
- throw new Error("Missing the required parameter 'payload' when calling addFirewallRuleToVirtualMachine");
80
+ throw new Error("Missing the required parameter 'payload' when calling addVMLabel");
78
81
  }
79
82
  var pathParams = {
80
- 'id': id
83
+ 'vm_id': vmId
81
84
  };
82
85
  var queryParams = {};
83
86
  var headerParams = {};
84
87
  var formParams = {};
85
- var authNames = ['apiKey', 'accessToken'];
88
+ var authNames = ['apiKey'];
86
89
  var contentTypes = ['application/json'];
87
90
  var accepts = ['application/json'];
88
- var returnType = _SecurityGroupRule["default"];
89
- return this.apiClient.callApi('/core/virtual-machines/{id}/sg-rules', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
91
+ var returnType = _ResponseModel["default"];
92
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/label', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
90
93
  }
91
94
 
92
95
  /**
93
- * Add firewall rule to virtual machine
94
- * Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
95
- * @param {Number} id
96
- * @param {module:model/CreateSecurityRulePayload} payload
97
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SecurityGroupRule}
96
+ * Edit virtual machine labels
97
+ * Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
98
+ * @param {Number} vmId
99
+ * @param {module:model/EditLabelOfAnExistingVMPayload} payload
100
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
98
101
  */
99
102
  }, {
100
- key: "addFirewallRuleToVirtualMachine",
101
- value: function addFirewallRuleToVirtualMachine(id, payload) {
102
- return this.addFirewallRuleToVirtualMachineWithHttpInfo(id, payload).then(function (response_and_data) {
103
+ key: "addVMLabel",
104
+ value: function addVMLabel(vmId, payload) {
105
+ return this.addVMLabelWithHttpInfo(vmId, payload).then(function (response_and_data) {
103
106
  return response_and_data.data;
104
107
  });
105
108
  }
@@ -112,16 +115,16 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
112
115
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
113
116
  */
114
117
  }, {
115
- key: "attachFirewallsToAVirtualMachineWithHttpInfo",
116
- value: function attachFirewallsToAVirtualMachineWithHttpInfo(vmId, payload) {
118
+ key: "attachFirewallsToVMWithHttpInfo",
119
+ value: function attachFirewallsToVMWithHttpInfo(vmId, payload) {
117
120
  var postBody = payload;
118
121
  // verify the required parameter 'vmId' is set
119
122
  if (vmId === undefined || vmId === null) {
120
- throw new Error("Missing the required parameter 'vmId' when calling attachFirewallsToAVirtualMachine");
123
+ throw new Error("Missing the required parameter 'vmId' when calling attachFirewallsToVM");
121
124
  }
122
125
  // verify the required parameter 'payload' is set
123
126
  if (payload === undefined || payload === null) {
124
- throw new Error("Missing the required parameter 'payload' when calling attachFirewallsToAVirtualMachine");
127
+ throw new Error("Missing the required parameter 'payload' when calling attachFirewallsToVM");
125
128
  }
126
129
  var pathParams = {
127
130
  'vm_id': vmId
@@ -129,7 +132,7 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
129
132
  var queryParams = {};
130
133
  var headerParams = {};
131
134
  var formParams = {};
132
- var authNames = ['apiKey', 'accessToken'];
135
+ var authNames = ['apiKey'];
133
136
  var contentTypes = ['application/json'];
134
137
  var accepts = ['application/json'];
135
138
  var returnType = _ResponseModel["default"];
@@ -144,9 +147,97 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
144
147
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
145
148
  */
146
149
  }, {
147
- key: "attachFirewallsToAVirtualMachine",
148
- value: function attachFirewallsToAVirtualMachine(vmId, payload) {
149
- return this.attachFirewallsToAVirtualMachineWithHttpInfo(vmId, payload).then(function (response_and_data) {
150
+ key: "attachFirewallsToVM",
151
+ value: function attachFirewallsToVM(vmId, payload) {
152
+ return this.attachFirewallsToVMWithHttpInfo(vmId, payload).then(function (response_and_data) {
153
+ return response_and_data.data;
154
+ });
155
+ }
156
+
157
+ /**
158
+ * Fetch virtual machine name availability
159
+ * Check if a Virtual Machine name is available
160
+ * @param {String} name
161
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NameAvailableModel} and HTTP response
162
+ */
163
+ }, {
164
+ key: "checkVMNameAvailabilityWithHttpInfo",
165
+ value: function checkVMNameAvailabilityWithHttpInfo(name) {
166
+ var postBody = null;
167
+ // verify the required parameter 'name' is set
168
+ if (name === undefined || name === null) {
169
+ throw new Error("Missing the required parameter 'name' when calling checkVMNameAvailability");
170
+ }
171
+ var pathParams = {
172
+ 'name': name
173
+ };
174
+ var queryParams = {};
175
+ var headerParams = {};
176
+ var formParams = {};
177
+ var authNames = ['apiKey'];
178
+ var contentTypes = [];
179
+ var accepts = ['application/json'];
180
+ var returnType = _NameAvailableModel["default"];
181
+ return this.apiClient.callApi('/core/virtual-machines/name-availability/{name}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
182
+ }
183
+
184
+ /**
185
+ * Fetch virtual machine name availability
186
+ * Check if a Virtual Machine name is available
187
+ * @param {String} name
188
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NameAvailableModel}
189
+ */
190
+ }, {
191
+ key: "checkVMNameAvailability",
192
+ value: function checkVMNameAvailability(name) {
193
+ return this.checkVMNameAvailabilityWithHttpInfo(name).then(function (response_and_data) {
194
+ return response_and_data.data;
195
+ });
196
+ }
197
+
198
+ /**
199
+ * Add firewall rule to virtual machine
200
+ * Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
201
+ * @param {Number} vmId
202
+ * @param {module:model/CreateSecurityRulePayload} payload
203
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SecurityGroupRule} and HTTP response
204
+ */
205
+ }, {
206
+ key: "createFirewallRuleForVMWithHttpInfo",
207
+ value: function createFirewallRuleForVMWithHttpInfo(vmId, payload) {
208
+ var postBody = payload;
209
+ // verify the required parameter 'vmId' is set
210
+ if (vmId === undefined || vmId === null) {
211
+ throw new Error("Missing the required parameter 'vmId' when calling createFirewallRuleForVM");
212
+ }
213
+ // verify the required parameter 'payload' is set
214
+ if (payload === undefined || payload === null) {
215
+ throw new Error("Missing the required parameter 'payload' when calling createFirewallRuleForVM");
216
+ }
217
+ var pathParams = {
218
+ 'vm_id': vmId
219
+ };
220
+ var queryParams = {};
221
+ var headerParams = {};
222
+ var formParams = {};
223
+ var authNames = ['apiKey'];
224
+ var contentTypes = ['application/json'];
225
+ var accepts = ['application/json'];
226
+ var returnType = _SecurityGroupRule["default"];
227
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/sg-rules', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
228
+ }
229
+
230
+ /**
231
+ * Add firewall rule to virtual machine
232
+ * Creates a firewall rule for a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://docs.hyperstack.cloud/docs/api-reference/core-resources/virtual-machines/vm-firewall-rules/add-firewall-rule-to-vm).
233
+ * @param {Number} vmId
234
+ * @param {module:model/CreateSecurityRulePayload} payload
235
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SecurityGroupRule}
236
+ */
237
+ }, {
238
+ key: "createFirewallRuleForVM",
239
+ value: function createFirewallRuleForVM(vmId, payload) {
240
+ return this.createFirewallRuleForVMWithHttpInfo(vmId, payload).then(function (response_and_data) {
150
241
  return response_and_data.data;
151
242
  });
152
243
  }
@@ -159,16 +250,16 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
159
250
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateSnapshotResponse} and HTTP response
160
251
  */
161
252
  }, {
162
- key: "createSnapshotFromAVirtualMachineWithHttpInfo",
163
- value: function createSnapshotFromAVirtualMachineWithHttpInfo(vmId, payload) {
253
+ key: "createSnapshotForVMWithHttpInfo",
254
+ value: function createSnapshotForVMWithHttpInfo(vmId, payload) {
164
255
  var postBody = payload;
165
256
  // verify the required parameter 'vmId' is set
166
257
  if (vmId === undefined || vmId === null) {
167
- throw new Error("Missing the required parameter 'vmId' when calling createSnapshotFromAVirtualMachine");
258
+ throw new Error("Missing the required parameter 'vmId' when calling createSnapshotForVM");
168
259
  }
169
260
  // verify the required parameter 'payload' is set
170
261
  if (payload === undefined || payload === null) {
171
- throw new Error("Missing the required parameter 'payload' when calling createSnapshotFromAVirtualMachine");
262
+ throw new Error("Missing the required parameter 'payload' when calling createSnapshotForVM");
172
263
  }
173
264
  var pathParams = {
174
265
  'vm_id': vmId
@@ -176,7 +267,7 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
176
267
  var queryParams = {};
177
268
  var headerParams = {};
178
269
  var formParams = {};
179
- var authNames = ['apiKey', 'accessToken'];
270
+ var authNames = ['apiKey'];
180
271
  var contentTypes = ['application/json'];
181
272
  var accepts = ['application/json'];
182
273
  var returnType = _CreateSnapshotResponse["default"];
@@ -191,32 +282,32 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
191
282
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateSnapshotResponse}
192
283
  */
193
284
  }, {
194
- key: "createSnapshotFromAVirtualMachine",
195
- value: function createSnapshotFromAVirtualMachine(vmId, payload) {
196
- return this.createSnapshotFromAVirtualMachineWithHttpInfo(vmId, payload).then(function (response_and_data) {
285
+ key: "createSnapshotForVM",
286
+ value: function createSnapshotForVM(vmId, payload) {
287
+ return this.createSnapshotForVMWithHttpInfo(vmId, payload).then(function (response_and_data) {
197
288
  return response_and_data.data;
198
289
  });
199
290
  }
200
291
 
201
292
  /**
202
293
  * Create virtual machines
203
- * Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
294
+ * Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://docs.hyperstack.cloud/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
204
295
  * @param {module:model/CreateInstancesPayload} payload
205
296
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateInstancesResponse} and HTTP response
206
297
  */
207
298
  }, {
208
- key: "createVirtualMachinesWithHttpInfo",
209
- value: function createVirtualMachinesWithHttpInfo(payload) {
299
+ key: "createVMsWithHttpInfo",
300
+ value: function createVMsWithHttpInfo(payload) {
210
301
  var postBody = payload;
211
302
  // verify the required parameter 'payload' is set
212
303
  if (payload === undefined || payload === null) {
213
- throw new Error("Missing the required parameter 'payload' when calling createVirtualMachines");
304
+ throw new Error("Missing the required parameter 'payload' when calling createVMs");
214
305
  }
215
306
  var pathParams = {};
216
307
  var queryParams = {};
217
308
  var headerParams = {};
218
309
  var formParams = {};
219
- var authNames = ['apiKey', 'accessToken'];
310
+ var authNames = ['apiKey'];
220
311
  var contentTypes = ['application/json'];
221
312
  var accepts = ['application/json'];
222
313
  var returnType = _CreateInstancesResponse["default"];
@@ -225,14 +316,14 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
225
316
 
226
317
  /**
227
318
  * Create virtual machines
228
- * Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
319
+ * Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://docs.hyperstack.cloud/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).
229
320
  * @param {module:model/CreateInstancesPayload} payload
230
321
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateInstancesResponse}
231
322
  */
232
323
  }, {
233
- key: "createVirtualMachines",
234
- value: function createVirtualMachines(payload) {
235
- return this.createVirtualMachinesWithHttpInfo(payload).then(function (response_and_data) {
324
+ key: "createVMs",
325
+ value: function createVMs(payload) {
326
+ return this.createVMsWithHttpInfo(payload).then(function (response_and_data) {
236
327
  return response_and_data.data;
237
328
  });
238
329
  }
@@ -240,47 +331,47 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
240
331
  /**
241
332
  * Delete firewall rule from virtual machine
242
333
  * Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.
243
- * @param {Number} virtualMachineId
334
+ * @param {Number} vmId
244
335
  * @param {Number} sgRuleId
245
336
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
246
337
  */
247
338
  }, {
248
- key: "deleteFirewallRuleFromVirtualMachineWithHttpInfo",
249
- value: function deleteFirewallRuleFromVirtualMachineWithHttpInfo(virtualMachineId, sgRuleId) {
339
+ key: "deleteFirewallRuleForVMWithHttpInfo",
340
+ value: function deleteFirewallRuleForVMWithHttpInfo(vmId, sgRuleId) {
250
341
  var postBody = null;
251
- // verify the required parameter 'virtualMachineId' is set
252
- if (virtualMachineId === undefined || virtualMachineId === null) {
253
- throw new Error("Missing the required parameter 'virtualMachineId' when calling deleteFirewallRuleFromVirtualMachine");
342
+ // verify the required parameter 'vmId' is set
343
+ if (vmId === undefined || vmId === null) {
344
+ throw new Error("Missing the required parameter 'vmId' when calling deleteFirewallRuleForVM");
254
345
  }
255
346
  // verify the required parameter 'sgRuleId' is set
256
347
  if (sgRuleId === undefined || sgRuleId === null) {
257
- throw new Error("Missing the required parameter 'sgRuleId' when calling deleteFirewallRuleFromVirtualMachine");
348
+ throw new Error("Missing the required parameter 'sgRuleId' when calling deleteFirewallRuleForVM");
258
349
  }
259
350
  var pathParams = {
260
- 'virtual_machine_id': virtualMachineId,
351
+ 'vm_id': vmId,
261
352
  'sg_rule_id': sgRuleId
262
353
  };
263
354
  var queryParams = {};
264
355
  var headerParams = {};
265
356
  var formParams = {};
266
- var authNames = ['apiKey', 'accessToken'];
357
+ var authNames = ['apiKey'];
267
358
  var contentTypes = [];
268
359
  var accepts = ['application/json'];
269
360
  var returnType = _ResponseModel["default"];
270
- return this.apiClient.callApi('/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
361
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/sg-rules/{sg_rule_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
271
362
  }
272
363
 
273
364
  /**
274
365
  * Delete firewall rule from virtual machine
275
366
  * Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.
276
- * @param {Number} virtualMachineId
367
+ * @param {Number} vmId
277
368
  * @param {Number} sgRuleId
278
369
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
279
370
  */
280
371
  }, {
281
- key: "deleteFirewallRuleFromVirtualMachine",
282
- value: function deleteFirewallRuleFromVirtualMachine(virtualMachineId, sgRuleId) {
283
- return this.deleteFirewallRuleFromVirtualMachineWithHttpInfo(virtualMachineId, sgRuleId).then(function (response_and_data) {
372
+ key: "deleteFirewallRuleForVM",
373
+ value: function deleteFirewallRuleForVM(vmId, sgRuleId) {
374
+ return this.deleteFirewallRuleForVMWithHttpInfo(vmId, sgRuleId).then(function (response_and_data) {
284
375
  return response_and_data.data;
285
376
  });
286
377
  }
@@ -288,128 +379,232 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
288
379
  /**
289
380
  * Delete virtual machine
290
381
  * Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
291
- * @param {Number} id
382
+ * @param {Number} vmId
292
383
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
293
384
  */
294
385
  }, {
295
- key: "deleteVirtualMachineWithHttpInfo",
296
- value: function deleteVirtualMachineWithHttpInfo(id) {
386
+ key: "deleteVMWithHttpInfo",
387
+ value: function deleteVMWithHttpInfo(vmId) {
297
388
  var postBody = null;
298
- // verify the required parameter 'id' is set
299
- if (id === undefined || id === null) {
300
- throw new Error("Missing the required parameter 'id' when calling deleteVirtualMachine");
389
+ // verify the required parameter 'vmId' is set
390
+ if (vmId === undefined || vmId === null) {
391
+ throw new Error("Missing the required parameter 'vmId' when calling deleteVM");
301
392
  }
302
393
  var pathParams = {
303
- 'id': id
394
+ 'vm_id': vmId
304
395
  };
305
396
  var queryParams = {};
306
397
  var headerParams = {};
307
398
  var formParams = {};
308
- var authNames = ['apiKey', 'accessToken'];
399
+ var authNames = ['apiKey'];
309
400
  var contentTypes = [];
310
401
  var accepts = ['application/json'];
311
402
  var returnType = _ResponseModel["default"];
312
- return this.apiClient.callApi('/core/virtual-machines/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
403
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
313
404
  }
314
405
 
315
406
  /**
316
407
  * Delete virtual machine
317
408
  * Permanently deletes a virtual machine. Provide the virtual machine ID in the path to delete the specified virtual machine.
318
- * @param {Number} id
409
+ * @param {Number} vmId
319
410
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
320
411
  */
321
412
  }, {
322
- key: "deleteVirtualMachine",
323
- value: function deleteVirtualMachine(id) {
324
- return this.deleteVirtualMachineWithHttpInfo(id).then(function (response_and_data) {
413
+ key: "deleteVM",
414
+ value: function deleteVM(vmId) {
415
+ return this.deleteVMWithHttpInfo(vmId).then(function (response_and_data) {
325
416
  return response_and_data.data;
326
417
  });
327
418
  }
328
419
 
329
420
  /**
330
- * Edit virtual machine labels
331
- * Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
332
- * @param {Number} virtualMachineId
333
- * @param {module:model/EditlabelofanexistingVMPayload} payload
334
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
421
+ * Retrieve virtual machines associated with a contract
422
+ * Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
423
+ * @param {Number} contractId
424
+ * @param {Object} opts Optional parameters
425
+ * @param {String} [page] Page Number
426
+ * @param {String} [pageSize] Data Per Page
427
+ * @param {String} [search] Search By Instance ID or Name
428
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ContractInstancesResponse} and HTTP response
335
429
  */
336
430
  }, {
337
- key: "editVirtualMachineLabelsWithHttpInfo",
338
- value: function editVirtualMachineLabelsWithHttpInfo(virtualMachineId, payload) {
339
- var postBody = payload;
340
- // verify the required parameter 'virtualMachineId' is set
341
- if (virtualMachineId === undefined || virtualMachineId === null) {
342
- throw new Error("Missing the required parameter 'virtualMachineId' when calling editVirtualMachineLabels");
431
+ key: "getContractVMsWithHttpInfo",
432
+ value: function getContractVMsWithHttpInfo(contractId, opts) {
433
+ opts = opts || {};
434
+ var postBody = null;
435
+ // verify the required parameter 'contractId' is set
436
+ if (contractId === undefined || contractId === null) {
437
+ throw new Error("Missing the required parameter 'contractId' when calling getContractVMs");
343
438
  }
344
- // verify the required parameter 'payload' is set
345
- if (payload === undefined || payload === null) {
346
- throw new Error("Missing the required parameter 'payload' when calling editVirtualMachineLabels");
439
+ var pathParams = {
440
+ 'contract_id': contractId
441
+ };
442
+ var queryParams = {
443
+ 'page': opts['page'],
444
+ 'pageSize': opts['pageSize'],
445
+ 'search': opts['search']
446
+ };
447
+ var headerParams = {};
448
+ var formParams = {};
449
+ var authNames = ['apiKey'];
450
+ var contentTypes = [];
451
+ var accepts = ['application/json'];
452
+ var returnType = _ContractInstancesResponse["default"];
453
+ return this.apiClient.callApi('/core/virtual-machines/contract/{contract_id}/virtual-machines', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
454
+ }
455
+
456
+ /**
457
+ * Retrieve virtual machines associated with a contract
458
+ * Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
459
+ * @param {Number} contractId
460
+ * @param {Object} opts Optional parameters
461
+ * @param {String} opts.page Page Number
462
+ * @param {String} opts.pageSize Data Per Page
463
+ * @param {String} opts.search Search By Instance ID or Name
464
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ContractInstancesResponse}
465
+ */
466
+ }, {
467
+ key: "getContractVMs",
468
+ value: function getContractVMs(contractId, opts) {
469
+ return this.getContractVMsWithHttpInfo(contractId, opts).then(function (response_and_data) {
470
+ return response_and_data.data;
471
+ });
472
+ }
473
+
474
+ /**
475
+ * Retrieve virtual machine details
476
+ * Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
477
+ * @param {Number} vmId
478
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Instance} and HTTP response
479
+ */
480
+ }, {
481
+ key: "getVMWithHttpInfo",
482
+ value: function getVMWithHttpInfo(vmId) {
483
+ var postBody = null;
484
+ // verify the required parameter 'vmId' is set
485
+ if (vmId === undefined || vmId === null) {
486
+ throw new Error("Missing the required parameter 'vmId' when calling getVM");
347
487
  }
348
488
  var pathParams = {
349
- 'virtual_machine_id': virtualMachineId
489
+ 'vm_id': vmId
350
490
  };
351
491
  var queryParams = {};
352
492
  var headerParams = {};
353
493
  var formParams = {};
354
- var authNames = ['apiKey', 'accessToken'];
355
- var contentTypes = ['application/json'];
494
+ var authNames = ['apiKey'];
495
+ var contentTypes = [];
356
496
  var accepts = ['application/json'];
357
- var returnType = _ResponseModel["default"];
358
- return this.apiClient.callApi('/core/virtual-machines/{virtual_machine_id}/label', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
497
+ var returnType = _Instance["default"];
498
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
359
499
  }
360
500
 
361
501
  /**
362
- * Edit virtual machine labels
363
- * Adds one or more labels to an existing virtual machine. Provide the virtual machine ID in the path to add labels to the specified VM. For multiple labels, add a space between each label in the request body.
364
- * @param {Number} virtualMachineId
365
- * @param {module:model/EditlabelofanexistingVMPayload} payload
366
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
502
+ * Retrieve virtual machine details
503
+ * Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
504
+ * @param {Number} vmId
505
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Instance}
367
506
  */
368
507
  }, {
369
- key: "editVirtualMachineLabels",
370
- value: function editVirtualMachineLabels(virtualMachineId, payload) {
371
- return this.editVirtualMachineLabelsWithHttpInfo(virtualMachineId, payload).then(function (response_and_data) {
508
+ key: "getVM",
509
+ value: function getVM(vmId) {
510
+ return this.getVMWithHttpInfo(vmId).then(function (response_and_data) {
372
511
  return response_and_data.data;
373
512
  });
374
513
  }
375
514
 
376
515
  /**
377
- * Fetch virtual machine name availability
378
- * Check if a Virtual Machine name is available
379
- * @param {String} name
380
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/NameAvailableModel} and HTTP response
516
+ * Get virtual machine logs
517
+ * Retrieve console logs for a virtual machine
518
+ * @param {Number} vmId
519
+ * @param {Number} requestId
520
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetInstanceLogsResponse} and HTTP response
381
521
  */
382
522
  }, {
383
- key: "fetchVirtualMachineNameAvailabilityWithHttpInfo",
384
- value: function fetchVirtualMachineNameAvailabilityWithHttpInfo(name) {
523
+ key: "getVMLogsWithHttpInfo",
524
+ value: function getVMLogsWithHttpInfo(vmId, requestId) {
385
525
  var postBody = null;
386
- // verify the required parameter 'name' is set
387
- if (name === undefined || name === null) {
388
- throw new Error("Missing the required parameter 'name' when calling fetchVirtualMachineNameAvailability");
526
+ // verify the required parameter 'vmId' is set
527
+ if (vmId === undefined || vmId === null) {
528
+ throw new Error("Missing the required parameter 'vmId' when calling getVMLogs");
529
+ }
530
+ // verify the required parameter 'requestId' is set
531
+ if (requestId === undefined || requestId === null) {
532
+ throw new Error("Missing the required parameter 'requestId' when calling getVMLogs");
389
533
  }
390
534
  var pathParams = {
391
- 'name': name
535
+ 'vm_id': vmId
536
+ };
537
+ var queryParams = {
538
+ 'request_id': requestId
392
539
  };
393
- var queryParams = {};
394
540
  var headerParams = {};
395
541
  var formParams = {};
396
- var authNames = ['apiKey', 'accessToken'];
542
+ var authNames = ['apiKey'];
397
543
  var contentTypes = [];
398
544
  var accepts = ['application/json'];
399
- var returnType = _NameAvailableModel["default"];
400
- return this.apiClient.callApi('/core/virtual-machines/name-availability/{name}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
545
+ var returnType = _GetInstanceLogsResponse["default"];
546
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/logs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
401
547
  }
402
548
 
403
549
  /**
404
- * Fetch virtual machine name availability
405
- * Check if a Virtual Machine name is available
406
- * @param {String} name
407
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/NameAvailableModel}
550
+ * Get virtual machine logs
551
+ * Retrieve console logs for a virtual machine
552
+ * @param {Number} vmId
553
+ * @param {Number} requestId
554
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetInstanceLogsResponse}
555
+ */
556
+ }, {
557
+ key: "getVMLogs",
558
+ value: function getVMLogs(vmId, requestId) {
559
+ return this.getVMLogsWithHttpInfo(vmId, requestId).then(function (response_and_data) {
560
+ return response_and_data.data;
561
+ });
562
+ }
563
+
564
+ /**
565
+ * Retrieve virtual machine performance metrics
566
+ * Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://docs.hyperstack.cloud/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
567
+ * @param {Number} vmId
568
+ * @param {Object} opts Optional parameters
569
+ * @param {module:model/String} [duration]
570
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MetricsFields} and HTTP response
571
+ */
572
+ }, {
573
+ key: "getVMMetricsWithHttpInfo",
574
+ value: function getVMMetricsWithHttpInfo(vmId, opts) {
575
+ opts = opts || {};
576
+ var postBody = null;
577
+ // verify the required parameter 'vmId' is set
578
+ if (vmId === undefined || vmId === null) {
579
+ throw new Error("Missing the required parameter 'vmId' when calling getVMMetrics");
580
+ }
581
+ var pathParams = {
582
+ 'vm_id': vmId
583
+ };
584
+ var queryParams = {
585
+ 'duration': opts['duration']
586
+ };
587
+ var headerParams = {};
588
+ var formParams = {};
589
+ var authNames = ['apiKey'];
590
+ var contentTypes = [];
591
+ var accepts = ['application/json'];
592
+ var returnType = _MetricsFields["default"];
593
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/metrics', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
594
+ }
595
+
596
+ /**
597
+ * Retrieve virtual machine performance metrics
598
+ * Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://docs.hyperstack.cloud/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
599
+ * @param {Number} vmId
600
+ * @param {Object} opts Optional parameters
601
+ * @param {module:model/String} opts.duration
602
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MetricsFields}
408
603
  */
409
604
  }, {
410
- key: "fetchVirtualMachineNameAvailability",
411
- value: function fetchVirtualMachineNameAvailability(name) {
412
- return this.fetchVirtualMachineNameAvailabilityWithHttpInfo(name).then(function (response_and_data) {
605
+ key: "getVMMetrics",
606
+ value: function getVMMetrics(vmId, opts) {
607
+ return this.getVMMetricsWithHttpInfo(vmId, opts).then(function (response_and_data) {
413
608
  return response_and_data.data;
414
609
  });
415
610
  }
@@ -417,40 +612,40 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
417
612
  /**
418
613
  * Hard reboot virtual machine
419
614
  * Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.
420
- * @param {Number} id
615
+ * @param {Number} vmId
421
616
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
422
617
  */
423
618
  }, {
424
- key: "hardRebootVirtualMachineWithHttpInfo",
425
- value: function hardRebootVirtualMachineWithHttpInfo(id) {
619
+ key: "hardRebootVMWithHttpInfo",
620
+ value: function hardRebootVMWithHttpInfo(vmId) {
426
621
  var postBody = null;
427
- // verify the required parameter 'id' is set
428
- if (id === undefined || id === null) {
429
- throw new Error("Missing the required parameter 'id' when calling hardRebootVirtualMachine");
622
+ // verify the required parameter 'vmId' is set
623
+ if (vmId === undefined || vmId === null) {
624
+ throw new Error("Missing the required parameter 'vmId' when calling hardRebootVM");
430
625
  }
431
626
  var pathParams = {
432
- 'id': id
627
+ 'vm_id': vmId
433
628
  };
434
629
  var queryParams = {};
435
630
  var headerParams = {};
436
631
  var formParams = {};
437
- var authNames = ['apiKey', 'accessToken'];
632
+ var authNames = ['apiKey'];
438
633
  var contentTypes = [];
439
634
  var accepts = ['application/json'];
440
635
  var returnType = _ResponseModel["default"];
441
- return this.apiClient.callApi('/core/virtual-machines/{id}/hard-reboot', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
636
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/hard-reboot', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
442
637
  }
443
638
 
444
639
  /**
445
640
  * Hard reboot virtual machine
446
641
  * Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.
447
- * @param {Number} id
642
+ * @param {Number} vmId
448
643
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
449
644
  */
450
645
  }, {
451
- key: "hardRebootVirtualMachine",
452
- value: function hardRebootVirtualMachine(id) {
453
- return this.hardRebootVirtualMachineWithHttpInfo(id).then(function (response_and_data) {
646
+ key: "hardRebootVM",
647
+ value: function hardRebootVM(vmId) {
648
+ return this.hardRebootVMWithHttpInfo(vmId).then(function (response_and_data) {
454
649
  return response_and_data.data;
455
650
  });
456
651
  }
@@ -458,40 +653,47 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
458
653
  /**
459
654
  * Hibernate virtual machine
460
655
  * Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.
461
- * @param {Number} virtualMachineId
656
+ * @param {Number} vmId
657
+ * @param {Object} opts Optional parameters
658
+ * @param {String} [retainIp] false
462
659
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
463
660
  */
464
661
  }, {
465
- key: "hibernateVirtualMachineWithHttpInfo",
466
- value: function hibernateVirtualMachineWithHttpInfo(virtualMachineId) {
662
+ key: "hibernateVMWithHttpInfo",
663
+ value: function hibernateVMWithHttpInfo(vmId, opts) {
664
+ opts = opts || {};
467
665
  var postBody = null;
468
- // verify the required parameter 'virtualMachineId' is set
469
- if (virtualMachineId === undefined || virtualMachineId === null) {
470
- throw new Error("Missing the required parameter 'virtualMachineId' when calling hibernateVirtualMachine");
666
+ // verify the required parameter 'vmId' is set
667
+ if (vmId === undefined || vmId === null) {
668
+ throw new Error("Missing the required parameter 'vmId' when calling hibernateVM");
471
669
  }
472
670
  var pathParams = {
473
- 'virtual_machine_id': virtualMachineId
671
+ 'vm_id': vmId
672
+ };
673
+ var queryParams = {
674
+ 'retain_ip': opts['retainIp']
474
675
  };
475
- var queryParams = {};
476
676
  var headerParams = {};
477
677
  var formParams = {};
478
- var authNames = ['apiKey', 'accessToken'];
678
+ var authNames = ['apiKey'];
479
679
  var contentTypes = [];
480
680
  var accepts = ['application/json'];
481
681
  var returnType = _ResponseModel["default"];
482
- return this.apiClient.callApi('/core/virtual-machines/{virtual_machine_id}/hibernate', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
682
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/hibernate', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
483
683
  }
484
684
 
485
685
  /**
486
686
  * Hibernate virtual machine
487
687
  * Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.
488
- * @param {Number} virtualMachineId
688
+ * @param {Number} vmId
689
+ * @param {Object} opts Optional parameters
690
+ * @param {String} opts.retainIp false
489
691
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
490
692
  */
491
693
  }, {
492
- key: "hibernateVirtualMachine",
493
- value: function hibernateVirtualMachine(virtualMachineId) {
494
- return this.hibernateVirtualMachineWithHttpInfo(virtualMachineId).then(function (response_and_data) {
694
+ key: "hibernateVM",
695
+ value: function hibernateVM(vmId, opts) {
696
+ return this.hibernateVMWithHttpInfo(vmId, opts).then(function (response_and_data) {
495
697
  return response_and_data.data;
496
698
  });
497
699
  }
@@ -500,15 +702,16 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
500
702
  * List virtual machines
501
703
  * Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.
502
704
  * @param {Object} opts Optional parameters
503
- * @param {String} [page] Page Number
504
- * @param {String} [pageSize] Data Per Page
705
+ * @param {Number} [page]
706
+ * @param {Number} [pageSize]
505
707
  * @param {String} [search]
506
- * @param {String} [environment] Filter Environment ID or Name
708
+ * @param {String} [environment]
709
+ * @param {Array.<Number>} [excludeFirewalls] Comma-separated list of Security Group IDs to ignore instances attached
507
710
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Instances} and HTTP response
508
711
  */
509
712
  }, {
510
- key: "listVirtualMachinesWithHttpInfo",
511
- value: function listVirtualMachinesWithHttpInfo(opts) {
713
+ key: "listVMsWithHttpInfo",
714
+ value: function listVMsWithHttpInfo(opts) {
512
715
  opts = opts || {};
513
716
  var postBody = null;
514
717
  var pathParams = {};
@@ -516,11 +719,12 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
516
719
  'page': opts['page'],
517
720
  'pageSize': opts['pageSize'],
518
721
  'search': opts['search'],
519
- 'environment': opts['environment']
722
+ 'environment': opts['environment'],
723
+ 'exclude_firewalls': this.apiClient.buildCollectionParam(opts['excludeFirewalls'], 'multi')
520
724
  };
521
725
  var headerParams = {};
522
726
  var formParams = {};
523
- var authNames = ['apiKey', 'accessToken'];
727
+ var authNames = ['apiKey'];
524
728
  var contentTypes = [];
525
729
  var accepts = ['application/json'];
526
730
  var returnType = _Instances["default"];
@@ -531,247 +735,152 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
531
735
  * List virtual machines
532
736
  * Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.
533
737
  * @param {Object} opts Optional parameters
534
- * @param {String} opts.page Page Number
535
- * @param {String} opts.pageSize Data Per Page
738
+ * @param {Number} opts.page
739
+ * @param {Number} opts.pageSize
536
740
  * @param {String} opts.search
537
- * @param {String} opts.environment Filter Environment ID or Name
741
+ * @param {String} opts.environment
742
+ * @param {Array.<Number>} opts.excludeFirewalls Comma-separated list of Security Group IDs to ignore instances attached
538
743
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Instances}
539
744
  */
540
745
  }, {
541
- key: "listVirtualMachines",
542
- value: function listVirtualMachines(opts) {
543
- return this.listVirtualMachinesWithHttpInfo(opts).then(function (response_and_data) {
746
+ key: "listVMs",
747
+ value: function listVMs(opts) {
748
+ return this.listVMsWithHttpInfo(opts).then(function (response_and_data) {
544
749
  return response_and_data.data;
545
750
  });
546
751
  }
547
752
 
548
753
  /**
549
- * Resize virtual machine
550
- * Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
551
- * @param {Number} virtualMachineId
552
- * @param {module:model/InstanceResizePayload} payload
553
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
754
+ * Request virtual machine logs
755
+ * Request console logs for a virtual machine
756
+ * @param {Number} vmId
757
+ * @param {module:model/RequestInstanceLogsPayload} payload
758
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RequestInstanceLogsResponse} and HTTP response
554
759
  */
555
760
  }, {
556
- key: "resizeVirtualMachineWithHttpInfo",
557
- value: function resizeVirtualMachineWithHttpInfo(virtualMachineId, payload) {
761
+ key: "requestVMLogsWithHttpInfo",
762
+ value: function requestVMLogsWithHttpInfo(vmId, payload) {
558
763
  var postBody = payload;
559
- // verify the required parameter 'virtualMachineId' is set
560
- if (virtualMachineId === undefined || virtualMachineId === null) {
561
- throw new Error("Missing the required parameter 'virtualMachineId' when calling resizeVirtualMachine");
764
+ // verify the required parameter 'vmId' is set
765
+ if (vmId === undefined || vmId === null) {
766
+ throw new Error("Missing the required parameter 'vmId' when calling requestVMLogs");
562
767
  }
563
768
  // verify the required parameter 'payload' is set
564
769
  if (payload === undefined || payload === null) {
565
- throw new Error("Missing the required parameter 'payload' when calling resizeVirtualMachine");
770
+ throw new Error("Missing the required parameter 'payload' when calling requestVMLogs");
566
771
  }
567
772
  var pathParams = {
568
- 'virtual_machine_id': virtualMachineId
773
+ 'vm_id': vmId
569
774
  };
570
775
  var queryParams = {};
571
776
  var headerParams = {};
572
777
  var formParams = {};
573
- var authNames = ['apiKey', 'accessToken'];
778
+ var authNames = ['apiKey'];
574
779
  var contentTypes = ['application/json'];
575
780
  var accepts = ['application/json'];
576
- var returnType = _ResponseModel["default"];
577
- return this.apiClient.callApi('/core/virtual-machines/{virtual_machine_id}/resize', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
781
+ var returnType = _RequestInstanceLogsResponse["default"];
782
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/logs', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
578
783
  }
579
784
 
580
785
  /**
581
- * Resize virtual machine
582
- * Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
583
- * @param {Number} virtualMachineId
584
- * @param {module:model/InstanceResizePayload} payload
585
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
786
+ * Request virtual machine logs
787
+ * Request console logs for a virtual machine
788
+ * @param {Number} vmId
789
+ * @param {module:model/RequestInstanceLogsPayload} payload
790
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RequestInstanceLogsResponse}
586
791
  */
587
792
  }, {
588
- key: "resizeVirtualMachine",
589
- value: function resizeVirtualMachine(virtualMachineId, payload) {
590
- return this.resizeVirtualMachineWithHttpInfo(virtualMachineId, payload).then(function (response_and_data) {
793
+ key: "requestVMLogs",
794
+ value: function requestVMLogs(vmId, payload) {
795
+ return this.requestVMLogsWithHttpInfo(vmId, payload).then(function (response_and_data) {
591
796
  return response_and_data.data;
592
797
  });
593
798
  }
594
799
 
595
800
  /**
596
- * Restore virtual machine from hibernation
597
- * Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.
598
- * @param {Number} virtualMachineId
801
+ * Resize virtual machine
802
+ * Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://docs.hyperstack.cloud/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
803
+ * @param {Number} vmId
804
+ * @param {module:model/InstanceResizePayload} payload
599
805
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
600
806
  */
601
807
  }, {
602
- key: "restoreVirtualMachineFromHibernationWithHttpInfo",
603
- value: function restoreVirtualMachineFromHibernationWithHttpInfo(virtualMachineId) {
604
- var postBody = null;
605
- // verify the required parameter 'virtualMachineId' is set
606
- if (virtualMachineId === undefined || virtualMachineId === null) {
607
- throw new Error("Missing the required parameter 'virtualMachineId' when calling restoreVirtualMachineFromHibernation");
808
+ key: "resizeVMWithHttpInfo",
809
+ value: function resizeVMWithHttpInfo(vmId, payload) {
810
+ var postBody = payload;
811
+ // verify the required parameter 'vmId' is set
812
+ if (vmId === undefined || vmId === null) {
813
+ throw new Error("Missing the required parameter 'vmId' when calling resizeVM");
814
+ }
815
+ // verify the required parameter 'payload' is set
816
+ if (payload === undefined || payload === null) {
817
+ throw new Error("Missing the required parameter 'payload' when calling resizeVM");
608
818
  }
609
819
  var pathParams = {
610
- 'virtual_machine_id': virtualMachineId
820
+ 'vm_id': vmId
611
821
  };
612
822
  var queryParams = {};
613
823
  var headerParams = {};
614
824
  var formParams = {};
615
- var authNames = ['apiKey', 'accessToken'];
616
- var contentTypes = [];
825
+ var authNames = ['apiKey'];
826
+ var contentTypes = ['application/json'];
617
827
  var accepts = ['application/json'];
618
828
  var returnType = _ResponseModel["default"];
619
- return this.apiClient.callApi('/core/virtual-machines/{virtual_machine_id}/hibernate-restore', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
829
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/resize', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
620
830
  }
621
831
 
622
832
  /**
623
- * Restore virtual machine from hibernation
624
- * Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.
625
- * @param {Number} virtualMachineId
833
+ * Resize virtual machine
834
+ * Updates the hardware configuration for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://docs.hyperstack.cloud/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).
835
+ * @param {Number} vmId
836
+ * @param {module:model/InstanceResizePayload} payload
626
837
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
627
838
  */
628
839
  }, {
629
- key: "restoreVirtualMachineFromHibernation",
630
- value: function restoreVirtualMachineFromHibernation(virtualMachineId) {
631
- return this.restoreVirtualMachineFromHibernationWithHttpInfo(virtualMachineId).then(function (response_and_data) {
840
+ key: "resizeVM",
841
+ value: function resizeVM(vmId, payload) {
842
+ return this.resizeVMWithHttpInfo(vmId, payload).then(function (response_and_data) {
632
843
  return response_and_data.data;
633
844
  });
634
845
  }
635
846
 
636
847
  /**
637
- * Retrieve virtual machine details
638
- * Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
639
- * @param {Number} id
640
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Instance} and HTTP response
848
+ * Restore virtual machine from hibernation
849
+ * Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
850
+ * @param {Number} vmId
851
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
641
852
  */
642
853
  }, {
643
- key: "retrieveVirtualMachineDetailsWithHttpInfo",
644
- value: function retrieveVirtualMachineDetailsWithHttpInfo(id) {
854
+ key: "restoreVMFromHibernationWithHttpInfo",
855
+ value: function restoreVMFromHibernationWithHttpInfo(vmId) {
645
856
  var postBody = null;
646
- // verify the required parameter 'id' is set
647
- if (id === undefined || id === null) {
648
- throw new Error("Missing the required parameter 'id' when calling retrieveVirtualMachineDetails");
857
+ // verify the required parameter 'vmId' is set
858
+ if (vmId === undefined || vmId === null) {
859
+ throw new Error("Missing the required parameter 'vmId' when calling restoreVMFromHibernation");
649
860
  }
650
861
  var pathParams = {
651
- 'id': id
862
+ 'vm_id': vmId
652
863
  };
653
864
  var queryParams = {};
654
865
  var headerParams = {};
655
866
  var formParams = {};
656
- var authNames = ['apiKey', 'accessToken'];
867
+ var authNames = ['apiKey'];
657
868
  var contentTypes = [];
658
869
  var accepts = ['application/json'];
659
- var returnType = _Instance["default"];
660
- return this.apiClient.callApi('/core/virtual-machines/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
661
- }
662
-
663
- /**
664
- * Retrieve virtual machine details
665
- * Retrieves the details of an existing virtual machine. Provide the virtual machine ID in the path, and Infrahub will return information about the corresponding VM.
666
- * @param {Number} id
667
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Instance}
668
- */
669
- }, {
670
- key: "retrieveVirtualMachineDetails",
671
- value: function retrieveVirtualMachineDetails(id) {
672
- return this.retrieveVirtualMachineDetailsWithHttpInfo(id).then(function (response_and_data) {
673
- return response_and_data.data;
674
- });
675
- }
676
-
677
- /**
678
- * Retrieve virtual machine performance metrics
679
- * Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
680
- * @param {Number} virtualMachineId
681
- * @param {Object} opts Optional parameters
682
- * @param {module:model/String} [duration]
683
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MetricsFields} and HTTP response
684
- */
685
- }, {
686
- key: "retrieveVirtualMachinePerformanceMetricsWithHttpInfo",
687
- value: function retrieveVirtualMachinePerformanceMetricsWithHttpInfo(virtualMachineId, opts) {
688
- opts = opts || {};
689
- var postBody = null;
690
- // verify the required parameter 'virtualMachineId' is set
691
- if (virtualMachineId === undefined || virtualMachineId === null) {
692
- throw new Error("Missing the required parameter 'virtualMachineId' when calling retrieveVirtualMachinePerformanceMetrics");
693
- }
694
- var pathParams = {
695
- 'virtual_machine_id': virtualMachineId
696
- };
697
- var queryParams = {
698
- 'duration': opts['duration']
699
- };
700
- var headerParams = {};
701
- var formParams = {};
702
- var authNames = ['apiKey', 'accessToken'];
703
- var contentTypes = [];
704
- var accepts = ['application/json'];
705
- var returnType = _MetricsFields["default"];
706
- return this.apiClient.callApi('/core/virtual-machines/{virtual_machine_id}/metrics', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
707
- }
708
-
709
- /**
710
- * Retrieve virtual machine performance metrics
711
- * Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).
712
- * @param {Number} virtualMachineId
713
- * @param {Object} opts Optional parameters
714
- * @param {module:model/String} opts.duration
715
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MetricsFields}
716
- */
717
- }, {
718
- key: "retrieveVirtualMachinePerformanceMetrics",
719
- value: function retrieveVirtualMachinePerformanceMetrics(virtualMachineId, opts) {
720
- return this.retrieveVirtualMachinePerformanceMetricsWithHttpInfo(virtualMachineId, opts).then(function (response_and_data) {
721
- return response_and_data.data;
722
- });
723
- }
724
-
725
- /**
726
- * Retrieve virtual machines associated with a contract
727
- * Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
728
- * @param {Number} contractId
729
- * @param {Object} opts Optional parameters
730
- * @param {String} [page] Page Number
731
- * @param {String} [pageSize] Data Per Page
732
- * @param {String} [search] Search By Instance ID or Name
733
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ContractInstancesResponse} and HTTP response
734
- */
735
- }, {
736
- key: "retrieveVirtualMachinesAssociatedWithAContractWithHttpInfo",
737
- value: function retrieveVirtualMachinesAssociatedWithAContractWithHttpInfo(contractId, opts) {
738
- opts = opts || {};
739
- var postBody = null;
740
- // verify the required parameter 'contractId' is set
741
- if (contractId === undefined || contractId === null) {
742
- throw new Error("Missing the required parameter 'contractId' when calling retrieveVirtualMachinesAssociatedWithAContract");
743
- }
744
- var pathParams = {
745
- 'contract_id': contractId
746
- };
747
- var queryParams = {
748
- 'page': opts['page'],
749
- 'pageSize': opts['pageSize'],
750
- 'search': opts['search']
751
- };
752
- var headerParams = {};
753
- var formParams = {};
754
- var authNames = ['apiKey', 'accessToken'];
755
- var contentTypes = [];
756
- var accepts = ['application/json'];
757
- var returnType = _ContractInstancesResponse["default"];
758
- return this.apiClient.callApi('/core/virtual-machines/contract/{contract_id}/virtual-machines', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
870
+ var returnType = _ResponseModel["default"];
871
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/hibernate-restore', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
759
872
  }
760
873
 
761
874
  /**
762
- * Retrieve virtual machines associated with a contract
763
- * Retrieves a list of virtual machines associated with a contract, providing details such as virtual machine name, timestamp, flavor name, and other relevant information. Please provide the ID of the relevant contract in the path.
764
- * @param {Number} contractId
765
- * @param {Object} opts Optional parameters
766
- * @param {String} opts.page Page Number
767
- * @param {String} opts.pageSize Data Per Page
768
- * @param {String} opts.search Search By Instance ID or Name
769
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ContractInstancesResponse}
875
+ * Restore virtual machine from hibernation
876
+ * Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID that you want to restore from hibernation.
877
+ * @param {Number} vmId
878
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
770
879
  */
771
880
  }, {
772
- key: "retrieveVirtualMachinesAssociatedWithAContract",
773
- value: function retrieveVirtualMachinesAssociatedWithAContract(contractId, opts) {
774
- return this.retrieveVirtualMachinesAssociatedWithAContractWithHttpInfo(contractId, opts).then(function (response_and_data) {
881
+ key: "restoreVMFromHibernation",
882
+ value: function restoreVMFromHibernation(vmId) {
883
+ return this.restoreVMFromHibernationWithHttpInfo(vmId).then(function (response_and_data) {
775
884
  return response_and_data.data;
776
885
  });
777
886
  }
@@ -779,40 +888,40 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
779
888
  /**
780
889
  * Start virtual machine
781
890
  * Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
782
- * @param {Number} id
891
+ * @param {Number} vmId
783
892
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
784
893
  */
785
894
  }, {
786
- key: "startVirtualMachineWithHttpInfo",
787
- value: function startVirtualMachineWithHttpInfo(id) {
895
+ key: "startVMWithHttpInfo",
896
+ value: function startVMWithHttpInfo(vmId) {
788
897
  var postBody = null;
789
- // verify the required parameter 'id' is set
790
- if (id === undefined || id === null) {
791
- throw new Error("Missing the required parameter 'id' when calling startVirtualMachine");
898
+ // verify the required parameter 'vmId' is set
899
+ if (vmId === undefined || vmId === null) {
900
+ throw new Error("Missing the required parameter 'vmId' when calling startVM");
792
901
  }
793
902
  var pathParams = {
794
- 'id': id
903
+ 'vm_id': vmId
795
904
  };
796
905
  var queryParams = {};
797
906
  var headerParams = {};
798
907
  var formParams = {};
799
- var authNames = ['apiKey', 'accessToken'];
908
+ var authNames = ['apiKey'];
800
909
  var contentTypes = [];
801
910
  var accepts = ['application/json'];
802
911
  var returnType = _ResponseModel["default"];
803
- return this.apiClient.callApi('/core/virtual-machines/{id}/start', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
912
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/start', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
804
913
  }
805
914
 
806
915
  /**
807
916
  * Start virtual machine
808
917
  * Initiates the startup of a virtual machine. Provide the virtual machine ID in the path to initiate the starting of the specified virtual machine.
809
- * @param {Number} id
918
+ * @param {Number} vmId
810
919
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
811
920
  */
812
921
  }, {
813
- key: "startVirtualMachine",
814
- value: function startVirtualMachine(id) {
815
- return this.startVirtualMachineWithHttpInfo(id).then(function (response_and_data) {
922
+ key: "startVM",
923
+ value: function startVM(vmId) {
924
+ return this.startVMWithHttpInfo(vmId).then(function (response_and_data) {
816
925
  return response_and_data.data;
817
926
  });
818
927
  }
@@ -820,40 +929,40 @@ var VirtualMachineApi = exports["default"] = /*#__PURE__*/function () {
820
929
  /**
821
930
  * Stop virtual machine
822
931
  * Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
823
- * @param {Number} id
932
+ * @param {Number} vmId
824
933
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ResponseModel} and HTTP response
825
934
  */
826
935
  }, {
827
- key: "stopVirtualMachineWithHttpInfo",
828
- value: function stopVirtualMachineWithHttpInfo(id) {
936
+ key: "stopVMWithHttpInfo",
937
+ value: function stopVMWithHttpInfo(vmId) {
829
938
  var postBody = null;
830
- // verify the required parameter 'id' is set
831
- if (id === undefined || id === null) {
832
- throw new Error("Missing the required parameter 'id' when calling stopVirtualMachine");
939
+ // verify the required parameter 'vmId' is set
940
+ if (vmId === undefined || vmId === null) {
941
+ throw new Error("Missing the required parameter 'vmId' when calling stopVM");
833
942
  }
834
943
  var pathParams = {
835
- 'id': id
944
+ 'vm_id': vmId
836
945
  };
837
946
  var queryParams = {};
838
947
  var headerParams = {};
839
948
  var formParams = {};
840
- var authNames = ['apiKey', 'accessToken'];
949
+ var authNames = ['apiKey'];
841
950
  var contentTypes = [];
842
951
  var accepts = ['application/json'];
843
952
  var returnType = _ResponseModel["default"];
844
- return this.apiClient.callApi('/core/virtual-machines/{id}/stop', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
953
+ return this.apiClient.callApi('/core/virtual-machines/{vm_id}/stop', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
845
954
  }
846
955
 
847
956
  /**
848
957
  * Stop virtual machine
849
958
  * Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.
850
- * @param {Number} id
959
+ * @param {Number} vmId
851
960
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ResponseModel}
852
961
  */
853
962
  }, {
854
- key: "stopVirtualMachine",
855
- value: function stopVirtualMachine(id) {
856
- return this.stopVirtualMachineWithHttpInfo(id).then(function (response_and_data) {
963
+ key: "stopVM",
964
+ value: function stopVM(vmId) {
965
+ return this.stopVMWithHttpInfo(vmId).then(function (response_and_data) {
857
966
  return response_and_data.data;
858
967
  });
859
968
  }