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​

The following fields are returned by SELECT queries:

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

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, targetProjectsIdGets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenLists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
createinsertprojectsId, locationsIdrequestId, targetProjectIdCreates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
patchupdateprojectsId, locationsId, targetProjectsIdrequestId, updateMaskUpdates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
deletedeleteprojectsId, locationsId, targetProjectsIdrequestIdDeletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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
locationsIdstring
projectsIdstring
targetProjectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
targetProjectIdstring
updateMaskstring (google-fieldmask)

SELECT examples​

Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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

INSERT examples​

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

INSERT INTO google.vmmigration.target_projects (
data__description,
data__project,
projectsId,
locationsId,
requestId,
targetProjectId
)
SELECT
'{{ description }}',
'{{ project }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ targetProjectId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.

UPDATE google.vmmigration.target_projects
SET
data__description = '{{ description }}',
data__project = '{{ project }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND targetProjectsId = '{{ targetProjectsId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global.

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