from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.private_networks.list(filter_location="SAO", filter_project="awesome-copper-clock", filter_tags="tag_BZWAJKePr2Fx9kRyyaARImQlXmW,tag_X8yMgb8AZPFrX72lQgrwhBVnPN2", page_size=20, page_number=1)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "vlan_AW6Q2D9lqKLpr",
"type": "virtual_networks",
"attributes": {
"tags": [
{
"id": "tag_rNk62XV5ewSV52K5oAv5FbENl1R",
"name": "tag1",
"description": "Quia quia natus numquam.",
"color": "#ead6ea"
}
],
"vid": 2040,
"description": "Consequatur quo aut quia.",
"created_at": null,
"region": {
"city": "Sydney 243",
"country": "Australia 253",
"site": {
"id": "loc_1ZJrdxnWDg4LV",
"name": "Sydney 243",
"slug": "SYD204",
"facility": "Sydney 243"
}
},
"project": {
"id": "proj_W6Q2D9ordKLpr",
"name": "Sleek Leather Hat",
"slug": "sleek-leather-hat",
"description": "Enormous Copper Lamp",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 2,
"prefixes": 0,
"servers": 1,
"storages": 0,
"virtual_machines": 0,
"vlans": 2
}
},
"assignments_count": 1
}
}
],
"meta": {}
}Lists virtual networks assigned to a project
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.private_networks.list(filter_location="SAO", filter_project="awesome-copper-clock", filter_tags="tag_BZWAJKePr2Fx9kRyyaARImQlXmW,tag_X8yMgb8AZPFrX72lQgrwhBVnPN2", page_size=20, page_number=1)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "vlan_AW6Q2D9lqKLpr",
"type": "virtual_networks",
"attributes": {
"tags": [
{
"id": "tag_rNk62XV5ewSV52K5oAv5FbENl1R",
"name": "tag1",
"description": "Quia quia natus numquam.",
"color": "#ead6ea"
}
],
"vid": 2040,
"description": "Consequatur quo aut quia.",
"created_at": null,
"region": {
"city": "Sydney 243",
"country": "Australia 253",
"site": {
"id": "loc_1ZJrdxnWDg4LV",
"name": "Sydney 243",
"slug": "SYD204",
"facility": "Sydney 243"
}
},
"project": {
"id": "proj_W6Q2D9ordKLpr",
"name": "Sleek Leather Hat",
"slug": "sleek-leather-hat",
"description": "Enormous Copper Lamp",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 2,
"prefixes": 0,
"servers": 1,
"storages": 0,
"virtual_machines": 0,
"vlans": 2
}
},
"assignments_count": 1
}
}
],
"meta": {}
}The location slug to filter by
The project id or slug to filter by
The tags ids to filter by, separated by comma, e.g. filter[tags]=tag_1,tag_2will return ssh keys with tag_1 AND tag_2
Number of items to return per page
x >= 1Page number to return (starts at 1)
x >= 1Was this page helpful?