List volumes
Returns
List volumes
package main
import (
"context"
"fmt"
"github.com/onkernel/hypeman-go"
"github.com/onkernel/hypeman-go/option"
)
func main() {
client := hypeman.NewClient(
option.WithAPIKey("My API Key"),
)
volumes, err := client.Volumes.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", volumes)
}
[
{
"id": "vol-data-1",
"created_at": "2025-01-15T09:00:00Z",
"name": "my-data-volume",
"size_gb": 10,
"attachments": [
{
"instance_id": "inst-abc123",
"mount_path": "/mnt/data",
"readonly": false
}
]
}
]
Returns Examples
[
{
"id": "vol-data-1",
"created_at": "2025-01-15T09:00:00Z",
"name": "my-data-volume",
"size_gb": 10,
"attachments": [
{
"instance_id": "inst-abc123",
"mount_path": "/mnt/data",
"readonly": false
}
]
}
]