All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
BootVM | Put /vm.boot | Boot the previously created VM instance. |
CreateVM | Put /vm.create | Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created. |
DeleteVM | Put /vm.delete | Delete the cloud-hypervisor Virtual Machine (VM) instance. |
PauseVM | Put /vm.pause | Pause a previously booted VM instance. |
PowerButtonVM | Put /vm.power-button | Trigger a power button in the VM |
RebootVM | Put /vm.reboot | Reboot the VM instance. |
ResumeVM | Put /vm.resume | Resume a previously paused VM instance. |
ShutdownVM | Put /vm.shutdown | Shut the VM instance down. |
ShutdownVMM | Put /vmm.shutdown | Shuts the cloud-hypervisor VMM. |
VmAddDevicePut | Put /vm.add-device | Add a new device to the VM |
VmAddDiskPut | Put /vm.add-disk | Add a new disk to the VM |
VmAddFsPut | Put /vm.add-fs | Add a new virtio-fs device to the VM |
VmAddNetPut | Put /vm.add-net | Add a new network device to the VM |
VmAddPmemPut | Put /vm.add-pmem | Add a new pmem device to the VM |
VmAddVdpaPut | Put /vm.add-vdpa | Add a new vDPA device to the VM |
VmAddVsockPut | Put /vm.add-vsock | Add a new vsock device to the VM |
VmCoredumpPut | Put /vm.coredump | Takes a VM coredump. |
VmCountersGet | Get /vm.counters | Get counters from the VM |
VmInfoGet | Get /vm.info | Returns general information about the cloud-hypervisor Virtual Machine (VM) instance. |
VmReceiveMigrationPut | Put /vm.receive-migration | Receive a VM migration from URL |
VmRemoveDevicePut | Put /vm.remove-device | Remove a device from the VM |
VmResizePut | Put /vm.resize | Resize the VM |
VmResizeZonePut | Put /vm.resize-zone | Resize a memory zone |
VmRestorePut | Put /vm.restore | Restore a VM from a snapshot. |
VmSendMigrationPut | Put /vm.send-migration | Send a VM migration to URL |
VmSnapshotPut | Put /vm.snapshot | Returns a VM snapshot. |
VmmPingGet | Get /vmm.ping | Ping the VMM to check for API server availability |
BootVM(ctx).Execute()
Boot the previously created VM instance.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiBootVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateVM(ctx).VmConfig(vmConfig).Execute()
Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.
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)
}
}
Other parameters are passed through a pointer to a apiCreateVMRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmConfig | VmConfig | The VM configuration |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteVM(ctx).Execute()
Delete the cloud-hypervisor Virtual Machine (VM) instance.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiDeleteVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PauseVM(ctx).Execute()
Pause a previously booted VM instance.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiPauseVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PowerButtonVM(ctx).Execute()
Trigger a power button in the VM
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiPowerButtonVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RebootVM(ctx).Execute()
Reboot the VM instance.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiRebootVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResumeVM(ctx).Execute()
Resume a previously paused VM instance.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiResumeVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShutdownVM(ctx).Execute()
Shut the VM instance down.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiShutdownVMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShutdownVMM(ctx).Execute()
Shuts the cloud-hypervisor VMM.
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)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiShutdownVMMRequest struct via the builder pattern
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddDevicePut(ctx).DeviceConfig(deviceConfig).Execute()
Add a new device to the VM
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)
}
Other parameters are passed through a pointer to a apiVmAddDevicePutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
deviceConfig | DeviceConfig | The path of the new device |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddDiskPut(ctx).DiskConfig(diskConfig).Execute()
Add a new disk to the VM
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
diskConfig := *openapiclient.NewDiskConfig("Path_example") // 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)
}
Other parameters are passed through a pointer to a apiVmAddDiskPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
diskConfig | DiskConfig | The details of the new disk |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddFsPut(ctx).FsConfig(fsConfig).Execute()
Add a new virtio-fs device to the VM
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)
}
Other parameters are passed through a pointer to a apiVmAddFsPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
fsConfig | FsConfig | The details of the new virtio-fs |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddNetPut(ctx).NetConfig(netConfig).Execute()
Add a new network device to the VM
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)
}
Other parameters are passed through a pointer to a apiVmAddNetPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
netConfig | NetConfig | The details of the new network device |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddPmemPut(ctx).PmemConfig(pmemConfig).Execute()
Add a new pmem device to the VM
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)
}
Other parameters are passed through a pointer to a apiVmAddPmemPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
pmemConfig | PmemConfig | The details of the new pmem device |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddVdpaPut(ctx).VdpaConfig(vdpaConfig).Execute()
Add a new vDPA device to the VM
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)
}
Other parameters are passed through a pointer to a apiVmAddVdpaPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vdpaConfig | VdpaConfig | The details of the new vDPA device |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PciDeviceInfo VmAddVsockPut(ctx).VsockConfig(vsockConfig).Execute()
Add a new vsock device to the VM
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)
}
Other parameters are passed through a pointer to a apiVmAddVsockPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vsockConfig | VsockConfig | The details of the new vsock device |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmCoredumpPut(ctx).VmCoredumpData(vmCoredumpData).Execute()
Takes a VM coredump.
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)
}
}
Other parameters are passed through a pointer to a apiVmCoredumpPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmCoredumpData | VmCoredumpData | The coredump configuration |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]map[string]int64 VmCountersGet(ctx).Execute()
Get counters from the VM
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)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiVmCountersGetRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmInfo VmInfoGet(ctx).Execute()
Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
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)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiVmInfoGetRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmReceiveMigrationPut(ctx).ReceiveMigrationData(receiveMigrationData).Execute()
Receive a VM migration from URL
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)
}
}
Other parameters are passed through a pointer to a apiVmReceiveMigrationPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
receiveMigrationData | ReceiveMigrationData | The URL for the reception of migration state |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmRemoveDevicePut(ctx).VmRemoveDevice(vmRemoveDevice).Execute()
Remove a device from the VM
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)
}
}
Other parameters are passed through a pointer to a apiVmRemoveDevicePutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmRemoveDevice | VmRemoveDevice | The identifier of the device |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmResizePut(ctx).VmResize(vmResize).Execute()
Resize the VM
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)
}
}
Other parameters are passed through a pointer to a apiVmResizePutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmResize | VmResize | The target size for the VM |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmResizeZonePut(ctx).VmResizeZone(vmResizeZone).Execute()
Resize a memory zone
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)
}
}
Other parameters are passed through a pointer to a apiVmResizeZonePutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmResizeZone | VmResizeZone | The target size for the memory zone |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmRestorePut(ctx).RestoreConfig(restoreConfig).Execute()
Restore a VM from a snapshot.
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)
}
}
Other parameters are passed through a pointer to a apiVmRestorePutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
restoreConfig | RestoreConfig | The restore configuration |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmSendMigrationPut(ctx).SendMigrationData(sendMigrationData).Execute()
Send a VM migration to URL
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)
}
}
Other parameters are passed through a pointer to a apiVmSendMigrationPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
sendMigrationData | SendMigrationData | The URL for sending the migration state |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmSnapshotPut(ctx).VmSnapshotConfig(vmSnapshotConfig).Execute()
Returns a VM snapshot.
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)
}
}
Other parameters are passed through a pointer to a apiVmSnapshotPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
vmSnapshotConfig | VmSnapshotConfig | The snapshot configuration |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VmmPingResponse VmmPingGet(ctx).Execute()
Ping the VMM to check for API server availability
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)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiVmmPingGetRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]