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": "enormous-paper-clock",
},
})
# 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": "2025-07-16T18:37:16+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": "enormous-paper-clock",
},
})
# 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": "2025-07-16T18:37:16+00:00"
}
},
"meta": {}
}
Show child attributes
Was this page helpful?