# REST Resource: projects.locations.imageImports.imageImportJobs

- [Resource: ImageImportJob](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob)
  - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.SCHEMA_REPRESENTATION)
  - [State](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.State)
  - [ImageImportStep](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.ImageImportStep)
    - [JSON representation](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.ImageImportStep.SCHEMA_REPRESENTATION)
  - [InitializingImageImportStep](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.InitializingImageImportStep)
  - [LoadingImageSourceFilesStep](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.LoadingImageSourceFilesStep)
  - [CreatingImageStep](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.CreatingImageStep)
- [Methods](https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#METHODS_SUMMARY)

## Resource: ImageImportJob

ImageImportJob describes the progress and result of an image import.

| JSON representation |
|---|
| ``` { "name": string, "createdResources": [ string ], "state": enum (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.State`), "createTime": string, "endTime": string, "errors": [ { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/Status`) } ], "warnings": [ { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/MigrationWarning`) } ], "steps": [ { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.ImageImportStep`) } ], // Union field `source` can be only one of the following: "cloudStorageUri": string // End of list of possible types for union field `source`. // Union field `target_details` can be only one of the following: "diskImageTargetDetails": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/DiskImageTargetDetails`) }, "machineImageTargetDetails": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/MachineImageTargetDetails`) } // End of list of possible types for union field `target_details`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource path of the ImageImportJob. |
| `createdResources[]` | `string` Output only. The resource paths of the resources created by the image import job. |
| `state` | ``enum (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.State`)`` Output only. The state of the image import. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the image import was created (as an API call, not when it was actually created in the target). A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the image import was ended. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `errors[]` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/Status`)`` Output only. Provides details on the error that led to the image import state in case of an error. |
| `warnings[]` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/MigrationWarning`)`` Output only. Warnings that occurred during the image import. |
| `steps[]` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.ImageImportStep`)`` Output only. The image import steps list representing its progress. |
| Union field `source`. `source` can be only one of the following: ||
| `cloudStorageUri` | `string` Output only. The path to the Cloud Storage file from which the image should be imported. |
| Union field `target_details`. The configuration of the resources that were created in GCP as a result of the image import. `target_details` can be only one of the following: ||
| `diskImageTargetDetails` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/DiskImageTargetDetails`)`` Output only. Target details used to import a disk image. |
| `machineImageTargetDetails` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/MachineImageTargetDetails`)`` Output only. Target details used to import a machine image. |

### State

Possible states of the image import.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state is unknown. |
| `PENDING` | The image import has not yet started. |
| `RUNNING` | The image import is active and running. |
| `SUCCEEDED` | The image import has finished successfully. |
| `FAILED` | The image import has finished with errors. |
| `CANCELLING` | The image import is being cancelled. |
| `CANCELLED` | The image import was cancelled. |

### ImageImportStep

ImageImportStep holds information about the image import step progress.

| JSON representation |
|---|
| ``` { "startTime": string, "endTime": string, // Union field `step` can be only one of the following: "initializing": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.InitializingImageImportStep`) }, "loadingSourceFiles": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.LoadingImageSourceFilesStep`) }, "adaptingOs": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/AdaptingOSStep`) }, "creatingImage": { object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.CreatingImageStep`) } // End of list of possible types for union field `step`. } ``` |

| Fields ||
|---|---|
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the step has started. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the step has ended. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| Union field `step`. `step` can be only one of the following: ||
| `initializing` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.InitializingImageImportStep`)`` Initializing step. |
| `loadingSourceFiles` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.LoadingImageSourceFilesStep`)`` Loading source files step. |
| `adaptingOs` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/AdaptingOSStep`)`` Adapting OS step. |
| `creatingImage` | ``object (`https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs#ImageImportJob.CreatingImageStep`)`` Creating image step. |

### InitializingImageImportStep

This type has no fields.
InitializingImageImportStep contains specific step details.

### LoadingImageSourceFilesStep

This type has no fields.
LoadingImageSourceFilesStep contains specific step details.

### CreatingImageStep

This type has no fields.
CreatingImageStep contains specific step details.

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs/cancel` | Initiates the cancellation of a running clone job. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs/get` | Gets details of a single ImageImportJob. |
| ### `https://docs.cloud.google.com/migrate/virtual-machines/docs/5.0/reference/rest/v1alpha1/projects.locations.imageImports.imageImportJobs/list` | Lists ImageImportJobs in a given project. |