const apiInstance = new Fastly.LoggingS3Api();
Method |
Fastly API endpoint |
Description |
createLogAwsS3 |
POST /service/{service_id}/version/{version_id}/logging/s3 |
Create an AWS S3 log endpoint |
deleteLogAwsS3 |
DELETE /service/{service_id}/version/{version_id}/logging/s3/{logging_s3_name} |
Delete an AWS S3 log endpoint |
getLogAwsS3 |
GET /service/{service_id}/version/{version_id}/logging/s3/{logging_s3_name} |
Get an AWS S3 log endpoint |
listLogAwsS3 |
GET /service/{service_id}/version/{version_id}/logging/s3 |
List AWS S3 log endpoints |
updateLogAwsS3 |
PUT /service/{service_id}/version/{version_id}/logging/s3/{logging_s3_name} |
Update an AWS S3 log endpoint |
createLogAwsS3({ service_id, version_id, [name, ][placement, ][format_version, ][response_condition, ][format, ][message_type, ][timestamp_format, ][period, ][gzip_level, ][compression_codec, ][access_key, ][acl, ][bucket_name, ][domain, ][iam_role, ][path, ][public_key, ][redundancy, ][secret_key, ][server_side_encryption_kms_key_id, ][server_side_encryption] })
Create a S3 for a particular service and version.
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'",
message_type: "classic",
timestamp_format: "timestamp_format_example",
period: 3600,
gzip_level: 0,
compression_codec: "zstd",
access_key: "access_key_example",
acl: "acl_example",
bucket_name: "bucket_name_example",
domain: "domain_example",
iam_role: "iam_role_example",
path: "'null'",
public_key: "'null'",
redundancy: "'null'",
secret_key: "secret_key_example",
server_side_encryption_kms_key_id: "'null'",
server_side_encryption: "'null'",
};
apiInstance.createLogAwsS3(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"] |
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'] |
message_type |
String |
How the message should be formatted. |
[optional] [one of: "classic", "loggly", "logplex", "blank"] |
timestamp_format |
String |
A timestamp format |
[optional] |
period |
Number |
How frequently log files are finalized so they can be available for reading (in seconds). |
[optional] [defaults to 3600] |
gzip_level |
Number |
What level of gzip encoding to have when sending logs (default 0 , no compression). If an explicit non-zero value is set, then compression_codec will default to \"gzip.\" Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [defaults to 0] |
compression_codec |
String |
The codec used for compression of your logs. Valid values are zstd , snappy , and gzip . If the specified codec is \"gzip\", gzip_level will default to 3. To specify a different level, leave compression_codec blank and explicitly set the level using gzip_level . Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [one of: "zstd", "snappy", "gzip"] |
access_key |
String |
The access key for your S3 account. Not required if iam_role is provided. |
[optional] |
acl |
String |
The access control list (ACL) specific request header. See the AWS documentation for Access Control List (ACL) Specific Request Headers for more information. |
[optional] |
bucket_name |
String |
The bucket name for S3 account. |
[optional] |
domain |
String |
The domain of the Amazon S3 endpoint. |
[optional] |
iam_role |
String |
The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if access_key and secret_key are provided. |
[optional] |
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'] |
redundancy |
String |
The S3 redundancy level. |
[optional] [defaults to 'null'] |
secret_key |
String |
The secret key for your S3 account. Not required if iam_role is provided. |
[optional] |
server_side_encryption_kms_key_id |
String |
Optional server-side KMS Key Id. Must be set if server_side_encryption is set to aws:kms or AES256 . |
[optional] [defaults to 'null'] |
server_side_encryption |
String |
Set this to AES256 or aws:kms to enable S3 Server Side Encryption. |
[optional] [defaults to 'null'] |
LoggingS3Response
deleteLogAwsS3({ service_id, version_id, logging_s3_name })
Delete the S3 for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_s3_name: "logging_s3_name_example", // required
};
apiInstance.deleteLogAwsS3(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_s3_name |
String |
The name for the real-time logging configuration. |
|
InlineResponse200
getLogAwsS3({ service_id, version_id, logging_s3_name })
Get the S3 for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_s3_name: "logging_s3_name_example", // required
};
apiInstance.getLogAwsS3(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_s3_name |
String |
The name for the real-time logging configuration. |
|
LoggingS3Response
listLogAwsS3({ service_id, version_id })
List all of the S3s for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
};
apiInstance.listLogAwsS3(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. |
|
[LoggingS3Response]
updateLogAwsS3({ service_id, version_id, logging_s3_name, [name, ][placement, ][format_version, ][response_condition, ][format, ][message_type, ][timestamp_format, ][period, ][gzip_level, ][compression_codec, ][access_key, ][acl, ][bucket_name, ][domain, ][iam_role, ][path, ][public_key, ][redundancy, ][secret_key, ][server_side_encryption_kms_key_id, ][server_side_encryption] })
Update the S3 for a particular service and version.
const options = {
service_id: "service_id_example", // required
version_id: 56, // required
logging_s3_name: "logging_s3_name_example", // required
name: "name_example",
placement: "none",
format_version: 1,
response_condition: "response_condition_example",
format: "'%h %l %u %t \"%r\" %>s %b'",
message_type: "classic",
timestamp_format: "timestamp_format_example",
period: 3600,
gzip_level: 0,
compression_codec: "zstd",
access_key: "access_key_example",
acl: "acl_example",
bucket_name: "bucket_name_example",
domain: "domain_example",
iam_role: "iam_role_example",
path: "'null'",
public_key: "'null'",
redundancy: "'null'",
secret_key: "secret_key_example",
server_side_encryption_kms_key_id: "'null'",
server_side_encryption: "'null'",
};
apiInstance.updateLogAwsS3(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_s3_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'] |
message_type |
String |
How the message should be formatted. |
[optional] [one of: "classic", "loggly", "logplex", "blank"] |
timestamp_format |
String |
A timestamp format |
[optional] |
period |
Number |
How frequently log files are finalized so they can be available for reading (in seconds). |
[optional] [defaults to 3600] |
gzip_level |
Number |
What level of gzip encoding to have when sending logs (default 0 , no compression). If an explicit non-zero value is set, then compression_codec will default to \"gzip.\" Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [defaults to 0] |
compression_codec |
String |
The codec used for compression of your logs. Valid values are zstd , snappy , and gzip . If the specified codec is \"gzip\", gzip_level will default to 3. To specify a different level, leave compression_codec blank and explicitly set the level using gzip_level . Specifying both compression_codec and gzip_level in the same API request will result in an error. |
[optional] [one of: "zstd", "snappy", "gzip"] |
access_key |
String |
The access key for your S3 account. Not required if iam_role is provided. |
[optional] |
acl |
String |
The access control list (ACL) specific request header. See the AWS documentation for Access Control List (ACL) Specific Request Headers for more information. |
[optional] |
bucket_name |
String |
The bucket name for S3 account. |
[optional] |
domain |
String |
The domain of the Amazon S3 endpoint. |
[optional] |
iam_role |
String |
The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if access_key and secret_key are provided. |
[optional] |
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'] |
redundancy |
String |
The S3 redundancy level. |
[optional] [defaults to 'null'] |
secret_key |
String |
The secret key for your S3 account. Not required if iam_role is provided. |
[optional] |
server_side_encryption_kms_key_id |
String |
Optional server-side KMS Key Id. Must be set if server_side_encryption is set to aws:kms or AES256 . |
[optional] [defaults to 'null'] |
server_side_encryption |
String |
Set this to AES256 or aws:kms to enable S3 Server Side Encryption. |
[optional] [defaults to 'null'] |
LoggingS3Response
[Back to top] [Back to API list]
[Back to README]