Amazon Elastic Compute Cloud
API Reference (API Version 2015-04-15)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.

ImportInstance

Creates an import instance task using metadata from the specified disk image. ImportInstance only supports single-volume VMs. To import multi-volume VMs, use ImportImage. After importing the image, you then upload it using the ec2-import-volume command in the EC2 command line tools. For more information, see Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2 in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

For information about the common parameters that all actions use, see Common Query Parameters.

Description

A description for the instance being imported.

Type: String

Required: No

DiskImage.N

The disk image.

Type: DiskImage list

Required: No

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.

Type: Boolean

Required: No

LaunchSpecification

The launch specification.

Type: ImportInstanceLaunchSpecification

Required: No

Platform

The instance operating system.

Type: String

Valid Values: Windows

Required: Yes

Response Elements

The following elements are returned.

conversionTask

Information about the conversion task.

Type: ConversionTask

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Examples

Example

This example creates an import instance task that migrates a Windows Server 2008 SP2 (32-bit) VM into the AWS us-east-1 region.

Sample Request

https://ec2.amazonaws.com/?Action=ImportInstance
&LaunchSpecification.Architecture=x86_64
&LaunchSpecification.InstanceType=m1.xlarge
&DiskImage.1.Image.Format=VMDK
&DiskImage.1.Image.Bytes=1179593728
&DiskImage.1.Image.ImportManifestUrl=https://s3.amazonaws.com/myawsbucket/?a3a5e1b6-590d-43cc-97c1-15c7325d3f41/?Win_2008_Server_Data_Center_SP2_32-bit.?vmdkmanifest.xml?AWSAccessKeyId=?AKIAIOSFODNN7EXAMPLE&?Expires=1294855591&?Signature=5snej01TlTtL0uR7KExtEXAMPLE%3D
&DiskImage.1.Volume.Size=12	
&Platform=Windows
&AUTHPARAMS

Sample Response

<ImportInstanceResponse xmlns="http://ec2.amazonaws.com/doc/2015-04-15/">
  <conversionTask>
    <conversionTaskId>import-i-ffvko9js</conversionTaskId>
    <expirationTime>2010-12-22T12:01Z</expirationTime>
    <importInstance>
       <volumes>
          <item>
             <bytesConverted>0</bytesConverted>
             <availabilityZone>us-east-1a</availabilityZone>
             <image>
                <format>VMDK</format>
                <size>1179593728</size>
                <importManifestUrl>
                 https://s3.amazonaws.com/myawsbucket/?a3a5e1b6-590d-43cc-97c1-15c7325d3f41/?Win_2008_Server_Data_Center_SP2_32-bit.?vmdkmanifest.xml?AWSAccessKeyId=?AKIAIOSFODNN7EXAMPLE&?Expires=1294855591&?Signature=5snej01TlTtL0uR7KExtEXAMPLE%3D
                </importManifestUrl>
             </image>
             <description/>
             <volume>
                <size>12</size>
                <id>vol-1a2b3c4d</id>
             </volume>
             <status>active</status>
             <statusMessage/>
          </item>
       </volumes>
       <instanceId>i-12655a7f</instanceId>
       <description/>
    </importInstance>
  </conversionTask>
</ImportInstanceResponse>