import_jobs
Creates, updates, deletes, gets or lists a import_jobs
resource.
Overview
Name | import_jobs |
Type | Resource |
Id | google.migrationcenter.import_jobs |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the import job. |
assetSource | string | Required. Reference to a source. |
completeTime | string | Output only. The timestamp when the import job was completed. |
createTime | string | Output only. The timestamp when the import job was created. |
displayName | string | Optional. User-friendly display name. Maximum length is 256 characters. |
executionReport | object | A resource that reports result of the import job execution. |
labels | object | Labels as key value pairs. |
state | string | Output only. The state of the import job. |
updateTime | string | Output only. The timestamp when the import job was last updated. |
validationReport | object | A resource that aggregates errors across import job files. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | importJobsId, locationsId, projectsId | Gets the details of an import job. |
list | SELECT | locationsId, projectsId | Lists all import jobs. |
create | INSERT | locationsId, projectsId | Creates an import job. |
delete | DELETE | importJobsId, locationsId, projectsId | Deletes an import job. |
patch | UPDATE | importJobsId, locationsId, projectsId | Updates an import job. |
run | EXEC | importJobsId, locationsId, projectsId | Runs an import job. |
validate | EXEC | importJobsId, locationsId, projectsId | Validates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.migrationcenter.import_jobs (
locationsId,
projectsId,
displayName,
labels,
assetSource
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ labels }}',
'{{ assetSource }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: completeTime
value: string
- name: state
value: string
- name: labels
value: object
- name: assetSource
value: string
- name: validationReport
value:
- name: fileValidations
value:
- - name: fileName
value: string
- name: rowErrors
value:
- - name: rowNumber
value: integer
- name: vmName
value: string
- name: vmUuid
value: string
- name: errors
value:
- - name: errorDetails
value: string
- name: severity
value: string
- name: csvError
value:
- name: rowNumber
value: integer
- name: xlsxError
value:
- name: sheet
value: string
- name: rowNumber
value: integer
- name: partialReport
value: boolean
- name: fileErrors
value:
- - name: errorDetails
value: string
- name: severity
value: string
- name: jobErrors
value:
- - name: errorDetails
value: string
- name: severity
value: string
- name: executionReport
value:
- name: framesReported
value: integer
- name: totalRowsCount
value: integer
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 }}';