groups
Creates, updates, deletes, gets or lists a groups
resource.
Overview
Name | groups |
Type | Resource |
Id | google.monitoring.groups |
Fields
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_groups_get | SELECT | groupsId, projectsId | Gets a single group. |
projects_groups_list | SELECT | projectsId | Lists the existing groups. |
projects_groups_create | INSERT | projectsId | Creates a new group. |
projects_groups_delete | DELETE | groupsId, projectsId | Deletes an existing group. |
projects_groups_update | REPLACE | groupsId, projectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.monitoring.groups (
projectsId,
name,
displayName,
parentName,
filter,
isCluster
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ parentName }}',
'{{ filter }}',
{{ isCluster }}
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: parentName
value: string
- name: filter
value: string
- name: isCluster
value: boolean
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 }}';