Skip to content

Latest commit

 

History

History
271 lines (169 loc) · 7.61 KB

File metadata and controls

271 lines (169 loc) · 7.61 KB

ProductBotManagementAPI

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
DisableProductBotManagement DELETE /enabled-products/v1/bot_management/services/{service_id} Disable product
EnableProductBotManagement PUT /enabled-products/v1/bot_management/services/{service_id} Enable product
GetProductBotManagement GET /enabled-products/v1/bot_management/services/{service_id} Get product enablement status
GetServicesProductBotManagement GET /enabled-products/v1/bot_management/services Get services with product enabled

DisableProductBotManagement

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.ProductBotManagementAPI.DisableProductBotManagement(ctx, serviceId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProductBotManagementAPI.DisableProductBotManagement`: %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 apiDisableProductBotManagementRequest 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

EnableProductBotManagement

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.

    cfg := fastly.NewConfiguration()
    apiClient := fastly.NewAPIClient(cfg)
    ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
    resp, r, err := apiClient.ProductBotManagementAPI.EnableProductBotManagement(ctx, serviceId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProductBotManagementAPI.EnableProductBotManagement`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EnableProductBotManagement`: BotManagementResponseBodyEnable
    fmt.Fprintf(os.Stdout, "Response from `ProductBotManagementAPI.EnableProductBotManagement`: %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 apiEnableProductBotManagementRequest struct via the builder pattern

Name Type Description Notes

Return type

BotManagementResponseBodyEnable

Authorization

API Token

HTTP request headers

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

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

GetProductBotManagement

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.ProductBotManagementAPI.GetProductBotManagement(ctx, serviceId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProductBotManagementAPI.GetProductBotManagement`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetProductBotManagement`: BotManagementResponseBodyEnable
    fmt.Fprintf(os.Stdout, "Response from `ProductBotManagementAPI.GetProductBotManagement`: %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 apiGetProductBotManagementRequest struct via the builder pattern

Name Type Description Notes

Return type

BotManagementResponseBodyEnable

Authorization

API Token

HTTP request headers

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

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

GetServicesProductBotManagement

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.ProductBotManagementAPI.GetServicesProductBotManagement(ctx).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProductBotManagementAPI.GetServicesProductBotManagement`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetServicesProductBotManagement`: BotManagementResponseBodyGetAllServices
    fmt.Fprintf(os.Stdout, "Response from `ProductBotManagementAPI.GetServicesProductBotManagement`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

BotManagementResponseBodyGetAllServices

Authorization

API Token

HTTP request headers

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

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