Skip to main content

image_imports

Creates, updates, deletes, gets or lists an image_imports resource.

Overview​

Nameimage_imports
TypeResource
Idgoogle.vmmigration.image_imports

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The resource path of the ImageImport.
cloudStorageUristringImmutable. The path to the Cloud Storage file from which the image should be imported.
createTimestring (google-datetime)Output only. The time the image import was created.
diskImageTargetDefaultsobjectImmutable. Target details for importing a disk image, will be used by ImageImportJob. (id: DiskImageTargetDetails)
encryptionobjectImmutable. The encryption details used by the image import process during the image adaptation for Compute Engine. (id: Encryption)
machineImageTargetDefaultsobjectImmutable. Target details for importing a machine image, will be used by ImageImportJob. (id: MachineImageTargetDetails)
recentImageImportJobsarrayOutput only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, imageImportsIdGets details of a single ImageImport.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenLists ImageImports in a given project.
createinsertprojectsId, locationsIdimageImportId, requestIdCreates a new ImageImport in a given project.
deletedeleteprojectsId, locationsId, imageImportsIdrequestIdDeletes a single ImageImport.

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.

NameDatatypeDescription
imageImportsIdstring
locationsIdstring
projectsIdstring
filterstring
imageImportIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples​

Gets details of a single ImageImport.

SELECT
name,
cloudStorageUri,
createTime,
diskImageTargetDefaults,
encryption,
machineImageTargetDefaults,
recentImageImportJobs
FROM google.vmmigration.image_imports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND imageImportsId = '{{ imageImportsId }}' -- required
;

INSERT examples​

Creates a new ImageImport in a given project.

INSERT INTO google.vmmigration.image_imports (
data__cloudStorageUri,
data__diskImageTargetDefaults,
data__encryption,
data__machineImageTargetDefaults,
projectsId,
locationsId,
imageImportId,
requestId
)
SELECT
'{{ cloudStorageUri }}',
'{{ diskImageTargetDefaults }}',
'{{ encryption }}',
'{{ machineImageTargetDefaults }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ imageImportId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples​

Deletes a single ImageImport.

DELETE FROM google.vmmigration.image_imports
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND imageImportsId = '{{ imageImportsId }}' --required
AND requestId = '{{ requestId }}'
;