import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.firewalls.listAssignments({
firewallId: "fw_Qk0Ryqv1dW36X",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"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.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.firewalls.listAssignments({
firewallId: "fw_Qk0Ryqv1dW36X",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"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?