from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.firewalls.get(firewall_id="fw_6A05EdQ1dvKYQ")
# Handle response
print(res){
"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
}
]
}
}
}Returns a single firewall by its ID.
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.firewalls.get(firewall_id="fw_6A05EdQ1dvKYQ")
# Handle response
print(res){
"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?