Skip to main content

import_jobs

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

Overview

Nameimport_jobs
TypeResource
Idgoogle.migrationcenter.import_jobs

Fields

NameDatatypeDescription
namestringOutput only. The full name of the import job.
assetSourcestringRequired. Reference to a source.
completeTimestringOutput only. The timestamp when the import job was completed.
createTimestringOutput only. The timestamp when the import job was created.
displayNamestringOptional. User-friendly display name. Maximum length is 256 characters.
executionReportobjectA resource that reports result of the import job execution.
labelsobjectLabels as key value pairs.
statestringOutput only. The state of the import job.
updateTimestringOutput only. The timestamp when the import job was last updated.
validationReportobjectA resource that aggregates errors across import job files.

Methods

NameAccessible byRequired ParamsDescription
getSELECTimportJobsId, locationsId, projectsIdGets the details of an import job.
listSELECTlocationsId, projectsIdLists all import jobs.
createINSERTlocationsId, projectsIdCreates an import job.
deleteDELETEimportJobsId, locationsId, projectsIdDeletes an import job.
patchUPDATEimportJobsId, locationsId, projectsIdUpdates an import job.
runEXECimportJobsId, locationsId, projectsIdRuns an import job.
validateEXECimportJobsId, locationsId, projectsIdValidates an import job.

SELECT examples

Lists all import jobs.

SELECT
name,
assetSource,
completeTime,
createTime,
displayName,
executionReport,
labels,
state,
updateTime,
validationReport
FROM google.migrationcenter.import_jobs
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.migrationcenter.import_jobs (
locationsId,
projectsId,
displayName,
labels,
assetSource
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ labels }}',
'{{ assetSource }}'
;

UPDATE example

Updates a import_jobs resource.

/*+ update */
UPDATE google.migrationcenter.import_jobs
SET
displayName = '{{ displayName }}',
labels = '{{ labels }}',
assetSource = '{{ assetSource }}'
WHERE
importJobsId = '{{ importJobsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified import_jobs resource.

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