Skip to main content

sources

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

Overview

Namesources
TypeResource
Idgoogle.vmmigration.sources

Fields

NameDatatypeDescription
namestringOutput only. The Source name.
descriptionstringUser-provided description of the source.
awsobjectAwsSourceDetails message describes a specific source details for the AWS source type.
azureobjectAzureSourceDetails message describes a specific source details for the Azure source type.
createTimestringOutput only. The create time timestamp.
encryptionobjectEncryption message describes the details of the applied encryption.
labelsobjectThe labels of the source.
updateTimestringOutput only. The update time timestamp.
vmwareobjectVmwareSourceDetails message describes a specific source details for the vmware source type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, sourcesIdGets details of a single Source.
listSELECTlocationsId, projectsIdLists Sources in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Source in a given project and location.
deleteDELETElocationsId, projectsId, sourcesIdDeletes a single Source.
patchUPDATElocationsId, projectsId, sourcesIdUpdates the parameters of a single Source.

SELECT examples

Lists Sources in a given project and location.

SELECT
name,
description,
aws,
azure,
createTime,
encryption,
labels,
updateTime,
vmware
FROM google.vmmigration.sources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.vmmigration.sources (
locationsId,
projectsId,
vmware,
aws,
azure,
labels,
description,
encryption
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ vmware }}',
'{{ aws }}',
'{{ azure }}',
'{{ labels }}',
'{{ description }}',
'{{ encryption }}'
;

UPDATE example

Updates a sources resource.

/*+ update */
UPDATE google.vmmigration.sources
SET
vmware = '{{ vmware }}',
aws = '{{ aws }}',
azure = '{{ azure }}',
labels = '{{ labels }}',
description = '{{ description }}',
encryption = '{{ encryption }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sourcesId = '{{ sourcesId }}';

DELETE example

Deletes the specified sources resource.

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