Skip to content

Latest commit

 

History

History
396 lines (270 loc) · 21.1 KB

LoggingOpenstackAPI.md

File metadata and controls

396 lines (270 loc) · 21.1 KB

LoggingOpenstackAPI

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
CreateLogOpenstack POST /service/{service_id}/version/{version_id}/logging/openstack Create an OpenStack log endpoint
DeleteLogOpenstack DELETE /service/{service_id}/version/{version_id}/logging/openstack/{logging_openstack_name} Delete an OpenStack log endpoint
GetLogOpenstack GET /service/{service_id}/version/{version_id}/logging/openstack/{logging_openstack_name} Get an OpenStack log endpoint
ListLogOpenstack GET /service/{service_id}/version/{version_id}/logging/openstack List OpenStack log endpoints
UpdateLogOpenstack PUT /service/{service_id}/version/{version_id}/logging/openstack/{logging_openstack_name} Update an OpenStack log endpoint

CreateLogOpenstack

Create an OpenStack log endpoint

Example

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)
    messageType := "messageType_example" // string | How the message should be formatted. (optional) (default to "classic")
    timestampFormat := "timestampFormat_example" // string | A timestamp format (optional)
    compressionCodec := "compressionCodec_example" // string | The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. (optional)
    period := int32(56) // int32 | How frequently log files are finalized so they can be available for reading (in seconds). (optional) (default to 3600)
    gzipLevel := int32(56) // int32 | The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. (optional) (default to 0)
    accessKey := "accessKey_example" // string | Your OpenStack account access key. (optional)
    bucketName := "bucketName_example" // string | The name of your OpenStack container. (optional)
    path := "path_example" // string | The path to upload logs to. (optional) (default to "null")
    publicKey := "publicKey_example" // string | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional) (default to "null")
    url := "url_example" // string | Your OpenStack auth url. (optional)
    user := "user_example" // string | The username for your OpenStack account. (optional)

    cfg := fastly.NewConfiguration()
    apiClient := fastly.NewAPIClient(cfg)
    ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
    resp, r, err := apiClient.LoggingOpenstackAPI.CreateLogOpenstack(ctx, serviceID, versionID).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).MessageType(messageType).TimestampFormat(timestampFormat).CompressionCodec(compressionCodec).Period(period).GzipLevel(gzipLevel).AccessKey(accessKey).BucketName(bucketName).Path(path).PublicKey(publicKey).URL(url).User(user).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoggingOpenstackAPI.CreateLogOpenstack`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateLogOpenstack`: LoggingOpenstackResponse
    fmt.Fprintf(os.Stdout, "Response from `LoggingOpenstackAPI.CreateLogOpenstack`: %v\n", resp)
}

Path Parameters

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

Other parameters are passed through a pointer to a apiCreateLogOpenstackRequest struct via the builder pattern

Name Type Description Notes
name string The name for the real-time logging configuration. placement

Return type

LoggingOpenstackResponse

Authorization

API Token

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

Back to top | Back to API list | Back to README

DeleteLogOpenstack

Delete an OpenStack log endpoint

Example

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.
    loggingOpenstackName := "loggingOpenstackName_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.LoggingOpenstackAPI.DeleteLogOpenstack(ctx, serviceID, versionID, loggingOpenstackName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoggingOpenstackAPI.DeleteLogOpenstack`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteLogOpenstack`: InlineResponse200
    fmt.Fprintf(os.Stdout, "Response from `LoggingOpenstackAPI.DeleteLogOpenstack`: %v\n", resp)
}

Path Parameters

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.
loggingOpenstackName string The name for the real-time logging configuration.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteLogOpenstackRequest struct via the builder pattern

Name Type Description Notes

Return type

InlineResponse200

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Back to top | Back to API list | Back to README

GetLogOpenstack

Get an OpenStack log endpoint

Example

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.
    loggingOpenstackName := "loggingOpenstackName_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.LoggingOpenstackAPI.GetLogOpenstack(ctx, serviceID, versionID, loggingOpenstackName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoggingOpenstackAPI.GetLogOpenstack`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetLogOpenstack`: LoggingOpenstackResponse
    fmt.Fprintf(os.Stdout, "Response from `LoggingOpenstackAPI.GetLogOpenstack`: %v\n", resp)
}

Path Parameters

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.
loggingOpenstackName string The name for the real-time logging configuration.

Other Parameters

Other parameters are passed through a pointer to a apiGetLogOpenstackRequest struct via the builder pattern

Name Type Description Notes

Return type

LoggingOpenstackResponse

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Back to top | Back to API list | Back to README

ListLogOpenstack

List OpenStack log endpoints

Example

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.LoggingOpenstackAPI.ListLogOpenstack(ctx, serviceID, versionID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoggingOpenstackAPI.ListLogOpenstack`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListLogOpenstack`: []LoggingOpenstackResponse
    fmt.Fprintf(os.Stdout, "Response from `LoggingOpenstackAPI.ListLogOpenstack`: %v\n", resp)
}

Path Parameters

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

Other parameters are passed through a pointer to a apiListLogOpenstackRequest struct via the builder pattern

Name Type Description Notes

Return type

[]LoggingOpenstackResponse

Authorization

API Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Back to top | Back to API list | Back to README

UpdateLogOpenstack

Update an OpenStack log endpoint

Example

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.
    loggingOpenstackName := "loggingOpenstackName_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)
    messageType := "messageType_example" // string | How the message should be formatted. (optional) (default to "classic")
    timestampFormat := "timestampFormat_example" // string | A timestamp format (optional)
    compressionCodec := "compressionCodec_example" // string | The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. (optional)
    period := int32(56) // int32 | How frequently log files are finalized so they can be available for reading (in seconds). (optional) (default to 3600)
    gzipLevel := int32(56) // int32 | The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error. (optional) (default to 0)
    accessKey := "accessKey_example" // string | Your OpenStack account access key. (optional)
    bucketName := "bucketName_example" // string | The name of your OpenStack container. (optional)
    path := "path_example" // string | The path to upload logs to. (optional) (default to "null")
    publicKey := "publicKey_example" // string | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional) (default to "null")
    url := "url_example" // string | Your OpenStack auth url. (optional)
    user := "user_example" // string | The username for your OpenStack account. (optional)

    cfg := fastly.NewConfiguration()
    apiClient := fastly.NewAPIClient(cfg)
    ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
    resp, r, err := apiClient.LoggingOpenstackAPI.UpdateLogOpenstack(ctx, serviceID, versionID, loggingOpenstackName).Name(name).Placement(placement).ResponseCondition(responseCondition).Format(format).FormatVersion(formatVersion).MessageType(messageType).TimestampFormat(timestampFormat).CompressionCodec(compressionCodec).Period(period).GzipLevel(gzipLevel).AccessKey(accessKey).BucketName(bucketName).Path(path).PublicKey(publicKey).URL(url).User(user).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `LoggingOpenstackAPI.UpdateLogOpenstack`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateLogOpenstack`: LoggingOpenstackResponse
    fmt.Fprintf(os.Stdout, "Response from `LoggingOpenstackAPI.UpdateLogOpenstack`: %v\n", resp)
}

Path Parameters

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.
loggingOpenstackName string The name for the real-time logging configuration.

Other Parameters

Other parameters are passed through a pointer to a apiUpdateLogOpenstackRequest struct via the builder pattern

Name Type Description Notes
name string The name for the real-time logging configuration. placement

Return type

LoggingOpenstackResponse

Authorization

API Token

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

Back to top | Back to API list | Back to README