Class: Google::Apis::LoggingV2beta1::LogSink

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/logging_v2beta1/classes.rb,
generated/google/apis/logging_v2beta1/representations.rb,
generated/google/apis/logging_v2beta1/representations.rb

Overview

Describes a sink used to export log entries outside Cloud Logging.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogSink

Returns a new instance of LogSink.



744
745
746
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 744

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#destinationString

The export destination. See Exporting Logs With Sinks. Examples: "storage.googleapis.com/a-bucket", " bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset". Corresponds to the JSON property destination

Returns:

  • (String)


725
726
727
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 725

def destination
  @destination
end

#filterString

An advanced logs filter. Only log entries matching that filter are exported. The filter must be consistent with the log entry format specified by the outputVersionFormat parameter, regardless of the format of the log entry that was originally written to Cloud Logging. Example (V2 format): "logName=projects/my-projectid/logs/syslog AND severity>=ERROR". Corresponds to the JSON property filter

Returns:

  • (String)


735
736
737
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 735

def filter
  @filter
end

#nameString

Required. The client-assigned sink identifier. Example: "my-severe-errors-to- pubsub". Sink identifiers are limited to 1000 characters and can include only the following characters: A-Z, a-z, 0-9, and the special characters _-. . Corresponds to the JSON property name

Returns:

  • (String)


718
719
720
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 718

def name
  @name
end

#output_version_formatString

The log entry version to use for this sink's exported log entries. This version does not have to correspond to the version of the log entry when it was written to Cloud Logging. Corresponds to the JSON property outputVersionFormat

Returns:

  • (String)


742
743
744
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 742

def output_version_format
  @output_version_format
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



749
750
751
752
753
754
# File 'generated/google/apis/logging_v2beta1/classes.rb', line 749

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @destination = args[:destination] if args.key?(:destination)
  @filter = args[:filter] if args.key?(:filter)
  @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
end