Skip to content

EC2  >  Operations  >  import_instance

import_instance

Operation

import_instance async

import_instance(input: ImportInstanceInput, plugins: list[Plugin] | None = None) -> ImportInstanceOutput
Note

We recommend that you use the ImportImage API instead. For more information, see Importing a VM as an image using VM Import/Export in the VM Import/Export User Guide.

Creates an import instance task using metadata from the specified disk image.

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead.

For information about the import manifest referenced by this API action, see VM Import Manifest.

This API action is not supported by the Command Line Interface (CLI).

Parameters:

Name Type Description Default
input ImportInstanceInput

An instance of ImportInstanceInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ImportInstanceOutput

An instance of ImportInstanceOutput.

Input

ImportInstanceInput dataclass

Bases: _SerdeShape

Dataclass for ImportInstanceInput structure.

Attributes

description class-attribute instance-attribute
description: str | None = ...

A description for the instance being imported.

disk_images class-attribute instance-attribute
disk_images: list[DiskImage] | None = ...

The disk image.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

launch_specification class-attribute instance-attribute
launch_specification: ImportInstanceLaunchSpecification | None = ...

The launch specification.

platform class-attribute instance-attribute
platform: str | None = ...

The instance operating system.

Output

ImportInstanceOutput dataclass

Bases: _SerdeShape

Dataclass for ImportInstanceOutput structure.

Attributes

conversion_task class-attribute instance-attribute
conversion_task: ConversionTask | None = ...

Information about the conversion task.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.