Skip to main content

target_projects

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

Overview

Nametarget_projects
TypeResource
Idgoogle.vmmigration.target_projects

Fields

NameDatatypeDescription
namestringOutput only. The name of the target project.
descriptionstringThe target project's description.
createTimestringOutput only. The time this target project resource was created (not related to when the Compute Engine project it points to was created).
projectstringRequired. The target project ID (number) or project name.
updateTimestringOutput only. The last time the target project resource was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, targetProjectsIdGets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
listSELECTlocationsId, projectsIdLists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
createINSERTlocationsId, projectsIdCreates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
deleteDELETElocationsId, projectsId, targetProjectsIdDeletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
patchUPDATElocationsId, projectsId, targetProjectsIdUpdates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.

SELECT examples

Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.

SELECT
name,
description,
createTime,
project,
updateTime
FROM google.vmmigration.target_projects
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.vmmigration.target_projects (
locationsId,
projectsId,
project,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ project }}',
'{{ description }}'
;

UPDATE example

Updates a target_projects resource.

/*+ update */
UPDATE google.vmmigration.target_projects
SET
project = '{{ project }}',
description = '{{ description }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND targetProjectsId = '{{ targetProjectsId }}';

DELETE example

Deletes the specified target_projects resource.

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