Authorizations
Path Parameters
The Virtual Network ID
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.PrivateNetworks.Update(ctx, "vlan_VaNmodjeObE8W", operations.UpdateVirtualNetworkPrivateNetworksRequestBody{
Data: operations.UpdateVirtualNetworkPrivateNetworksData{
ID: "vlan_VaNmodjeObE8W",
Type: operations.UpdateVirtualNetworkPrivateNetworksTypeVirtualNetworks,
Attributes: &operations.UpdateVirtualNetworkPrivateNetworksAttributes{
Tags: []string{
"tag_Mjb3aoBkXRi5nR0gBQ5EhV30voRx",
"tag_QnkPzo8Wj1iWWzg24P5bhXAzrxmm",
},
},
},
})
if err != nil {
log.Fatal(err)
}
if res.VirtualNetwork != nil {
// handle response
}
}{
"data": {
"id": "vlan_VaNmodjeObE8W",
"type": "virtual_networks",
"attributes": {
"tags": [
{
"id": "tag_Mjb3aoBkXRi5nR0gBQ5EhV30voRx",
"name": "Arantar",
"description": "Qui rerum nihil eum.",
"color": "#a7f6f6"
},
{
"id": "tag_QnkPzo8Wj1iWWzg24P5bhXAzrxmm",
"name": "Meneldor",
"description": "Et voluptate quibusdam non.",
"color": "#9ecccc"
}
],
"vid": 2040,
"name": "illo",
"description": "Eum voluptatem nisi et.",
"site": "SAO",
"created_at": null
}
},
"meta": {}
}Update a Virtual Network.
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"github.com/latitudesh/latitudesh-go-sdk/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.PrivateNetworks.Update(ctx, "vlan_VaNmodjeObE8W", operations.UpdateVirtualNetworkPrivateNetworksRequestBody{
Data: operations.UpdateVirtualNetworkPrivateNetworksData{
ID: "vlan_VaNmodjeObE8W",
Type: operations.UpdateVirtualNetworkPrivateNetworksTypeVirtualNetworks,
Attributes: &operations.UpdateVirtualNetworkPrivateNetworksAttributes{
Tags: []string{
"tag_Mjb3aoBkXRi5nR0gBQ5EhV30voRx",
"tag_QnkPzo8Wj1iWWzg24P5bhXAzrxmm",
},
},
},
})
if err != nil {
log.Fatal(err)
}
if res.VirtualNetwork != nil {
// handle response
}
}{
"data": {
"id": "vlan_VaNmodjeObE8W",
"type": "virtual_networks",
"attributes": {
"tags": [
{
"id": "tag_Mjb3aoBkXRi5nR0gBQ5EhV30voRx",
"name": "Arantar",
"description": "Qui rerum nihil eum.",
"color": "#a7f6f6"
},
{
"id": "tag_QnkPzo8Wj1iWWzg24P5bhXAzrxmm",
"name": "Meneldor",
"description": "Et voluptate quibusdam non.",
"color": "#9ecccc"
}
],
"vid": 2040,
"name": "illo",
"description": "Eum voluptatem nisi et.",
"site": "SAO",
"created_at": null
}
},
"meta": {}
}The Virtual Network ID
Show child attributes
Was this page helpful?