Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::Group.
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.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#display_name
defdisplay_name()->::String
Returns
(::String) — A user-assigned name for this group, used only for display purposes.
#display_name=
defdisplay_name=(value)->::String
Parameter
value (::String) — A user-assigned name for this group, used only for display purposes.
Returns
(::String) — A user-assigned name for this group, used only for display purposes.
#filter
deffilter()->::String
Returns
(::String) — The filter used to determine which monitored resources belong to this
group.
#filter=
deffilter=(value)->::String
Parameter
value (::String) — The filter used to determine which monitored resources belong to this
group.
Returns
(::String) — The filter used to determine which monitored resources belong to this
group.
#is_cluster
defis_cluster()->::Boolean
Returns
(::Boolean) — If true, the members of this group are considered to be a cluster.
The system can perform additional analysis on groups that are clusters.
#is_cluster=
defis_cluster=(value)->::Boolean
Parameter
value (::Boolean) — If true, the members of this group are considered to be a cluster.
The system can perform additional analysis on groups that are clusters.
Returns
(::Boolean) — If true, the members of this group are considered to be a cluster.
The system can perform additional analysis on groups that are clusters.
#name
defname()->::String
Returns
(::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.
#name=
defname=(value)->::String
Parameter
value (::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.
Returns
(::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.
#parent_name
defparent_name()->::String
Returns
(::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, "".
#parent_name=
defparent_name=(value)->::String
Parameter
value (::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, "".
Returns
(::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, "".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::Group (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-Group)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-Group)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-Group)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-Group)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-Group)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-Group)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-Group)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-Group)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-Group)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-Group)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-Group)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-Group)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-Group)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-Group)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-Group)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-Group)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-Group)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-Group)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-Group)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-Group) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::Group.\n\nThe description of a dynamic collection of monitored resources. Each group\nhas a filter that is matched against monitored resources and their associated\nmetadata. If a group's filter matches an available monitored resource, then\nthat resource is a member of that group. Groups can contain any number of\nmonitored resources, and each monitored resource can be a member of any\nnumber of groups.\n\n\nGroups can be nested in parent-child hierarchies. The `parentName` field\nidentifies an optional parent for each group. If a group has a parent, then\nthe only monitored resources available to be matched by the group's filter\nare the resources contained in the parent group. In other words, a group\ncontains the monitored resources that match its filter and the filters of all\nthe group's ancestors. A group without a parent can contain any monitored\nresource.\n\nFor example, consider an infrastructure running a set of instances with two\nuser-defined tags: `\"environment\"` and `\"role\"`. A parent group has a filter,\n`environment=\"production\"`. A child of that parent group has a filter,\n`role=\"transcoder\"`. The parent group contains all instances in the\nproduction environment, regardless of their roles. The child group contains\ninstances that have the transcoder role *and* are in the production\nenvironment.\n\n\u003cbr /\u003e\n\nThe monitored resources contained in a group can change at any moment,\ndepending on what resources exist and what filters are associated with the\ngroup and its ancestors. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #display_name\n\n def display_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- A user-assigned name for this group, used only for display purposes.\n\n### #display_name=\n\n def display_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- A user-assigned name for this group, used only for display purposes. \n**Returns**\n\n- (::String) --- A user-assigned name for this group, used only for display purposes.\n\n### #filter\n\n def filter() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The filter used to determine which monitored resources belong to this group.\n\n### #filter=\n\n def filter=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The filter used to determine which monitored resources belong to this group. \n**Returns**\n\n- (::String) --- The filter used to determine which monitored resources belong to this group.\n\n### #is_cluster\n\n def is_cluster() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.\n\n### #is_cluster=\n\n def is_cluster=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters. \n**Returns**\n\n- (::Boolean) --- If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The name of this group. The format is:\n\n projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]\n\n When creating a group, this field is ignored and a new name is created\n consisting of the project specified in the call to `CreateGroup`\n and a unique `[GROUP_ID]` that is generated automatically.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Output only. The name of this group. The format is:\n\n\n projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]\n\n When creating a group, this field is ignored and a new name is created\n consisting of the project specified in the call to `CreateGroup`\nand a unique `[GROUP_ID]` that is generated automatically. \n**Returns**\n\n- (::String) --- Output only. The name of this group. The format is:\n\n projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]\n\n When creating a group, this field is ignored and a new name is created\n consisting of the project specified in the call to `CreateGroup`\n and a unique `[GROUP_ID]` that is generated automatically.\n\n### #parent_name\n\n def parent_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The name of the group's parent, if it has one. The format is:\n\n projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]\n\n For groups with no parent, `parent_name` is the empty string, `\"\"`.\n\n### #parent_name=\n\n def parent_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The name of the group's parent, if it has one. The format is:\n\n\n projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]\n\nFor groups with no parent, `parent_name` is the empty string, `\"\"`. \n**Returns**\n\n- (::String) --- The name of the group's parent, if it has one. The format is:\n\n projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]\n\n For groups with no parent, `parent_name` is the empty string, `\"\"`."]]