Skip to main content
GET
/
plans
/
containers
/
{plan_id}
Go (SDK)
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
          }
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

plan_id
string
required

The Plan ID

Response

200 - application/vnd.api+json

Success

id
string
type
enum<string>
Available options:
container_plan
attributes
object
I