import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.privateNetworks.update({
vlanId: "vlan_VaNmodjeObE8W",
requestBody: {
data: {
id: "vlan_VaNmodjeObE8W",
type: "virtual_networks",
attributes: {
tags: [
"tag_RjLvG6oe84IAw7BxxEGaFAXK4l4",
"tag_lpPQ21kXEYfb9az3jRoVIVw4RBk",
],
},
},
},
});
console.log(result);
}
run();{
"data": {
"id": "vlan_VaNmodjeObE8W",
"type": "virtual_networks",
"attributes": {
"tags": [
{
"id": "tag_RjLvG6oe84IAw7BxxEGaFAXK4l4",
"name": "Tal-Elmar",
"description": "Placeat non sit velit.",
"color": "#e5e53e"
},
{
"id": "tag_lpPQ21kXEYfb9az3jRoVIVw4RBk",
"name": "Great Eagle",
"description": "Voluptatem aut in corrupti.",
"color": "#502f50"
}
],
"vid": 2040,
"name": "cupiditate",
"description": "Perspiciatis molestiae laborum quae.",
"site": "SAO",
"created_at": null
}
},
"meta": {}
}Update a Virtual Network.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.privateNetworks.update({
vlanId: "vlan_VaNmodjeObE8W",
requestBody: {
data: {
id: "vlan_VaNmodjeObE8W",
type: "virtual_networks",
attributes: {
tags: [
"tag_RjLvG6oe84IAw7BxxEGaFAXK4l4",
"tag_lpPQ21kXEYfb9az3jRoVIVw4RBk",
],
},
},
},
});
console.log(result);
}
run();{
"data": {
"id": "vlan_VaNmodjeObE8W",
"type": "virtual_networks",
"attributes": {
"tags": [
{
"id": "tag_RjLvG6oe84IAw7BxxEGaFAXK4l4",
"name": "Tal-Elmar",
"description": "Placeat non sit velit.",
"color": "#e5e53e"
},
{
"id": "tag_lpPQ21kXEYfb9az3jRoVIVw4RBk",
"name": "Great Eagle",
"description": "Voluptatem aut in corrupti.",
"color": "#502f50"
}
],
"vid": 2040,
"name": "cupiditate",
"description": "Perspiciatis molestiae laborum quae.",
"site": "SAO",
"created_at": null
}
},
"meta": {}
}Was this page helpful?