import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.firewalls.getAllFirewallAssignments({
filterServer: "sv_Qk0Ryqv1dW36X",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"data": [
{
"id": "fwasg_zGr47qlMDAg0m",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_Qk0Ryqv1dW36X",
"hostname": "Heavy Duty Silk Bottle",
"primary_ipv4": "237.198.84.1"
},
"firewall": {
"id": "fw_pRMLydp0dQKr1",
"name": "Welch LLC"
}
}
},
{
"id": "fwasg_w5AEmq7XDBkWX",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_Qk0Ryqv1dW36X",
"hostname": "Heavy Duty Silk Bottle",
"primary_ipv4": "237.198.84.1"
},
"firewall": {
"id": "fw_zGr47qlMDAg0m",
"name": "Corkery-Windler"
}
}
}
]
}Returns a list of all servers assigned to one or more firewalls.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.firewalls.getAllFirewallAssignments({
filterServer: "sv_Qk0Ryqv1dW36X",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"data": [
{
"id": "fwasg_zGr47qlMDAg0m",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_Qk0Ryqv1dW36X",
"hostname": "Heavy Duty Silk Bottle",
"primary_ipv4": "237.198.84.1"
},
"firewall": {
"id": "fw_pRMLydp0dQKr1",
"name": "Welch LLC"
}
}
},
{
"id": "fwasg_w5AEmq7XDBkWX",
"type": "firewall_assignments",
"attributes": {
"server": {
"id": "sv_Qk0Ryqv1dW36X",
"hostname": "Heavy Duty Silk Bottle",
"primary_ipv4": "237.198.84.1"
},
"firewall": {
"id": "fw_zGr47qlMDAg0m",
"name": "Corkery-Windler"
}
}
}
]
}The server ID to filter by
Number of items to return per page
x >= 1Page number to return (starts at 1)
x >= 1Was this page helpful?