Class: Google::Apis::LoggingV2::LogExclusion
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::LogExclusion
- 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
Specifies a set of log entries that are filtered out by a sink. If your Google Cloud resource receives a large volume of log entries, you can use exclusions to reduce your chargeable logs. Note that exclusions on organization-level and folder-level sinks don't apply to child resources. Note also that you cannot modify the _Required sink or exclude logs from it.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#disabled ⇒ Boolean
(also: #disabled?)
Optional.
-
#filter ⇒ String
Required.
-
#name ⇒ String
Optional.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogExclusion
constructor
A new instance of LogExclusion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LogExclusion
Returns a new instance of LogExclusion.
2528 2529 2530 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2528 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. The creation timestamp of the exclusion.This field may not be
present for older exclusions.
Corresponds to the JSON property createTime
2489 2490 2491 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2489 def create_time @create_time end |
#description ⇒ String
Optional. A description of this exclusion.
Corresponds to the JSON property description
2494 2495 2496 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2494 def description @description end |
#disabled ⇒ Boolean Also known as: disabled?
Optional. If set to True, then this exclusion is disabled and it does not
exclude any log entries. You can update an exclusion to change the value of
this field.
Corresponds to the JSON property disabled
2501 2502 2503 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2501 def disabled @disabled end |
#filter ⇒ String
Required. An advanced logs filter (https://docs.cloud.google.com/logging/docs/
view/building-queries#queries-by-expression) that matches the log entries to
be excluded. By using the sample function (https://docs.cloud.google.com/
logging/docs/view/logging-query-language#sample), you can exclude less than
100% of the matching log entries.For example, the following query matches 99%
of low-severity log entries from Google Cloud Storage buckets:resource.type=
gcs_bucket severity<ERROR sample(insertId, 0.99)
Corresponds to the JSON property filter
2513 2514 2515 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2513 def filter @filter end |
#name ⇒ String
Optional. A client-assigned identifier, such as "load-balancer-exclusion".
Identifiers are limited to 100 characters and can include only letters, digits,
underscores, hyphens, and periods. First character has to be alphanumeric.
Corresponds to the JSON property name
2520 2521 2522 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2520 def name @name end |
#update_time ⇒ String
Output only. The last update timestamp of the exclusion.This field may not be
present for older exclusions.
Corresponds to the JSON property updateTime
2526 2527 2528 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2526 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2533 2534 2535 2536 2537 2538 2539 2540 |
# File 'lib/google/apis/logging_v2/classes.rb', line 2533 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @disabled = args[:disabled] if args.key?(:disabled) @filter = args[:filter] if args.key?(:filter) @name = args[:name] if args.key?(:name) @update_time = args[:update_time] if args.key?(:update_time) end |