Back to Kata Containers

DefaultApi

src/runtime/virtcontainers/pkg/cloud-hypervisor/client/docs/DefaultApi.md

3.30.044.3 KB
Original Source

\DefaultApi

All URIs are relative to http://localhost/api/v1

MethodHTTP requestDescription
BootVMPut /vm.bootBoot the previously created VM instance.
CreateVMPut /vm.createCreate the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.
DeleteVMPut /vm.deleteDelete the cloud-hypervisor Virtual Machine (VM) instance.
PauseVMPut /vm.pausePause a previously booted VM instance.
PowerButtonVMPut /vm.power-buttonTrigger a power button in the VM
RebootVMPut /vm.rebootReboot the VM instance.
ResumeVMPut /vm.resumeResume a previously paused VM instance.
ShutdownVMPut /vm.shutdownShut the VM instance down.
ShutdownVMMPut /vmm.shutdownShuts the cloud-hypervisor VMM.
VmAddDevicePutPut /vm.add-deviceAdd a new device to the VM
VmAddDiskPutPut /vm.add-diskAdd a new disk to the VM
VmAddFsPutPut /vm.add-fsAdd a new virtio-fs device to the VM
VmAddNetPutPut /vm.add-netAdd a new network device to the VM
VmAddPmemPutPut /vm.add-pmemAdd a new pmem device to the VM
VmAddUserDevicePutPut /vm.add-user-deviceAdd a new userspace device to the VM
VmAddVdpaPutPut /vm.add-vdpaAdd a new vDPA device to the VM
VmAddVsockPutPut /vm.add-vsockAdd a new vsock device to the VM
VmCoredumpPutPut /vm.coredumpTakes a VM coredump.
VmCountersGetGet /vm.countersGet counters from the VM
VmInfoGetGet /vm.infoReturns general information about the cloud-hypervisor Virtual Machine (VM) instance.
VmReceiveMigrationPutPut /vm.receive-migrationReceive a VM migration from URL
VmRemoveDevicePutPut /vm.remove-deviceRemove a device from the VM
VmResizeDiskPutPut /vm.resize-diskResize a disk
VmResizePutPut /vm.resizeResize the VM
VmResizeZonePutPut /vm.resize-zoneResize a memory zone
VmRestorePutPut /vm.restoreRestore a VM from a snapshot.
VmSendMigrationPutPut /vm.send-migrationSend a VM migration to URL
VmSnapshotPutPut /vm.snapshotReturns a VM snapshot.
VmmNmiPutPut /vmm.nmiInject an NMI.
VmmPingGetGet /vmm.pingPing the VMM to check for API server availability

BootVM

BootVM(ctx).Execute()

Boot the previously created VM instance.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.BootVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BootVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CreateVM

CreateVM(ctx).VmConfig(vmConfig).Execute()

Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmConfig := *openapiclient.NewVmConfig(*openapiclient.NewPayloadConfig()) // VmConfig | The VM configuration

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.CreateVM(context.Background()).VmConfig(vmConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmConfigVmConfigThe VM configuration

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

DeleteVM

DeleteVM(ctx).Execute()

Delete the cloud-hypervisor Virtual Machine (VM) instance.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.DeleteVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

PauseVM

PauseVM(ctx).Execute()

Pause a previously booted VM instance.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.PauseVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PauseVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

PowerButtonVM

PowerButtonVM(ctx).Execute()

Trigger a power button in the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.PowerButtonVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.PowerButtonVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

RebootVM

RebootVM(ctx).Execute()

Reboot the VM instance.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.RebootVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RebootVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ResumeVM

ResumeVM(ctx).Execute()

Resume a previously paused VM instance.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.ResumeVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ResumeVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ShutdownVM

ShutdownVM(ctx).Execute()

Shut the VM instance down.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.ShutdownVM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ShutdownVM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ShutdownVMM

ShutdownVMM(ctx).Execute()

Shuts the cloud-hypervisor VMM.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.ShutdownVMM(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ShutdownVMM``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

VmAddDevicePut

PciDeviceInfo VmAddDevicePut(ctx).DeviceConfig(deviceConfig).Execute()

Add a new device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    deviceConfig := *openapiclient.NewDeviceConfig("Path_example") // DeviceConfig | The path of the new device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddDevicePut(context.Background()).DeviceConfig(deviceConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddDevicePut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddDevicePut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddDevicePut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
deviceConfigDeviceConfigThe path of the new device

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddDiskPut

PciDeviceInfo VmAddDiskPut(ctx).DiskConfig(diskConfig).Execute()

Add a new disk to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    diskConfig := *openapiclient.NewDiskConfig() // DiskConfig | The details of the new disk

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddDiskPut(context.Background()).DiskConfig(diskConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddDiskPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddDiskPut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddDiskPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
diskConfigDiskConfigThe details of the new disk

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddFsPut

PciDeviceInfo VmAddFsPut(ctx).FsConfig(fsConfig).Execute()

Add a new virtio-fs device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    fsConfig := *openapiclient.NewFsConfig("Tag_example", "Socket_example", int32(123), int32(123)) // FsConfig | The details of the new virtio-fs

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddFsPut(context.Background()).FsConfig(fsConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddFsPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddFsPut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddFsPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
fsConfigFsConfigThe details of the new virtio-fs

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddNetPut

PciDeviceInfo VmAddNetPut(ctx).NetConfig(netConfig).Execute()

Add a new network device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    netConfig := *openapiclient.NewNetConfig() // NetConfig | The details of the new network device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddNetPut(context.Background()).NetConfig(netConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddNetPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddNetPut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddNetPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
netConfigNetConfigThe details of the new network device

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddPmemPut

PciDeviceInfo VmAddPmemPut(ctx).PmemConfig(pmemConfig).Execute()

Add a new pmem device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    pmemConfig := *openapiclient.NewPmemConfig("File_example") // PmemConfig | The details of the new pmem device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddPmemPut(context.Background()).PmemConfig(pmemConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddPmemPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddPmemPut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddPmemPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
pmemConfigPmemConfigThe details of the new pmem device

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddUserDevicePut

PciDeviceInfo VmAddUserDevicePut(ctx).VmAddUserDevice(vmAddUserDevice).Execute()

Add a new userspace device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmAddUserDevice := *openapiclient.NewVmAddUserDevice("Socket_example") // VmAddUserDevice | The path of the new device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddUserDevicePut(context.Background()).VmAddUserDevice(vmAddUserDevice).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddUserDevicePut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddUserDevicePut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddUserDevicePut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmAddUserDeviceVmAddUserDeviceThe path of the new device

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddVdpaPut

PciDeviceInfo VmAddVdpaPut(ctx).VdpaConfig(vdpaConfig).Execute()

Add a new vDPA device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vdpaConfig := *openapiclient.NewVdpaConfig("Path_example", int32(123)) // VdpaConfig | The details of the new vDPA device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddVdpaPut(context.Background()).VdpaConfig(vdpaConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddVdpaPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddVdpaPut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddVdpaPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vdpaConfigVdpaConfigThe details of the new vDPA device

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmAddVsockPut

PciDeviceInfo VmAddVsockPut(ctx).VsockConfig(vsockConfig).Execute()

Add a new vsock device to the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vsockConfig := *openapiclient.NewVsockConfig(int64(123), "Socket_example") // VsockConfig | The details of the new vsock device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmAddVsockPut(context.Background()).VsockConfig(vsockConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmAddVsockPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmAddVsockPut`: PciDeviceInfo
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmAddVsockPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vsockConfigVsockConfigThe details of the new vsock device

Return type

PciDeviceInfo

Authorization

No authorization required

HTTP request headers

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

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

VmCoredumpPut

VmCoredumpPut(ctx).VmCoredumpData(vmCoredumpData).Execute()

Takes a VM coredump.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmCoredumpData := *openapiclient.NewVmCoredumpData() // VmCoredumpData | The coredump configuration

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmCoredumpPut(context.Background()).VmCoredumpData(vmCoredumpData).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmCoredumpPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmCoredumpDataVmCoredumpDataThe coredump configuration

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmCountersGet

map[string]map[string]int64 VmCountersGet(ctx).Execute()

Get counters from the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmCountersGet(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmCountersGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `VmCountersGet`: map[string]map[string]int64
    fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VmCountersGet`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

map[string]map[string]int64

Authorization

No authorization required

HTTP request headers

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

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

VmInfoGet

VmInfo VmInfoGet(ctx).Execute()

Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

VmInfo

Authorization

No authorization required

HTTP request headers

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

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

VmReceiveMigrationPut

VmReceiveMigrationPut(ctx).ReceiveMigrationData(receiveMigrationData).Execute()

Receive a VM migration from URL

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    receiveMigrationData := *openapiclient.NewReceiveMigrationData("ReceiverUrl_example") // ReceiveMigrationData | The URL for the reception of migration state

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmReceiveMigrationPut(context.Background()).ReceiveMigrationData(receiveMigrationData).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmReceiveMigrationPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
receiveMigrationDataReceiveMigrationDataThe URL for the reception of migration state

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmRemoveDevicePut

VmRemoveDevicePut(ctx).VmRemoveDevice(vmRemoveDevice).Execute()

Remove a device from the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmRemoveDevice := *openapiclient.NewVmRemoveDevice() // VmRemoveDevice | The identifier of the device

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmRemoveDevicePut(context.Background()).VmRemoveDevice(vmRemoveDevice).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmRemoveDevicePut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmRemoveDeviceVmRemoveDeviceThe identifier of the device

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmResizeDiskPut

VmResizeDiskPut(ctx).VmResizeDisk(vmResizeDisk).Execute()

Resize a disk

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmResizeDisk := *openapiclient.NewVmResizeDisk() // VmResizeDisk | Resizes a disk attached to the VM

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmResizeDiskPut(context.Background()).VmResizeDisk(vmResizeDisk).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmResizeDiskPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmResizeDiskVmResizeDiskResizes a disk attached to the VM

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmResizePut

VmResizePut(ctx).VmResize(vmResize).Execute()

Resize the VM

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmResize := *openapiclient.NewVmResize() // VmResize | The target size for the VM

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmResizePut(context.Background()).VmResize(vmResize).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmResizePut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmResizeVmResizeThe target size for the VM

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmResizeZonePut

VmResizeZonePut(ctx).VmResizeZone(vmResizeZone).Execute()

Resize a memory zone

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmResizeZone := *openapiclient.NewVmResizeZone() // VmResizeZone | The target size for the memory zone

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmResizeZonePut(context.Background()).VmResizeZone(vmResizeZone).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmResizeZonePut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmResizeZoneVmResizeZoneThe target size for the memory zone

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmRestorePut

VmRestorePut(ctx).RestoreConfig(restoreConfig).Execute()

Restore a VM from a snapshot.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    restoreConfig := *openapiclient.NewRestoreConfig("SourceUrl_example") // RestoreConfig | The restore configuration

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmRestorePut(context.Background()).RestoreConfig(restoreConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmRestorePut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
restoreConfigRestoreConfigThe restore configuration

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmSendMigrationPut

VmSendMigrationPut(ctx).SendMigrationData(sendMigrationData).Execute()

Send a VM migration to URL

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    sendMigrationData := *openapiclient.NewSendMigrationData("DestinationUrl_example") // SendMigrationData | The URL for sending the migration state

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmSendMigrationPut(context.Background()).SendMigrationData(sendMigrationData).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmSendMigrationPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
sendMigrationDataSendMigrationDataThe URL for sending the migration state

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmSnapshotPut

VmSnapshotPut(ctx).VmSnapshotConfig(vmSnapshotConfig).Execute()

Returns a VM snapshot.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    vmSnapshotConfig := *openapiclient.NewVmSnapshotConfig() // VmSnapshotConfig | The snapshot configuration

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmSnapshotPut(context.Background()).VmSnapshotConfig(vmSnapshotConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmSnapshotPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
vmSnapshotConfigVmSnapshotConfigThe snapshot configuration

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

VmmNmiPut

VmmNmiPut(ctx).Execute()

Inject an NMI.

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DefaultApi.VmmNmiPut(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VmmNmiPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

VmmPingGet

VmmPingResponse VmmPingGet(ctx).Execute()

Ping the VMM to check for API server availability

Example

go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

VmmPingResponse

Authorization

No authorization required

HTTP request headers

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

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