Class: Google::Apis::MonitoringV1::EventAnnotation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/monitoring_v1/classes.rb,
lib/google/apis/monitoring_v1/representations.rb,
lib/google/apis/monitoring_v1/representations.rb

Overview

Annotation configuration for one event type on a dashboard

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EventAnnotation

Returns a new instance of EventAnnotation.



885
886
887
# File 'lib/google/apis/monitoring_v1/classes.rb', line 885

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

Instance Attribute Details

#display_nameString

Solely for UI display. Should not be used programmatically. Corresponds to the JSON property displayName

Returns:

  • (String)


857
858
859
# File 'lib/google/apis/monitoring_v1/classes.rb', line 857

def display_name
  @display_name
end

#enabledBoolean Also known as: enabled?

Whether or not to show the events on the dashboard by default Corresponds to the JSON property enabled

Returns:

  • (Boolean)


862
863
864
# File 'lib/google/apis/monitoring_v1/classes.rb', line 862

def enabled
  @enabled
end

#event_typeString

The type of event to display. Corresponds to the JSON property eventType

Returns:

  • (String)


868
869
870
# File 'lib/google/apis/monitoring_v1/classes.rb', line 868

def event_type
  @event_type
end

#filterString

string filtering the events - event dependant. Example values: "resource. labels.pod_name = 'pod-1'" "protoPayload.authenticationInfo.principalEmail=' user@example.com'" Corresponds to the JSON property filter

Returns:

  • (String)


875
876
877
# File 'lib/google/apis/monitoring_v1/classes.rb', line 875

def filter
  @filter
end

#resource_namesArray<String>

Per annotation level override for the names of logging resources to search for events. Currently only projects are supported. If both this field and the per annotation field is empty, it will default to the host project. Limit: 50 projects. For example: “projects/another-project-id” Corresponds to the JSON property resourceNames

Returns:

  • (Array<String>)


883
884
885
# File 'lib/google/apis/monitoring_v1/classes.rb', line 883

def resource_names
  @resource_names
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



890
891
892
893
894
895
896
# File 'lib/google/apis/monitoring_v1/classes.rb', line 890

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @enabled = args[:enabled] if args.key?(:enabled)
  @event_type = args[:event_type] if args.key?(:event_type)
  @filter = args[:filter] if args.key?(:filter)
  @resource_names = args[:resource_names] if args.key?(:resource_names)
end