Skip to content

Latest commit

 

History

History
237 lines (178 loc) · 8.48 KB

LoggingHoneycombApi.md

File metadata and controls

237 lines (178 loc) · 8.48 KB

Fastly.LoggingHoneycombApi

const apiInstance = new Fastly.LoggingHoneycombApi();

Methods

Method Fastly API endpoint Description
createLogHoneycomb POST /service/{service_id}/version/{version_id}/logging/honeycomb Create a Honeycomb log endpoint
deleteLogHoneycomb DELETE /service/{service_id}/version/{version_id}/logging/honeycomb/{logging_honeycomb_name} Delete the Honeycomb log endpoint
getLogHoneycomb GET /service/{service_id}/version/{version_id}/logging/honeycomb/{logging_honeycomb_name} Get a Honeycomb log endpoint
listLogHoneycomb GET /service/{service_id}/version/{version_id}/logging/honeycomb List Honeycomb log endpoints
updateLogHoneycomb PUT /service/{service_id}/version/{version_id}/logging/honeycomb/{logging_honeycomb_name} Update a Honeycomb log endpoint

createLogHoneycomb

createLogHoneycomb({ service_id, version_id, [name, ][placement, ][format_version, ][response_condition, ][format, ][dataset, ][token] })

Create a Honeycomb logging object for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  name: "name_example",
  placement: "none",
  format_version: 1,
  response_condition: "response_condition_example",
  format: "format_example",
  dataset: "dataset_example",
  token: "token_example",
};

apiInstance.createLogHoneycomb(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"]
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]
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. Must produce valid JSON that Honeycomb can ingest. [optional]
dataset String The Honeycomb Dataset you want to log to. [optional]
token String The Write Key from the Account page of your Honeycomb account. [optional]

Return type

LoggingHoneycomb

deleteLogHoneycomb

deleteLogHoneycomb({ service_id, version_id, logging_honeycomb_name })

Delete the Honeycomb logging object for a particular service and version.

Example

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

apiInstance.deleteLogHoneycomb(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_honeycomb_name String The name for the real-time logging configuration.

Return type

InlineResponse200

getLogHoneycomb

getLogHoneycomb({ service_id, version_id, logging_honeycomb_name })

Get the details of a Honeycomb logging object for a particular service and version.

Example

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

apiInstance.getLogHoneycomb(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_honeycomb_name String The name for the real-time logging configuration.

Return type

LoggingHoneycomb

listLogHoneycomb

listLogHoneycomb({ service_id, version_id })

List all of the Honeycomb logging objects for a particular service and version.

Example

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

apiInstance.listLogHoneycomb(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

[LoggingHoneycombResponse]

updateLogHoneycomb

updateLogHoneycomb({ service_id, version_id, logging_honeycomb_name, [name, ][placement, ][format_version, ][response_condition, ][format, ][dataset, ][token] })

Update a Honeycomb logging object for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_honeycomb_name: "logging_honeycomb_name_example", // required
  name: "name_example",
  placement: "none",
  format_version: 1,
  response_condition: "response_condition_example",
  format: "format_example",
  dataset: "dataset_example",
  token: "token_example",
};

apiInstance.updateLogHoneycomb(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_honeycomb_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"]
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]
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. Must produce valid JSON that Honeycomb can ingest. [optional]
dataset String The Honeycomb Dataset you want to log to. [optional]
token String The Write Key from the Account page of your Honeycomb account. [optional]

Return type

LoggingHoneycombResponse

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