Skip to main content

groups

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

Overview

Namegroups
TypeResource
Idgoogle.vmmigration.groups

Fields

NameDatatypeDescription
namestringOutput only. The Group name.
descriptionstringUser-provided description of the group.
createTimestringOutput only. The create time timestamp.
displayNamestringDisplay name is a user defined name for this group which can be updated.
migrationTargetTypestringImmutable. The target type of this group.
updateTimestringOutput only. The update time timestamp.

Methods

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

SELECT examples

Lists Groups in a given project and location.

SELECT
name,
description,
createTime,
displayName,
migrationTargetType,
updateTime
FROM google.vmmigration.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.vmmigration.groups (
locationsId,
projectsId,
description,
displayName,
migrationTargetType
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ displayName }}',
'{{ migrationTargetType }}'
;

UPDATE example

Updates a groups resource.

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

DELETE example

Deletes the specified groups resource.

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