Skip to main content

sources

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

Overview

Namesources
TypeResource
Idgoogle.migrationcenter.sources

Fields

NameDatatypeDescription
namestringOutput only. The full name of the source.
descriptionstringFree-text description.
createTimestringOutput only. The timestamp when the source was created.
displayNamestringUser-friendly display name.
errorFrameCountintegerOutput only. The number of frames that were reported by the source and contained errors.
managedbooleanIf true, the source is managed by other service(s).
pendingFrameCountintegerOutput only. Number of frames that are still being processed.
priorityintegerThe information confidence of the source. The higher the value, the higher the confidence.
statestringOutput only. The state of the source.
typestringData source type.
updateTimestringOutput only. The timestamp when the source was last updated.

Methods

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

SELECT examples

Lists all the sources in a given project and location.

SELECT
name,
description,
createTime,
displayName,
errorFrameCount,
managed,
pendingFrameCount,
priority,
state,
type,
updateTime
FROM google.migrationcenter.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.migrationcenter.sources (
locationsId,
projectsId,
displayName,
description,
type,
priority,
managed
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ description }}',
'{{ type }}',
'{{ priority }}',
{{ managed }}
;

UPDATE example

Updates a sources resource.

/*+ update */
UPDATE google.migrationcenter.sources
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
type = '{{ type }}',
priority = '{{ priority }}',
managed = true|false
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sourcesId = '{{ sourcesId }}';

DELETE example

Deletes the specified sources resource.

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