Skip to main content
GET
/
firewalls
/
{firewall_id}
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"log"
)

func main() {
    ctx := context.Background()

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.Firewalls.Get(ctx, "fw_6A05EdQ1dvKYQ")
    if err != nil {
        log.Fatal(err)
    }
    if res.Firewall != nil {
        // handle response
    }
}
{
  "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
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

firewall_id
string
required

The Firewall ID

Response

200 - application/vnd.api+json

Success

data
object
meta
object