Reference documentation and code samples for the Stackdriver Monitoring V3 Client class 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. TheparentNamefield
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 roleandare 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.
Generated from protobuf messagegoogle.monitoring.v3.Group
Namespace
Google \ Cloud \ Monitoring \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ 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 toCreateGroupand a unique[GROUP_ID]that is generated automatically.
↳ display_name
string
A user-assigned name for this group, used only for display purposes.
↳ 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_nameis the empty string,"".
↳ filter
string
The filter used to determine which monitored resources belong to this group.
↳ is_cluster
bool
If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.
getName
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 toCreateGroupand a unique[GROUP_ID]that is generated automatically.
Returns
Type
Description
string
setName
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 toCreateGroupand a unique[GROUP_ID]that is generated automatically.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisplayName
A user-assigned name for this group, used only for display purposes.
Returns
Type
Description
string
setDisplayName
A user-assigned name for this group, used only for display purposes.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getParentName
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_nameis the empty string,"".
Returns
Type
Description
string
setParentName
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_nameis the empty string,"".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getFilter
The filter used to determine which monitored resources belong to this
group.
Returns
Type
Description
string
setFilter
The filter used to determine which monitored resources belong to this
group.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getIsCluster
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
Type
Description
bool
setIsCluster
If true, the members of this group are considered to be a cluster.
The system can perform additional analysis on groups that are clusters.
[[["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,["# Stackdriver Monitoring V3 Client - Class Group (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.Group)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.Group)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.Group)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.Group)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.Group)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.Group)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.Group)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.Group)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.Group)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.Group)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.Group)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.Group)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.Group)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.Group) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class 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\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.\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.\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\nGenerated from protobuf message `google.monitoring.v3.Group`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. The name of this group. The format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]/groups/\\[GROUP_ID\\]\nWhen creating a group, this field is ignored and a new name is created\nconsisting of the project specified in the call to `CreateGroup`\nand a unique `[GROUP_ID]` that is generated automatically.\n\n### setName\n\nOutput only. The name of this group. The format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]/groups/\\[GROUP_ID\\]\nWhen creating a group, this field is ignored and a new name is created\nconsisting of the project specified in the call to `CreateGroup`\nand a unique `[GROUP_ID]` that is generated automatically.\n\n### getDisplayName\n\nA user-assigned name for this group, used only for display purposes.\n\n### setDisplayName\n\nA user-assigned name for this group, used only for display purposes.\n\n### getParentName\n\nThe name of the group's parent, if it has one. The format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]/groups/\\[GROUP_ID\\]\nFor groups with no parent, `parent_name` is the empty string, `\"\"`.\n\n### setParentName\n\nThe name of the group's parent, if it has one. The format is:\nprojects/\\[PROJECT_ID_OR_NUMBER\\]/groups/\\[GROUP_ID\\]\nFor groups with no parent, `parent_name` is the empty string, `\"\"`.\n\n### getFilter\n\nThe filter used to determine which monitored resources belong to this\ngroup.\n\n### setFilter\n\nThe filter used to determine which monitored resources belong to this\ngroup.\n\n### getIsCluster\n\nIf true, the members of this group are considered to be a cluster.\n\nThe system can perform additional analysis on groups that are clusters.\n\n### setIsCluster\n\nIf true, the members of this group are considered to be a cluster.\n\nThe system can perform additional analysis on groups that are clusters."]]