Skip to content

EC2  >  Operations  >  import_volume

import_volume

Operation

import_volume async

import_volume(input: ImportVolumeInput, plugins: list[Plugin] | None = None) -> ImportVolumeOutput
Note

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead. To import a disk to a snapshot, use ImportSnapshot instead.

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

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 ImportVolumeInput

An instance of ImportVolumeInput.

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
ImportVolumeOutput

An instance of ImportVolumeOutput.

Input

ImportVolumeInput dataclass

Bases: _SerdeShape

Dataclass for ImportVolumeInput structure.

Attributes

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

The Availability Zone for the resulting EBS volume.

Either AvailabilityZone or AvailabilityZoneId must be specified, but not both.

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

The ID of the Availability Zone for the resulting EBS volume.

Either AvailabilityZone or AvailabilityZoneId must be specified, but not both.

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

A description of the volume.

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.

image class-attribute instance-attribute
image: DiskImageDetail | None = ...

The disk image.

volume class-attribute instance-attribute
volume: VolumeDetail | None = ...

The volume size.

Output

ImportVolumeOutput dataclass

Bases: _SerdeShape

Dataclass for ImportVolumeOutput 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.