Class: Google::Apis::LoggingV2::LogExclusion

Inherits:
Object
  • Object
show all
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 project receives a large volume of logs, you might be able to use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Audit log entries and log entries from Amazon Web Services are never excluded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogExclusion

Returns a new instance of LogExclusion



897
898
899
# File 'generated/google/apis/logging_v2/classes.rb', line 897

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

Instance Attribute Details

#create_timeString

Output only. The creation timestamp of the exclusion.This field may not be present for older exclusions. Corresponds to the JSON property createTime

Returns:

  • (String)


860
861
862
# File 'generated/google/apis/logging_v2/classes.rb', line 860

def create_time
  @create_time
end

#descriptionString

Optional. A description of this exclusion. Corresponds to the JSON property description

Returns:

  • (String)


865
866
867
# File 'generated/google/apis/logging_v2/classes.rb', line 865

def description
  @description
end

#disabledBoolean 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

Returns:

  • (Boolean)


872
873
874
# File 'generated/google/apis/logging_v2/classes.rb', line 872

def disabled
  @disabled
end

#filterString

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 filter matches 99% of low-severity log entries from load balancers:"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" Corresponds to the JSON property filter

Returns:

  • (String)


882
883
884
# File 'generated/google/apis/logging_v2/classes.rb', line 882

def filter
  @filter
end

#nameString

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. Corresponds to the JSON property name

Returns:

  • (String)


889
890
891
# File 'generated/google/apis/logging_v2/classes.rb', line 889

def name
  @name
end

#update_timeString

Output only. The last update timestamp of the exclusion.This field may not be present for older exclusions. Corresponds to the JSON property updateTime

Returns:

  • (String)


895
896
897
# File 'generated/google/apis/logging_v2/classes.rb', line 895

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



902
903
904
905
906
907
908
909
# File 'generated/google/apis/logging_v2/classes.rb', line 902

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