Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| CreateLogHoneycomb | POST /service/{service_id}/version/{version_id}/logging/honeycomb |
Create a Honeycomb log endpoint |
| DeleteLogHoneycomb | DELETE /service/{service_id}/version/{version_id}/logging/honeycomb/{logging_honeycomb_name} |
Delete the Honeycomb log endpoint |
| GetLogHoneycomb | GET /service/{service_id}/version/{version_id}/logging/honeycomb/{logging_honeycomb_name} |
Get a Honeycomb log endpoint |
| ListLogHoneycomb | GET /service/{service_id}/version/{version_id}/logging/honeycomb |
List Honeycomb log endpoints |
| UpdateLogHoneycomb | PUT /service/{service_id}/version/{version_id}/logging/honeycomb/{logging_honeycomb_name} |
Update a Honeycomb log endpoint |
Create a Honeycomb log endpoint
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
versionId := int32(56) // int32 | Integer identifying a service version.
name := "name_example" // string | The name for the real-time logging configuration. (optional)
placement := "placement_example" // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional)
responseCondition := "responseCondition_example" // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
format := "format_example" // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional)
logProcessingRegion := "logProcessingRegion_example" // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional) (default to "none")
formatVersion := int32(56) // int32 | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional) (default to 2)
dataset := "dataset_example" // string | The Honeycomb Dataset you want to log to. (optional)
token := "token_example" // string | The Write Key from the Account page of your Honeycomb account. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHoneycombAPI.CreateLogHoneycomb(ctx, serviceId, versionId).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).LogProcessingRegion(logProcessingRegion).FormatVersion(formatVersion).Dataset(dataset).Token(token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHoneycombAPI.CreateLogHoneycomb`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLogHoneycomb`: LoggingHoneycombResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHoneycombAPI.CreateLogHoneycomb`: %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. | |
| versionId | int32 | Integer identifying a service version. |
Other parameters are passed through a pointer to a apiCreateLogHoneycombRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| name | string | The name for the real-time logging configuration. | placement |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Back to top | Back to API list | Back to README
Delete the Honeycomb log endpoint
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
versionId := int32(56) // int32 | Integer identifying a service version.
loggingHoneycombName := "loggingHoneycombName_example" // string | The name for the real-time logging configuration.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHoneycombAPI.DeleteLogHoneycomb(ctx, serviceId, versionId, loggingHoneycombName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHoneycombAPI.DeleteLogHoneycomb`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteLogHoneycomb`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `LoggingHoneycombAPI.DeleteLogHoneycomb`: %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. | |
| versionId | int32 | Integer identifying a service version. | |
| loggingHoneycombName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiDeleteLogHoneycombRequest 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 a Honeycomb log endpoint
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
versionId := int32(56) // int32 | Integer identifying a service version.
loggingHoneycombName := "loggingHoneycombName_example" // string | The name for the real-time logging configuration.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHoneycombAPI.GetLogHoneycomb(ctx, serviceId, versionId, loggingHoneycombName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHoneycombAPI.GetLogHoneycomb`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLogHoneycomb`: LoggingHoneycombResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHoneycombAPI.GetLogHoneycomb`: %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. | |
| versionId | int32 | Integer identifying a service version. | |
| loggingHoneycombName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiGetLogHoneycombRequest 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
List Honeycomb log endpoints
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
versionId := int32(56) // int32 | Integer identifying a service version.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHoneycombAPI.ListLogHoneycomb(ctx, serviceId, versionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHoneycombAPI.ListLogHoneycomb`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLogHoneycomb`: []LoggingHoneycombResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHoneycombAPI.ListLogHoneycomb`: %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. | |
| versionId | int32 | Integer identifying a service version. |
Other parameters are passed through a pointer to a apiListLogHoneycombRequest 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
Update a Honeycomb log endpoint
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
versionId := int32(56) // int32 | Integer identifying a service version.
loggingHoneycombName := "loggingHoneycombName_example" // string | The name for the real-time logging configuration.
name := "name_example" // string | The name for the real-time logging configuration. (optional)
placement := "placement_example" // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional)
responseCondition := "responseCondition_example" // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
format := "format_example" // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional)
logProcessingRegion := "logProcessingRegion_example" // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional) (default to "none")
formatVersion := int32(56) // int32 | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional) (default to 2)
dataset := "dataset_example" // string | The Honeycomb Dataset you want to log to. (optional)
token := "token_example" // string | The Write Key from the Account page of your Honeycomb account. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHoneycombAPI.UpdateLogHoneycomb(ctx, serviceId, versionId, loggingHoneycombName).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).LogProcessingRegion(logProcessingRegion).FormatVersion(formatVersion).Dataset(dataset).Token(token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHoneycombAPI.UpdateLogHoneycomb`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateLogHoneycomb`: LoggingHoneycombResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHoneycombAPI.UpdateLogHoneycomb`: %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. | |
| versionId | int32 | Integer identifying a service version. | |
| loggingHoneycombName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiUpdateLogHoneycombRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| name | string | The name for the real-time logging configuration. | placement |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json