Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
CreateLogLogentries | POST /service/{service_id}/version/{version_id}/logging/logentries |
Create a Logentries log endpoint |
DeleteLogLogentries | DELETE /service/{service_id}/version/{version_id}/logging/logentries/{logging_logentries_name} |
Delete a Logentries log endpoint |
GetLogLogentries | GET /service/{service_id}/version/{version_id}/logging/logentries/{logging_logentries_name} |
Get a Logentries log endpoint |
ListLogLogentries | GET /service/{service_id}/version/{version_id}/logging/logentries |
List Logentries log endpoints |
UpdateLogLogentries | PUT /service/{service_id}/version/{version_id}/logging/logentries/{logging_logentries_name} |
Update a Logentries log endpoint |
Create a Logentries 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)
port := int32(56) // int32 | The port number. (optional) (default to 20000)
token := "token_example" // string | Use token based authentication. (optional)
useTLS := openapiclient.logging_use_tls_string("0") // LoggingUseTLSString | (optional) (default to LOGGINGUSETLSSTRING_no_tls)
region := "region_example" // string | The region to which to stream logs. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingLogentriesAPI.CreateLogLogentries(ctx, serviceID, versionID).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).Port(port).Token(token).UseTLS(useTLS).Region(region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogentriesAPI.CreateLogLogentries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLogLogentries`: LoggingLogentriesResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogentriesAPI.CreateLogLogentries`: %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 apiCreateLogLogentriesRequest 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 Logentries 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.
loggingLogentriesName := "loggingLogentriesName_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.LoggingLogentriesAPI.DeleteLogLogentries(ctx, serviceID, versionID, loggingLogentriesName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogentriesAPI.DeleteLogLogentries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteLogLogentries`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `LoggingLogentriesAPI.DeleteLogLogentries`: %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. | |
loggingLogentriesName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiDeleteLogLogentriesRequest 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 Logentries 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.
loggingLogentriesName := "loggingLogentriesName_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.LoggingLogentriesAPI.GetLogLogentries(ctx, serviceID, versionID, loggingLogentriesName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogentriesAPI.GetLogLogentries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLogLogentries`: LoggingLogentriesResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogentriesAPI.GetLogLogentries`: %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. | |
loggingLogentriesName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiGetLogLogentriesRequest 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 Logentries 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.LoggingLogentriesAPI.ListLogLogentries(ctx, serviceID, versionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogentriesAPI.ListLogLogentries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLogLogentries`: []LoggingLogentriesResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogentriesAPI.ListLogLogentries`: %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 apiListLogLogentriesRequest 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 Logentries 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.
loggingLogentriesName := "loggingLogentriesName_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)
port := int32(56) // int32 | The port number. (optional) (default to 20000)
token := "token_example" // string | Use token based authentication. (optional)
useTLS := openapiclient.logging_use_tls_string("0") // LoggingUseTLSString | (optional) (default to LOGGINGUSETLSSTRING_no_tls)
region := "region_example" // string | The region to which to stream logs. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.LoggingLogentriesAPI.UpdateLogLogentries(ctx, serviceID, versionID, loggingLogentriesName).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).Port(port).Token(token).UseTLS(useTLS).Region(region).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LoggingLogentriesAPI.UpdateLogLogentries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateLogLogentries`: LoggingLogentriesResponse
fmt.Fprintf(os.Stdout, "Response from `LoggingLogentriesAPI.UpdateLogLogentries`: %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. | |
loggingLogentriesName | string | The name for the real-time logging configuration. |
Other parameters are passed through a pointer to a apiUpdateLogLogentriesRequest 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