---
title: "POST /v1/{+parent}/imageImports"
method: POST
path: "/v1/{+parent}/imageImports"
tags: ["projects"]
---

# POST /v1/{+parent}/imageImports

`POST /v1/{+parent}/imageImports`

Creates a new ImageImport in a given project.

## Path parameters

- `parent` string, required

## Query parameters

- `imageImportId` string
- `requestId` string

## Request body

- ImageImport — ImageImport describes the configuration of the image import to run.
  - `cloudStorageUri` string — Immutable. The path to the Cloud Storage file from which the image should be imported.
  - `diskImageTargetDefaults` DiskImageTargetDetails — The target details of the image resource that will be created by the import job.
    - `encryption` Encryption — Encryption message describes the details of the applied encryption.
      - `kmsKey` string — Required. The name of the encryption key that is stored in Google Cloud KMS.
    - `familyName` string — Optional. The name of the image family to which the new image belongs.
    - `singleRegionStorage` boolean — Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.
    - `targetProject` string — Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.
    - `dataDiskImageImport` DataDiskImageImport — Used when the image import is not using OS adaptation process.
      - `guestOsFeatures` string[] — Optional. A list of guest OS features to apply to the imported image. These features are flags that are used by Compute Engine to enable certain capabilities for virtual machine instances that are created from the image. This field does not change the OS of the image; it only marks the image with the specified features. The user must ensure that the OS is compatible with the features. For a list of available features, see https://cloud.google.com/compute/docs/images/create-custom#guest-os-features.
    - `description` string — Optional. An optional description of the image.
    - `imageName` string — Required. The name of the image to be created.
    - `labels` object — Optional. A map of labels to associate with the image.
    - `osAdaptationParameters` ImageImportOsAdaptationParameters — Parameters affecting the OS adaptation process.
      - `bootConversion` 'BOOT_CONVERSION_UNSPECIFIED' | 'NONE' | 'BIOS_TO_EFI' — Optional. By default the image will keep its existing boot option. Setting this property will trigger an internal process which will convert the image from using the existing boot option to another. The size of the boot disk might be increased to allow the conversion
      - `generalize` boolean — Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).
      - `adaptationModifiers` AdaptationModifier[] — Optional. Modifiers to be used as configuration of the OS adaptation process.
        - `value` string — Optional. The value of the modifier. The actual value depends on the modifier and can also be empty.
        - `modifier` string — Optional. The modifier name.
      - `licenseType` 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT' | 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG' | 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL' — Optional. Choose which type of license to apply to the imported image.
    - `additionalLicenses` string[] — Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME
  - `name` string — Output only. The resource path of the ImageImport.
  - `machineImageTargetDefaults` MachineImageTargetDetails — The target details of the machine image resource that will be created by the image import job.
    - `targetProject` string — Required. Reference to the TargetProject resource that represents the target project in which the imported machine image will be created.
    - `encryption` Encryption — Encryption message describes the details of the applied encryption.
      - `kmsKey` string — Required. The name of the encryption key that is stored in Google Cloud KMS.
    - `additionalLicenses` string[] — Optional. Additional licenses to assign to the instance created by the machine image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME
    - `tags` string[] — Optional. The tags to apply to the instance created by the machine image.
    - `serviceAccount` ServiceAccount — Service account to assign to the instance created by the machine image.
      - `email` string — Required. The email address of the service account.
      - `scopes` string[] — Optional. The list of scopes to be made available for this service account.
    - `skipOsAdaptation` SkipOsAdaptation — Mentions that the machine image import is not using OS adaptation process.
    - `description` string — Optional. An optional description of the machine image.
    - `machineImageParametersOverrides` MachineImageParametersOverrides — Parameters overriding decisions based on the source machine image configurations.
      - `machineType` string — Optional. The machine type to create the MachineImage with. If empty, the service will choose a relevant machine type based on the information from the source image. For more information about machine types, please refer to https://cloud.google.com/compute/docs/machine-resource.
    - `networkInterfaces` NetworkInterface[] — Optional. The network interfaces to create with the instance created by the machine image. Internal and external IP addresses, and network tiers are ignored for machine image import.
      - `networkTier` 'COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED' | 'NETWORK_TIER_STANDARD' | 'NETWORK_TIER_PREMIUM' — Optional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.
      - `network` string — Optional. The network to connect the NIC to.
      - `subnetwork` string — Optional. The subnetwork to connect the NIC to.
      - `internalIp` string — Optional. The internal IP to define in the NIC. The formats accepted are: `ephemeral` \ ipv4 address \ a named address resource full path.
      - `externalIp` string — Optional. The external IP to define in the NIC.
    - `singleRegionStorage` boolean — Optional. Set to true to set the machine image storageLocations to the single region of the import job. When false, the closest multi-region is selected.
    - `machineImageName` string — Required. The name of the machine image to be created.
    - `osAdaptationParameters` ImageImportOsAdaptationParameters — Parameters affecting the OS adaptation process.
      - `bootConversion` 'BOOT_CONVERSION_UNSPECIFIED' | 'NONE' | 'BIOS_TO_EFI' — Optional. By default the image will keep its existing boot option. Setting this property will trigger an internal process which will convert the image from using the existing boot option to another. The size of the boot disk might be increased to allow the conversion
      - `generalize` boolean — Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).
      - `adaptationModifiers` AdaptationModifier[] — Optional. Modifiers to be used as configuration of the OS adaptation process.
        - `value` string — Optional. The value of the modifier. The actual value depends on the modifier and can also be empty.
        - `modifier` string — Optional. The modifier name.
      - `licenseType` 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT' | 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG' | 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL' — Optional. Choose which type of license to apply to the imported image.
    - `shieldedInstanceConfig` ShieldedInstanceConfig — Shielded instance configuration.
      - `enableIntegrityMonitoring` boolean — Optional. Defines whether the instance created by the machine image has integrity monitoring enabled. This can be set to true only if the image boot option is EFI, and vTPM is enabled.
      - `enableVtpm` boolean — Optional. Defines whether the instance created by the machine image has vTPM enabled. This can be set to true only if the image boot option is EFI.
      - `secureBoot` 'SECURE_BOOT_UNSPECIFIED' | 'TRUE' | 'FALSE' — Optional. Defines whether the instance created by the machine image has Secure Boot enabled. This can be set to true only if the image boot option is EFI.
    - `labels` object — Optional. The labels to apply to the instance created by the machine image.
  - `createTime` string, google-datetime — Output only. The time the image import was created.
  - `recentImageImportJobs` ImageImportJob[] — Output only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.
    - `steps` ImageImportStep[] — Output only. The image import steps list representing its progress.
      - `loadingSourceFiles` LoadingImageSourceFilesStep — LoadingImageSourceFilesStep contains specific step details.
      - `adaptingOs` AdaptingOSStep — AdaptingOSStep contains specific step details.
      - `startTime` string, google-datetime — Output only. The time the step has started.
      - `initializing` InitializingImageImportStep — InitializingImageImportStep contains specific step details.
      - `creatingImage` CreatingImageStep — CreatingImageStep contains specific step details.
      - `endTime` string, google-datetime — Output only. The time the step has ended.
    - `errors` Status[] — Output only. Provides details on the error that led to the image import state in case of an error.
      - `details` object[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
      - `message` string — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      - `code` integer — The status code, which should be an enum value of google.rpc.Code.
    - `diskImageTargetDetails` DiskImageTargetDetails — The target details of the image resource that will be created by the import job.
      - `encryption` Encryption — Encryption message describes the details of the applied encryption.
        - `kmsKey` string — Required. The name of the encryption key that is stored in Google Cloud KMS.
      - `familyName` string — Optional. The name of the image family to which the new image belongs.
      - `singleRegionStorage` boolean — Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.
      - `targetProject` string — Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.
      - `dataDiskImageImport` DataDiskImageImport — Used when the image import is not using OS adaptation process.
        - `guestOsFeatures` string[] — Optional. A list of guest OS features to apply to the imported image. These features are flags that are used by Compute Engine to enable certain capabilities for virtual machine instances that are created from the image. This field does not change the OS of the image; it only marks the image with the specified features. The user must ensure that the OS is compatible with the features. For a list of available features, see https://cloud.google.com/compute/docs/images/create-custom#guest-os-features.
      - `description` string — Optional. An optional description of the image.
      - `imageName` string — Required. The name of the image to be created.
      - `labels` object — Optional. A map of labels to associate with the image.
      - `osAdaptationParameters` ImageImportOsAdaptationParameters — Parameters affecting the OS adaptation process.
        - `bootConversion` 'BOOT_CONVERSION_UNSPECIFIED' | 'NONE' | 'BIOS_TO_EFI' — Optional. By default the image will keep its existing boot option. Setting this property will trigger an internal process which will convert the image from using the existing boot option to another. The size of the boot disk might be increased to allow the conversion
        - `generalize` boolean — Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).
        - `adaptationModifiers` AdaptationModifier[] — Optional. Modifiers to be used as configuration of the OS adaptation process.
          - `value` string — Optional. The value of the modifier. The actual value depends on the modifier and can also be empty.
          - `modifier` string — Optional. The modifier name.
        - `licenseType` 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT' | 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG' | 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL' — Optional. Choose which type of license to apply to the imported image.
      - `additionalLicenses` string[] — Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME
    - `endTime` string, google-datetime — Output only. The time the image import was ended.
    - `warnings` MigrationWarning[] — Output only. Warnings that occurred during the image import.
      - `warningTime` string, google-datetime — The time the warning occurred.
      - `code` 'WARNING_CODE_UNSPECIFIED' | 'ADAPTATION_WARNING' — The warning code.
      - `warningMessage` LocalizedMessage — Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
        - `locale` string — The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
        - `message` string — The localized error message in the above locale.
      - `helpLinks` Link[] — Output only. URL(s) pointing to additional information on handling the current warning.
        - `description` string — Describes what the link offers.
        - `url` string — The URL of the link.
      - `actionItem` LocalizedMessage — Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
        - `locale` string — The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
        - `message` string — The localized error message in the above locale.
    - `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.
    - `machineImageTargetDetails` MachineImageTargetDetails — The target details of the machine image resource that will be created by the image import job.
      - `targetProject` string — Required. Reference to the TargetProject resource that represents the target project in which the imported machine image will be created.
      - `encryption` Encryption — Encryption message describes the details of the applied encryption.
        - `kmsKey` string — Required. The name of the encryption key that is stored in Google Cloud KMS.
      - `additionalLicenses` string[] — Optional. Additional licenses to assign to the instance created by the machine image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME
      - `tags` string[] — Optional. The tags to apply to the instance created by the machine image.
      - `serviceAccount` ServiceAccount — Service account to assign to the instance created by the machine image.
        - `email` string — Required. The email address of the service account.
        - `scopes` string[] — Optional. The list of scopes to be made available for this service account.
      - `skipOsAdaptation` SkipOsAdaptation — Mentions that the machine image import is not using OS adaptation process.
      - `description` string — Optional. An optional description of the machine image.
      - `machineImageParametersOverrides` MachineImageParametersOverrides — Parameters overriding decisions based on the source machine image configurations.
        - `machineType` string — Optional. The machine type to create the MachineImage with. If empty, the service will choose a relevant machine type based on the information from the source image. For more information about machine types, please refer to https://cloud.google.com/compute/docs/machine-resource.
      - `networkInterfaces` NetworkInterface[] — Optional. The network interfaces to create with the instance created by the machine image. Internal and external IP addresses, and network tiers are ignored for machine image import.
        - `networkTier` 'COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED' | 'NETWORK_TIER_STANDARD' | 'NETWORK_TIER_PREMIUM' — Optional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.
        - `network` string — Optional. The network to connect the NIC to.
        - `subnetwork` string — Optional. The subnetwork to connect the NIC to.
        - `internalIp` string — Optional. The internal IP to define in the NIC. The formats accepted are: `ephemeral` \ ipv4 address \ a named address resource full path.
        - `externalIp` string — Optional. The external IP to define in the NIC.
      - `singleRegionStorage` boolean — Optional. Set to true to set the machine image storageLocations to the single region of the import job. When false, the closest multi-region is selected.
      - `machineImageName` string — Required. The name of the machine image to be created.
      - `osAdaptationParameters` ImageImportOsAdaptationParameters — Parameters affecting the OS adaptation process.
        - `bootConversion` 'BOOT_CONVERSION_UNSPECIFIED' | 'NONE' | 'BIOS_TO_EFI' — Optional. By default the image will keep its existing boot option. Setting this property will trigger an internal process which will convert the image from using the existing boot option to another. The size of the boot disk might be increased to allow the conversion
        - `generalize` boolean — Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).
        - `adaptationModifiers` AdaptationModifier[] — Optional. Modifiers to be used as configuration of the OS adaptation process.
          - `value` string — Optional. The value of the modifier. The actual value depends on the modifier and can also be empty.
          - `modifier` string — Optional. The modifier name.
        - `licenseType` 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT' | 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG' | 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL' — Optional. Choose which type of license to apply to the imported image.
      - `shieldedInstanceConfig` ShieldedInstanceConfig — Shielded instance configuration.
        - `enableIntegrityMonitoring` boolean — Optional. Defines whether the instance created by the machine image has integrity monitoring enabled. This can be set to true only if the image boot option is EFI, and vTPM is enabled.
        - `enableVtpm` boolean — Optional. Defines whether the instance created by the machine image has vTPM enabled. This can be set to true only if the image boot option is EFI.
        - `secureBoot` 'SECURE_BOOT_UNSPECIFIED' | 'TRUE' | 'FALSE' — Optional. Defines whether the instance created by the machine image has Secure Boot enabled. This can be set to true only if the image boot option is EFI.
      - `labels` object — Optional. The labels to apply to the instance created by the machine image.
    - `createTime` string, google-datetime — Output only. The time the image import was created (as an API call, not when it was actually created in the target).
    - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELLING' | 'CANCELLED' — Output only. The state of the image import.
    - `cloudStorageUri` string — Output only. The path to the Cloud Storage file from which the image should be imported.
  - `encryption` Encryption — Encryption message describes the details of the applied encryption.
    - `kmsKey` string — Required. The name of the encryption key that is stored in Google Cloud KMS.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/vmmigration.md) · [All operations](https://skmtc.net/google/apis/vmmigration/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/vmmigration/versions/c812c34615f3/schema)
