@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.
- package/README.md +268 -245
- package/dist/ApiClient.js +2 -7
- package/dist/api/AccessKeysApi.js +168 -0
- package/dist/api/AliveApi.js +33 -2
- package/dist/api/ApiKeyApi.js +33 -33
- package/dist/api/AssigningMemberRoleApi.js +20 -20
- package/dist/api/AuthApi.js +146 -6
- package/dist/api/BetaAccessApi.js +161 -0
- package/dist/api/BillingApi.js +1394 -465
- package/dist/api/BucketsApi.js +180 -0
- package/dist/api/CalculateApi.js +9 -9
- package/dist/api/CallbacksApi.js +87 -87
- package/dist/api/ClusterEventsApi.js +8 -8
- package/dist/api/ClustersApi.js +531 -23
- package/dist/api/ComplianceApi.js +24 -24
- package/dist/api/CreditApi.js +13 -11
- package/dist/api/CustomerContractApi.js +71 -71
- package/dist/api/DashboardApi.js +9 -9
- package/dist/api/DeploymentApi.js +11 -11
- package/dist/api/EnvironmentApi.js +83 -41
- package/dist/api/FIPExclusionsApi.js +85 -0
- package/dist/api/FirewallAttachmentApi.js +11 -9
- package/dist/api/FirewallsApi.js +82 -82
- package/dist/api/FlavorApi.js +4 -4
- package/dist/api/FloatingIpApi.js +31 -31
- package/dist/api/GpuApi.js +7 -7
- package/dist/api/HealthApi.js +76 -0
- package/dist/api/ImageApi.js +25 -25
- package/dist/api/InviteApi.js +53 -12
- package/dist/api/KeypairApi.js +17 -17
- package/dist/api/OrganizationApi.js +10 -10
- package/dist/api/PartnerConfigApi.js +117 -0
- package/dist/api/PaymentApi.js +66 -21
- package/dist/api/PermissionApi.js +4 -4
- package/dist/api/PolicyApi.js +4 -4
- package/dist/api/PricebookApi.js +9 -7
- package/dist/api/ProfileApi.js +43 -43
- package/dist/api/RbacRoleApi.js +46 -46
- package/dist/api/RegionApi.js +6 -6
- package/dist/api/RegionsApi.js +76 -0
- package/dist/api/SecurityRulesApi.js +2 -2
- package/dist/api/SnapshotEventsApi.js +8 -8
- package/dist/api/SnapshotsApi.js +73 -73
- package/dist/api/StockApi.js +9 -9
- package/dist/api/TemplateApi.js +50 -50
- package/dist/api/UserApi.js +53 -47
- package/dist/api/UserDetailChoiceApi.js +9 -9
- package/dist/api/UserPermissionApi.js +7 -7
- package/dist/api/VirtualMachineApi.js +464 -355
- package/dist/api/VirtualMachineEventsApi.js +16 -16
- package/dist/api/VncUrlApi.js +32 -28
- package/dist/api/VolumeApi.js +108 -59
- package/dist/api/VolumeAttachmentApi.js +79 -33
- package/dist/api/VouchersApi.js +86 -0
- package/dist/index.js +525 -714
- package/dist/model/{EnvironmentFieldsforVolume.js → AccessTokenField.js} +23 -23
- package/dist/model/AddUserInfoSuccessResponseModel.js +1 -1
- package/dist/model/AllocatedGPUCountGraph.js +1 -1
- package/dist/model/ApiKeyFields.js +1 -1
- package/dist/model/AssignRbacRolePayload.js +1 -1
- package/dist/model/AttachCallbackPayload.js +1 -1
- package/dist/model/AttachCallbackResponse.js +1 -1
- package/dist/model/AttachFirewallWithVM.js +1 -1
- package/dist/model/AttachFirewallsToVMPayload.js +1 -1
- package/dist/model/AttachVolumeFields.js +21 -1
- package/dist/model/AttachVolumes.js +1 -1
- package/dist/model/AttachVolumesPayload.js +13 -2
- package/dist/model/{InternalVolumeAttachmentFields.js → AttachmentsFieldsForVolume.js} +39 -37
- package/dist/model/{VirtualMachineUsage.js → Attributes.js} +68 -34
- package/dist/model/AuthGetTokenResponseModel.js +5 -13
- package/dist/model/AuthUserFields.js +1 -1
- package/dist/model/AuthUserInfoResponseModel.js +1 -1
- package/dist/model/{FlavorVMFields.js → BetaAccessRequestFields.js} +68 -50
- package/dist/model/BetaAccessRequestPayload.js +122 -0
- package/dist/model/{CreateDiscountResponse.js → BetaAccessRequestResponseModel.js} +27 -27
- package/dist/model/{Creditrequests.js → BetaAccessStatusItem.js} +57 -42
- package/dist/model/{VolumesLastStatusChangeResponse.js → BetaAccessStatusResponseModel.js} +38 -37
- package/dist/model/BillingHistory.js +99 -0
- package/dist/model/{WarningMailLogResponse.js → BillingHistoryDataSynthesisDetails.js} +48 -43
- package/dist/model/{VMUsageResponse.js → BillingHistoryFineTuning.js} +46 -41
- package/dist/model/BillingHistoryModelEvalutationDetails.js +143 -0
- package/dist/model/{ContractEligibleInstancesResponse.js → BillingHistoryServerlessInference.js} +48 -43
- package/dist/model/{GetAllDiscountForAllOrganizationResponse.js → BillingHistoryServerlessInferenceDetails.js} +52 -39
- package/dist/model/{Billingmetricesfields.js → BillingMetricesFields.js} +28 -28
- package/dist/model/{Billingmetricesresponse.js → BillingMetricesResponse.js} +24 -24
- package/dist/model/ClusterEvents.js +1 -1
- package/dist/model/ClusterEventsFields.js +1 -1
- package/dist/model/ClusterFields.js +76 -13
- package/dist/model/{FlavorPayload.js → ClusterFlavorFields.js} +74 -74
- package/dist/model/ClusterListResponse.js +1 -1
- package/dist/model/{InternalSecurityRulesFieldsForInstance.js → ClusterNodeFields.js} +76 -58
- package/dist/model/{InternalInstanceKeypairFields.js → ClusterNodeGroupFields.js} +65 -43
- package/dist/model/{StockVisibilityUserListResponse.js → ClusterNodeGroupsCreateResponse.js} +46 -32
- package/dist/model/{CreateUpdatePolicyResponseModel.js → ClusterNodeGroupsGetResponse.js} +27 -27
- package/dist/model/{InternalInstancesResponse.js → ClusterNodeGroupsListResponse.js} +36 -36
- package/dist/model/{ContractEligibleInstanceFields.js → ClusterNodeInstanceFields.js} +53 -45
- package/dist/model/{ImageLogos.js → ClusterNodesListResponse.js} +36 -36
- package/dist/model/ClusterResponse.js +1 -1
- package/dist/model/{GetVersionResponse.js → ClusterVersion.js} +54 -30
- package/dist/model/ClusterVersions.js +27 -6
- package/dist/model/Colors.js +105 -0
- package/dist/model/CommonResponseModel.js +1 -1
- package/dist/model/ComplianceFields.js +1 -1
- package/dist/model/ComplianceModelFields.js +1 -1
- package/dist/model/CompliancePayload.js +1 -1
- package/dist/model/ComplianceResponse.js +1 -1
- package/dist/model/ContainerOverviewFields.js +1 -1
- package/dist/model/Contract.js +1 -1
- package/dist/model/ContractDiscountPlanFields.js +9 -1
- package/dist/model/ContractGPUAllocationGraphResponse.js +1 -1
- package/dist/model/ContractInstanceFields.js +15 -1
- package/dist/model/ContractInstancesResponse.js +1 -1
- package/dist/model/{ApiKeyVerifyFields.js → CreateClusterNodeFields.js} +48 -38
- package/dist/model/{CreateUpdatePolicyPayload.js → CreateClusterNodeGroupPayload.js} +72 -44
- package/dist/model/CreateClusterPayload.js +74 -22
- package/dist/model/CreateEnvironment.js +3 -3
- package/dist/model/CreateFirewallPayload.js +1 -1
- package/dist/model/CreateFirewallRulePayload.js +1 -1
- package/dist/model/CreateImage.js +1 -1
- package/dist/model/CreateImagePayload.js +1 -1
- package/dist/model/CreateInstancesPayload.js +11 -11
- package/dist/model/CreateInstancesResponse.js +1 -1
- package/dist/model/CreateProfilePayload.js +3 -3
- package/dist/model/CreateProfileResponse.js +1 -1
- package/dist/model/CreateSecurityRulePayload.js +1 -1
- package/dist/model/CreateSnapshotPayload.js +5 -16
- package/dist/model/CreateSnapshotResponse.js +1 -1
- package/dist/model/CreateUpdateComplianceResponse.js +1 -1
- package/dist/model/CreateUpdateRbacRolePayload.js +1 -1
- package/dist/model/CreateVolumePayload.js +3 -3
- package/dist/model/CustomerContractDetailResponseModel.js +1 -1
- package/dist/model/CustomerContractFields.js +1 -1
- package/dist/model/DashboardInfoResponse.js +1 -1
- package/dist/model/{ContractBillingHistoryResponseModel.js → DataSynthesisBillingHistoryDetailsResponseSchema.js} +29 -27
- package/dist/model/{ContractlBillingHistoryResponseMetrics.js → DeleteClusterNodesFields.js} +25 -21
- package/dist/model/DeploymentFields.js +1 -1
- package/dist/model/{DeploymentFieldsforstartdeployments.js → DeploymentFieldsForStartDeployments.js} +24 -24
- package/dist/model/Deployments.js +1 -1
- package/dist/model/DetachVolumes.js +1 -1
- package/dist/model/DetachVolumesPayload.js +1 -1
- package/dist/model/{EditlabelofanexistingVMPayload.js → EditLabelOfAnExistingVMPayload.js} +18 -18
- package/dist/model/Environment.js +1 -1
- package/dist/model/EnvironmentFeatures.js +36 -1
- package/dist/model/EnvironmentFields.js +1 -1
- package/dist/model/{InternalEnvironmentFields.js → EnvironmentFieldsForVolume.js} +23 -31
- package/dist/model/Environments.js +1 -1
- package/dist/model/ErrorResponseModel.js +1 -1
- package/dist/model/FirewallAttachmentModel.js +1 -1
- package/dist/model/FirewallAttachmentVMModel.js +1 -1
- package/dist/model/FirewallDetailFields.js +1 -1
- package/dist/model/FirewallDetailResponse.js +1 -1
- package/dist/model/FirewallEnvironmentFields.js +1 -1
- package/dist/model/FirewallFields.js +1 -1
- package/dist/model/FirewallResponse.js +1 -1
- package/dist/model/FirewallRule.js +1 -1
- package/dist/model/FirewallsListResponse.js +1 -1
- package/dist/model/FlavorFields.js +9 -1
- package/dist/model/FlavorItemGetResponse.js +1 -1
- package/dist/model/{CustomerFields.js → FlavorLabelFields.js} +26 -24
- package/dist/model/FlavorListResponse.js +1 -1
- package/dist/model/FlavorObjectFields.js +1 -1
- package/dist/model/GPUFields.js +1 -1
- package/dist/model/GPUList.js +1 -1
- package/dist/model/GPURegionFields.js +1 -1
- package/dist/model/GenerateUpdateApiKeyPayload.js +1 -1
- package/dist/model/GenerateUpdateApiKeyResponseModel.js +1 -1
- package/dist/model/GetApiKeysResponseModel.js +1 -1
- package/dist/model/{Getcreditandthresholdinfo.js → GetCreditAndThresholdInfo.js} +20 -20
- package/dist/model/{Getcreditandthresholdinfoinresponse.js → GetCreditAndThresholdInfoInResponse.js} +24 -24
- package/dist/model/GetCustomerContractsListResponseModel.js +1 -1
- package/dist/model/GetInstanceLogsResponse.js +89 -0
- package/dist/model/GetInvitesResponseModel.js +1 -1
- package/dist/model/GetOrganizationResponseModel.js +1 -1
- package/dist/model/GetPermissionsResponseModel.js +1 -1
- package/dist/model/GetPoliciesResponseModel.js +1 -1
- package/dist/model/GetRbacRolesResponseModel.js +1 -1
- package/dist/model/GetUserPermissionsResponseModel.js +1 -1
- package/dist/model/GraphDatetimeValueModel.js +1 -1
- package/dist/model/Image.js +1 -1
- package/dist/model/ImageFields.js +1 -1
- package/dist/model/ImageGetResponse.js +1 -1
- package/dist/model/Images.js +1 -1
- package/dist/model/ImportKeypairPayload.js +1 -1
- package/dist/model/ImportKeypairResponse.js +1 -1
- package/dist/model/InfrahubResourceObjectResponseForCustomer.js +1 -1
- package/dist/model/Instance.js +1 -1
- package/dist/model/InstanceEnvironmentFields.js +1 -1
- package/dist/model/InstanceEvents.js +1 -1
- package/dist/model/InstanceEventsFields.js +1 -1
- package/dist/model/InstanceFields.js +21 -5
- package/dist/model/InstanceFlavorFields.js +42 -1
- package/dist/model/InstanceImageFields.js +1 -1
- package/dist/model/InstanceKeypairFields.js +1 -1
- package/dist/model/InstanceOverviewFields.js +1 -1
- package/dist/model/InstanceResizePayload.js +1 -1
- package/dist/model/Instances.js +1 -1
- package/dist/model/InviteFields.js +1 -1
- package/dist/model/InviteUserPayload.js +1 -1
- package/dist/model/InviteUserResponseModel.js +1 -1
- package/dist/model/KeypairEnvironmentFeatures.js +120 -0
- package/dist/model/{InternalVolumeFields.js → KeypairEnvironmentFields.js} +41 -39
- package/dist/model/KeypairFields.js +8 -6
- package/dist/model/Keypairs.js +1 -1
- package/dist/model/LableResonse.js +1 -1
- package/dist/model/{Lastdaycostfields.js → LastDayCostFields.js} +21 -21
- package/dist/model/{Lastdaycostresponse.js → LastDayCostResponse.js} +24 -24
- package/dist/model/{TokenFields.js → Logos.js} +47 -35
- package/dist/model/{LogoutPayload.js → MFAStatusFields.js} +27 -30
- package/dist/model/{GPU.js → MFAStatusResponse.js} +31 -31
- package/dist/model/{VerifyApiKeyResponseModel.js → ManualReconciliationModel.js} +33 -29
- package/dist/model/{Creditrequestresponse.js → MasterFlavorsResponse.js} +30 -30
- package/dist/model/MetricItemFields.js +1 -1
- package/dist/model/MetricsFields.js +1 -1
- package/dist/model/ModelEvaluationBillingHistoryDetailsResponseSchema.js +113 -0
- package/dist/model/NameAvailableModel.js +1 -1
- package/dist/model/NewConfigurationsResponse.js +1 -1
- package/dist/model/NewModelResponse.js +1 -1
- package/dist/model/NewStockResponse.js +1 -1
- package/dist/model/NewStockRetriveResponse.js +1 -1
- package/dist/model/ObjectStorageAccessKeyCreateRequest.js +117 -0
- package/dist/model/{FutureNodeModel.js → ObjectStorageAccessKeyCreateResponse.js} +70 -66
- package/dist/model/{ContractChangePayload.js → ObjectStorageAccessKeyListResponse.js} +44 -64
- package/dist/model/{FutureNodeUpdateModel.js → ObjectStorageAccessKeyResponse.js} +60 -51
- package/dist/model/{SetDefaultsPayload.js → ObjectStorageBucketListResponse.js} +53 -37
- package/dist/model/{CreateUpdatePermissionPayload.js → ObjectStorageBucketResponse.js} +75 -49
- package/dist/model/{PowerUsageModel.js → ObjectStorageDeleteResponse.js} +28 -38
- package/dist/model/{ContractEventCreateModel.js → ObjectStorageErrorResponse.js} +40 -47
- package/dist/model/{VerifyApiKeyPayload.js → ObjectStorageHealthResponse.js} +28 -29
- package/dist/model/{SingleVisibilityUserResponse.js → ObjectStoragePaginationMeta.js} +38 -38
- package/dist/model/{CreateGPU.js → ObjectStorageRegionListResponse.js} +46 -53
- package/dist/model/{RegionPayload.js → ObjectStorageRegionResponse.js} +20 -32
- package/dist/model/ObjectStorageRegionsEnum.js +53 -0
- package/dist/model/OrganizationFields.js +1 -1
- package/dist/model/OrganizationLevelBillingHistory.js +1 -1
- package/dist/model/OrganizationLevelBillingHistoryResources.js +1 -1
- package/dist/model/OrganizationLevelBillingHistoryResponseAttributes.js +1 -1
- package/dist/model/OrganizationLevelBillingHistoryResponseMetrics.js +1 -1
- package/dist/model/OrganizationLevelBillingHistoryResponseModel.js +1 -1
- package/dist/model/{OrganizationThresholdfields.js → OrganizationThresholdFields.js} +22 -22
- package/dist/model/{Organizationthresholdupdateresponse.js → OrganizationThresholdUpdateResponse.js} +24 -24
- package/dist/model/{Organizationthresholdsresponse.js → OrganizationThresholdsResponse.js} +24 -24
- package/dist/model/OrganizationUserResponseModel.js +1 -1
- package/dist/model/OverviewInfo.js +1 -1
- package/dist/model/Pagination.js +104 -0
- package/dist/model/PaginationData.js +1 -1
- package/dist/model/PartnerConfig.js +192 -0
- package/dist/model/PaymentDetailsFields.js +21 -1
- package/dist/model/PaymentDetailsResponse.js +1 -1
- package/dist/model/PaymentInitiateFields.js +1 -1
- package/dist/model/PaymentInitiatePayload.js +1 -1
- package/dist/model/PaymentInitiateResponse.js +1 -1
- package/dist/model/PermissionFields.js +1 -1
- package/dist/model/PolicyFields.js +1 -1
- package/dist/model/PolicyPermissionFields.js +1 -1
- package/dist/model/PricebookModel.js +1 -1
- package/dist/model/PricebookResourceObjectResponseForCustomer.js +1 -1
- package/dist/model/{NewStockUpdateResponseModel.js → PrimaryColor.js} +31 -27
- package/dist/model/ProfileFields.js +1 -1
- package/dist/model/ProfileListResponse.js +1 -1
- package/dist/model/ProfileObjectFields.js +1 -1
- package/dist/model/RbacRoleDetailResponseModel.js +1 -1
- package/dist/model/RbacRoleDetailResponseModelFixed.js +1 -1
- package/dist/model/RbacRoleField.js +1 -1
- package/dist/model/RbacRoleFields.js +1 -1
- package/dist/model/{CustomerPayload.js → RedeemVoucherPayload.js} +29 -38
- package/dist/model/RegionFields.js +49 -1
- package/dist/model/Regions.js +1 -1
- package/dist/model/RemoveMemberFromOrganizationResponseModel.js +1 -1
- package/dist/model/RemoveMemberPayload.js +1 -1
- package/dist/model/RequestConsole.js +1 -1
- package/dist/model/{ExcludeBillingPostResponse.js → RequestInstanceLogsPayload.js} +22 -27
- package/dist/model/RequestInstanceLogsResponse.js +85 -0
- package/dist/model/ResourceBillingEventsHistoryMetrics.js +1 -1
- package/dist/model/ResourceBillingEventsHistoryResponse.js +1 -1
- package/dist/model/ResourceBillingResponseForCustomer.js +1 -1
- package/dist/model/{ContractBillingHistory.js → ResourceLevelBillingBucketDetailsResources.js} +27 -27
- package/dist/model/ResourceLevelBillingDetailsAttributes.js +1 -1
- package/dist/model/ResourceLevelBillingDetailsMetrics.js +1 -1
- package/dist/model/ResourceLevelBillingDetailsVM.js +1 -1
- package/dist/model/ResourceLevelBillingDetailsVolume.js +1 -1
- package/dist/model/ResourceLevelBillingDetailsVolumeAttributes.js +1 -1
- package/dist/model/ResourceLevelBillingDetailsVolumeMetrics.js +1 -1
- package/dist/model/ResourceLevelBillingHistory.js +1 -1
- package/dist/model/ResourceLevelBillingHistoryResources.js +1 -1
- package/dist/model/{NodeResponseModel.js → ResourceLevelBillingHistoryResourcesCluster.js} +47 -31
- package/dist/model/ResourceLevelBillingHistoryResponseAttributes.js +9 -1
- package/dist/model/ResourceLevelBillingHistoryResponseMetrics.js +1 -1
- package/dist/model/ResourceLevelBillingVMDetailsResources.js +1 -1
- package/dist/model/ResourceLevelBillingVolumeDetailsResources.js +1 -1
- package/dist/model/{AuthRequestLoginResponseModel.js → ResourceLevelBucketBillingDetailsResponseModel.js} +27 -27
- package/dist/model/{CreateUpdatePermissionResponseModel.js → ResourceLevelBucketBillingHistoryResponseModel.js} +31 -31
- package/dist/model/ResourceLevelClusterBillingDetailsResponseModel.js +111 -0
- package/dist/model/ResourceLevelClusterBillingHistoryResponseModel.js +111 -0
- package/dist/model/ResourceLevelClusterGraphBillingDetailsResponseModel.js +111 -0
- package/dist/model/ResourceLevelGraphBillingDetailVolume.js +1 -1
- package/dist/model/ResourceLevelGraphBillingDetailsAttributes.js +1 -1
- package/dist/model/{OrganizationObjectResponse.js → ResourceLevelGraphBillingDetailsBucket.js} +45 -29
- package/dist/model/ResourceLevelGraphBillingDetailsMetrics.js +1 -1
- package/dist/model/ResourceLevelGraphBillingDetailsVM.js +1 -1
- package/dist/model/ResourceLevelGraphBillingVMDetailsResources.js +1 -1
- package/dist/model/ResourceLevelGraphBillingVolumeDetailsResources.js +1 -1
- package/dist/model/ResourceLevelVMBillingDetailsResponseModel.js +1 -1
- package/dist/model/ResourceLevelVmBillingHistoryResponseModel.js +1 -1
- package/dist/model/ResourceLevelVmGraphBillingDetailsResponseModel.js +1 -1
- package/dist/model/ResourceLevelVolumeBillingDetailsResponseModel.js +1 -1
- package/dist/model/ResourceLevelVolumeBillingHistoryResponseModel.js +1 -1
- package/dist/model/ResourceLevelVolumeGraphBillingDetailsResponseModel.js +1 -1
- package/dist/model/ResourceObjectResponseForCustomer.js +1 -1
- package/dist/model/ResponseModel.js +1 -1
- package/dist/model/RolePermissionFields.js +1 -1
- package/dist/model/RolePolicyFields.js +1 -1
- package/dist/model/{Data.js → SecondaryColor.js} +31 -38
- package/dist/model/SecurityGroupRule.js +1 -1
- package/dist/model/SecurityGroupRuleFields.js +1 -1
- package/dist/model/{SecurityRulesFieldsforInstance.js → SecurityRulesFieldsForInstance.js} +26 -26
- package/dist/model/SecurityRulesProtocolFields.js +1 -1
- package/dist/model/{Organizationcreditrechargelimitresponse.js → ServerlessInferencedBillingHistoryDetailsResponseSchema.js} +29 -27
- package/dist/model/SnapshotFields.js +27 -5
- package/dist/model/SnapshotRestoreRequest.js +1 -1
- package/dist/model/SnapshotRetrieve.js +1 -1
- package/dist/model/SnapshotRetrieveFields.js +170 -5
- package/dist/model/Snapshots.js +1 -1
- package/dist/model/StartDeployment.js +5 -5
- package/dist/model/StartDeploymentPayload.js +1 -1
- package/dist/model/SubResourceGraphBillingDetailsMetrics.js +1 -1
- package/dist/model/SubResourcesCostsResponseModel.js +1 -1
- package/dist/model/SubResourcesGraphBillingHistoryFields.js +1 -1
- package/dist/model/SubResourcesGraphResponseModel.js +1 -1
- package/dist/model/{Subscribeorunsubscribeupdatepayload.js → SubscribeOrUnsubscribeUpdatePayload.js} +20 -20
- package/dist/model/Template.js +1 -1
- package/dist/model/TemplateFields.js +1 -1
- package/dist/model/Templates.js +1 -1
- package/dist/model/TokenBasedBillingHistoryResponse.js +113 -0
- package/dist/model/URIs.js +161 -0
- package/dist/model/UpdateClusterNodeGroupPayload.js +93 -0
- package/dist/model/UpdateEnvironment.js +1 -1
- package/dist/model/UpdateKeypairName.js +1 -1
- package/dist/model/{UpdateKeypairnameresponse.js → UpdateKeypairNameResponse.js} +20 -20
- package/dist/model/UpdateOrganizationPayload.js +1 -1
- package/dist/model/UpdateOrganizationResponseModel.js +1 -1
- package/dist/model/UpdateTemplate.js +1 -1
- package/dist/model/UpdateVolumeAttachmentPayload.js +85 -0
- package/dist/model/{UserTransferPayload.js → UpdateVolumePayload.js} +29 -38
- package/dist/model/{FlavorResponse.js → UpdateVolumeResponse.js} +41 -32
- package/dist/model/UserDefaultChoiceForUserFields.js +1 -1
- package/dist/model/UserDefaultChoicesForUserResponse.js +1 -1
- package/dist/model/{Userinfopostpayload.js → UserInfoPostPayload.js} +30 -30
- package/dist/model/{FutureNodesStockModel.js → UserOrganizationsResponse.js} +28 -28
- package/dist/model/UserPermissionFields.js +1 -1
- package/dist/model/UsersInfoFields.js +13 -1
- package/dist/model/UsersInfoListResponse.js +1 -1
- package/dist/model/VNCURL.js +1 -1
- package/dist/model/VNCURLFields.js +1 -1
- package/dist/model/Volume.js +1 -1
- package/dist/model/VolumeAttachmentFields.js +21 -5
- package/dist/model/VolumeFields.js +38 -5
- package/dist/model/{VolumeFieldsforInstance.js → VolumeFieldsForInstance.js} +23 -23
- package/dist/model/VolumeOverviewFields.js +1 -1
- package/dist/model/VolumeTypes.js +1 -1
- package/dist/model/Volumes.js +36 -12
- package/dist/model/{InfrahubResourceObjectResponse.js → VolumesFields.js} +95 -85
- package/dist/model/{FutureNodeStockModel.js → Voucher.js} +44 -33
- package/dist/model/{Creditrechargelimitresponse.js → VoucherRedeemResponseSchema.js} +56 -47
- package/dist/model/WorkloadBillingHistoryResponse.js +113 -0
- package/package.json +1 -1
- package/dist/model/AddUpdateFlavorOrganizationPayload.js +0 -242
- package/dist/model/AuthRequestLoginFields.js +0 -101
- package/dist/model/BillingImmuneResourcesResponse.js +0 -111
- package/dist/model/BillingResponse.js +0 -130
- package/dist/model/ContractBillingHistoryResponseAttributes.js +0 -149
- package/dist/model/ContractResourcePayload.js +0 -146
- package/dist/model/CreateContractFields.js +0 -170
- package/dist/model/CreateContractPayload.js +0 -178
- package/dist/model/CreateDiscountsPayload.js +0 -192
- package/dist/model/Creditrechargelimitfield.js +0 -109
- package/dist/model/DiscountEntityModel.js +0 -122
- package/dist/model/DiscountFields.js +0 -149
- package/dist/model/DiscountPlanFields.js +0 -181
- package/dist/model/DiscountResourceFields.js +0 -113
- package/dist/model/DiscountResourcePayload.js +0 -142
- package/dist/model/ExcludeBillingPostPayload.js +0 -135
- package/dist/model/ExportBillingDataRequest.js +0 -186
- package/dist/model/ExportBillingDataResponse.js +0 -101
- package/dist/model/FieldChange.js +0 -116
- package/dist/model/FlavorVMsResponse.js +0 -130
- package/dist/model/FutureNodeResponseModel.js +0 -122
- package/dist/model/GetAllContractFields.js +0 -137
- package/dist/model/GetAllContractsResponseModel.js +0 -130
- package/dist/model/GetAllDiscountsFields.js +0 -158
- package/dist/model/GetDiscountDetailResponse.js +0 -111
- package/dist/model/GetDiscountResponse.js +0 -130
- package/dist/model/GetEntityDiscountDetailResponse.js +0 -159
- package/dist/model/GetTokenPayload.js +0 -126
- package/dist/model/HistoricalInstance.js +0 -138
- package/dist/model/HistoricalInstancesFields.js +0 -201
- package/dist/model/InsertDiscountPlanFields.js +0 -168
- package/dist/model/InstancesSummaryFields.js +0 -249
- package/dist/model/InternalInstanceFields.js +0 -344
- package/dist/model/InternalInstanceFlavorFields.js +0 -161
- package/dist/model/InternalInstanceImageFields.js +0 -133
- package/dist/model/InternalVolumesResponse.js +0 -130
- package/dist/model/LogoGetResponse.js +0 -109
- package/dist/model/NodeModel.js +0 -230
- package/dist/model/NodePayloadModel.js +0 -122
- package/dist/model/NodePowerUsageModel.js +0 -244
- package/dist/model/NodeStockPayloadModel.js +0 -110
- package/dist/model/NodeStockResponseModel.js +0 -110
- package/dist/model/NodeStocksPayload.js +0 -144
- package/dist/model/PricebookResourceObjectResponse.js +0 -173
- package/dist/model/RefreshTokenPayload.js +0 -126
- package/dist/model/RegionResponse.js +0 -111
- package/dist/model/StockVisibilityUserPayload.js +0 -112
- package/dist/model/SuccessResponseModel.js +0 -100
- package/dist/model/UpdateContractPayload.js +0 -168
- package/dist/model/UpdateDiscountsPayload.js +0 -160
- package/dist/model/UpdateDiscountsStatusPayload.js +0 -112
- package/dist/model/UpdateGPU.js +0 -114
- package/dist/model/VMUsageRequestPayload.js +0 -113
- package/dist/model/VolumeStatusChangeFields.js +0 -125
- 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
|
|
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.
|
|
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
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @param {Number}
|
|
64
|
-
* @param {module:model/
|
|
65
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
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: "
|
|
69
|
-
value: function
|
|
71
|
+
key: "addVMLabelWithHttpInfo",
|
|
72
|
+
value: function addVMLabelWithHttpInfo(vmId, payload) {
|
|
70
73
|
var postBody = payload;
|
|
71
|
-
// verify the required parameter '
|
|
72
|
-
if (
|
|
73
|
-
throw new Error("Missing the required parameter '
|
|
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
|
|
80
|
+
throw new Error("Missing the required parameter 'payload' when calling addVMLabel");
|
|
78
81
|
}
|
|
79
82
|
var pathParams = {
|
|
80
|
-
'
|
|
83
|
+
'vm_id': vmId
|
|
81
84
|
};
|
|
82
85
|
var queryParams = {};
|
|
83
86
|
var headerParams = {};
|
|
84
87
|
var formParams = {};
|
|
85
|
-
var authNames = ['apiKey'
|
|
88
|
+
var authNames = ['apiKey'];
|
|
86
89
|
var contentTypes = ['application/json'];
|
|
87
90
|
var accepts = ['application/json'];
|
|
88
|
-
var returnType =
|
|
89
|
-
return this.apiClient.callApi('/core/virtual-machines/{
|
|
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
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* @param {Number}
|
|
96
|
-
* @param {module:model/
|
|
97
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
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: "
|
|
101
|
-
value: function
|
|
102
|
-
return this.
|
|
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: "
|
|
116
|
-
value: function
|
|
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
|
|
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
|
|
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'
|
|
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: "
|
|
148
|
-
value: function
|
|
149
|
-
return this.
|
|
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: "
|
|
163
|
-
value: function
|
|
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
|
|
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
|
|
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'
|
|
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: "
|
|
195
|
-
value: function
|
|
196
|
-
return this.
|
|
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://
|
|
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: "
|
|
209
|
-
value: function
|
|
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
|
|
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'
|
|
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://
|
|
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: "
|
|
234
|
-
value: function
|
|
235
|
-
return this.
|
|
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}
|
|
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: "
|
|
249
|
-
value: function
|
|
339
|
+
key: "deleteFirewallRuleForVMWithHttpInfo",
|
|
340
|
+
value: function deleteFirewallRuleForVMWithHttpInfo(vmId, sgRuleId) {
|
|
250
341
|
var postBody = null;
|
|
251
|
-
// verify the required parameter '
|
|
252
|
-
if (
|
|
253
|
-
throw new Error("Missing the required parameter '
|
|
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
|
|
348
|
+
throw new Error("Missing the required parameter 'sgRuleId' when calling deleteFirewallRuleForVM");
|
|
258
349
|
}
|
|
259
350
|
var pathParams = {
|
|
260
|
-
'
|
|
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'
|
|
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/{
|
|
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}
|
|
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: "
|
|
282
|
-
value: function
|
|
283
|
-
return this.
|
|
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}
|
|
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: "
|
|
296
|
-
value: function
|
|
386
|
+
key: "deleteVMWithHttpInfo",
|
|
387
|
+
value: function deleteVMWithHttpInfo(vmId) {
|
|
297
388
|
var postBody = null;
|
|
298
|
-
// verify the required parameter '
|
|
299
|
-
if (
|
|
300
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
394
|
+
'vm_id': vmId
|
|
304
395
|
};
|
|
305
396
|
var queryParams = {};
|
|
306
397
|
var headerParams = {};
|
|
307
398
|
var formParams = {};
|
|
308
|
-
var authNames = ['apiKey'
|
|
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/{
|
|
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}
|
|
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: "
|
|
323
|
-
value: function
|
|
324
|
-
return this.
|
|
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
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* @param {Number}
|
|
333
|
-
* @param {
|
|
334
|
-
* @
|
|
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: "
|
|
338
|
-
value: function
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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
|
-
'
|
|
489
|
+
'vm_id': vmId
|
|
350
490
|
};
|
|
351
491
|
var queryParams = {};
|
|
352
492
|
var headerParams = {};
|
|
353
493
|
var formParams = {};
|
|
354
|
-
var authNames = ['apiKey'
|
|
355
|
-
var contentTypes = [
|
|
494
|
+
var authNames = ['apiKey'];
|
|
495
|
+
var contentTypes = [];
|
|
356
496
|
var accepts = ['application/json'];
|
|
357
|
-
var returnType =
|
|
358
|
-
return this.apiClient.callApi('/core/virtual-machines/{
|
|
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
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* @param {Number}
|
|
365
|
-
* @
|
|
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: "
|
|
370
|
-
value: function
|
|
371
|
-
return this.
|
|
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
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* @param {
|
|
380
|
-
* @
|
|
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: "
|
|
384
|
-
value: function
|
|
523
|
+
key: "getVMLogsWithHttpInfo",
|
|
524
|
+
value: function getVMLogsWithHttpInfo(vmId, requestId) {
|
|
385
525
|
var postBody = null;
|
|
386
|
-
// verify the required parameter '
|
|
387
|
-
if (
|
|
388
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
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'
|
|
542
|
+
var authNames = ['apiKey'];
|
|
397
543
|
var contentTypes = [];
|
|
398
544
|
var accepts = ['application/json'];
|
|
399
|
-
var returnType =
|
|
400
|
-
return this.apiClient.callApi('/core/virtual-machines/
|
|
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
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* @param {
|
|
407
|
-
* @
|
|
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: "
|
|
411
|
-
value: function
|
|
412
|
-
return this.
|
|
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}
|
|
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: "
|
|
425
|
-
value: function
|
|
619
|
+
key: "hardRebootVMWithHttpInfo",
|
|
620
|
+
value: function hardRebootVMWithHttpInfo(vmId) {
|
|
426
621
|
var postBody = null;
|
|
427
|
-
// verify the required parameter '
|
|
428
|
-
if (
|
|
429
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
627
|
+
'vm_id': vmId
|
|
433
628
|
};
|
|
434
629
|
var queryParams = {};
|
|
435
630
|
var headerParams = {};
|
|
436
631
|
var formParams = {};
|
|
437
|
-
var authNames = ['apiKey'
|
|
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/{
|
|
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}
|
|
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: "
|
|
452
|
-
value: function
|
|
453
|
-
return this.
|
|
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}
|
|
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: "
|
|
466
|
-
value: function
|
|
662
|
+
key: "hibernateVMWithHttpInfo",
|
|
663
|
+
value: function hibernateVMWithHttpInfo(vmId, opts) {
|
|
664
|
+
opts = opts || {};
|
|
467
665
|
var postBody = null;
|
|
468
|
-
// verify the required parameter '
|
|
469
|
-
if (
|
|
470
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
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'
|
|
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/{
|
|
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}
|
|
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: "
|
|
493
|
-
value: function
|
|
494
|
-
return this.
|
|
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 {
|
|
504
|
-
* @param {
|
|
705
|
+
* @param {Number} [page]
|
|
706
|
+
* @param {Number} [pageSize]
|
|
505
707
|
* @param {String} [search]
|
|
506
|
-
* @param {String} [environment]
|
|
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: "
|
|
511
|
-
value: function
|
|
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'
|
|
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 {
|
|
535
|
-
* @param {
|
|
738
|
+
* @param {Number} opts.page
|
|
739
|
+
* @param {Number} opts.pageSize
|
|
536
740
|
* @param {String} opts.search
|
|
537
|
-
* @param {String} opts.environment
|
|
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: "
|
|
542
|
-
value: function
|
|
543
|
-
return this.
|
|
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
|
-
*
|
|
550
|
-
*
|
|
551
|
-
* @param {Number}
|
|
552
|
-
* @param {module:model/
|
|
553
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
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: "
|
|
557
|
-
value: function
|
|
761
|
+
key: "requestVMLogsWithHttpInfo",
|
|
762
|
+
value: function requestVMLogsWithHttpInfo(vmId, payload) {
|
|
558
763
|
var postBody = payload;
|
|
559
|
-
// verify the required parameter '
|
|
560
|
-
if (
|
|
561
|
-
throw new Error("Missing the required parameter '
|
|
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
|
|
770
|
+
throw new Error("Missing the required parameter 'payload' when calling requestVMLogs");
|
|
566
771
|
}
|
|
567
772
|
var pathParams = {
|
|
568
|
-
'
|
|
773
|
+
'vm_id': vmId
|
|
569
774
|
};
|
|
570
775
|
var queryParams = {};
|
|
571
776
|
var headerParams = {};
|
|
572
777
|
var formParams = {};
|
|
573
|
-
var authNames = ['apiKey'
|
|
778
|
+
var authNames = ['apiKey'];
|
|
574
779
|
var contentTypes = ['application/json'];
|
|
575
780
|
var accepts = ['application/json'];
|
|
576
|
-
var returnType =
|
|
577
|
-
return this.apiClient.callApi('/core/virtual-machines/{
|
|
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
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* @param {Number}
|
|
584
|
-
* @param {module:model/
|
|
585
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
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: "
|
|
589
|
-
value: function
|
|
590
|
-
return this.
|
|
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
|
-
*
|
|
597
|
-
*
|
|
598
|
-
* @param {Number}
|
|
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: "
|
|
603
|
-
value: function
|
|
604
|
-
var postBody =
|
|
605
|
-
// verify the required parameter '
|
|
606
|
-
if (
|
|
607
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
820
|
+
'vm_id': vmId
|
|
611
821
|
};
|
|
612
822
|
var queryParams = {};
|
|
613
823
|
var headerParams = {};
|
|
614
824
|
var formParams = {};
|
|
615
|
-
var authNames = ['apiKey'
|
|
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/{
|
|
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
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* @param {Number}
|
|
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: "
|
|
630
|
-
value: function
|
|
631
|
-
return this.
|
|
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
|
-
*
|
|
638
|
-
*
|
|
639
|
-
* @param {Number}
|
|
640
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
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: "
|
|
644
|
-
value: function
|
|
854
|
+
key: "restoreVMFromHibernationWithHttpInfo",
|
|
855
|
+
value: function restoreVMFromHibernationWithHttpInfo(vmId) {
|
|
645
856
|
var postBody = null;
|
|
646
|
-
// verify the required parameter '
|
|
647
|
-
if (
|
|
648
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
862
|
+
'vm_id': vmId
|
|
652
863
|
};
|
|
653
864
|
var queryParams = {};
|
|
654
865
|
var headerParams = {};
|
|
655
866
|
var formParams = {};
|
|
656
|
-
var authNames = ['apiKey'
|
|
867
|
+
var authNames = ['apiKey'];
|
|
657
868
|
var contentTypes = [];
|
|
658
869
|
var accepts = ['application/json'];
|
|
659
|
-
var returnType =
|
|
660
|
-
return this.apiClient.callApi('/core/virtual-machines/{
|
|
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
|
-
*
|
|
763
|
-
*
|
|
764
|
-
* @param {Number}
|
|
765
|
-
* @
|
|
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: "
|
|
773
|
-
value: function
|
|
774
|
-
return this.
|
|
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}
|
|
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: "
|
|
787
|
-
value: function
|
|
895
|
+
key: "startVMWithHttpInfo",
|
|
896
|
+
value: function startVMWithHttpInfo(vmId) {
|
|
788
897
|
var postBody = null;
|
|
789
|
-
// verify the required parameter '
|
|
790
|
-
if (
|
|
791
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
903
|
+
'vm_id': vmId
|
|
795
904
|
};
|
|
796
905
|
var queryParams = {};
|
|
797
906
|
var headerParams = {};
|
|
798
907
|
var formParams = {};
|
|
799
|
-
var authNames = ['apiKey'
|
|
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/{
|
|
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}
|
|
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: "
|
|
814
|
-
value: function
|
|
815
|
-
return this.
|
|
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}
|
|
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: "
|
|
828
|
-
value: function
|
|
936
|
+
key: "stopVMWithHttpInfo",
|
|
937
|
+
value: function stopVMWithHttpInfo(vmId) {
|
|
829
938
|
var postBody = null;
|
|
830
|
-
// verify the required parameter '
|
|
831
|
-
if (
|
|
832
|
-
throw new Error("Missing the required parameter '
|
|
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
|
-
'
|
|
944
|
+
'vm_id': vmId
|
|
836
945
|
};
|
|
837
946
|
var queryParams = {};
|
|
838
947
|
var headerParams = {};
|
|
839
948
|
var formParams = {};
|
|
840
|
-
var authNames = ['apiKey'
|
|
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/{
|
|
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}
|
|
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: "
|
|
855
|
-
value: function
|
|
856
|
-
return this.
|
|
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
|
}
|