Skip to content

Latest commit

 

History

History
153 lines (96 loc) · 3.65 KB

File metadata and controls

153 lines (96 loc) · 3.65 KB

\VncUrlAPI

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

Method HTTP request Description
GetVNCURL Get /core/virtual-machines/{vm_id}/console/{job_id} Get VNC Console Link
RequestVMConsole Get /core/virtual-machines/{vm_id}/request-console Request Instance Console

GetVNCURL

VNCURL GetVNCURL(ctx, vmId, jobId).Execute()

Get VNC Console Link

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)

func main() {
	vmId := int32(56) // int32 | 
	jobId := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.VncUrlAPI.GetVNCURL(context.Background(), vmId, jobId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `VncUrlAPI.GetVNCURL``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetVNCURL`: VNCURL
	fmt.Fprintf(os.Stdout, "Response from `VncUrlAPI.GetVNCURL`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmId int32
jobId int32

Other Parameters

Other parameters are passed through a pointer to a apiGetVNCURLRequest struct via the builder pattern

Name Type Description Notes

Return type

VNCURL

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RequestVMConsole

RequestConsole RequestVMConsole(ctx, vmId).Execute()

Request Instance Console

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/NexGenCloud/hyperstack-sdk-go/hyperstack"
)

func main() {
	vmId := int32(56) // int32 | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.VncUrlAPI.RequestVMConsole(context.Background(), vmId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `VncUrlAPI.RequestVMConsole``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RequestVMConsole`: RequestConsole
	fmt.Fprintf(os.Stdout, "Response from `VncUrlAPI.RequestVMConsole`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
vmId int32

Other Parameters

Other parameters are passed through a pointer to a apiRequestVMConsoleRequest struct via the builder pattern

Name Type Description Notes

Return type

RequestConsole

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]