import_jobs
Creates, updates, deletes, gets or lists an import_jobs
resource.
Overview
Name | import_jobs |
Type | Resource |
Id | google.migrationcenter.import_jobs |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the import job. |
assetSource | string | Required. Reference to a source. |
completeTime | string (google-datetime) | Output only. The timestamp when the import job was completed. |
createTime | string (google-datetime) | Output only. The timestamp when the import job was created. |
displayName | string | Optional. User-friendly display name. Maximum length is 256 characters. |
executionReport | object | Output only. The report with the results of running the import job. (id: ExecutionReport) |
labels | object | Labels as key value pairs. |
state | string | Output only. The state of the import job. |
updateTime | string (google-datetime) | Output only. The timestamp when the import job was last updated. |
validationReport | object | Output only. The report with the validation results of the import job. (id: ValidationReport) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the import job. |
assetSource | string | Required. Reference to a source. |
completeTime | string (google-datetime) | Output only. The timestamp when the import job was completed. |
createTime | string (google-datetime) | Output only. The timestamp when the import job was created. |
displayName | string | Optional. User-friendly display name. Maximum length is 256 characters. |
executionReport | object | Output only. The report with the results of running the import job. (id: ExecutionReport) |
labels | object | Labels as key value pairs. |
state | string | Output only. The state of the import job. |
updateTime | string (google-datetime) | Output only. The timestamp when the import job was last updated. |
validationReport | object | Output only. The report with the validation results of the import job. (id: ValidationReport) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , importJobsId | view | Gets the details of an import job. |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy , view | Lists all import jobs. |
create | insert | projectsId , locationsId | importJobId , requestId | Creates an import job. |
patch | update | projectsId , locationsId , importJobsId | updateMask , requestId | Updates an import job. |
delete | delete | projectsId , locationsId , importJobsId | requestId , force | Deletes an import job. |
validate | exec | projectsId , locationsId , importJobsId | Validates an import job. | |
run | exec | projectsId , locationsId , importJobsId | Runs an import job. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
importJobsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
force | boolean | |
importJobId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
Gets the details of an import job.
SELECT
name,
assetSource,
completeTime,
createTime,
displayName,
executionReport,
labels,
state,
updateTime,
validationReport
FROM google.migrationcenter.import_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND importJobsId = '{{ importJobsId }}' -- required
AND view = '{{ view }}';
Lists all import jobs.
SELECT
name,
assetSource,
completeTime,
createTime,
displayName,
executionReport,
labels,
state,
updateTime,
validationReport
FROM google.migrationcenter.import_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}';
INSERT
examples
- create
- Manifest
Creates an import job.
INSERT INTO google.migrationcenter.import_jobs (
data__displayName,
data__labels,
data__assetSource,
projectsId,
locationsId,
importJobId,
requestId
)
SELECT
'{{ displayName }}',
'{{ labels }}',
'{{ assetSource }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ importJobId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: import_jobs
props:
- name: projectsId
value: string
description: Required parameter for the import_jobs resource.
- name: locationsId
value: string
description: Required parameter for the import_jobs resource.
- name: displayName
value: string
description: >
Optional. User-friendly display name. Maximum length is 256 characters.
- name: labels
value: object
description: >
Labels as key value pairs.
- name: assetSource
value: string
description: >
Required. Reference to a source.
- name: importJobId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
Updates an import job.
UPDATE google.migrationcenter.import_jobs
SET
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__assetSource = '{{ assetSource }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND importJobsId = '{{ importJobsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes an import job.
DELETE FROM google.migrationcenter.import_jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND importJobsId = '{{ importJobsId }}' --required
AND requestId = '{{ requestId }}'
AND force = '{{ force }}';
Lifecycle Methods
- validate
- run
Validates an import job.
EXEC google.migrationcenter.import_jobs.validate
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@importJobsId='{{ importJobsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}';
Runs an import job.
EXEC google.migrationcenter.import_jobs.run
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@importJobsId='{{ importJobsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}';