import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.private_networks.create(data={
"type": latitudesh_python_sdk.CreateVirtualNetworkPrivateNetworksType.VIRTUAL_NETWORK,
"attributes": {
"description": "São Paulo VLAN",
"site": latitudesh_python_sdk.CreateVirtualNetworkPrivateNetworksSite.MIA,
"project": "ergonomic-steel-bag",
},
})
# Handle response
print(res){
"data": {
"id": "vlan_3YjJOLQjdvZ87",
"type": "virtual_networks",
"attributes": {
"tags": [],
"vid": 2000,
"name": "MIA-2000",
"description": "São Paulo VLAN",
"site": "MIA",
"created_at": "2026-01-14T15:57:17+00:00"
}
},
"meta": {}
}Creates a new Virtual Network.
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.private_networks.create(data={
"type": latitudesh_python_sdk.CreateVirtualNetworkPrivateNetworksType.VIRTUAL_NETWORK,
"attributes": {
"description": "São Paulo VLAN",
"site": latitudesh_python_sdk.CreateVirtualNetworkPrivateNetworksSite.MIA,
"project": "ergonomic-steel-bag",
},
})
# Handle response
print(res){
"data": {
"id": "vlan_3YjJOLQjdvZ87",
"type": "virtual_networks",
"attributes": {
"tags": [],
"vid": 2000,
"name": "MIA-2000",
"description": "São Paulo VLAN",
"site": "MIA",
"created_at": "2026-01-14T15:57:17+00:00"
}
},
"meta": {}
}Was this page helpful?