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.



669
670
671
# File 'lib/google/apis/logging_v2/classes.rb', line 669

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



650
651
652
# File 'lib/google/apis/logging_v2/classes.rb', line 650

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)


660
661
662
# File 'lib/google/apis/logging_v2/classes.rb', line 660

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)


667
668
669
# File 'lib/google/apis/logging_v2/classes.rb', line 667

def mode
  @mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



674
675
676
677
678
# File 'lib/google/apis/logging_v2/classes.rb', line 674

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