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 |
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.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)
}
}| 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 apiDisableProductBotManagementRequest 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.
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)
}| 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 apiEnableProductBotManagementRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
BotManagementResponseBodyEnable
- Content-Type: Not defined
- 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.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)
}| 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 apiGetProductBotManagementRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
BotManagementResponseBodyEnable
- 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.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)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetServicesProductBotManagementRequest struct via the builder pattern
BotManagementResponseBodyGetAllServices
- Content-Type: Not defined
- Accept: application/json