Class: Google::Apis::LoggingV2::DefaultSinkConfig
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::DefaultSinkConfig
- 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
-
#exclusions ⇒ Array<Google::Apis::LoggingV2::LogExclusion>
Optional.
-
#filter ⇒ String
Optional.
-
#mode ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DefaultSinkConfig
constructor
A new instance of DefaultSinkConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DefaultSinkConfig
Returns a new instance of DefaultSinkConfig.
729 730 731 |
# File 'lib/google/apis/logging_v2/classes.rb', line 729 def initialize(**args) update!(**args) end |
Instance Attribute Details
#exclusions ⇒ Array<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
709 710 711 |
# File 'lib/google/apis/logging_v2/classes.rb', line 709 def exclusions @exclusions end |
#filter ⇒ String
Optional. An advanced logs filter (https://docs.cloud.google.com/logging/docs/
view/building-queries#queries-by-expression). 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
720 721 722 |
# File 'lib/google/apis/logging_v2/classes.rb', line 720 def filter @filter end |
#mode ⇒ String
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
727 728 729 |
# File 'lib/google/apis/logging_v2/classes.rb', line 727 def mode @mode end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
734 735 736 737 738 |
# File 'lib/google/apis/logging_v2/classes.rb', line 734 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 |