Skip to content

Latest commit

 

History

History
409 lines (259 loc) · 11.6 KB

File metadata and controls

409 lines (259 loc) · 11.6 KB

ProductNgwafAPI

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

DisableProductNgwaf

Disable product

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId string Alphanumeric string identifying the service.

Other Parameters

Other parameters are passed through a pointer to a apiDisableProductNgwafRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

Back to top | Back to API list | Back to README

EnableProductNgwaf

Enable product

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId string Alphanumeric string identifying the service.

Other Parameters

Other parameters are passed through a pointer to a apiEnableProductNgwafRequest struct via the builder pattern

Name Type Description Notes
ngwafRequestEnable NgwafRequestEnable

Return type

NgwafResponseEnable

Authorization

API Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Back to top | Back to API list | Back to README

GetProductNgwaf

Get product enablement status

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId string Alphanumeric string identifying the service.

Other Parameters

Other parameters are passed through a pointer to a apiGetProductNgwafRequest struct via the builder pattern

Name Type Description Notes

Return type

NgwafResponseEnable

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Back to top | Back to API list | Back to README

GetProductNgwafConfiguration

Get configuration

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId string Alphanumeric string identifying the service.

Other Parameters

Other parameters are passed through a pointer to a apiGetProductNgwafConfigurationRequest struct via the builder pattern

Name Type Description Notes

Return type

NgwafResponseConfigure

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Back to top | Back to API list | Back to README

GetServicesProductNgwaf

Get services with product enabled

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetServicesProductNgwafRequest struct via the builder pattern

Return type

NgwafResponseBodyGetAllServices

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Back to top | Back to API list | Back to README

SetProductNgwafConfiguration

Update configuration

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
serviceId string Alphanumeric string identifying the service.

Other Parameters

Other parameters are passed through a pointer to a apiSetProductNgwafConfigurationRequest struct via the builder pattern

Name Type Description Notes
ngwafRequestUpdateConfiguration NgwafRequestUpdateConfiguration

Return type

NgwafResponseConfigure

Authorization

API Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Back to top | Back to API list | Back to README