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:

Successful response

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, locationsIdpageSize, pageToken, filter, orderByLists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
createinsertprojectsId, locationsIdtargetProjectId, requestIdCreates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global.
patchupdateprojectsId, locationsId, targetProjectsIdupdateMask, requestIdUpdates 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__project,
data__description,
projectsId,
locationsId,
targetProjectId,
requestId
)
SELECT
'{{ project }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ targetProjectId }}',
'{{ requestId }}'
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__project = '{{ project }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND targetProjectsId = '{{ targetProjectsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
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 }}';