const apiInstance = new Fastly.LoggingDigitaloceanApi();
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
createLogDigocean | POST /service/{service_id}/version/{version_id}/logging/digitalocean | Create a DigitalOcean Spaces log endpoint |
deleteLogDigocean | DELETE /service/{service_id}/version/{version_id}/logging/digitalocean/{logging_digitalocean_name} | Delete a DigitalOcean Spaces log endpoint |
getLogDigocean | GET /service/{service_id}/version/{version_id}/logging/digitalocean/{logging_digitalocean_name} | Get a DigitalOcean Spaces log endpoint |
listLogDigocean | GET /service/{service_id}/version/{version_id}/logging/digitalocean | List DigitalOcean Spaces log endpoints |
updateLogDigocean | PUT /service/{service_id}/version/{version_id}/logging/digitalocean/{logging_digitalocean_name} | Update a DigitalOcean Spaces log endpoint |
createLogDigocean({ service_id, version_id, [name, ][placement, ][response_condition, ][format, ][format_version, ][message_type, ][timestamp_format, ][compression_codec, ][period, ][gzip_level, ][bucket_name, ][access_key, ][secret_key, ][domain, ][path, ][public_key] })
Create a DigitalOcean Space for a particular service and version.
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,
message_type: "classic",
timestamp_format: "timestamp_format_example",
compression_codec: "zstd",
period: 3600,
gzip_level: 0,
bucket_name: "bucket_name_example",
access_key: "access_key_example",
secret_key: "secret_key_example",
domain: "'nyc3.digitaloceanspaces.com'",
path: "'null'",
public_key: "'null'",
};
apiInstance.createLogDigocean(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
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] |
message_type | String | How the message should be formatted. | [optional] [one of: "classic", "loggly", "logplex", "blank"] |
timestamp_format | String | A timestamp format | [optional] |
compression_codec | String | The codec used for compressing your logs. Valid values are zstd , snappy , and gzip . Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [one of: "zstd", "snappy", "gzip"] |
period | Number | How frequently log files are finalized so they can be available for reading (in seconds). | [optional] [defaults to 3600] |
gzip_level | Number | The level of gzip encoding when sending logs (default 0 , no compression). Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [defaults to 0] |
bucket_name | String | The name of the DigitalOcean Space. | [optional] |
access_key | String | Your DigitalOcean Spaces account access key. | [optional] |
secret_key | String | Your DigitalOcean Spaces account secret key. | [optional] |
domain | String | The domain of the DigitalOcean Spaces endpoint. | [optional] [defaults to 'nyc3.digitaloceanspaces.com'] |
path | String | The path to upload logs to. | [optional] [defaults to 'null'] |
public_key | String | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [optional] [defaults to 'null'] |
deleteLogDigocean({ service_id, version_id, logging_digitalocean_name })
Delete the DigitalOcean Space for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_digitalocean_name: "logging_digitalocean_name_example", // required
};
apiInstance.deleteLogDigocean(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
logging_digitalocean_name | String | The name for the real-time logging configuration. |
getLogDigocean({ service_id, version_id, logging_digitalocean_name })
Get the DigitalOcean Space for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_digitalocean_name: "logging_digitalocean_name_example", // required
};
apiInstance.getLogDigocean(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
logging_digitalocean_name | String | The name for the real-time logging configuration. |
listLogDigocean({ service_id, version_id })
List all of the DigitalOcean Spaces for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.listLogDigocean(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. |
updateLogDigocean({ service_id, version_id, logging_digitalocean_name, [name, ][placement, ][response_condition, ][format, ][format_version, ][message_type, ][timestamp_format, ][compression_codec, ][period, ][gzip_level, ][bucket_name, ][access_key, ][secret_key, ][domain, ][path, ][public_key] })
Update the DigitalOcean Space for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_digitalocean_name: "logging_digitalocean_name_example", // required
name: "name_example",
placement: "none",
response_condition: "response_condition_example",
format: "'%h %l %u %t \"%r\" %>s %b'",
format_version: 1,
message_type: "classic",
timestamp_format: "timestamp_format_example",
compression_codec: "zstd",
period: 3600,
gzip_level: 0,
bucket_name: "bucket_name_example",
access_key: "access_key_example",
secret_key: "secret_key_example",
domain: "'nyc3.digitaloceanspaces.com'",
path: "'null'",
public_key: "'null'",
};
apiInstance.updateLogDigocean(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
service_id | String | Alphanumeric string identifying the service. | |
version_id | Number | Integer identifying a service version. | |
logging_digitalocean_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] |
message_type | String | How the message should be formatted. | [optional] [one of: "classic", "loggly", "logplex", "blank"] |
timestamp_format | String | A timestamp format | [optional] |
compression_codec | String | The codec used for compressing your logs. Valid values are zstd , snappy , and gzip . Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [one of: "zstd", "snappy", "gzip"] |
period | Number | How frequently log files are finalized so they can be available for reading (in seconds). | [optional] [defaults to 3600] |
gzip_level | Number | The level of gzip encoding when sending logs (default 0 , no compression). Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [defaults to 0] |
bucket_name | String | The name of the DigitalOcean Space. | [optional] |
access_key | String | Your DigitalOcean Spaces account access key. | [optional] |
secret_key | String | Your DigitalOcean Spaces account secret key. | [optional] |
domain | String | The domain of the DigitalOcean Spaces endpoint. | [optional] [defaults to 'nyc3.digitaloceanspaces.com'] |
path | String | The path to upload logs to. | [optional] [defaults to 'null'] |
public_key | String | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [optional] [defaults to 'null'] |