Skip to content

This API action supports only single-volume VMs

Description

This API action supports only single-volume VMs. To import multi-volume VMs, use import_image instead. To import a disk to a snapshot, use import_snapshot 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).

Usage

ec2_import_volume(AvailabilityZoneId, DryRun, AvailabilityZone, Image,
  Description, Volume)

Arguments

  • AvailabilityZoneId

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

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

  • DryRun

    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.

  • AvailabilityZone

    The Availability Zone for the resulting EBS volume.

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

  • Image

    [required] The disk image.

  • Description

    A description of the volume.

  • Volume

    [required] The volume size.

Value

A list with the following syntax:

list(
  ConversionTask = list(
    ConversionTaskId = "string",
    ExpirationTime = "string",
    ImportInstance = list(
      Description = "string",
      InstanceId = "string",
      Platform = "Windows",
      Volumes = list(
        list(
          AvailabilityZone = "string",
          AvailabilityZoneId = "string",
          BytesConverted = 123,
          Description = "string",
          Image = list(
            Checksum = "string",
            Format = "VMDK"|"RAW"|"VHD",
            ImportManifestUrl = "string",
            Size = 123
          ),
          Status = "string",
          StatusMessage = "string",
          Volume = list(
            Id = "string",
            Size = 123
          )
        )
      )
    ),
    ImportVolume = list(
      AvailabilityZone = "string",
      AvailabilityZoneId = "string",
      BytesConverted = 123,
      Description = "string",
      Image = list(
        Checksum = "string",
        Format = "VMDK"|"RAW"|"VHD",
        ImportManifestUrl = "string",
        Size = 123
      ),
      Volume = list(
        Id = "string",
        Size = 123
      )
    ),
    State = "active"|"cancelling"|"cancelled"|"completed",
    StatusMessage = "string",
    Tags = list(
      list(
        Key = "string",
        Value = "string"
      )
    )
  )
)

Request syntax

svc$import_volume(
  AvailabilityZoneId = "string",
  DryRun = TRUE|FALSE,
  AvailabilityZone = "string",
  Image = list(
    Format = "VMDK"|"RAW"|"VHD",
    Bytes = 123,
    ImportManifestUrl = "string"
  ),
  Description = "string",
  Volume = list(
    Size = 123
  )
)