Class: Google::Apis::ServiceusageV1beta1::MonitoringDestination

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

Overview

Configuration of a specific monitoring destination (the producer project or the consumer project).

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) ⇒ MonitoringDestination

Returns a new instance of MonitoringDestination



3148
3149
3150
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 3148

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

Instance Attribute Details

#metricsArray<String>

Names of the metrics to report to this monitoring destination. Each name must be defined in Service.metrics section. Corresponds to the JSON property metrics

Returns:

  • (Array<String>)


3140
3141
3142
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 3140

def metrics
  @metrics
end

#monitored_resourceString

The monitored resource type. The type must be defined in Service.monitored_resources section. Corresponds to the JSON property monitoredResource

Returns:

  • (String)


3146
3147
3148
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 3146

def monitored_resource
  @monitored_resource
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3153
3154
3155
3156
# File 'generated/google/apis/serviceusage_v1beta1/classes.rb', line 3153

def update!(**args)
  @metrics = args[:metrics] if args.key?(:metrics)
  @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
end