Class: Google::Apis::MonitoringV3::Group
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV3::Group
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/monitoring_v3/classes.rb,
lib/google/apis/monitoring_v3/representations.rb,
lib/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
-
#display_name ⇒ String
A user-assigned name for this group, used only for display purposes.
-
#filter ⇒ String
The filter used to determine which monitored resources belong to this group.
-
#is_cluster ⇒ Boolean
(also: #is_cluster?)
If true, the members of this group are considered to be a cluster.
-
#name ⇒ String
Output only.
-
#parent_name ⇒ String
The name of the group's parent, if it has one.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Group
constructor
A new instance of Group.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Group
Returns a new instance of Group.
1826 1827 1828 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1826 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
A user-assigned name for this group, used only for display purposes.
Corresponds to the JSON property displayName
1797 1798 1799 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1797 def display_name @display_name end |
#filter ⇒ String
The filter used to determine which monitored resources belong to this group.
Corresponds to the JSON property filter
1802 1803 1804 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1802 def filter @filter end |
#is_cluster ⇒ Boolean 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
1808 1809 1810 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1808 def is_cluster @is_cluster end |
#name ⇒ String
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
1817 1818 1819 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1817 def name @name end |
#parent_name ⇒ String
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, parent_name
is the empty string, "".
Corresponds to the JSON property parentName
1824 1825 1826 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1824 def parent_name @parent_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1831 1832 1833 1834 1835 1836 1837 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1831 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 |