Skip to content

Official Go SDK for Hyperstack: https://www.hyperstack.cloud. Please check the infrahub-doc (link below) for the installation instructions.

Notifications You must be signed in to change notification settings

NexGenCloud/hyperstack-sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for hyperstack

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.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: v1.48.0-alpha
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import hyperstack "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value hyperstack.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), hyperstack.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value hyperstack.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), hyperstack.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using hyperstack.ContextOperationServerIndices and hyperstack.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), hyperstack.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), hyperstack.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://infrahub-api.nexgencloud.com/v1

Class Method HTTP request Description
AccessKeysAPI CreateAccessKeyEndpoint Post /object-storage/access-keys Generate a new access key
AccessKeysAPI DeleteAccessKeyEndpoint Delete /object-storage/access-keys/{access_key_id} Remove an existing access key
AccessKeysAPI ListAccessKeysEndpoint Get /object-storage/access-keys List access keys
AliveAPI GetAlive Get /billing/alive GET: Alive
AliveAPI GetAliveDoc Get /billing/alive/doc
ApiKeyAPI DeleteAPIKey Delete /api-key/{api_key_id} Delete API Key
ApiKeyAPI GenerateAPIKey Post /api-key/generate Generate API Key
ApiKeyAPI GetAPIKey Get /api-key Retrieve API Keys
ApiKeyAPI UpdateAPIKey Put /api-key/{api_key_id} Update API Key
AssigningMemberRoleAPI AssignRBACRoleToUser Put /auth/users/{user_id}/assign-roles Assign RBAC Role
AssigningMemberRoleAPI RemoveRBACRoleFromUser Delete /auth/users/{user_id}/roles Remove RBAC Role From User
AuthAPI ChangeOrganizationForToken Get /auth/token/change-org/{org_id}
AuthAPI DisableMFA Get /auth/me/mfa/disable
AuthAPI GetUserMFAStatus Get /auth/me/mfa Get MFA status for authenticated user
AuthAPI GetUserOrganizations Get /auth/me/organizations Get User Organizations
AuthAPI RetrieveAuthenticatedUserDetails Get /auth/me Retrieve Authenticated User Details
BetaAccessAPI CreateBetaAccessRequest Post /auth/beta-access/requests Create a new beta access request
BetaAccessAPI GetBetaAccessRequests Get /auth/beta-access/requests/{program} Check the status of beta access requests
BetaAccessAPI GetBetaAccessStatus Get /auth/beta-access/requests Check the status of all beta access requests
BillingAPI BucketsBillingHistoryHourlyChart Get /billing/billing/history/bucket/{bucket_id}/graph Retrieve hourly cost datapoints of a Specific Bucket for a specific billing cycle
BillingAPI GetBucketBillingHistory Get /billing/billing/history/bucket/{bucket_id} Retrieve Billing History of a Specific Snapshot for a specific Billing Cycle
BillingAPI GetClusterBillingHistory Get /billing/billing/history/cluster/{cluster_id} Retrieve Billing History of a Specific Cluster for a specific Billing Cycle
BillingAPI GetClusterBillingHistoryGraph Get /billing/billing/history/cluster/{cluster_id}/graph Retrieve hourly cost datapoints of a specific Cluster for a specific billing cycle
BillingAPI GetDataSynthesisBillingHistory Get /billing/billing/history/data_synthesis Retrieve Billing History of data synthesis for a specific Billing Cycle
BillingAPI GetDataSynthesisBillingHistoryGraph Get /billing/billing/history/data_synthesis/{resource_id}/graph Retrieve hourly cost datapoints of a Specific Data Synthesis for a specific
BillingAPI GetDataSynthesisHistoryForResource Get /billing/billing/history/data_synthesis/{resource_id}
BillingAPI GetFineTuningBillingHistory Get /billing/billing/history/fine_tuning Retrieve Billing History of model evaluation for a specific Billing Cycle
BillingAPI GetFineTuningBillingHistoryGraph Get /billing/billing/history/fine_tuning/{resource_id}/graph Retrieve hourly cost datapoints of a Specific Fine Tuning for a specific billing cycle
BillingAPI GetLastDayCost Get /billing/billing/last-day-cost GET: Last Day Cost
BillingAPI GetModelEvaluationBillingHistory Get /billing/billing/history/model_evaluation Retrieve Billing History of model evaluation for a specific Billing Cycle
BillingAPI GetModelEvaluationBillingHistoryGraph Get /billing/billing/history/model_evaluation/{resource_id}/graph Retrieve hourly cost datapoints of a Specific Model Evaluation for a specific
BillingAPI GetNotificationThreshold Put /billing/billing/threshold/{threshold_id} Update: Subscribe or Unsubscribe Notification Threshold
BillingAPI GetResourceFineTuningBillingHistory Get /billing/billing/history/fine_tuning/{resource_id} Retrieve Billing History of a Specific Fine Tuning for a specific Billing Cycle
BillingAPI GetResourceModelEvaluationBillingHistory Get /billing/billing/history/model_evaluation/{resource_id}
BillingAPI GetServerlessInferenceBillingHistoryGraph Get /billing/billing/history/serverless_inference/{resource_id}/graph Retrieve hourly cost datapoints of a Specific Serverless Inference for a specific
BillingAPI GetServerlessInferencesBillingHistory Get /billing/billing/history/serverless_inference/{resource_id}
BillingAPI GetSnapshotBillingHistory Get /billing/billing/history/snapshot/{snapshot_id} Retrieve Billing History of a Specific Snapshot for a specific Billing Cycle
BillingAPI GetSnapshotBillingHistoryGraph Get /billing/billing/history/snapshot/{snapshot_id}/graph Retrieve hourly cost datapoints of a Specific Snapshot for a specific billing cycle
BillingAPI GetUsage Get /billing/billing/usage GET: Billing usage
BillingAPI GetUserBillingHistory Get /billing/billing/history Retrieve Billing History for a specific Billing Cycle
BillingAPI GetVMBillingDetails Get /billing/billing/history/virtual-machine/{vm_id} Retrieve Billing History of a Specific Virtual Machine for a specific Billing Cycle
BillingAPI GetVMBillingEvents Get /billing/billing/virtual-machine/{vm_id}/billing-events Retrieve VM billing events history
BillingAPI GetVMBillingGraph Get /billing/billing/history/virtual-machine/{vm_id}/graph Retrieve hourly cost datapoints of a Specific Virtual Machine for a specific billing cycle
BillingAPI GetVMBillingHistory Get /billing/billing/history/virtual-machine Retrieve Billing History of Virtual Machine for a specific Billing Cycle
BillingAPI GetVMSubResourceCosts Get /billing/billing/virtual-machine/{vm_id}/sub-resource Retrieve Total Costs and Non Discount Costs for Sub Resources
BillingAPI GetVMSubResourceGraph Get /billing/billing/virtual-machine/{vm_id}/sub-resource/graph Retrieve Sub-Resources Historical Cost datapoints of a Virtual
BillingAPI GetVolumeBillingDetails Get /billing/billing/history/volume/{volume_id} Retrieve Billing History of a Specific Volume for a specific Billing Cycle
BillingAPI GetVolumeBillingEvents Get /billing/billing/volume/{volume_id}/billing-events Retrieve Volume billing events history
BillingAPI GetVolumeBillingHistory Get /billing/billing/history/volume Retrieve Billing History of Volume for a specific Billing Cycle
BillingAPI GetVolumeBillingHistoryGraph Get /billing/billing/history/volume/{volume_id}/graph Retrieve hourly cost datapoints of a Specific Volume for a specific billing cycle
BillingAPI ListBillingContractHistory Get /billing/billing/history/contract Retrieve Billing History of Contract for a specific Billing Cycle
BillingAPI ListBucketBillingHistory Get /billing/billing/history/bucket Retrieve Billing History of a Bucket for a specific Billing Cycle
BillingAPI ListClustersBillingHistory Get /billing/billing/history/cluster Retrieve Billing History of Clusters for a specific Billing Cycle
BillingAPI ListOrgNotificationThresholds Get /billing/billing/threshold GET: All Thresholds for Organization
BillingAPI ListServerlessInferenceBillingHistory Get /billing/billing/history/serverless_inference Retrieve Billing History of serverless inference for a specific Billing Cycle
BillingAPI ListSnapshotBillingHistory Get /billing/billing/history/snapshot Retrieve Billing History of Snapshot for a specific Billing Cycle
BucketsAPI DeleteBucketEndpoint Delete /object-storage/buckets/{bucket_name} Delete a bucket
BucketsAPI ListBucketsEndpoint Get /object-storage/buckets List buckets
BucketsAPI RetrieveBucketEndpoint Get /object-storage/buckets/{bucket_name} Retrieve a bucket
CalculateAPI CalculateResourceBillingRate Get /pricebook/calculate/resource/{resource_type}/{id} Retrieve Billing Rate for Resource
CallbacksAPI AttachCallbackToVM Post /core/virtual-machines/{vm_id}/attach-callback Attach callback to virtual machine
CallbacksAPI AttachCallbackToVolume Post /core/volumes/{volume_id}/attach-callback Attach callback to volume
CallbacksAPI DeleteVMCallback Delete /core/virtual-machines/{vm_id}/delete-callback Delete virtual machine callback
CallbacksAPI DeleteVolumeCallback Delete /core/volumes/{volume_id}/delete-callback Delete volume callback
CallbacksAPI UpdateVMCallback Put /core/virtual-machines/{vm_id}/update-callback Update virtual machine callback
CallbacksAPI UpdateVolumeCallback Put /core/volumes/{volume_id}/update-callback Update volume callback
ClusterEventsAPI ListClusterEvents Get /core/clusters/{cluster_id}/events Fetch all of a cluster events
ClustersAPI CreateCluster Post /core/clusters Create Cluster
ClustersAPI CreateNode Post /core/clusters/{cluster_id}/nodes Create Node
ClustersAPI CreateNodeGroup Post /core/clusters/{cluster_id}/node-groups Create a node group in a cluster
ClustersAPI DeleteCluster Delete /core/clusters/{id} Delete a cluster
ClustersAPI DeleteClusterNode Delete /core/clusters/{cluster_id}/nodes/{node_id} Delete Cluster Node
ClustersAPI DeleteClusterNodes Post /core/clusters/{cluster_id}/nodes/delete Delete Multiple Cluster Nodes
ClustersAPI DeleteNodeGroup Delete /core/clusters/{cluster_id}/node-groups/{node_group_id} Delete a node group
ClustersAPI FetchClusterNameAvailability Get /core/clusters/name-availability/{name} Fetch cluster name availability
ClustersAPI GetClusterMasterFlavors Get /core/clusters/master-flavors Get Cluster Master Flavors
ClustersAPI GetClusterNodes Get /core/clusters/{cluster_id}/nodes Get Cluster Nodes
ClustersAPI GetClusterVersions Get /core/clusters/versions List Cluster Versions
ClustersAPI GetNodeGroup Get /core/clusters/{cluster_id}/node-groups/{node_group_id} Retrieve a node group in a cluster
ClustersAPI GettingClusterDetail Get /core/clusters/{id} Getting Cluster Detail
ClustersAPI ListClusters Get /core/clusters List Clusters
ClustersAPI ListNodeGroups Get /core/clusters/{cluster_id}/node-groups List node groups for a cluster
ClustersAPI ReconcileCluster Post /core/clusters/{cluster_id}/reconcile Reconcile a cluster
ClustersAPI UpdateNodeGroup Patch /core/clusters/{cluster_id}/node-groups/{node_group_id} Update a node group in a cluster
ComplianceAPI CreateCompliance Post /core/compliance Create compliance
ComplianceAPI DeleteCompliance Delete /core/compliance/{gpu_model} Delete a compliance
ComplianceAPI GetCompliance Get /core/compliance Retrieve GPU compliance
ComplianceAPI UpdateCompliance Put /core/compliance Update a compliance
CreditAPI GetUserCredit Get /billing/user-credit/credit GET: View credit and threshold
CustomerContractAPI GetContractGPUAllocationGraph Get /pricebook/contracts/{contract_id}/gpu_allocation_graph Retrieve GPU Allocation Graph for Contract
CustomerContractAPI ListCustomerContracts Get /pricebook/contracts List Contracts
CustomerContractAPI RetrieveContract Get /pricebook/contracts/{contract_id} Retrieve Contract Details
DashboardAPI GetDashboard Get /core/dashboard Retrieve Dashboard
DeploymentAPI DeleteDeployment Delete /core/marketplace/deployments/{id} Delete Deployment
DeploymentAPI GetDeployment Get /core/marketplace/deployments/{id} Details of Deployment by ID
DeploymentAPI ListDeployments Get /core/marketplace/deployments List Deployments
DeploymentAPI StartDeployment Post /core/marketplace/deployments Start Deployment
EnvironmentAPI CreateEnvironment Post /core/environments Create environment
EnvironmentAPI DeleteEnvironment Delete /core/environments/{id} Delete environment
EnvironmentAPI FetchEnvironmentNameAvailability Get /core/environments/name-availability/{name} Fetch environment name availability
EnvironmentAPI GetEnvironment Get /core/environments/{id} Retrieve environment
EnvironmentAPI ListEnvironments Get /core/environments List environments
EnvironmentAPI UpdateEnvironment Put /core/environments/{id} Update environment
FIPExclusionsAPI CheckIfOrgIsExcludedFromFloatingIPDetachment Get /core/fip-detachment-exclusions/org/{org_id}
FirewallAttachmentAPI AttachFirewallToVMs Post /core/firewalls/{firewall_id}/update-attachments Attach Firewalls to VMs
FirewallsAPI AddRuleToFirewall Post /core/firewalls/{firewall_id}/firewall-rules Add firewall rule to firewall
FirewallsAPI CreateFirewall Post /core/firewalls Create firewall
FirewallsAPI DeleteExistingFirewall Delete /core/firewalls/{id} Delete firewall
FirewallsAPI DeleteRuleFromFirewall Delete /core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id} Delete firewall rules from firewall
FirewallsAPI GetFirewall Get /core/firewalls/{id} Retrieve firewall details
FirewallsAPI ListExistingFirewalls Get /core/firewalls List firewalls
FlavorAPI ListFlavors Get /core/flavors List Flavors
FloatingIpAPI AttachPublicIPToVM Post /core/virtual-machines/{vm_id}/attach-floatingip Attach public IP to virtual machine
FloatingIpAPI DetachPublicIPFromVM Post /core/virtual-machines/{vm_id}/detach-floatingip Detach public IP from virtual machine
GpuAPI ListGPUs Get /core/gpus List GPUs
HealthAPI HealthzEndpoint Get /object-storage/healthz Healthcheck
ImageAPI DeleteImage Delete /core/images/{id} Delete an image
ImageAPI FetchImageNameAvailability Get /core/image/name-availability/{name} Fetch name availability for Images
ImageAPI GetImage Get /core/images/{id} Get Private Image Details
ImageAPI ListImages Get /core/images List Images
InviteAPI AcceptInvite Get /auth/invites/{id}/accept Accept Invite
InviteAPI DeleteInvite Delete /auth/invites/{id} Accept Invite
InviteAPI InviteUserToOrganization Post /auth/invites Invite User to Organization
InviteAPI ListInvites Get /auth/invites List Invites
KeypairAPI DeleteKeyPair Delete /core/keypair/{id} Delete key pair
KeypairAPI ImportKeyPair Post /core/keypairs Import key pair
KeypairAPI ListKeyPairs Get /core/keypairs List key pairs
KeypairAPI UpdateKeyPairName Put /core/keypair/{id} Update key pair name
OrganizationAPI RemoveOrganizationMember Post /auth/organizations/remove-member Remove Organization Member
OrganizationAPI RetrieveOrganizationInformation Get /auth/organizations Retrieve Organization Information
OrganizationAPI UpdateOrganizationInformation Put /auth/organizations/update Update Organization Information
PartnerConfigAPI GetPartnerConfig Get /auth/partner-config Get partner config
PartnerConfigAPI GetPartnerConfigByDomain Get /auth/partner-config/docs
PaymentAPI GetPaymentReceipt Get /billing/payment/receipt/{payment_id} Retrieve Payment Receipt
PaymentAPI InitiatePayment Post /billing/payment/payment-initiate POST: Initiate payment
PaymentAPI ListPaymentDetails Get /billing/payment/payment-details GET: View payment details
PermissionAPI ListPermissions Get /auth/permissions List Permissions
PolicyAPI ListPolicies Get /auth/policies List Policies
PricebookAPI GetPricebook Get /pricebook
ProfileAPI CreateProfile Post /core/profiles Create profile
ProfileAPI DeleteProfile Delete /core/profiles/{id} Delete profile
ProfileAPI GetProfile Get /core/profiles/{id} Retrieve profile details
ProfileAPI ListProfiles Get /core/profiles List profiles
RbacRoleAPI CreateRBACRole Post /auth/roles Create RBAC Role
RbacRoleAPI DeleteRBACRole Delete /auth/roles/{id} Delete RBAC Role
RbacRoleAPI ListRBACRoles Get /auth/roles List RBAC Roles
RbacRoleAPI RetrieveRBACRoleDetails Get /auth/roles/{id} Retrieve RBAC Role Details
RbacRoleAPI UpdateRBACRole Put /auth/roles/{id} Update RBAC Role
RegionAPI ListRegions Get /core/regions List Regions
RegionsAPI ListRegionsEndpoint Get /object-storage/regions Get a list of supported regions
SecurityRulesAPI ListFirewallRuleProtocols Get /core/sg-rules-protocols List firewall rule protocols
SnapshotEventsAPI ListSnapshotEvents Get /core/snapshots/{snapshot_id}/events Fetch all events for a snapshot
SnapshotsAPI CreateCustomImage Post /core/snapshots/{snapshot_id}/image Create an image from a snapshot
SnapshotsAPI DeleteSnapshot Delete /core/snapshots/{id} Delete snapshot
SnapshotsAPI FetchSnapshotNameAvailability Get /core/snapshots/name-availability/{name} Fetch snapshot name availability
SnapshotsAPI GetSnapshot Get /core/snapshots/{id} Retrieve a snapshot
SnapshotsAPI ListSnapshots Get /core/snapshots Retrieve list of snapshots with pagination
SnapshotsAPI RestoreSnapshot Post /core/snapshots/{id}/restore Restore a snapshot
StockAPI GetGPUStock Get /core/stocks Retrieve GPU stocks
TemplateAPI CreateTemplate Post /core/marketplace/templates Create template
TemplateAPI DeleteTemplate Delete /core/marketplace/templates/{id} Delete template
TemplateAPI GetTemplate Get /core/marketplace/templates/{id} Retrieve template details
TemplateAPI ListTemplates Get /core/marketplace/templates List templates
TemplateAPI UpdateTemplate Put /core/marketplace/templates/{id} Update template
UserAPI AddUserBillingInfo Post /billing/user/info POST: Insert billing info
UserAPI GetUserBillingInfo Get /billing/user/info GET: Retrieve billing info
UserAPI UpdateUserBillingInfo Put /billing/user/info PUT: Update billing info
UserDetailChoiceAPI ListDefaultFlavorsAndImages Get /core/user/resources/defaults Retrieve Default Flavors and Images
UserPermissionAPI ListMyUserPermissions Get /auth/users/me/permissions List My User Permissions
UserPermissionAPI ListUserPermissions Get /auth/users/{id}/permissions List User Permissions
VirtualMachineAPI AddVMLabel Put /core/virtual-machines/{vm_id}/label Edit virtual machine labels
VirtualMachineAPI AttachFirewallsToVM Post /core/virtual-machines/{vm_id}/attach-firewalls Attach firewalls to a virtual machine
VirtualMachineAPI CheckVMNameAvailability Get /core/virtual-machines/name-availability/{name} Fetch virtual machine name availability
VirtualMachineAPI CreateFirewallRuleForVM Post /core/virtual-machines/{vm_id}/sg-rules Add firewall rule to virtual machine
VirtualMachineAPI CreateSnapshotForVM Post /core/virtual-machines/{vm_id}/snapshots Create snapshot from a virtual machine
VirtualMachineAPI CreateVMs Post /core/virtual-machines Create virtual machines
VirtualMachineAPI DeleteFirewallRuleForVM Delete /core/virtual-machines/{vm_id}/sg-rules/{sg_rule_id} Delete firewall rule from virtual machine
VirtualMachineAPI DeleteVM Delete /core/virtual-machines/{vm_id} Delete virtual machine
VirtualMachineAPI GetContractVMs Get /core/virtual-machines/contract/{contract_id}/virtual-machines Retrieve virtual machines associated with a contract
VirtualMachineAPI GetVM Get /core/virtual-machines/{vm_id} Retrieve virtual machine details
VirtualMachineAPI GetVMLogs Get /core/virtual-machines/{vm_id}/logs Get virtual machine logs
VirtualMachineAPI GetVMMetrics Get /core/virtual-machines/{vm_id}/metrics Retrieve virtual machine performance metrics
VirtualMachineAPI HardRebootVM Get /core/virtual-machines/{vm_id}/hard-reboot Hard reboot virtual machine
VirtualMachineAPI HibernateVM Get /core/virtual-machines/{vm_id}/hibernate Hibernate virtual machine
VirtualMachineAPI ListVMs Get /core/virtual-machines List virtual machines
VirtualMachineAPI RequestVMLogs Post /core/virtual-machines/{vm_id}/logs Request virtual machine logs
VirtualMachineAPI ResizeVM Post /core/virtual-machines/{vm_id}/resize Resize virtual machine
VirtualMachineAPI RestoreVMFromHibernation Get /core/virtual-machines/{vm_id}/hibernate-restore Restore virtual machine from hibernation
VirtualMachineAPI StartVM Get /core/virtual-machines/{vm_id}/start Start virtual machine
VirtualMachineAPI StopVM Get /core/virtual-machines/{vm_id}/stop Stop virtual machine
VirtualMachineEventsAPI ListVMEvents Get /core/virtual-machines/{vm_id}/events List virtual machine events
VncUrlAPI GetVNCURL Get /core/virtual-machines/{vm_id}/console/{job_id} Get VNC Console Link
VncUrlAPI RequestVMConsole Get /core/virtual-machines/{vm_id}/request-console Request Instance Console
VolumeAPI CreateVolume Post /core/volumes Create volume
VolumeAPI DeleteVolume Delete /core/volumes/{volume_id} Delete volume
VolumeAPI FetchVolumeNameAvailability Get /core/volume/name-availability/{name} Fetch volume name availability
VolumeAPI GetVolume Get /core/volumes/{volume_id} Fetch Volume Details
VolumeAPI ListVolumeTypes Get /core/volume-types List volume types
VolumeAPI ListVolumes Get /core/volumes List volumes
VolumeAPI UpdateVolume Patch /core/volumes/{volume_id} Update volume fields
VolumeAttachmentAPI AttachVolumesToVM Post /core/virtual-machines/{vm_id}/attach-volumes Attach volumes to virtual machine
VolumeAttachmentAPI DetachVolumesFromVM Post /core/virtual-machines/{vm_id}/detach-volumes Detach volumes from virtual machine
VolumeAttachmentAPI UpdateVolumeAttachment Patch /core/volume-attachments/{volume_attachment_id} Update a volume attachment
VouchersAPI RedeemAVoucher Post /billing/billing/vouchers/redeem Redeem a voucher with a voucher_code

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiKey

  • Type: API key
  • API key parameter name: api_key
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: apiKey and passed in as the auth context for each request.

Example

auth := context.WithValue(
		context.Background(),
		hyperstack.ContextAPIKeys,
		map[string]hyperstack.APIKey{
			"apiKey": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

About

Official Go SDK for Hyperstack: https://www.hyperstack.cloud. Please check the infrahub-doc (link below) for the installation instructions.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 7