Skip to main content

groups

Creates, updates, deletes, gets or lists a groups resource.

Overview

Namegroups
TypeResource
Idgoogle.monitoring.groups

Fields

NameDatatypeDescription
namestringOutput 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.
displayNamestringA user-assigned name for this group, used only for display purposes.
filterstringThe filter used to determine which monitored resources belong to this group.
isClusterbooleanIf true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.
parentNamestringThe 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, "".

Methods

NameAccessible byRequired ParamsDescription
projects_groups_getSELECTgroupsId, projectsIdGets a single group.
projects_groups_listSELECTprojectsIdLists the existing groups.
projects_groups_createINSERTprojectsIdCreates a new group.
projects_groups_deleteDELETEgroupsId, projectsIdDeletes an existing group.
projects_groups_updateREPLACEgroupsId, projectsIdUpdates an existing group. You can change any group attributes except name.

SELECT examples

Lists the existing groups.

SELECT
name,
displayName,
filter,
isCluster,
parentName
FROM google.monitoring.groups
WHERE projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new groups resource.

/*+ create */
INSERT INTO google.monitoring.groups (
projectsId,
name,
displayName,
parentName,
filter,
isCluster
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ parentName }}',
'{{ filter }}',
{{ isCluster }}
;

REPLACE example

Replaces all fields in the specified groups resource.

/*+ update */
REPLACE google.monitoring.groups
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
parentName = '{{ parentName }}',
filter = '{{ filter }}',
isCluster = true|false
WHERE
groupsId = '{{ groupsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified groups resource.

/*+ delete */
DELETE FROM google.monitoring.groups
WHERE groupsId = '{{ groupsId }}'
AND projectsId = '{{ projectsId }}';