groups
Creates, updates, deletes, gets or lists a groups
resource.
Overview
Name | groups |
Type | Resource |
Id | google.monitoring.groups |
Fields
The following fields are returned by SELECT
queries:
- projects_groups_get
- projects_groups_list
Successful response
Name | Datatype | Description |
---|---|---|
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. |
displayName | 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. |
isCluster | 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. |
parentName | 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, "". |
Successful response
Name | Datatype | Description |
---|---|---|
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. |
displayName | 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. |
isCluster | 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. |
parentName | 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, "". |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_groups_get | select | projectsId , groupsId | Gets a single group. | |
projects_groups_list | select | projectsId | childrenOfGroup , ancestorsOfGroup , descendantsOfGroup , pageSize , pageToken | Lists the existing groups. |
projects_groups_create | insert | projectsId | validateOnly | Creates a new group. |
projects_groups_update | replace | projectsId , groupsId | validateOnly | Updates an existing group. You can change any group attributes except name. |
projects_groups_delete | delete | projectsId , groupsId | recursive | Deletes an existing group. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
groupsId | string | |
projectsId | string | |
ancestorsOfGroup | string | |
childrenOfGroup | string | |
descendantsOfGroup | string | |
pageSize | integer (int32) | |
pageToken | string | |
recursive | boolean | |
validateOnly | boolean |
SELECT
examples
- projects_groups_get
- projects_groups_list
Gets a single group.
SELECT
name,
displayName,
filter,
isCluster,
parentName
FROM google.monitoring.groups
WHERE projectsId = '{{ projectsId }}' -- required
AND groupsId = '{{ groupsId }}' -- required;
Lists the existing groups.
SELECT
name,
displayName,
filter,
isCluster,
parentName
FROM google.monitoring.groups
WHERE projectsId = '{{ projectsId }}' -- required
AND childrenOfGroup = '{{ childrenOfGroup }}'
AND ancestorsOfGroup = '{{ ancestorsOfGroup }}'
AND descendantsOfGroup = '{{ descendantsOfGroup }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_groups_create
- Manifest
Creates a new group.
INSERT INTO google.monitoring.groups (
data__name,
data__displayName,
data__parentName,
data__filter,
data__isCluster,
projectsId,
validateOnly
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ parentName }}',
'{{ filter }}',
{{ isCluster }},
'{{ projectsId }}',
'{{ validateOnly }}'
RETURNING
name,
displayName,
filter,
isCluster,
parentName
;
# Description fields are for documentation purposes
- name: groups
props:
- name: projectsId
value: string
description: Required parameter for the groups resource.
- name: name
value: string
description: >
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: displayName
value: string
description: >
A user-assigned name for this group, used only for display purposes.
- name: parentName
value: string
description: >
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, "".
- name: filter
value: string
description: >
The filter used to determine which monitored resources belong to this group.
- name: isCluster
value: boolean
description: >
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: validateOnly
value: boolean
REPLACE
examples
- projects_groups_update
Updates an existing group. You can change any group attributes except name.
REPLACE google.monitoring.groups
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__parentName = '{{ parentName }}',
data__filter = '{{ filter }}',
data__isCluster = {{ isCluster }}
WHERE
projectsId = '{{ projectsId }}' --required
AND groupsId = '{{ groupsId }}' --required
AND validateOnly = {{ validateOnly}}
RETURNING
name,
displayName,
filter,
isCluster,
parentName;
DELETE
examples
- projects_groups_delete
Deletes an existing group.
DELETE FROM google.monitoring.groups
WHERE projectsId = '{{ projectsId }}' --required
AND groupsId = '{{ groupsId }}' --required
AND recursive = '{{ recursive }}';