Class: Google::Apis::MonitoringV1::MetricsScope

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

Represents a Metrics Scope (https://cloud.google.com/monitoring/settings# concept-scope) in Cloud Monitoring, which specifies one or more Google projects and zero or more AWS accounts to monitor together.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MetricsScope

Returns a new instance of MetricsScope.



1056
1057
1058
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1056

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

Instance Attribute Details

#create_timeString

Output only. The time when this Metrics Scope was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1036
1037
1038
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1036

def create_time
  @create_time
end

#monitored_projectsArray<Google::Apis::MonitoringV1::MonitoredProject>

Output only. The list of projects monitored by this Metrics Scope. Corresponds to the JSON property monitoredProjects



1041
1042
1043
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1041

def monitored_projects
  @monitored_projects
end

#nameString

Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/SCOPING_PROJECT_ID_OR_NUMBER Corresponds to the JSON property name

Returns:

  • (String)


1049
1050
1051
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1049

def name
  @name
end

#update_timeString

Output only. The time when this Metrics Scope record was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


1054
1055
1056
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1054

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1061
1062
1063
1064
1065
1066
# File 'lib/google/apis/monitoring_v1/classes.rb', line 1061

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @monitored_projects = args[:monitored_projects] if args.key?(:monitored_projects)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end