Julineo / cloud-ngfw-aws-go

This is the underlying SDK library for a Terraform provider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Palo Alto Networks cloudngfw

GoDoc

Package cloudngfw is a golang SDK for interacting with the Cloud NGFW AWS API.

Setup

This uses the AWS golang SDK under the hood, so it assumes you have credentials stored in the standard spots.

Example Script

package main

import (
    "context"
    "log"

    "github.com/paloaltonetworks/cloud-ngfw-aws-go"
)

func main() {
    var err error

    c := &awsngfw.Client{
        Host: "api.endpoint.com",
        Region: "us-east-1",
        LfaArn: "arn:aws:iam::123456789:role/CloudNgfwFirewallAdmin",
        LraArn: "arn:aws:iam::123456789:role/CloudNgfwRulestackAdmin",
    }
    if err = c.Setup(); err != nil {
        log.Fatal(err)
    }

    if err = c.RefreshJwts(context.TODO()); err != nil {
		log.Fatal(err)
	}

    log.Printf("Firewall JWT: %s", c.FirewallJwt)
    log.Printf("Rulestack JWT: %s", c.RulestackJwt)
}

About

This is the underlying SDK library for a Terraform provider

License:Mozilla Public License 2.0


Languages

Language:Go 99.8%Language:Makefile 0.2%