Skip to main content

groups

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

Overview

Namegroups
TypeResource
Idgoogle.migrationcenter.groups

Fields

NameDatatypeDescription
namestringOutput only. The name of the group.
descriptionstringOptional. The description of the group.
createTimestringOutput only. The timestamp when the group was created.
displayNamestringOptional. User-friendly display name.
labelsobjectLabels as key value pairs.
updateTimestringOutput only. The timestamp when the group was last updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTgroupsId, locationsId, projectsIdGets the details of a group.
listSELECTlocationsId, projectsIdLists all groups in a given project and location.
createINSERTlocationsId, projectsIdCreates a new group in a given project and location.
deleteDELETEgroupsId, locationsId, projectsIdDeletes a group.
patchUPDATEgroupsId, locationsId, projectsIdUpdates the parameters of a group.

SELECT examples

Lists all groups in a given project and location.

SELECT
name,
description,
createTime,
displayName,
labels,
updateTime
FROM google.migrationcenter.groups
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.migrationcenter.groups (
locationsId,
projectsId,
labels,
displayName,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ labels }}',
'{{ displayName }}',
'{{ description }}'
;

UPDATE example

Updates a groups resource.

/*+ update */
UPDATE google.migrationcenter.groups
SET
labels = '{{ labels }}',
displayName = '{{ displayName }}',
description = '{{ description }}'
WHERE
groupsId = '{{ groupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified groups resource.

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