Class: Google::Apis::LoggingV2::DefaultSinkConfig

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

Overview

Describes the custom _Default sink configuration that is used to override the built-in _Default sink configuration in newly created resource containers, such as projects or folders.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DefaultSinkConfig

Returns a new instance of DefaultSinkConfig.



727
728
729
# File 'lib/google/apis/logging_v2/classes.rb', line 727

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

Instance Attribute Details

#exclusionsArray<Google::Apis::LoggingV2::LogExclusion>

Optional. Specifies the set of exclusions to be added to the _Default sink in newly created resource containers. Corresponds to the JSON property exclusions



708
709
710
# File 'lib/google/apis/logging_v2/classes.rb', line 708

def exclusions
  @exclusions
end

#filterString

Optional. An advanced logs filter (https://cloud.google.com/logging/docs/view/ advanced-queries). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName=" projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERRORTo match all logs, don' t add exclusions and use the following line as the value of filter:logName:* Cannot be empty or unset when the value of mode is OVERWRITE. Corresponds to the JSON property filter

Returns:

  • (String)


718
719
720
# File 'lib/google/apis/logging_v2/classes.rb', line 718

def filter
  @filter
end

#modeString

Required. Determines the behavior to apply to the built-in _Default sink inclusion filter.Exclusions are always appended, as built-in _Default sinks have no exclusions. Corresponds to the JSON property mode

Returns:

  • (String)


725
726
727
# File 'lib/google/apis/logging_v2/classes.rb', line 725

def mode
  @mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



732
733
734
735
736
# File 'lib/google/apis/logging_v2/classes.rb', line 732

def update!(**args)
  @exclusions = args[:exclusions] if args.key?(:exclusions)
  @filter = args[:filter] if args.key?(:filter)
  @mode = args[:mode] if args.key?(:mode)
end