import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.firewalls.get({
firewallId: "fw_6A05EdQ1dvKYQ",
});
console.log(result);
}
run();{
"data": {
"id": "fw_6A05EdQ1dvKYQ",
"type": "firewalls",
"attributes": {
"name": "D'Amore-Nienow",
"project": {
"id": "proj_byQrJdNJd30gv",
"name": "Rustic Steel Plate",
"slug": "rustic-steel-plate"
},
"rules": [
{
"from": "233.62.24.172",
"to": "20.231.71.178",
"port": "80",
"protocol": "TCP",
"default": false
},
{
"from": "242.23.216.53",
"to": "136.56.111.45",
"port": "80",
"protocol": "TCP",
"default": false
}
]
}
}
}Retrieve a firewall
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.firewalls.get({
firewallId: "fw_6A05EdQ1dvKYQ",
});
console.log(result);
}
run();{
"data": {
"id": "fw_6A05EdQ1dvKYQ",
"type": "firewalls",
"attributes": {
"name": "D'Amore-Nienow",
"project": {
"id": "proj_byQrJdNJd30gv",
"name": "Rustic Steel Plate",
"slug": "rustic-steel-plate"
},
"rules": [
{
"from": "233.62.24.172",
"to": "20.231.71.178",
"port": "80",
"protocol": "TCP",
"default": false
},
{
"from": "242.23.216.53",
"to": "136.56.111.45",
"port": "80",
"protocol": "TCP",
"default": false
}
]
}
}
}Was this page helpful?