Authorizations
Response
200 - application/vnd.api+json
Success
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Plans.VM.List(ctx)
if err != nil {
log.Fatal(err)
}
if res.VirtualMachinePlans != nil {
// handle response
}
}{
"data": [
{
"id": "plan_j0L6WO1QOPlXy",
"type": "virtual_machine_plans",
"attributes": {
"name": "vm.l40s.tiny",
"specs": {
"memory": 16,
"vcpus": 14,
"disk": {
"type": "local",
"size": {
"amount": 150,
"unit": "gib"
}
}
},
"regions": [
{
"name": "United States",
"available": [
"DAL"
],
"pricing": {
"USD": {
"hour": 1,
"month": 720,
"year": 8640
},
"BRL": {
"hour": 1,
"month": 720,
"year": 8640
}
}
}
],
"stock_level": "low"
}
}
]
}package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Plans.VM.List(ctx)
if err != nil {
log.Fatal(err)
}
if res.VirtualMachinePlans != nil {
// handle response
}
}{
"data": [
{
"id": "plan_j0L6WO1QOPlXy",
"type": "virtual_machine_plans",
"attributes": {
"name": "vm.l40s.tiny",
"specs": {
"memory": 16,
"vcpus": 14,
"disk": {
"type": "local",
"size": {
"amount": 150,
"unit": "gib"
}
}
},
"regions": [
{
"name": "United States",
"available": [
"DAL"
],
"pricing": {
"USD": {
"hour": 1,
"month": 720,
"year": 8640
},
"BRL": {
"hour": 1,
"month": 720,
"year": 8640
}
}
}
],
"stock_level": "low"
}
}
]
}Success
Show child attributes
Was this page helpful?