Skip to content

Latest commit

 

History

History
237 lines (178 loc) · 8.41 KB

LoggingHerokuApi.md

File metadata and controls

237 lines (178 loc) · 8.41 KB

Fastly.LoggingHerokuApi

const apiInstance = new Fastly.LoggingHerokuApi();

Methods

Method Fastly API endpoint Description
createLogHeroku POST /service/{service_id}/version/{version_id}/logging/heroku Create a Heroku log endpoint
deleteLogHeroku DELETE /service/{service_id}/version/{version_id}/logging/heroku/{logging_heroku_name} Delete the Heroku log endpoint
getLogHeroku GET /service/{service_id}/version/{version_id}/logging/heroku/{logging_heroku_name} Get a Heroku log endpoint
listLogHeroku GET /service/{service_id}/version/{version_id}/logging/heroku List Heroku log endpoints
updateLogHeroku PUT /service/{service_id}/version/{version_id}/logging/heroku/{logging_heroku_name} Update the Heroku log endpoint

createLogHeroku

createLogHeroku({ service_id, version_id, [name, ][placement, ][format_version, ][response_condition, ][format, ][token, ][url] })

Create a Heroku 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: "'%h %l %u %t \"%r\" %>s %b'",
  token: "token_example",
  url: "url_example",
};

apiInstance.createLogHeroku(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. [optional] [defaults to '%h %l %u %t "%r" %>s %b']
token String The token to use for authentication (https://devcenter.heroku.com/articles/add-on-partner-log-integration). [optional]
url String The URL to stream logs to. [optional]

Return type

LoggingHerokuResponse

deleteLogHeroku

deleteLogHeroku({ service_id, version_id, logging_heroku_name })

Delete the Heroku for a particular service and version.

Example

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

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

Return type

InlineResponse200

getLogHeroku

getLogHeroku({ service_id, version_id, logging_heroku_name })

Get the Heroku for a particular service and version.

Example

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

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

Return type

LoggingHerokuResponse

listLogHeroku

listLogHeroku({ service_id, version_id })

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

Example

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

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

[LoggingHerokuResponse]

updateLogHeroku

updateLogHeroku({ service_id, version_id, logging_heroku_name, [name, ][placement, ][format_version, ][response_condition, ][format, ][token, ][url] })

Update the Heroku for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_heroku_name: "logging_heroku_name_example", // required
  name: "name_example",
  placement: "none",
  format_version: 1,
  response_condition: "response_condition_example",
  format: "'%h %l %u %t \"%r\" %>s %b'",
  token: "token_example",
  url: "url_example",
};

apiInstance.updateLogHeroku(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_heroku_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. [optional] [defaults to '%h %l %u %t "%r" %>s %b']
token String The token to use for authentication (https://devcenter.heroku.com/articles/add-on-partner-log-integration). [optional]
url String The URL to stream logs to. [optional]

Return type

LoggingHerokuResponse

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