package main
import (
"fmt"
"os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/wafv2"
)
func main() {
sess := session.Must(session.NewSessionWithOptions(
session.Options{
Profile: os.Getenv("AWS_PROFILE"),
SharedConfigState: session.SharedConfigEnable,
}))
svc := wafv2.New(sess, sess.Config.WithRegion("us-east-1"))
params := &wafv2.ListWebACLsInput{
Limit: aws.Int64(5),
Scope: aws.String("CLOUDFRONT"),
}
resp, err := svc.ListWebACLs(params)
if err != nil {
panic(err)
}
fmt.Println(resp)
}