Authorizations
Path Parameters
The Plan ID
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.GetContainersPlan(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.ContainerPlanData != nil {
// handle response
}
}
{
"id": "<string>",
"type": "container_plan",
"attributes": {
"slug": "<string>",
"specs": {
"cpu": {
"cores": 123,
"count": 123
},
"memory": {
"total": 123
},
"ephemeral_storage": {
"size": 123
},
"gpu": {
"count": 123,
"type": "<string>"
}
},
"regions": [
{
"name": "<string>",
"locations": {
"available": [
"<string>"
],
"in_stock": [
"<string>"
]
},
"stock_level": "unavailable",
"pricing": {
"USD": {
"minute": 123,
"hour": 123
},
"BRL": {
"minute": 123,
"hour": 123
}
}
}
]
}
}
Retrieve a container plan.
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.GetContainersPlan(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.ContainerPlanData != nil {
// handle response
}
}
{
"id": "<string>",
"type": "container_plan",
"attributes": {
"slug": "<string>",
"specs": {
"cpu": {
"cores": 123,
"count": 123
},
"memory": {
"total": 123
},
"ephemeral_storage": {
"size": 123
},
"gpu": {
"count": 123,
"type": "<string>"
}
},
"regions": [
{
"name": "<string>",
"locations": {
"available": [
"<string>"
],
"in_stock": [
"<string>"
]
},
"stock_level": "unavailable",
"pricing": {
"USD": {
"minute": 123,
"hour": 123
},
"BRL": {
"minute": 123,
"hour": 123
}
}
}
]
}
}
The Plan ID
Was this page helpful?