Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
CreateOwaspSettings | POST /service/{service_id}/wafs/{firewall_id}/owasp |
Create an OWASP settings object |
GetOwaspSettings | GET /service/{service_id}/wafs/{firewall_id}/owasp |
Get the OWASP settings object |
UpdateOwaspSettings | PATCH /service/{service_id}/wafs/{firewall_id}/owasp |
Update the OWASP settings object |
Create an OWASP settings object
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceID := "serviceId_example" // string | Alphanumeric string identifying the service.
firewallID := "firewallId_example" // string | Alphanumeric string identifying a Firewall.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LegacyWafOwaspAPI.CreateOwaspSettings(ctx, serviceID, firewallID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LegacyWafOwaspAPI.CreateOwaspSettings`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateOwaspSettings`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `LegacyWafOwaspAPI.CreateOwaspSettings`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
serviceID | string | Alphanumeric string identifying the service. | |
firewallID | string | Alphanumeric string identifying a Firewall. |
Other parameters are passed through a pointer to a apiCreateOwaspSettingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
Get the OWASP settings object
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceID := "serviceId_example" // string | Alphanumeric string identifying the service.
firewallID := "firewallId_example" // string | Alphanumeric string identifying a Firewall.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LegacyWafOwaspAPI.GetOwaspSettings(ctx, serviceID, firewallID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LegacyWafOwaspAPI.GetOwaspSettings`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOwaspSettings`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `LegacyWafOwaspAPI.GetOwaspSettings`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
serviceID | string | Alphanumeric string identifying the service. | |
firewallID | string | Alphanumeric string identifying a Firewall. |
Other parameters are passed through a pointer to a apiGetOwaspSettingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]any
- Content-Type: Not defined
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
Update the OWASP settings object
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceID := "serviceId_example" // string | Alphanumeric string identifying the service.
firewallID := "firewallId_example" // string | Alphanumeric string identifying a Firewall.
requestBody := map[string]map[string]any{"key": map[string]any(123)} // map[string]map[string]any | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LegacyWafOwaspAPI.UpdateOwaspSettings(ctx, serviceID, firewallID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LegacyWafOwaspAPI.UpdateOwaspSettings`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateOwaspSettings`: map[string]any
fmt.Fprintf(os.Stdout, "Response from `LegacyWafOwaspAPI.UpdateOwaspSettings`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
serviceID | string | Alphanumeric string identifying the service. | |
firewallID | string | Alphanumeric string identifying a Firewall. |
Other parameters are passed through a pointer to a apiUpdateOwaspSettingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
requestBody | map[string]map[string]any |
map[string]any
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json