Skip to content

Latest commit

 

History

History
240 lines (180 loc) · 8.44 KB

LoggingPapertrailApi.md

File metadata and controls

240 lines (180 loc) · 8.44 KB

Fastly.LoggingPapertrailApi

const apiInstance = new Fastly.LoggingPapertrailApi();

Methods

Note

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

Method HTTP request Description
createLogPapertrail POST /service/{service_id}/version/{version_id}/logging/papertrail Create a Papertrail log endpoint
deleteLogPapertrail DELETE /service/{service_id}/version/{version_id}/logging/papertrail/{logging_papertrail_name} Delete a Papertrail log endpoint
getLogPapertrail GET /service/{service_id}/version/{version_id}/logging/papertrail/{logging_papertrail_name} Get a Papertrail log endpoint
listLogPapertrail GET /service/{service_id}/version/{version_id}/logging/papertrail List Papertrail log endpoints
updateLogPapertrail PUT /service/{service_id}/version/{version_id}/logging/papertrail/{logging_papertrail_name} Update a Papertrail log endpoint

createLogPapertrail

createLogPapertrail({ service_id, version_id, [name, ][placement, ][response_condition, ][format, ][format_version, ][address, ][port] })

Create a Papertrail 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,
  address: "address_example",
  port: 514,
};

apiInstance.createLogPapertrail(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]
address String A hostname or IPv4 address. [optional]
port Number The port number. [optional] [defaults to 514]

Return type

LoggingPapertrailResponse

deleteLogPapertrail

deleteLogPapertrail({ service_id, version_id, logging_papertrail_name })

Delete the Papertrail for a particular service and version.

Example

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

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

Return type

InlineResponse200

getLogPapertrail

getLogPapertrail({ service_id, version_id, logging_papertrail_name })

Get the Papertrail for a particular service and version.

Example

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

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

Return type

LoggingPapertrailResponse

listLogPapertrail

listLogPapertrail({ service_id, version_id })

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

Example

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

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

[LoggingPapertrailResponse]

updateLogPapertrail

updateLogPapertrail({ service_id, version_id, logging_papertrail_name, [name, ][placement, ][response_condition, ][format, ][format_version, ][address, ][port] })

Update the Papertrail for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_papertrail_name: "logging_papertrail_name_example", // required
  name: "name_example",
  placement: "none",
  response_condition: "response_condition_example",
  format: "'%h %l %u %t \"%r\" %>s %b'",
  format_version: 1,
  address: "address_example",
  port: 514,
};

apiInstance.updateLogPapertrail(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_papertrail_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]
address String A hostname or IPv4 address. [optional]
port Number The port number. [optional] [defaults to 514]

Return type

LoggingPapertrailResponse

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