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.Servers.GetDeployConfig(ctx, "sv_pRMLydp0dQKr1")
if err != nil {
log.Fatal(err)
}
if res.DeployConfig != nil {
// handle response
}
}{
"data": {
"id": "sv_pRMLydp0dQKr1",
"type": "deploy_config",
"attributes": {
"ssh_keys": [
"ssh_0g1mbDwBqLv5B"
],
"user_data": "ud_0g1mbDwBqLv5B",
"raid": "raid-0",
"operating_system": "debian_10",
"hostname": "Asoka",
"ipxe_url": null,
"ipxe": null,
"partitions": [
{
"path": "/",
"size_in_gb": 300,
"filesystem_type": "ext4"
}
]
}
},
"meta": {}
}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.Servers.GetDeployConfig(ctx, "sv_pRMLydp0dQKr1")
if err != nil {
log.Fatal(err)
}
if res.DeployConfig != nil {
// handle response
}
}{
"data": {
"id": "sv_pRMLydp0dQKr1",
"type": "deploy_config",
"attributes": {
"ssh_keys": [
"ssh_0g1mbDwBqLv5B"
],
"user_data": "ud_0g1mbDwBqLv5B",
"raid": "raid-0",
"operating_system": "debian_10",
"hostname": "Asoka",
"ipxe_url": null,
"ipxe": null,
"partitions": [
{
"path": "/",
"size_in_gb": 300,
"filesystem_type": "ext4"
}
]
}
},
"meta": {}
}Was this page helpful?