Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
CreateLogHeroku | POST /service/{service_id}/version/{version_id}/logging/heroku |
Create a Heroku log endpoint |
DeleteLogHeroku | DELETE /service/{service_id}/version/{version_id}/logging/heroku/{logging_heroku_name} |
Delete the Heroku log endpoint |
GetLogHeroku | GET /service/{service_id}/version/{version_id}/logging/heroku/{logging_heroku_name} |
Get a Heroku log endpoint |
ListLogHeroku | GET /service/{service_id}/version/{version_id}/logging/heroku |
List Heroku log endpoints |
UpdateLogHeroku | PUT /service/{service_id}/version/{version_id}/logging/heroku/{logging_heroku_name} |
Update the Heroku log endpoint |
Create a Heroku 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://docs.fastly.com/en/guides/custom-log-formats). (optional) (default to "%h %l %u %t \"%r\" %>s %b")
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)
token := "token_example" // string | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional)
url := "url_example" // string | The URL to stream logs to. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHerokuAPI.CreateLogHeroku(ctx, serviceID, versionID).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).Token(token).URL(url).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHerokuAPI.CreateLogHeroku`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLogHeroku`: LoggingHerokuResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHerokuAPI.CreateLogHeroku`: %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 apiCreateLogHerokuRequest 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 Heroku 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.
loggingHerokuName := "loggingHerokuName_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.LoggingHerokuAPI.DeleteLogHeroku(ctx, serviceID, versionID, loggingHerokuName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHerokuAPI.DeleteLogHeroku`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteLogHeroku`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `LoggingHerokuAPI.DeleteLogHeroku`: %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. | |
loggingHerokuName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiDeleteLogHerokuRequest 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 Heroku 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.
loggingHerokuName := "loggingHerokuName_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.LoggingHerokuAPI.GetLogHeroku(ctx, serviceID, versionID, loggingHerokuName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHerokuAPI.GetLogHeroku`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLogHeroku`: LoggingHerokuResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHerokuAPI.GetLogHeroku`: %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. | |
loggingHerokuName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiGetLogHerokuRequest 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 Heroku 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.LoggingHerokuAPI.ListLogHeroku(ctx, serviceID, versionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHerokuAPI.ListLogHeroku`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLogHeroku`: []LoggingHerokuResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHerokuAPI.ListLogHeroku`: %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 apiListLogHerokuRequest 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 the Heroku 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.
loggingHerokuName := "loggingHerokuName_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://docs.fastly.com/en/guides/custom-log-formats). (optional) (default to "%h %l %u %t \"%r\" %>s %b")
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)
token := "token_example" // string | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional)
url := "url_example" // string | The URL to stream logs to. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingHerokuAPI.UpdateLogHeroku(ctx, serviceID, versionID, loggingHerokuName).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).Token(token).URL(url).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingHerokuAPI.UpdateLogHeroku`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateLogHeroku`: LoggingHerokuResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingHerokuAPI.UpdateLogHeroku`: %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. | |
loggingHerokuName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiUpdateLogHerokuRequest 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