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