target_projects
Creates, updates, deletes, gets or lists a target_projects
resource.
Overview
Name | target_projects |
Type | Resource |
Id | google.vmmigration.target_projects |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the target project. |
description | string | The target project's description. |
createTime | string | Output only. The time this target project resource was created (not related to when the Compute Engine project it points to was created). |
project | string | Required. The target project ID (number) or project name. |
updateTime | string | Output only. The last time the target project resource was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, targetProjectsId | Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global . |
list | SELECT | locationsId, projectsId | Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global . |
create | INSERT | locationsId, projectsId | Creates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is global . |
delete | DELETE | locationsId, projectsId, targetProjectsId | Deletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is global . |
patch | UPDATE | locationsId, projectsId, targetProjectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.vmmigration.target_projects (
locationsId,
projectsId,
project,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ project }}',
'{{ description }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: project
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
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 }}';