from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.firewalls.list_assignments(firewall_id="fw_Qk0Ryqv1dW36X", page_size=20, page_number=1)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "fwasg_6A05EdQ1dvKYQ",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_1Qkm7dXzD8nZV",
"hostname": "Durable Concrete Lamp",
"primary_ipv4": "114.216.142.237"
},
"firewall_id": "fw_Qk0Ryqv1dW36X"
}
},
{
"id": "fwasg_ez2A3DVldnawP",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_m5xyZOnNOWM0l",
"hostname": "Rustic Cotton Clock",
"primary_ipv4": "27.26.3.128"
},
"firewall_id": "fw_Qk0Ryqv1dW36X"
}
}
]
}Returns a list of all servers assigned to a particular firewall.
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.firewalls.list_assignments(firewall_id="fw_Qk0Ryqv1dW36X", page_size=20, page_number=1)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "fwasg_6A05EdQ1dvKYQ",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_1Qkm7dXzD8nZV",
"hostname": "Durable Concrete Lamp",
"primary_ipv4": "114.216.142.237"
},
"firewall_id": "fw_Qk0Ryqv1dW36X"
}
},
{
"id": "fwasg_ez2A3DVldnawP",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_m5xyZOnNOWM0l",
"hostname": "Rustic Cotton Clock",
"primary_ipv4": "27.26.3.128"
},
"firewall_id": "fw_Qk0Ryqv1dW36X"
}
}
]
}The Firewall ID
Number of items to return per page
x >= 1Page number to return (starts at 1)
x >= 1Was this page helpful?