Class: Google::Apis::MonitoringV3::Group

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

Overview

The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups.Groups can be nested in parent-child hierarchies. The parentName field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource.For example, consider an infrastructure running a set of instances with two user-defined tags: "environment" and "role". A parent group has a filter, environment="production". A child of that parent group has a filter, role="transcoder". The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role and are in the production environment. The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.

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

Returns a new instance of Group



1085
1086
1087
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1085

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

Instance Attribute Details

#display_nameString

A user-assigned name for this group, used only for display purposes. Corresponds to the JSON property displayName

Returns:

  • (String)


1056
1057
1058
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1056

def display_name
  @display_name
end

#filterString

The filter used to determine which monitored resources belong to this group. Corresponds to the JSON property filter

Returns:

  • (String)


1061
1062
1063
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1061

def filter
  @filter
end

#is_clusterBoolean Also known as: is_cluster?

If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. Corresponds to the JSON property isCluster

Returns:

  • (Boolean)


1067
1068
1069
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1067

def is_cluster
  @is_cluster
end

#nameString

Output only. The name of this group. The format is "projects/ project_id_or_number/groups/group_id". When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique group_id that is generated automatically. Corresponds to the JSON property name

Returns:

  • (String)


1076
1077
1078
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1076

def name
  @name
end

#parent_nameString

The name of the group's parent, if it has one. The format is "projects/ project_id_or_number/groups/group_id". For groups with no parent, parentName is the empty string, "". Corresponds to the JSON property parentName

Returns:

  • (String)


1083
1084
1085
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1083

def parent_name
  @parent_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1090
1091
1092
1093
1094
1095
1096
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1090

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @filter = args[:filter] if args.key?(:filter)
  @is_cluster = args[:is_cluster] if args.key?(:is_cluster)
  @name = args[:name] if args.key?(:name)
  @parent_name = args[:parent_name] if args.key?(:parent_name)
end