Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| DisableProductNgwaf | DELETE /enabled-products/v1/ngwaf/services/{service_id} |
Disable product |
| EnableProductNgwaf | PUT /enabled-products/v1/ngwaf/services/{service_id} |
Enable product |
| GetProductNgwaf | GET /enabled-products/v1/ngwaf/services/{service_id} |
Get product enablement status |
| GetProductNgwafConfiguration | GET /enabled-products/v1/ngwaf/services/{service_id}/configuration |
Get configuration |
| GetServicesProductNgwaf | GET /enabled-products/v1/ngwaf/services |
Get services with product enabled |
| SetProductNgwafConfiguration | PATCH /enabled-products/v1/ngwaf/services/{service_id}/configuration |
Update configuration |
Disable product
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.ProductNgwafAPI.DisableProductNgwaf(ctx, serviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductNgwafAPI.DisableProductNgwaf`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. |
Other parameters are passed through a pointer to a apiDisableProductNgwafRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
Back to top | Back to API list | Back to README
Enable product
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
ngwafRequestEnable := *openapiclient.NewNgwafRequestEnable("WorkspaceId_example") // NgwafRequestEnable | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.ProductNgwafAPI.EnableProductNgwaf(ctx, serviceId).NgwafRequestEnable(ngwafRequestEnable).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductNgwafAPI.EnableProductNgwaf`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EnableProductNgwaf`: NgwafResponseEnable
fmt.Fprintf(os.Stdout, "Response from `ProductNgwafAPI.EnableProductNgwaf`: %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. |
Other parameters are passed through a pointer to a apiEnableProductNgwafRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| ngwafRequestEnable | NgwafRequestEnable |
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Get product enablement status
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.ProductNgwafAPI.GetProductNgwaf(ctx, serviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductNgwafAPI.GetProductNgwaf`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProductNgwaf`: NgwafResponseEnable
fmt.Fprintf(os.Stdout, "Response from `ProductNgwafAPI.GetProductNgwaf`: %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. |
Other parameters are passed through a pointer to a apiGetProductNgwafRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Get configuration
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.ProductNgwafAPI.GetProductNgwafConfiguration(ctx, serviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductNgwafAPI.GetProductNgwafConfiguration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProductNgwafConfiguration`: NgwafResponseConfigure
fmt.Fprintf(os.Stdout, "Response from `ProductNgwafAPI.GetProductNgwafConfiguration`: %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. |
Other parameters are passed through a pointer to a apiGetProductNgwafConfigurationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Get services with product enabled
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.ProductNgwafAPI.GetServicesProductNgwaf(ctx).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductNgwafAPI.GetServicesProductNgwaf`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetServicesProductNgwaf`: NgwafResponseBodyGetAllServices
fmt.Fprintf(os.Stdout, "Response from `ProductNgwafAPI.GetServicesProductNgwaf`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetServicesProductNgwafRequest struct via the builder pattern
NgwafResponseBodyGetAllServices
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Update configuration
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
ngwafRequestUpdateConfiguration := *openapiclient.NewNgwafRequestUpdateConfiguration() // NgwafRequestUpdateConfiguration | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.ProductNgwafAPI.SetProductNgwafConfiguration(ctx, serviceId).NgwafRequestUpdateConfiguration(ngwafRequestUpdateConfiguration).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductNgwafAPI.SetProductNgwafConfiguration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetProductNgwafConfiguration`: NgwafResponseConfigure
fmt.Fprintf(os.Stdout, "Response from `ProductNgwafAPI.SetProductNgwafConfiguration`: %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. |
Other parameters are passed through a pointer to a apiSetProductNgwafConfigurationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| ngwafRequestUpdateConfiguration | NgwafRequestUpdateConfiguration |
- Content-Type: application/json
- Accept: application/json