Skip to content

Latest commit

 

History

History
279 lines (218 loc) · 18.1 KB

LoggingGcsApi.md

File metadata and controls

279 lines (218 loc) · 18.1 KB

Fastly\Api\LoggingGcsApi

$apiInstance = new Fastly\Api\LoggingGcsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

Methods

Note

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

Method HTTP request Description
createLogGcs() POST /service/{service_id}/version/{version_id}/logging/gcs Create a GCS log endpoint
deleteLogGcs() DELETE /service/{service_id}/version/{version_id}/logging/gcs/{logging_gcs_name} Delete a GCS log endpoint
getLogGcs() GET /service/{service_id}/version/{version_id}/logging/gcs/{logging_gcs_name} Get a GCS log endpoint
listLogGcs() GET /service/{service_id}/version/{version_id}/logging/gcs List GCS log endpoints
updateLogGcs() PUT /service/{service_id}/version/{version_id}/logging/gcs/{logging_gcs_name} Update a GCS log endpoint

createLogGcs()

createLogGcs($options): \Fastly\Model\LoggingGcsResponse // Create a GCS log endpoint

Create GCS logging for a particular service and version.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['name'] = 'name_example'; // string | The name for the real-time logging configuration.
$options['placement'] = 'placement_example'; // 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`.
$options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute.
$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
$options['format_version'] = self::FORMAT_VERSION_v2; // int | 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`.
$options['message_type'] = 'classic'; // string | How the message should be formatted.
$options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format
$options['compression_codec'] = 'compression_codec_example'; // 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.
$options['period'] = 3600; // int | How frequently log files are finalized so they can be available for reading (in seconds).
$options['gzip_level'] = 0; // int | 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.
$options['user'] = 'user_example'; // string | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.
$options['secret_key'] = 'secret_key_example'; // string | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.
$options['account_name'] = 'account_name_example'; // string | The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.
$options['bucket_name'] = 'bucket_name_example'; // string | The name of the GCS bucket.
$options['path'] = '/'; // string
$options['public_key'] = 'null'; // string | A PGP public key that Fastly will use to encrypt your log files before writing them to disk.
$options['project_id'] = 'project_id_example'; // string | Your Google Cloud Platform project ID. Required

try {
    $result = $apiInstance->createLogGcs($options);
} catch (Exception $e) {
    echo 'Exception when calling LoggingGcsApi->createLogGcs: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int 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 int 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'] [defaults to 'classic']
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 int How frequently log files are finalized so they can be available for reading (in seconds). [optional] [defaults to 3600]
gzip_level int 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]
user string Your Google Cloud Platform service account email address. The client_email field in your service account authentication JSON. Not required if account_name is specified. [optional]
secret_key string Your Google Cloud Platform account secret key. The private_key field in your service account authentication JSON. Not required if account_name is specified. [optional]
account_name string The name of the Google Cloud Platform service account associated with the target log collection service. Not required if user and secret_key are provided. [optional]
bucket_name string The name of the GCS bucket. [optional]
path string [optional] [defaults to '/']
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']
project_id string Your Google Cloud Platform project ID. Required [optional]

Return type

\Fastly\Model\LoggingGcsResponse

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

deleteLogGcs()

deleteLogGcs($options): \Fastly\Model\InlineResponse200 // Delete a GCS log endpoint

Delete the GCS Logging for a particular service and version.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['logging_gcs_name'] = 'logging_gcs_name_example'; // string | The name for the real-time logging configuration.

try {
    $result = $apiInstance->deleteLogGcs($options);
} catch (Exception $e) {
    echo 'Exception when calling LoggingGcsApi->deleteLogGcs: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
logging_gcs_name string The name for the real-time logging configuration.

Return type

\Fastly\Model\InlineResponse200

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

getLogGcs()

getLogGcs($options): \Fastly\Model\LoggingGcsResponse // Get a GCS log endpoint

Get the GCS Logging for a particular service and version.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['logging_gcs_name'] = 'logging_gcs_name_example'; // string | The name for the real-time logging configuration.

try {
    $result = $apiInstance->getLogGcs($options);
} catch (Exception $e) {
    echo 'Exception when calling LoggingGcsApi->getLogGcs: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
logging_gcs_name string The name for the real-time logging configuration.

Return type

\Fastly\Model\LoggingGcsResponse

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

listLogGcs()

listLogGcs($options): \Fastly\Model\LoggingGcsResponse[] // List GCS log endpoints

List all of the GCS log endpoints for a particular service and version.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.

try {
    $result = $apiInstance->listLogGcs($options);
} catch (Exception $e) {
    echo 'Exception when calling LoggingGcsApi->listLogGcs: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.

Return type

\Fastly\Model\LoggingGcsResponse[]

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

updateLogGcs()

updateLogGcs($options): \Fastly\Model\LoggingGcsResponse // Update a GCS log endpoint

Update the GCS for a particular service and version.

Example

    $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
$options['version_id'] = 56; // int | Integer identifying a service version.
$options['logging_gcs_name'] = 'logging_gcs_name_example'; // string | The name for the real-time logging configuration.
$options['name'] = 'name_example'; // string | The name for the real-time logging configuration.
$options['placement'] = 'placement_example'; // 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`.
$options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute.
$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
$options['format_version'] = self::FORMAT_VERSION_v2; // int | 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`.
$options['message_type'] = 'classic'; // string | How the message should be formatted.
$options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format
$options['compression_codec'] = 'compression_codec_example'; // 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.
$options['period'] = 3600; // int | How frequently log files are finalized so they can be available for reading (in seconds).
$options['gzip_level'] = 0; // int | 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.
$options['user'] = 'user_example'; // string | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.
$options['secret_key'] = 'secret_key_example'; // string | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.
$options['account_name'] = 'account_name_example'; // string | The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.
$options['bucket_name'] = 'bucket_name_example'; // string | The name of the GCS bucket.
$options['path'] = '/'; // string
$options['public_key'] = 'null'; // string | A PGP public key that Fastly will use to encrypt your log files before writing them to disk.
$options['project_id'] = 'project_id_example'; // string | Your Google Cloud Platform project ID. Required

try {
    $result = $apiInstance->updateLogGcs($options);
} catch (Exception $e) {
    echo 'Exception when calling LoggingGcsApi->updateLogGcs: ', $e->getMessage(), PHP_EOL;
}

Options

Note: the input parameter is an associative array with the keys listed below.

Name Type Description Notes
service_id string Alphanumeric string identifying the service.
version_id int Integer identifying a service version.
logging_gcs_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 int 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'] [defaults to 'classic']
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 int How frequently log files are finalized so they can be available for reading (in seconds). [optional] [defaults to 3600]
gzip_level int 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]
user string Your Google Cloud Platform service account email address. The client_email field in your service account authentication JSON. Not required if account_name is specified. [optional]
secret_key string Your Google Cloud Platform account secret key. The private_key field in your service account authentication JSON. Not required if account_name is specified. [optional]
account_name string The name of the Google Cloud Platform service account associated with the target log collection service. Not required if user and secret_key are provided. [optional]
bucket_name string The name of the GCS bucket. [optional]
path string [optional] [defaults to '/']
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']
project_id string Your Google Cloud Platform project ID. Required [optional]

Return type

\Fastly\Model\LoggingGcsResponse

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