Class: Google::Apis::LoggingV2::LogExclusion
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::LogExclusion
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/logging_v2/classes.rb,
generated/google/apis/logging_v2/representations.rb,
generated/google/apis/logging_v2/representations.rb
Overview
Specifies a set of log entries that are not to be stored in Logging. If your GCP resource receives a large volume of logs, you can use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Note that organization-level and folder-level exclusions don't apply to child resources, and that you can't exclude audit log entries.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#disabled ⇒ Boolean
(also: #disabled?)
Optional.
-
#filter ⇒ String
Required.
-
#name ⇒ String
Required.
-
#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.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ LogExclusion
Returns a new instance of LogExclusion.
1074 1075 1076 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1074 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
1037 1038 1039 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1037 def create_time @create_time end |
#description ⇒ String
Optional. A description of this exclusion.
Corresponds to the JSON property description
1042 1043 1044 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1042 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
1049 1050 1051 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1049 def disabled @disabled end |
#filter ⇒ String
Required. An advanced logs filter that matches the log entries to be excluded.
By using the sample function, 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
1059 1060 1061 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1059 def filter @filter end |
#name ⇒ String
Required. 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
1066 1067 1068 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1066 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
1072 1073 1074 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1072 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1079 1080 1081 1082 1083 1084 1085 1086 |
# File 'generated/google/apis/logging_v2/classes.rb', line 1079 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 |