Skip to main content

groups

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

Overview​

Namegroups
TypeResource
Idgoogle.vmmigration.groups

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The Group name.
createTimestring (google-datetime)Output only. The create time timestamp.
descriptionstringUser-provided description of the group.
displayNamestringDisplay name is a user defined name for this group which can be updated.
migrationTargetTypestringImmutable. The target type of this group. (MIGRATION_TARGET_TYPE_UNSPECIFIED, MIGRATION_TARGET_TYPE_GCE, MIGRATION_TARGET_TYPE_DISKS)
updateTimestring (google-datetime)Output only. The update time timestamp.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, groupsIdGets details of a single Group.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenLists Groups in a given project and location.
createinsertprojectsId, locationsIdgroupId, requestIdCreates a new Group in a given project and location.
patchupdateprojectsId, locationsId, groupsIdrequestId, updateMaskUpdates the parameters of a single Group.
deletedeleteprojectsId, locationsId, groupsIdrequestIdDeletes a single 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 details of a single Group.

SELECT
name,
createTime,
description,
displayName,
migrationTargetType,
updateTime
FROM google.vmmigration.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.vmmigration.groups (
data__description,
data__displayName,
data__migrationTargetType,
projectsId,
locationsId,
groupId,
requestId
)
SELECT
'{{ description }}',
'{{ displayName }}',
'{{ migrationTargetType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ groupId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates the parameters of a single Group.

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

DELETE examples​

Deletes a single Group.

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