Skip to content

Latest commit

 

History

History
248 lines (188 loc) · 9.01 KB

LoggingLogentriesApi.md

File metadata and controls

248 lines (188 loc) · 9.01 KB

Fastly.LoggingLogentriesApi

const apiInstance = new Fastly.LoggingLogentriesApi();

Methods

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

createLogLogentries

createLogLogentries({ service_id, version_id, [name, ][placement, ][response_condition, ][format, ][format_version, ][port, ][token, ][use_tls, ][region] })

Create a Logentry for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  name: "name_example",
  placement: "none",
  response_condition: "response_condition_example",
  format: "'%h %l %u %t \"%r\" %>s %b'",
  format_version: 1,
  port: 20000,
  token: "token_example",
  use_tls: new Fastly.LoggingUseTlsString(),
  region: "US",
};

apiInstance.createLogLogentries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.
name String The name for the real-time logging configuration. [optional]
placement 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] [one of: "none", "waf_debug", "null"]
response_condition String The name of an existing condition in the configured endpoint, or leave blank to always execute. [optional]
format String A Fastly log format string. [optional] [defaults to '%h %l %u %t "%r" %>s %b']
format_version Number 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] [one of: 1, 2]
port Number The port number. [optional] [defaults to 20000]
token String Use token based authentication. [optional]
use_tls LoggingUseTlsString [optional]
region String The region to which to stream logs. [optional] [one of: "US", "US-2", "US-3", "EU", "CA", "AU", "AP"]

Return type

LoggingLogentriesResponse

deleteLogLogentries

deleteLogLogentries({ service_id, version_id, logging_logentries_name })

Delete the Logentry for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_logentries_name: "logging_logentries_name_example", // required
};

apiInstance.deleteLogLogentries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.
logging_logentries_name String The name for the real-time logging configuration.

Return type

InlineResponse200

getLogLogentries

getLogLogentries({ service_id, version_id, logging_logentries_name })

Get the Logentry for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_logentries_name: "logging_logentries_name_example", // required
};

apiInstance.getLogLogentries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.
logging_logentries_name String The name for the real-time logging configuration.

Return type

LoggingLogentriesResponse

listLogLogentries

listLogLogentries({ service_id, version_id })

List all of the Logentries for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
};

apiInstance.listLogLogentries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.

Return type

[LoggingLogentriesResponse]

updateLogLogentries

updateLogLogentries({ service_id, version_id, logging_logentries_name, [name, ][placement, ][response_condition, ][format, ][format_version, ][port, ][token, ][use_tls, ][region] })

Update the Logentry for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_logentries_name: "logging_logentries_name_example", // required
  name: "name_example",
  placement: "none",
  response_condition: "response_condition_example",
  format: "'%h %l %u %t \"%r\" %>s %b'",
  format_version: 1,
  port: 20000,
  token: "token_example",
  use_tls: new Fastly.LoggingUseTlsString(),
  region: "US",
};

apiInstance.updateLogLogentries(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
service_id String Alphanumeric string identifying the service.
version_id Number Integer identifying a service version.
logging_logentries_name String The name for the real-time logging configuration.
name String The name for the real-time logging configuration. [optional]
placement 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] [one of: "none", "waf_debug", "null"]
response_condition String The name of an existing condition in the configured endpoint, or leave blank to always execute. [optional]
format String A Fastly log format string. [optional] [defaults to '%h %l %u %t "%r" %>s %b']
format_version Number 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] [one of: 1, 2]
port Number The port number. [optional] [defaults to 20000]
token String Use token based authentication. [optional]
use_tls LoggingUseTlsString [optional]
region String The region to which to stream logs. [optional] [one of: "US", "US-2", "US-3", "EU", "CA", "AU", "AP"]

Return type

LoggingLogentriesResponse

[Back to top] [Back to API list] [Back to README]