Skip to content

Latest commit

 

History

History
268 lines (208 loc) · 11 KB

LoggingSplunkApi.md

File metadata and controls

268 lines (208 loc) · 11 KB

Fastly.LoggingSplunkApi

const apiInstance = new Fastly.LoggingSplunkApi();

Methods

Note

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

Method HTTP request Description
createLogSplunk POST /service/{service_id}/version/{version_id}/logging/splunk Create a Splunk log endpoint
deleteLogSplunk DELETE /service/{service_id}/version/{version_id}/logging/splunk/{logging_splunk_name} Delete a Splunk log endpoint
getLogSplunk GET /service/{service_id}/version/{version_id}/logging/splunk/{logging_splunk_name} Get a Splunk log endpoint
listLogSplunk GET /service/{service_id}/version/{version_id}/logging/splunk List Splunk log endpoints
updateLogSplunk PUT /service/{service_id}/version/{version_id}/logging/splunk/{logging_splunk_name} Update a Splunk log endpoint

createLogSplunk

createLogSplunk({ service_id, version_id, [name, ][placement, ][response_condition, ][format, ][format_version, ][tls_ca_cert, ][tls_client_cert, ][tls_client_key, ][tls_hostname, ][request_max_entries, ][request_max_bytes, ][url, ][token, ][use_tls] })

Create a Splunk 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",
  response_condition: "response_condition_example",
  format: "'%h %l %u %t \"%r\" %>s %b'",
  format_version: 1,
  tls_ca_cert: "'null'",
  tls_client_cert: "'null'",
  tls_client_key: "'null'",
  tls_hostname: "'null'",
  request_max_entries: 0,
  request_max_bytes: 0,
  url: "url_example",
  token: "token_example",
  use_tls: new Fastly.LoggingUseTlsString(),
};

apiInstance.createLogSplunk(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]
tls_ca_cert String A secure certificate to authenticate a server with. Must be in PEM format. [optional] [defaults to 'null']
tls_client_cert String The client certificate used to make authenticated requests. Must be in PEM format. [optional] [defaults to 'null']
tls_client_key String The client private key used to make authenticated requests. Must be in PEM format. [optional] [defaults to 'null']
tls_hostname String The hostname to verify the server's certificate. This should be one of the Subject Alternative Name (SAN) fields for the certificate. Common Names (CN) are not supported. [optional] [defaults to 'null']
request_max_entries Number The maximum number of logs sent in one request. Defaults 0 for unbounded. [optional] [defaults to 0]
request_max_bytes Number The maximum number of bytes sent in one request. Defaults 0 for unbounded. [optional] [defaults to 0]
url String The URL to post logs to. [optional]
token String A Splunk token for use in posting logs over HTTP to your collector. [optional]
use_tls LoggingUseTlsString [optional]

Return type

LoggingSplunkResponse

deleteLogSplunk

deleteLogSplunk({ service_id, version_id, logging_splunk_name })

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

Example

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

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

Return type

InlineResponse200

getLogSplunk

getLogSplunk({ service_id, version_id, logging_splunk_name })

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

Example

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

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

Return type

LoggingSplunkResponse

listLogSplunk

listLogSplunk({ service_id, version_id })

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

Example

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

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

[LoggingSplunkResponse]

updateLogSplunk

updateLogSplunk({ service_id, version_id, logging_splunk_name, [name, ][placement, ][response_condition, ][format, ][format_version, ][tls_ca_cert, ][tls_client_cert, ][tls_client_key, ][tls_hostname, ][request_max_entries, ][request_max_bytes, ][url, ][token, ][use_tls] })

Update the Splunk logging object for a particular service and version.

Example

const options = {
  service_id: "service_id_example", // required
  version_id: 56, // required
  logging_splunk_name: "logging_splunk_name_example", // required
  name: "name_example",
  placement: "none",
  response_condition: "response_condition_example",
  format: "'%h %l %u %t \"%r\" %>s %b'",
  format_version: 1,
  tls_ca_cert: "'null'",
  tls_client_cert: "'null'",
  tls_client_key: "'null'",
  tls_hostname: "'null'",
  request_max_entries: 0,
  request_max_bytes: 0,
  url: "url_example",
  token: "token_example",
  use_tls: new Fastly.LoggingUseTlsString(),
};

apiInstance.updateLogSplunk(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_splunk_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]
tls_ca_cert String A secure certificate to authenticate a server with. Must be in PEM format. [optional] [defaults to 'null']
tls_client_cert String The client certificate used to make authenticated requests. Must be in PEM format. [optional] [defaults to 'null']
tls_client_key String The client private key used to make authenticated requests. Must be in PEM format. [optional] [defaults to 'null']
tls_hostname String The hostname to verify the server's certificate. This should be one of the Subject Alternative Name (SAN) fields for the certificate. Common Names (CN) are not supported. [optional] [defaults to 'null']
request_max_entries Number The maximum number of logs sent in one request. Defaults 0 for unbounded. [optional] [defaults to 0]
request_max_bytes Number The maximum number of bytes sent in one request. Defaults 0 for unbounded. [optional] [defaults to 0]
url String The URL to post logs to. [optional]
token String A Splunk token for use in posting logs over HTTP to your collector. [optional]
use_tls LoggingUseTlsString [optional]

Return type

LoggingSplunkResponse

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