WebService-Fastly

 view release on metacpan or  search on metacpan

lib/WebService/Fastly/LoggingBigqueryApi.pm  view on Meta::CPAN


Fastly API

Via the Fastly API you can perform any of the operations that are possible within the management console,  including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations suc...

The version of the API Spec document: 1.0.0
Contact: oss@fastly.com

=end comment

=cut

#
# NOTE: This class is auto generated.
# Do not edit the class manually.
#
package WebService::Fastly::LoggingBigqueryApi;

require 5.6.0;
use strict;
use warnings;
use utf8;
use Exporter;
use Carp qw( croak );
use Log::Any qw($log);

use WebService::Fastly::ApiClient;

use base "Class::Data::Inheritable";

__PACKAGE__->mk_classdata('method_documentation' => {});

sub new {
    my $class = shift;
    my $api_client;

    if ($_[0] && ref $_[0] && ref $_[0] eq 'WebService::Fastly::ApiClient' ) {
        $api_client = $_[0];
    } else {
        $api_client = WebService::Fastly::ApiClient->new(@_);
    }

    bless { api_client => $api_client }, $class;

}


#
# create_log_bigquery
#
# Create a BigQuery log endpoint
#
# @param string $service_id Alphanumeric string identifying the service. (required)
# @param int $version_id Integer identifying a service version. (required)
# @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional)
# @param string $placement 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 `v...
# @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
# @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional)
# @param int $format_version 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&#x60...
# @param string $user 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)
# @param string $secret_key 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)
# @param string $account_name 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)
# @param string $dataset Your BigQuery dataset. (optional)
# @param string $table Your BigQuery table. (optional)
# @param string $template_suffix BigQuery table name suffix template. Optional. (optional)
# @param string $project_id Your Google Cloud Platform project ID. Required (optional)
{
    my $params = {
    'service_id' => {
        data_type => 'string',
        description => 'Alphanumeric string identifying the service.',
        required => '1',
    },
    'version_id' => {
        data_type => 'int',
        description => 'Integer identifying a service version.',
        required => '1',
    },
    'name' => {
        data_type => 'string',
        description => 'The name of the BigQuery logging object. Used as a primary key for API access.',
        required => '0',
    },
    'placement' => {
        data_type => 'string',
        description => '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_...
        required => '0',
    },
    'response_condition' => {
        data_type => 'string',
        description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.',
        required => '0',
    },
    'format' => {
        data_type => 'string',
        description => 'A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table.',
        required => '0',
    },
    'format_version' => {
        data_type => 'int',
        description => '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 ...
        required => '0',
    },
    'user' => {
        data_type => 'string',
        description => '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.',
        required => '0',
    },
    'secret_key' => {
        data_type => 'string',
        description => 'Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.',
        required => '0',
    },
    'account_name' => {
        data_type => 'string',
        description => '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.',
        required => '0',
    },
    'dataset' => {
        data_type => 'string',
        description => 'Your BigQuery dataset.',
        required => '0',
    },
    'table' => {
        data_type => 'string',
        description => 'Your BigQuery table.',
        required => '0',
    },
    'template_suffix' => {
        data_type => 'string',
        description => 'BigQuery table name suffix template. Optional.',
        required => '0',
    },
    'project_id' => {
        data_type => 'string',
        description => 'Your Google Cloud Platform project ID. Required',
        required => '0',
    },
    };
    __PACKAGE__->method_documentation->{ 'create_log_bigquery' } = {
        summary => 'Create a BigQuery log endpoint',
        params => $params,
        returns => 'LoggingBigqueryResponse',
        };
}
# @return LoggingBigqueryResponse
#
sub create_log_bigquery {
    my ($self, %args) = @_;

    # verify the required parameter 'service_id' is set
    unless (exists $args{'service_id'}) {
      croak("Missing the required parameter 'service_id' when calling create_log_bigquery");
    }

    # verify the required parameter 'version_id' is set
    unless (exists $args{'version_id'}) {
      croak("Missing the required parameter 'version_id' when calling create_log_bigquery");
    }

    # parse inputs
    my $_resource_path = '/service/{service_id}/version/{version_id}/logging/bigquery';

    my $_method = 'POST';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 4.676 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )