Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
CreateLogLoggly | POST /service/{service_id}/version/{version_id}/logging/loggly |
Create a Loggly log endpoint |
DeleteLogLoggly | DELETE /service/{service_id}/version/{version_id}/logging/loggly/{logging_loggly_name} |
Delete a Loggly log endpoint |
GetLogLoggly | GET /service/{service_id}/version/{version_id}/logging/loggly/{logging_loggly_name} |
Get a Loggly log endpoint |
ListLogLoggly | GET /service/{service_id}/version/{version_id}/logging/loggly |
List Loggly log endpoints |
UpdateLogLoggly | PUT /service/{service_id}/version/{version_id}/logging/loggly/{logging_loggly_name} |
Update a Loggly log endpoint |
Create a Loggly 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://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingLogglyAPI.CreateLogLoggly(ctx, serviceID, versionID).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).Token(token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogglyAPI.CreateLogLoggly`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLogLoggly`: LoggingLogglyResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogglyAPI.CreateLogLoggly`: %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 apiCreateLogLogglyRequest 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 a Loggly 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.
loggingLogglyName := "loggingLogglyName_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.LoggingLogglyAPI.DeleteLogLoggly(ctx, serviceID, versionID, loggingLogglyName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogglyAPI.DeleteLogLoggly`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteLogLoggly`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `LoggingLogglyAPI.DeleteLogLoggly`: %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. | |
loggingLogglyName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiDeleteLogLogglyRequest 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 Loggly 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.
loggingLogglyName := "loggingLogglyName_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.LoggingLogglyAPI.GetLogLoggly(ctx, serviceID, versionID, loggingLogglyName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogglyAPI.GetLogLoggly`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLogLoggly`: LoggingLogglyResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogglyAPI.GetLogLoggly`: %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. | |
loggingLogglyName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiGetLogLogglyRequest 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 Loggly 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.LoggingLogglyAPI.ListLogLoggly(ctx, serviceID, versionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogglyAPI.ListLogLoggly`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLogLoggly`: []LoggingLogglyResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogglyAPI.ListLogLoggly`: %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 apiListLogLogglyRequest 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 Loggly 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.
loggingLogglyName := "loggingLogglyName_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://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingLogglyAPI.UpdateLogLoggly(ctx, serviceID, versionID, loggingLogglyName).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).Token(token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogglyAPI.UpdateLogLoggly`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateLogLoggly`: LoggingLogglyResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogglyAPI.UpdateLogLoggly`: %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. | |
loggingLogglyName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiUpdateLogLogglyRequest 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