Skip to main content

groups

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

Overview

Namegroups
TypeResource
Idgoogle.migrationcenter.groups

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The name of the group.
createTimestring (google-datetime)Output only. The timestamp when the group was created.
descriptionstringOptional. The description of the group.
displayNamestringOptional. User-friendly display name.
labelsobjectLabels as key value pairs.
updateTimestring (google-datetime)Output only. The timestamp when the group was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, groupsIdGets the details of a group.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists all groups in a given project and location.
createinsertprojectsId, locationsIdgroupId, requestIdCreates a new group in a given project and location.
patchupdateprojectsId, locationsId, groupsIdupdateMask, requestIdUpdates the parameters of a group.
deletedeleteprojectsId, locationsId, groupsIdrequestIdDeletes a 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.

NameDatatypeDescription
groupsIdstring
locationsIdstring
projectsIdstring
filterstring
groupIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the details of a group.

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

INSERT examples

Creates a new group in a given project and location.

INSERT INTO google.migrationcenter.groups (
data__labels,
data__displayName,
data__description,
projectsId,
locationsId,
groupId,
requestId
)
SELECT
'{{ labels }}',
'{{ displayName }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ groupId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a group.

UPDATE google.migrationcenter.groups
SET
data__labels = '{{ labels }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND groupsId = '{{ groupsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a group.

DELETE FROM google.migrationcenter.groups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND groupsId = '{{ groupsId }}' --required
AND requestId = '{{ requestId }}';