All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| ListVMEvents | Get /core/virtual-machines/{vm_id}/events | List virtual machine events |
InstanceEvents ListVMEvents(ctx, vmId).Execute()
List virtual machine events
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.VirtualMachineEventsAPI.ListVMEvents(context.Background(), vmId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VirtualMachineEventsAPI.ListVMEvents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListVMEvents`: InstanceEvents
fmt.Fprintf(os.Stdout, "Response from `VirtualMachineEventsAPI.ListVMEvents`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| vmId | int32 |
Other parameters are passed through a pointer to a apiListVMEventsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]