target_projects
Creates, updates, deletes, gets or lists a target_projects resource.
Overview
| Name | target_projects |
| Type | Resource |
| Id | google.vmmigration.target_projects |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The name of the target project. |
createTime | string (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). |
description | string | The target project's description. |
project | string | Required. The target project ID (number) or project name. |
updateTime | string (google-datetime) | Output only. The last time the target project resource was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The name of the target project. |
createTime | string (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). |
description | string | The target project's description. |
project | string | Required. The target project ID (number) or project name. |
updateTime | string (google-datetime) | Output only. The last time the target project resource was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, targetProjectsId | Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global. | |
list | select | projectsId, locationsId | filter, orderBy, pageToken, pageSize | Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global. |
create | insert | projectsId, locationsId | requestId, targetProjectId | Creates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global. |
patch | update | projectsId, locationsId, targetProjectsId | updateMask, requestId | Updates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global. |
delete | delete | projectsId, locationsId, targetProjectsId | requestId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
locationsId | string | |
projectsId | string | |
targetProjectsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
targetProjectId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
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
;
Lists TargetProjects in a given project. 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 filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: target_projects
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the target_projects resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the target_projects resource.
- name: description
value: "{{ description }}"
description: |
The target project's description.
- name: project
value: "{{ project }}"
description: |
Required. The target project ID (number) or project name.
- name: requestId
value: "{{ requestId }}"
- name: targetProjectId
value: "{{ targetProjectId }}"
UPDATE examples
- patch
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 updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
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 }}'
;